Freelancing Observations

September 1st, 2010

This week I started my life as a full time freelance developer/engineer/programmer/whatever you want to call it. Prior to this, I had spent all of my working years commuting to offices of various clients and sitting in various shades of beige cubicles. I found some websites that let you search nationwide for jobs and I’m fortunate enough to have a skillset that’s in demand, so why not?

There are 5 Starbucks, a Barnes and Noble, a Borders, and 3 libraries within just a couple of miles of my house, so it shouldn’t be too hard to find a place to work (with free WiFi!) each day. Why don’t I just work from my house? I’m afraid the temptation would be too great to take a nap, especially when I see my dogs completely passed out. Sleep is contagious. Besides, I like the hustle and bustle of being in public places.

So yesterday was my first day at this, and I decided to try the Starbucks closest to my house. I think I stayed there too long as I ended up smelling like a coffee. I also realized I didn’t realize how loud Starbucks can be, especially if they are playing music you don’t like. I heard “Fly me to the moon” by Frank Sinatra 3 times. I think their music is on some kind of loop. This particular Starbucks plays their music extra loud, which makes it so even if you have on headphones, you can’t hear Pandora — kind of like being on a plane. I went to Amazon and ordered a pair of noise canceling headphones. I think they’ll be a necessity.

I also came to the conclusion that it’s not ideal to sit in the same place all day. I will switch around.

This morning I worked at the local library. One surprising thing I noticed is that parents drop their kids off and leave them there, like a giant daycare. There was this one gang of 7 year olds walking around until a librarian stopped them and asked where their mother was. “Not here” the little girl gangleader said as she took out her phone. “Can you call her?” the librarian asked. “I don’t know how to use my phone” the girl replied. “Come with me” the librarian said and summoned the gang to follow here. When I checked some things out later on I asked the librarian and she said it’s a really big issue. Who knew!

This afternoon I went to a different Starbucks with my noise cancelling headphones (I really love Amazon Prime). They work great and now I can enjoy all of the hustle and bustle without actually having to hear people.

One final observation… It is over 95 degrees today here right outside of Boston, and I don’t think the elderly like the heat. The roads are pretty empty as was the bank. In fact, there was not one other person in this usually busy branch. I asked the banker and they indeed confirmed that there has been a glaring lack of old people out and about today.

Amazon, SimpleDB, and Base64

November 11th, 2008

The other day I made some changes to the way I am storing data in SimpleDB, part of Amazon Web Services. Instead of storing one data field per attribute, I store several delimited data fields in one attribute, which is more efficient for my needs. I used to use a ~ as a delimiter, but I decided to change the delimiter to a non-printable character code. Suddenly, my data was not returning the way I had saved it and my application was choking on it.

It turns out that Amazon changed the way they handle data storage a few months ago. It didn’t apply to me at the time I read the release notes, so I skipped over it. If there is a non-standard XML character in your data, they will automatically Base64 encode it. Took a while to figure this out. I decided to base64 encode when saving the delimited data and base64 decode upon retrieval. This way, I am not relying on Amazon to provide only encoded data. It is better to have the same data return as what you put in.

Upgrading Flex Builder to Flex SDK 3.1

November 11th, 2008

Maybe I am not subscribed to the proper notifications, but until last night I had no idea that there was a new Flex SDK version. You would think that since I purchased the application, my email address would become part of a notification list for upgrades. They certainly email me frequently about Creative Suite upgrades. Who knows.

I was having an issue where when I right-clicked on my episend message elements, the cursor would disappear after the menu went away. I tried all different combinations of CursorManager.ShowCursor(), CursorManager.RemoveAllCursors(), and Mouse.Show() in all different events. Nothing. So I did a search in Google and came across a list of bugs that was fixed in SDK 3.1. Wait a minute. Fixed as in past tense as in 3.1 already exists.

So I did a search for Flex SDK 3.1 and found the general Flex download page where you can download the Flex SDK or a trial version of Flex Builder. I couldn’t find much about upgrading an existing FlexBuilder installation to SDK 3.1. They have a page where Matt Chotin talks about upgrading to Air 1.1 (http://www.adobe.com/devnet/flex/articles/flex_air1.1.html and on that page he links to instructions for upgrading your SDK, but it must be a wrong link because I did not see instructions on the page he provided: http://livedocs.adobe.com/flex/3/html/build_6.html#162812. So I will give you the process I took to upgrade my SDK. It worked on both my home machine and office machine, one XP and the other Vista.

1) Download the 3.1 SDK zip file to your PC. The direct link to the SDK is:
http://download.macromedia.com/pub/flex/sdk/flex_sdk_3.zip

If that link doesn’t work for you, go to the general download page (http://www.adobe.com/products/flex/flexdownloads/), check the box that you agree to whatever they are asking you to agree to, and download the SDK.

2) Close Flex Builder and any running Flex or Air apps you have running.

3) Hopefully you have WinZip or another such unzipping tool and aren’t relying on the built-in Windows unzipper. You want to unzip the contents of the zip file, while preserving the directory structure and overwriting existing folders and files, to the SDK directory in your Flex setup. For me, this was c:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0 .

4) Launch Flex Builder and verify the new version by right clicking a project, clicking Properties, and selecting Flex Compiler. You should see “currently ‘Flex 3.1′” as your SDK version in the right hand pane.

5) Read Matt Chotin’s page (linked to above) to see if any of the manual post-upgrade procedures apply to you. They did not apply to me.

Good luck.

Sorting in Amazon SDB

October 28th, 2008

In July, Amazon Web Services released the ability to sort on SimpleDB queries. Prior to that, there was no guarantee of what order your result sets would come back in.

The syntax is pretty straightforward, just add sort asc or sort desc to the end of your query. The catch is that you have to include the attribute you want to sort on in your query. So you can’t do something like this:


['UserID' = '{$userID}'] sort 'SaveDate' desc

Simple DB throws an error. What you need to do is artificially add your sort attribute to the end of the query, like so:


['UserID' = '{$userID}'] intersection ['SaveDate' > ''] sort 'SaveDate' desc

The UserID query will be unaffected and your results will be sorted by SaveDate.