« March 2006 | Main | May 2006 »

April 30, 2006

Survey

Over the past couple of years I've found Details to be a good magazine for various articles related to men's issues. The writing is mostly short pieces but well written and not very fluffy. Overall the magazine tends to speak to a different target audience then myself, especially when it comes to clothes and materialism. While I have spent money on a couple of nice pieces of clothing, the $300 jeans and $125 shirts routinely advertised and reviewed are just crazy amounts to be spending on clothes (IMHO).

I recently got an email asking to participate in a survey they are running. Most of the questions in the survey definitely speak to the intended target audience. This one in particular stood out:

At a glance, you measure a man's success MOST by his:
_ Car
_ Home
_ Clothes
_ Watch
_ Footwear
_ Date

Tags: consumerism details survey

April 29, 2006

Mount Monadnock

Had a great hike up Mount Monadnock today. The view at the top was wonderful. You could see the Boston skyscrapers and Mount Washington. I don't think my pictures capture that very well, but compared to my last attempt at the summit which had ice on the trail, I'm okay with maybe not getting those pictures :)

Tags: hiking monadnock pictures

April 28, 2006

Da Vinci Code Quest on Google

I've been having fun over the past few days spending a few minutes when I get home from work playing the daily puzzle in the Da Vinci Code Quest on Google. I'll be curious to see how much more difficult they get over the next couple of weeks as the first week was really easy and this week they added a few more elements to make it more interesting.

Tags: games google

April 27, 2006

Obesity

This morning I attended the next lecture in the ongoing NU Innovations Series. The talk was entitled "Trimming the Fat: Legal Strategies and Public Health Policies for Fighting the Obesity Epidemic" given by Richard A. Daynard. One of the most striking statistics from the presentation was that a recent CDC study showed that out of children born in the US in 2000, over 1/3 will develop diabetes. 33% of all children developing diabetes to me is a staggering amount, especially if you consider that 30 years ago only about 5% of the population had diabetes.

The New York Times ran a recent series of articles about diabetes and having it just causes so many problems, I'm really beginning to think that it will be the next major heal epidemic that hits the US. Part of the problem is that the effects can be lat onset and it isn't nearly as obvious or linked as high to health issues as smoking is. The fact that we have genetics (store food, fat is good, sweet is awesome), cultural, and environmental factors among others all influencing obesity doesn't help.

One of the ideas proposed is to place a tax on high calorie low nutrient dense food as a way of subsidizing the downstream medical costs of eating such food. In the current environment with the lobbyists and the general capitalistic attitude in America, that sounds like a pipe dream. Unfortunately, like most situations it is going to take a crisis before things really do change. Hopefully we haven't reached a point of no return when that realization finally hits.

Tags: lecture nu obesity

April 26, 2006

Actionscript 3 FAQ

Mike Chambers is asking for input on improving the Actionscript 3 FAQ.

Tags: actionscript as3 faq programming

April 25, 2006

Gallery Upgrades

I decided it was time to upgrade to the latest versions of Gallery. I have to say that Gallery definitely gets high marks in my book for their Gallery 2 upgrade process. After a simple file unpack the entire process is handled through a slick browser based wizard. Painless.

The latest Gallery 1 release also has a smooth upgrade process, but not nearly as slick as Gallery 2. I think it might be time to look at migrating everything over again. Hopefully they have some more of the kinks worked out.

Tags: gallery neophi pictures upgrade

April 24, 2006

Flex 2, Actionscript 3, and E4X

I've found a feature of Actionscript 3 (AS3) that I've not seen in other languages that I think is pretty cool. It's taken me awhile to come to terms with it, but now that I've getting more comfortable with it I'm really starting to appreciate it. That feature is what is known as E4X or more officially Standard ECMA-357 ECMAScript for XML (E4X) Specification. At its core is the ability to work with and manipulate XML data in AS3 using standard language syntax instead of having to do everything through an API.

For example to create a variable that contains some hard coded XML you could just write:


var xml:XML =
<componentPackage>
<component id="MyButton" class="package1.MyButton"/>
<component id="MyOtherButton" class="package2.MyOtherButton"/>
</componentPackage>;

Notice the lack of any "new XML("")" or other traditional methods one might use to create an XML document. Pretty cool stuff. You can also do variable substitution when creating XML:


var attributeName:String = "class";
var xml:XML =
<componentPackage>
<component id="MyButton" {attributeName}="package1.MyButton"/>
<component id="MyOtherButton" {attributeName}="package2.MyOtherButton"/>
</componentPackage>;

That creates an XML document that looks exactly like the first XML example. Not the most convincing example, but you get the idea. You can substitute element names, attribute names, or whole attribute values. Besides being able to do inline XML document creation you can also do DOM style navigation to get at elements and attributes within the XML (these return XML or XMLList objects). Going back to the first XML example:


xml.component[0]; // <component id="MyButton" class="com.example.ui.MyButton"/>
xml.component[0].@id; // MyButton

Where things get really cool is the XPath like operations, technically called filters since it isn't as expressive as XPath:


xml.component.(@id == "MyButton"); // <component id="MyButton" class="com.example.ui.MyButton"/>

That searches for all component elements under the root that have an id of MyButton. There are a bunch more. In fact the Working with XML (doc link subject to change) section of the Flex 2 documentation has many good examples. It's at this point that I want to offer a hard learned lesson about what doesn't work with E4X (at present anyway, I can only hope that it will be solved in a future Flex 2 release).

The following line of code doesn't compile (again using the first XML example from above):


xml.component[0].@class; // Error: Expecting identifier before class

The reason is that "class" is a reserved keyword. Thankfully E4X provides alternative attribute access syntax, an example is:


xml.component[0].@["class"]; // package1.MyButton

A little clunky, but still reasonable. What I haven't been able to get working is any of the alternative syntaxes when trying to do a filter using the same attribute:


xml.component[0].(@class == "package1.MyButton"); // Error: Expecting identifier before class

I've tried all four listed variations: element.@attrName, element.attribute("attrName"), element["@attrName"], and element.@["attrName"]. None of them work in the above example, adjusted of course to account for the () filtering operation. This afternoon I finally stumbled upon a solution. This is even more clunky then the alternative attribute accessors, but it does eliminate the need to write custom loops to handle filters like the one above:


xml.component.(@\u0063lass == "package1.MyButton"); // <component id="MyButton" class="com.example.ui.MyButton"/>

In this case I'm using the Unicode value for the letter c (0063) which to my surprise worked. As I said earlier I hope this keyword issue is just a beta issue and it will be resolved. If not, consider using this approach to construct E4X filters that might reference AS3 keywords.

Tags: actionscript as3 e4x flex programmin xml

April 23, 2006

E*Trade

There are very few companies that I've done business with for many years that haven't undergone a name change during that time. T-Mobile for awhile was Voicestream and before that, when I signed up with them back in June of 1998, they were called Omnipoint. In fact my GSM SIM card still says Omnipoint on it. E*Trade, well E*Trade Bank in particular, used to be called Telebank when I first started doing business with them back in Mar of 1999. If you haven't guessed, I'm also fairly loyal to companies, if they continue to offer the features I want at a reasonable value. I'm sure there are others but those come to mind first since my mobile phone is sitting on my desk next to a letter from E*Trade Financial/Bank.

It seems that the reason I signed up with Telebank many years ago, which was their killer super savings account which morphed into the SmartSaver Account, is being discontinued. At the time Telebank had some of the highest interest rates available, a cool online banking site, and a few months later, cool electronic bill payment if you also had a checking account with them. This was before ING Direct and other similar financial products had really broken into the mainstream, or in some cases even existed. Alas, E*Trade has decided to convert their SmartSaver accounts into Money Market Accounts. This might be one of those times to check and see if my loyalty to them has wavered.

Tags: banking etrade history tmobile

April 22, 2006

My Desk

Over the course of the last three weeks an inordinate amount of junk accumulated on my desk. This afternoon I finally decided that I needed to do something about it. It took a couple of hours but now I can actually see most of my desk again. I seem to have this two phase strategy with dealing with stuff that end up on my desk. The important things like bills I'm sure to take care of first, but anything else quickly gets relegated to second class status and is very prone to just collect in one random pile or another. Unfortunately, I have the same bad habit with my email. Unless it is something that I need to respond to right away I'm prone to just let the email fester in a big pile until some afternoon I just attack it. This weekend will probably also involve doing that as my inbox is now back up over 200 message. Granted I've read them all but some of them require more than a skim and others I should really respond to.

Tags: cleaning desk mess

April 21, 2006

Gas Prices

I had to fill my car up last night. I had been running the tank to empty in anticipation of getting the fuel filler hose replaced as part of the recent recall. Turns out the tool initially created to handle the repair doesn't work. Nissan is in the process of redesigning the tool and it should be ready sometime in May. Let's hope my car doesn't catch fire :)

Since I had run my tank almost dry I needed a lot of fuel. I was unhappy that on pulling into the local gas station the premium fuel cost was back over $3. Even with how little I drive my car, or more importantly need to drive my car, $45 to fill up a tank is starting to get into the crazy territory. Unless I'm doing highway driving the Z doesn't get very good city mileage so that tank doesn't get me very far. I'll be curious to see how high it goes this time.

Tags: car gas history

April 20, 2006

Pair Programming

Most of today and the later half of yesterday afternoon I spent pair programming. While I've collaborated for short periods of time with other coworkers, this is by far the first concentrated time I've spent doing it. Overall I'm inclined to believe most of what the advocates claim about pair programming. We created a lot of code and most of it worked on the first run. We didn't practice a TDD approach, but did make sure that good unit tests existed. Some of the simple issues that still came up even with two sets of eyes on the code were simple compile time errors like missing imports and changed method signatures on system APIs (the downside of working with a beta of Flex 2).

Unlike a "true" paired programming session, I didn't do much typing. I think this stemmed mostly from the fact that our development systems are laptops. It isn't as easy to slide the keyboard and mouse over to your partner in this case. Even though I wasn't doing the typing, I contributed to the code by helping spot potential issues (syntactic and strategic) while duplicating knowledge on some of the more potentially error prone plumbing of the system.

Tags: pair programming tdd work

April 19, 2006

Be Careful Out There

A friend got mugged tonight. She is fine. Be careful out there.

Tags: mugging

April 18, 2006

Flash 8.5 Beta 2, Firefox, Mac OS, and Sleeping

Since installing the Flash 8.5 Beta Firefox has been crashing on a fairly regular basis when my Mac is coming out of sleep mode. I'm going to try reverting back to Flash 8 and see if that makes the problem go away. I've also recently upgraded Firefox due to recent security issues and I'm fairly certain the latest round of Mac OS patches got pushed out also, so the blame may not be squarely on Flash but given that it's the only beta product in that mix I'm going to try that first.

Tags: bugs flash mac

April 17, 2006

Skunks Take II

Today the guys from BatGuys came by to install some fencing and a one-way door around the area our skunk is living. Hopefully this will do the trick and we won't have to worry about the skunk coming back around anytime soon.

Tags: gilmanmanor skunks

April 16, 2006

Happy Easter

I had a very productive and relaxing day. I did my laundry this morning, went out for a bike ride, and then drove out to my brother's house. Had a wonderful Easter dinner with enough food to feed everyone three times over. After relaxing for a few more hours I drove back home just in time to catch this week's West Wing.

Tags: holiday life

April 15, 2006

Monk-e-Mail

These are too funny. Send one to everyone you know! http://www.careerbuilder.com/monk-e-mail/

Tags: funny

April 14, 2006

Life is Good

Life is good right now. At work this week we managed to get enough plumbing put together to have a first front-to-back communication of the application. It's always nice to have something that is starting to hang together even if some pieces of it are stubbed out. After work today Gilman Manor had the third consecutive week of grilling. Yummy chicken this time. I also attempted some grilled potatoes, but my foil wasn't quite heavy duty enough so a few of the potatoes got a little burned. I also made a batch of corn bread that was good. Not 100%, but this was my first attempt at corn bread from scratch and it turned out much better than the potatoes (which was my second attempt). At least this time the potatoes were somewhat edible, unlike my first attempt. My grill is a little too hot sometimes. Gilman Manor residents also played a bunch of poker tonight which was cool. Lastly, I've got more Tour of Duty to watch :)

Tags: bbq food gilmanmanor life programming

April 13, 2006

Couch Potato

Man I've got to finish these Tour of Duty DVDs, they are turning me into a couch potato. I just burned through another DVD this evening. It's getting too nice out to be spending this much time in front of the tube, regardless of how good a show it is...

Tags: life tv

April 12, 2006

Tour of Duty

I'm now about half way through the 3rd and final season of Tour of Duty on DVD. I was addicted to the show when it originally aired but only saw the first season. I remember it being on at a time such that I couldn't watch it on the big TV in the living room, but instead had to watch it on the small TV in the kitchen. I remember a couple of episodes leaving me breathless wondering what was going to happen. It was nominated multiple times and won one Emmy for Outstanding Sound Mixing for a Drama Series. Its biggest claim to fame is being the first TV series to show American soldiers in Vietnam War combat. Overall it's a high quality show with characters that are slowly developed over the three seasons and from other reviews one of the more realistic portrayals of the daily grind in Vietnam.

Tags: life tv

April 11, 2006

350Z Recall Notice

Anyone that might have a 2003-2004 Nissan 350Z be aware that the fuel filler hose may crack and result in fuel leakage from the hose while refueling. More details about the recall are on the Office of Defects Investigation website.

Tags: 350z car

April 10, 2006

Blogs

A couple of my coworkers I've found out have blogs. You can find them here and here. Check out the Connect 4 app on that first one.

Tags: blogs work

April 9, 2006

StandUP

The ACLU has recently been doing a lot of work to expand their Youth Outreach Program. They recently launched a new website called StandUP, you can find it at http://www.aclu.org/standup/. One particularly interesting piece is the Stand Up for Freedom Contest. The winning entries are worth watching and reading. Also stay tuned for an upcoming graphic novel about civil liberties. In the meantime you can watch The Spies Have It.

Tags: aclu

April 8, 2006

Actionscript 3 Class.forName

I'm sure this would be obvious for anyone that has been programming in Actionscript 3 for awhile, but coming in from the Java world I'm still trying to find the matching idioms. In particular I wanted a way to dynamically load a class based on its name. In Java this is the Class.forName() construct. Luckily AS3 also has a similar mechanism:

// return the class as a Class object
var temp:Class = flash.utils.getDefinitionByName("com.example.Sample") as Class;
// you can now call new it to create an instance along with passing constructor args
var instance:Object = new temp(arg1, arg2, ...);

If when doing this you get an "Runtime Error 1065" see this post.

Note: Update Nov 6, 2007
It looks like flash.util.getClassByName() has gone away. The example above has been updated to use the new mechanism called flash.utils.getDefinitionByName().

Tags: actionscript as3 programming

April 7, 2006

Private or Helper Classes in Actionscript 3

I didn't find this well documented when I was looking it up so I thought I'd post a sample. While Actionscript 3 (AS3) doesn't support protected and private classes like Java does, you can have helper classes that are only visible within the file that they are defined. The syntax for them is a little weird but the Flex 2 Beta 2 compiler seems to like it. The syntax is that after the package you define the helper class:

package com.example {
     public class Sample {
          private var _helperClass:HelperClass = new HelperClass();
     }
}
// imports for the helper class go here
import com.example.xml.SaxHandler;
class HelperClass {
     private var _saxHandler:SaxHandler;
}

Tags: actionscript as3 programming

April 6, 2006

Wonderful Night

Tonight was Christmas for Gilman Manor. Well kind of. Matt gave us tickets to see Spamalot for Christmas and the tickets were for tonight's show.

Before the show we ate at Via Matta. While it was a little rushed since we had to get to the show, the meal was an at least an order of magnitude better than our last planned dinner experience. Very very yummy food. It would have been even better if we would have been able to stay for dessert, but I'm not sure if I could have eaten anything else at that point.

The show was wonderful. It started off fairly predictable but then branched out into new material and incorporated many other Monty Python elements. While I've not watched that much Python, even for the non die-hard fan, it is a funny show.

Tags: food gilmanmanor life

April 5, 2006

Weather

Now that I'm biking into work on a regular basis I'm becoming more intimate with the weather. My walk to the T, while about as long as my bike ride, never really felt like I was as exposed. That's probably since my walking pace is much slower than I bike. As a result on a morning like this with some snow flakes starting to fall during my ride in, the combination isn't that pleasing. This is aggravated by the fact that I don't have any fenders on my bike. Most of the snow that was falling this morning was melting almost immediately causing enough moisture to be on the ground to be annoying. Yesterday was worse with the constant rain, but in either case I'd be happy if the weather would just cooperate during my commute :)

Tags: bike life

April 4, 2006

Grand Mufti of Bosnia

Tonight I attended a lecture by the Grand Mufti of Bosnia one Dr. Mustafa Ef. Ceric. His talk was on "European Muslim Identity in the New Millennium". The focus was a doctrine he has laid out to help unite Muslims and Europe. While I can't find a link to the core of his talk, it is one he has laid out before and I would not do it justice trying to summarize it here. Instead I'm inclined to mention some of the other nuggets of wisdom he imparted. These are all paraphrases of what he mentioned:

David Irving is an example of a new president where denial of a crime maybe a crime in itself.

Religion is about community and organization. Morality is about good and evil. Faith is a personal matter.

One of many jokes he interjected: Politicians can't tell the truth. Preachers can't tell a lie. Journalists can't tell the difference.

Islam has many faces: political, cultural, spiritual/religious, economic, and a new one terrorist. The problem well known faces are not attached to each.

Need to find a balance of dialog that needs to take place to help integration. Focus on politics is too powerful, focus on theology is too precious, and a focus on war is to costly.

Tolerance is a sign of strength, intolerance is a sign of weakness.

Tags: lecture religion tac

April 3, 2006

Parking

Now that April 1st has passed I've come to realize that there is one feature of my last apartment that I miss. That is off street parking. With April 1st comes street cleaning. Somerville was kind enough to leave a helpful reminder on my car that street cleaning has started up again after the winter's break. Out of all of the places I've lived in Somerville 50% have had off street parking. If I consider how long I've owned a car and how long I lived at each place that did have off street parking, I've only had to worry about street cleaning 20% of the time.

Unlike Cambridge, Somerville won't actually tow your car if you leave it on the street during street cleaning, you just get a nice little ticket. Given that they use a 1st and 3rd and a 2nd and 4th odd versus even different days of the week pattern for when they clean, even during that 20% of the time I still managed to amass 3 or 4 tickets. At one point someone was running a site which would email you reminders about when to move your car, alas I can't find it right now. If you happen to know it, please let me know.

Tags: car parking

April 2, 2006

Simple Idea

The March 25th Economist reports about a recent study in which "text-messaging reminders reduces the number of missed appointments with family doctors by 26-39%, for example, and the number of missed hospital appointments by 33-50%." [85] While the article doesn't go into the costs associated with implementing and maintaining such a system, it does estimate the projected savings at 256m-364m pounds. Such a simple idea that has tangible benefits.

Tags: economist quote

April 1, 2006

Blah Day

Don't know what it was but today I've just had one long non-stop headache. Blah....

Tags: life