better living through python

An adventure in programming and recovery.

How much is too much?

April 24, 2012

One of the issues I come up against is knowing when you’re telling too much. Either telling too much about a situation, a product, or something closer to home.

I was absent at the end of last week, and my apologies for that. I had every intention of posting on Thursday and Friday, however some things came up in my life that took precedence. Such situations aren’t uncommon in my life, in fact they’re more common than I would ever prefer them to be.

Sometimes a person’s life can be a certain way, and there is only so much they can do to mitigate it. For example, a person born to a drug-addicted mother and absent father can only do so much to deal with those issues. Although that’s not my personal experience, I know that everyone has people in their lives that are unavoidable but can still create large bumps in the road.

Everyone has parts or people in their lives that they devote to aiding and improving. Sometimes you’ll find that you have trouble living your life without seeing serious side-effects from these things infest your emotions and choices in everything else you do.

This is where the question of enabling comes in. How do you know you’re doing enough, but still not enabling? How, also, do you make a choice if you know a possible side-effect may cost the mental health and emotional well being of a child? How do you draw the line when it comes to the life of child?

South-eastern Oregon Trip, day four

April 23, 2012

Day four mileage - 309 miles

Our first scheduled stop of the day was in Burns, OR. On the way there we took many side roads and visited a variety of things.

As it was the season for bird watching we often stopped at small ponds or lakes and pulled out the binoculors. My favorite stop of the day was at Diamond Craters. We only really had time to stop at one of the craters, but it was definitely worth it.

My family viewing one of the craters

We were originally planning on stopping for the night in Bend, OR. Once we arrived in Bend all of us were ready to head home. It had been a rather long trip already, and when we were within 3 hours of home with enough day light to make it through the mountains it seemed rather silly to stop for the night.

And that’s our trip! Despite it being unadorned with famous places or landmarks it was still fun and relaxing. Keeping it so flexible allowed us to be more spontaneous in our choices. Don’t get me wrong some planned trips are really fun too, but sometimes they can just feel like work.

Tomorrow we return to normal blog posts, programming tidbits, recovery reflections and probably rainy Oregon sunshine.

South-eastern Oregon Trip, day three

April 18, 2012

Day three mileage - 190 miles

We were out on the road earlier today. We grabbed coffee at the local drive through coffee hut and started down Hwy 140, Warner Hwy. We stopped several places on the road on the way to our lunch stop in Denio, Nevada. We took a couple of photos of the local scenery, wildlife, and the random highway cattle-drive. See the photo album for images of irritated cows.

Denio, Nevada (which on our map looked like a city), is now called simply ‘Denio Junction’ on Googlemaps. Rightly so, this is no longer a town, it doesn’t even have a gas station. Luckily we bought gas in Adel, OR before crossing over into barren Northern Nevada. There were quite a few rabbits to be seen however.

After driving another 2 hours north we arrived at the historic Frenchglen Hotel. Very nice people, an amazing family style dinner (although a little spendy), and lots of local trails to meander down. Alex and I took off towards one of the small local hot springs.

Chillin Juniper Tree and Alex

It was bird watching season for the Frenchglen Hotel, and many of the people we met were packing binoculors and bird identification guides. The next day we checked out several of the side roads and were able to view a large variety of migrating wildlife in the local Wildlife National Refuge.

We ended our third night playing the Looney Toons version of Monopoly before heading up to bed. Tons of laughing, tons of Grandma cheating (she’s prone to cheating at games), and tons of trying to teach my niece and nephew how to catch her at it. Probably my favorite place during the trip.

South-eastern Oregon Trip, day two

April 17, 2012

Day two mileage - 175 miles

We began today by roaming around Medford before hitting the road. We visited a local bakery called Berg’s Bakery & Bistro. They had a decent selection of sweet treats and donuts. I purchased a bear claw and enjoyed myself immensely.

Once on the road we headed north towards Eagle Point, and visited the old Butte Creek Mill. The mill is still in operation and you can purchase a variety of tasty looking things inside. There is also a small museum including a variety of artifacts from the time.

Nazi biscuits and swastika sodas from the early 30s

One picture of particular interest includes some historical items on display inside the store. Specifically the very unexpected Nazi paraphernalia.

After Eagle Point we continued down the Kalamath Falls - Lakeview Highway until we reached Stevenson park, located just outside of Dairy, OR. We took a brief lunch respite, and then continued to Bly. At Bly we checked out the local Antique store (which had a horde of antiques in good condition all tucked away in this small store) and I grabbed a picture of the local Theatre. I’m not sure if this theatre is in use, but it was recently remodeled.

Continuing on we entered the Fremont National Forest. Although pretty, it was nothing like the forests of the more central and northern Cascades. Expect red roads and pine trees.

In Lakeview we visited the Old Perpetual Geyser.

Old Perpetual Geyser

All I can say is that it’s consistent. Then we drove around town and settled down in our hotel for the night.

South-eastern Oregon Trip, day one

April 16, 2012

A total of four days and over 900 miles later I have returned from my loop round south-eastern Oregon. Beginning and ending in Corvallis, I took a ton of photos (as requested), and generally learned much more about a normally unknown area of the world. We averaged about 200 miles per day including lots of stops for photos and for learning local historical tidbits as we found them.

I’ve created a new photo album for my trip and have shared it here via picasa. Many of the photos have more information listed with them, so make sure to read the details. The actual route is also shown on the roadmaps, identified by day traveled. This should help with locating approx. where each picture was taken and when.

Day one mileage - 208 miles

As with many family trips, things can sometimes change at the last minute. Originally this trip was to be just my mother, nephew Alex and I, however last minute my niece Kate ending up joining us. Kate is awesome, and so the trip continued to be much fun. Starting out around 11am we headed south on I-5.

I-5 tends to be a rather fast-paced route as it’s one of the major interstates in Oregon. We also didn’t make many sidetrips this first day. We attempted to visit the Applegate trail museum right off the highway, however it was closed until May. Instead we checked out the local covered bridge over Grave Creek.

Grave Creek Covered Bridge

Covered bridges are kind of a big deal in Oregon.

We spent some time in Medford hanging around, checking out bakeries, going shopping a bit, preparing for the trip over the southern cascades we would take the next day. We stayed at a Quaint, cozy apartment in Medford. I really liked the place, however it was a bit small for four people and perfect for two.

Upcoming trip

April 09, 2012

This upcoming Wednesday I will be going on a trip around Oregon with my mother and nephew. The hope is to see parts of Southeastern Oregon that most people never visit. I spent a good half of Sunday planning the trip.

I haven’t been able to program lately. I spent the end of last week and today (and soon to be tomorrow) translating. I would love to work on it, but after 8 hours of translation each day I’m rather worn out. I’ll post information and details about where I traveled once I return.

I’ve finally started running again after I sprained my ankle about a month ago. It’s very slow going. I don’t think I realized just how fast I was running back then, because right now I feel like a snail.

Anyways, it’s time I should be heading to bed. It’s been a long day, and tomorrow will be even longer.

File creation within a browser and the .json file

April 06, 2012

The last function of the CSP Schedule Converter code written is a function that puts the data produced in the previous functions into their subsequent files. Here is the code, shown below:

var downloadDataURI = function(options) {
    options.url || (options.url = "http://download-data-uri.appspot.com/");
    $j('<form method="post" action="'+options.url+'" style="display:none">
    <input type="hidden"name="filename" value="'+options.filename+'"/>
    <input type="hidden" name="data" value="'+options.data+'"/></form>')
    .submit().remove();}

The first line first asks whether there is an options.url location already in existence. If there isn’t one, then it uses the one shown in the second section of this line. This is necessary, however why will not make sense until I explain the next function shown.

This next function is a jQuery function that creates a form, inputs all the information created by the previous functions discussed, and then submits it and then hides the form. In order to create a file, like I wanted to here, you must submit the information into a form.

The important part of the options.url is that the form cannot be submitted unless the options.url has a location specified. The last aspect of creating this page action for the Chrome web store, was the creation of a manifest.json file.

This file specifies all the necessary information for the page action. You start by creating a file called ‘manifest.json’. Inside of this file the following information is contained:

{
  "name": "CSP Game Schedule Converter",
  "version": "1.1",
  "icons": {"128": "icon.png"},
  "description": "Creates downloadable ics and csv 
  files that you can import into Microsoft Outlook, iCalendar, 
  and Gmail Calendar.",

  "content_scripts": [
    {
      "matches": ["https://secure.sports-it.com/mysam/*"],
      "js": ["jquery-1.5.1.min.js","cspcalendar.js"],
      "run_at": "document_end"  
    }  
  ]
}    

In the first section shown the name (CSP Game Schedule Converter), version (1.1), icons (128, icon.png) and description are specified. This information is contained in an array, that Chrome interprets. The second section is the information needed to process all of the code. The first list, matches is the webpage when the script should run. The js is the name or names of the files to be run once the appropriate pages have been opened. The last part run_at indicates when the javascript files should be run (which in this case is once the page is done loading).

The last part needed was to put all of these files into one file folder and zip the folder. These files are the cspcalendar.js, jquery-1.5.1.min, manifest.json, final32.png and icon.png. Then the zipped folder is loaded into the Chrome web store. Once those aspects are completed, simply install the page action into your Chrome browser via the web store and you’re good to go.

Reflections on my interview

April 05, 2012

Rehashing on everything that happened for 90 minutes. Deliberatly remembering all the things that made me quit my previous job. Explaining them to someone else.

I thought that this experience was going to be severely painful. I expected to cry. I didn’t.

I didn’t feel crazy for reacting the way I did. Discussing what happened and how I reacted, I realized just how much I was trying to make the whole thing work. It wasn’t just me repeating what other people said. “Yes, I know. Yes, I’m not crazy…” On and on my list goes of all the things that I still felt were my fault.

Now I know that I wasn’t crazy. Now I know that it was real, and not just something I made up in my head. It’s so incredibly empowering. It’s insane the effect that kind of thing has on your confidence. It’s a good sign.

I participated in a bullying study

April 04, 2012

I don’t have much to post today, except that I took part in the bullying study earlier this morning. The interview took about 90 minutes in total. It felt like I was actually able to use my experiences for something positive, not just as memories to fuel my own self doubt and anger. It felt good.

I signed up for a bullying study

April 03, 2012

I’ve been wanting to for over a year now, however the first one I found a year ago asked only for participants whose experience had been over a year prior. Anyways, it finally happened. Paperwork is in, and I’m crossing my fingers that I get to help out.

However even seeing the word bullying or bully is now a trigger. I could feel the anxiety in me rise as I started to read some of the pdfs they sent me. I know I can have a tendency to worry too much, and react to peoples reactions as if they are acting passive-agressively even if they aren’t. My experience was not just because of me…I was blamed for something I could prove wasn’t my fault and no one bothered to do anything to show they even believed me.

Reading over some of the sample interview questions I was reminded of some recent information I found out. My prior superior was recently promoted into a position that has no subordinates. That partially makes me feel better, except that she still got a pay raise. I know that’s how things work, it still angers me dangerously. Why promote someone who isn’t doing their job?

You know what I asked for from the whole investigation? An apology from my superior for her behavior and to be taken off of probation. That was it. Considering I had proved I was not at fault for the occurance that put me there in the first place, I didn’t understand how difficult that was to ask for. I remember HR telling me, we don’t feel we should ask her to apologize for something we can’t prove happened.

Basically I was expendable. It’s true, that position was something they could have easily filled. It still doesn’t make it right that they allowed it to happen in the first place. I think, more than anything, I just want her to admit that it happened.

Links