Wednesday, December 24, 2008

Why I Keep this Blog Thing Up

I often ask myself why I do this blogging thing. I thought some more about it after reading my colleague Brian's post about his blog writing. Asides from keeping the 17-25 people who end up here every day up on all the banal elements of my life, I have kind of figured out why I started doing this and kept doing it. It's the fact that I can CREATE and PARTICIPATE by using this blog, even if the product isn't always the finest work.

There are a few things that I love in this world. I love my wife. I love my family. I love baseball. I love music. I love reading. The only thing I can really participate in anymore out of those is my marriage, and my family life. I can't really play baseball anymore thanks to an arm injury that has left my shoulder brittle and prone to reinjury, despite the surgery I had to get just to make it functional. All I can do is watch, remember, and enjoy the strategy of the game. For a short time I coached little league, but my current commitments leave me without the time to continue with that. I love listening to music. I love all sorts of music, but can play virtually none of it. I have picked up the guitar, but I am certainly not very good at it yet. All I can do is passively enjoy, and fumble through a few chords. I read. A lot. Reading is one of my passions. I read and read and read, and wonder how it is that there are people out there whose brain is able to generate the creative juices required to weave interesting tales together. People like my friend Ramsey, who are brilliant engineers by day, and extremely gifted writers by night. All I am good at is devouring the content.

All of these things are passive. Listening, reading, watching. I am passive. This blog is the only thing that I create most days that isn't just paid work. So, despite the uneven quality of the output, it's my stab at escaping passivity. I would like to say that it's cathartic, and sometimes it is. Sometimes it's just to talk about what I do, without having to directly bore someone to death face-to-face. Sometimes it's because I think it will help someone else. My most popular post is this Eclipse error post. It's kind of sad, because I've written all this stuff about my father, and about my work, and my ambitions, and a post about troubleshooting an IDE error is the number one post, followed closely by my gripes about my cable company. I hope to find a way in 2009 to post interesting things that are also popular. To that end, please feel free to comment anytime you wish, so that I may improve my content for those of you who out of guilt or necessity read this regularly.

Oh, and HAPPY HOLIDAYS! Radio silence will commence, as we are off to Indiana (grandparents house is an internet free zone), and your regularly scheduled swill will resume on Monday.

Monday, December 22, 2008

The Ghost of Startup Past

Well, as of last week, I have reached the formal dissolution of my very first startup. We met and signed some paperwork that says we all agree that we no longer exist, and to reallocate our shared resources. I found it so fitting that the end of this startup was so well organized. I think that this startup was interesting because we had all the organizational stuff down pat, operating agreements, etc. What we didn't have was the compelling product strategy and drive. So often, reading blogs of other startup folks, it's the exact opposite. This time around, I plan to spend 99% of my time on WHAT MATTERS. I must admit it felt good to be legit, and being incorporated and all that jazz gave me a false sense of accomplishment. I am now a year or two older (wiser too, hopefully?), and I am much more concerned with brass tacks.

The other big problem I faced last time personally was the unrelenting desire to build cool stuff. To build stuff from scratch, and to not rely on conventions or libraries. I think I have grown over the past couple of years as a developer, to the point where I am much more confident in my ability to get things done. I know I can build things if I need to. Therefore, the choice not to write cool software things is much easier to make. Now I want to build a product. If this means that I take something that's already built, and add value to it by focusing on FUNCTIONALITY. I want to create value for the user, and not create nerd brownie points for myself. Sourceforge is littered with projects that were the result of geeks trying to put a feather in their cap and some new acronyms on their resume. These projects are out on Sourceforge now because they couldn't sell them, in many cases.

To that end, I vow to not be 'cool' technically. Rather, I plan to be "functionally benevolent". I will ask people what they want, and build it as simply as possible. There are some wonderful building blocks out there, and I am going to use them. Let's hope that this all leads to some success in the new year.

Dear Ryan,

Attn: Ryan Grant, RB, Green Bay Packers
Re: Winning me my money

I am not sure if you read my blog, but if you do, I wanted you to know that I would love it if you would score 11 points tonight against Chicago. My pathetic fantasy hopes have come down to this. I am losing my third place game 68-58. If I would have started your peer, Mr. Portis, I would have already won my $150 back, but I didn't, so I need you to help. I will offer you my undying gratitude in return, and if you send me an address, I will send you a gift card to Olive Garden for $11. If you don't score at least 11 tonight, I will put a hex on you that the most esteemed faith healer won't be able to cure. The best course of action would be to take your first run from scrimmage the distance, thus winning for me and making it less stressful for both of us. I hope you do the right thing.
Sincerely,
Kirk Gray

Thursday, December 18, 2008

Rhee!

Has anyone every gotten more press for doing less than Chancellor Rhee of the DC Schools? Don't get me wrong - I think she is doing things that are incredibly necessary for this broken school system we have here. Her argument for pay-for-performance for teachers is definitely reasonable - if you don't think you can do your job, then you probably don't deserve tenure anyway. I realize that education isn't that simple, but at some point someone has to draw a line and say "we have to start to fix this, and hope that the parents get on the bus sooner or later".

I am listening to the podcast of Rhee on Diane Rehm. I really want to hear about Rhee, but goodness would Rehm please, please, please speed it up? Anyone else hear the similarity between Rehm and this:



Just sayin...she gets good guests, but her show could be about 20 minutes shorter if she would just spit it out.

What's Up, December!

Well for anyone who's interested, here's the latest happenings.

I am in the last stages of getting our wedding photos online. I have setup Gallery2 on the server at home. It's a great PHP app that allows you to host your photos, that my buddy Nick put me on to. I hope everyone will enjoy it. I have the domain name for our server, and I think I have resolved the DNS server stuff (more on how to do all this in a separate post, since it simply does not seem like there is one place to get all the information you need to do all this on your own, and I had a lot of trouble cobbling it together from the disparate sources. I hope it will help others who find themselves in my situation. At any rate, the wedding pictures are awesome. If anyone has any sort of professional photography needs, then by all means, check out Thomas Graves. He is personable, talented, and on the day of the event, extremely unobtrusive, while capturing all the special moments. If anyone wants to see a preview, check out this site. Thomas put together a little sampler before we got all the photos.

We also have all of our honeymoon pictures up on Snapfish, so feel free to take a look.

I just finished The Professor and the Madman, which turned out to be a fantastic story. I mentioned it before, but the story is about the creation of the venerable Oxford English Dictionary, and one of its most prolific contributors, Dr. William C. Minor. For anyone not familiar with the OED, it was an incredible undertaking that required decades of work before it was all released. A dictionary is an interesting thing, because it's obviously never finished, as new words pop up every day. Minor's incredible contributions to the dictionary (tens of thousands of definitions and supporting quotations), are no small feat for anyone, but are more amazing when you consider that he was a lunatic, who murdered someone because of his paranoid delusions, and was doing his word from an insane asylum. The story takes the reader through a quick history of dictionaries, the OED's beginnings, the life of the OED's leader, James Murray, and the life of William Minor. It's a pretty short, quick read, and I would recommend it to anyone who is interested in words or just interesting historical stories in general.

I am now back on This is Your Brain on Music, which I started and shelved a while ago, and have also made it about a quarter of the way through Flights of the Mind, a biography of Leonardo Da Vinci. So far I have only made it through his apprenticeship, but it's definitely interesting, if for no other reason, because we were just in Florence for our honeymoon, and can picture the scenes described in the book, along with the works of art that I just saw in the Uffizi Gallery. What makes these renaissance thinkers so amazing is the fact that with minimal real academic training, they produced incredible output, be it art, science, or literature. These people are simply brilliant, and their achievements just seem to dwarf anything that is taking place now.

Christmas is fast approaching, and we will be heading to Indiana to visit my Grandparents. I know they are excited, and I am excited too, to spend my first Christmas with my beautiful wife. What else...We are also getting the house painted finally - Jena had the kitchen redone some time ago, but we never ever got the patch work and painting done, so now's the time. The first estimate comes today - hopefully it won't be ridiculous. I have no concept of how much house painting costs.

Work is busy. I have moved on to new projects, and no longer have to dwell on the evil LAMP site install. It's back to Sportsvite core stuff, which is much more fun. Currently, I am finishing the latest round of updates to our Powerade/CBS Sports partner site. I have been able to use some interesting libraries in this endeavor. I have also been toying with content by using some of the Web APIs out there, like YouTube and Flickr's. The world of content that is consumable is fascinating to me. The interwoven world of the web allows everyone to focus on what they are best at, and to supplement their offerings with other people's core competencies. Incredible. I think things will really get rolling when our fourth engineer joins the team in the new year. There are so many cool things coming down the pike.

Radio-Free Amtrak

Why is it that regional train service doesn't include internet service? Is there any legitimate excuse for this? In an age when there are AIRLINES (not an industry that screams 'Customer Service!') that provide wireless internet service while you fly, where you can go to McDonalds in some places and hop online, you can't take a train (a very business function), and get online.

I can take the $20 bus to New York city, and guess what? I can get wireless internet! They have plugs on the trains, so you charge your computer, but you can't get on the web. Boo.

That said, it's way better than flying. I get to the train station at 6:15 for the 6:30 train, and bam, get a coffee and get on the train. No arriving 2 hours early and going through security. Despite this, I sit here thinking about how much it sucks not to have wireless. I need to go back and re-read A Complaint Free World.

Friday, December 12, 2008

This Just In:

From the "don't do this on your site" file:

If you are going to have a form that requires a captcha to submit, and you choose to display virtually illegible captchas (see below), then don't zap the form contents into the ether when your user inevitably gets the captcha wrong. (Talking to you, mybloglog). I wrote this nice long post to support to let them know there was an issue I didn't really care about, but thought they might, and now it's just lost in the webs.

Boo.

Mac Tricks I Should Have Been Using a Long Time Ago

As I mentioned when I first got my Macbook, I think that sudo sucks. What I failed to do was make my life any easier by developing some shortcuts.

I just finally got around to adding a bunch of aliases to my /etc/profile file:


alias tomcatDebug='sudo /tomcat-dir/bin/catalina.sh jpda start'
alias tomcatRun='sudo /tomcat-dir/bin/catalina.sh run'
alias tomcatStart='sudo /tomcat-dir/bin/catalina.sh start'
alias tomcat='sudo /tomcat-dir/bin/catalina.sh'
alias apacheStop='sudo /apache-dir/bin/apachectl stop'
alias apacheStart='sudo /apache-dir/bin/apachectl start'

I am going to add about a million of these, because I constantly do way too much switching directories and typing. Any self-respecting nerd probably has stuff like this, but for the rest of us dummies, hopefully this will help.

Wow

I was reading the Philly newspaper that Jena brought back from her trip last weekend, and in the classifieds, I ran across a bizarre ad that basically said "Fart a lot? Get paid for it".

I thought it couldn't be real. I was wrong:

So strange. We live in a strange world.

Come on, UAW

UAW should file paperwork to change their name to Unemployed Auto Workers, because that's where this is headed. What this move says to me is that they don't have a lot of faith in the Big 3 to avoid bankruptcy, whether or not they get the bailout, so they might as well milk the money cow until it happens. Otherwise, how you can justify a decision to save the entire industry. I am sad for Michigan right now. It has been in the grips of greed and incompetence now for too long, and I can only hope that the bottom is near.

With news of a potential White House bailout being floated about, I frankly hope that Washington doesn't blink - anyone who is criticizing Congress for asking questions is kidding themselves. Just because Congress isn't perfect doesn't mean that these questions don't need to be asked. Would we all rather just dump taxpayer money into a broken company just to keep it afloat and broken for a few more months??

Thursday, December 11, 2008

When will WMATA get one of these?

Was reading Scripting News, by Dave Winer on Google Reader and came across this post that talked about the BART exposing a web API. I immediately wondered if our wonderful friends at WMATA had something like this. I discovered a twitter account apparently updated by the good people at Metrorail. Note that every single entry is 'double-tweeted'. If they can't get simple things like this right, my confidence in their ability to push out a public API wanes quickly. I found this site called meenster, which got rave reviews here, but it doesn't seem to show me very much. I don't know if it is broken temporarily or just completely defunct, but this is what I see for bustling Metro Center:

Not terribly confidence-inspiring news there. Ah well, I guess it was extremely wishful thinking there. Back to your regularly scheduled programming.

Go Dukes

When I got to college in the fall of 1995, I was pretty excited to be there. There was tons of stuff to do, new people to meet, college athletics to watch, and lots of free beer. James Madison at the time was a medium-sized state school, with about 9,000 undergrads. There were two buildings across the interstate, but most of the campus was located on the east side of I-81. I was assigned to Eagle Hall (tallest building in Harrisonburg, checking in at EIGHT stories), on the sixth floor or a building whose elevator was not the most reliable.

The only good thing about this building, and being on this floor, was the skybox view of the football field. Bridgeforth Stadium has come a long way. Thirteen years ago, it was a very basic stadium, with standard metal bleachers on either side, and was open at both ends. It was crappy astroturf. On gamedays, you would inevitably find it half full. We didn't have to go to the games, because we could sit in our rooms and watch Mike Cawley sling it all over the field, to other future NFL also-rans like Macey Brooks and Ed Perry. It was a fun brand of football to watch, though somewhat lacking in defensive intensity - there were many scores like 42-35. This is okay, because when you don't know the name of ANYONE playing in the game (not a lot of national notoriety for teams like New Hampshire or Richmond), you just want to see the scoreboard light up. They made the playoffs that year, if I remember it right, but they played on the road and lost in the first round. That was the last year that they were good for some time. My first year was also the second-to-last year of Lefty Driesell's time at Madison. The basketball team took a nosedive as well, after his departure to Georgia State.

Needless to say, my (more than four) years at Madison didn't make me a diehard JMU fan. I have pretty much stuck to my guns as a Michigan Wolverine fan, as my father raised me. They played games that mattered, were on TV regularly, and I could share the fun with my father. Even James Madison's National Championship football team in 2004 couldn't sway my allegiance.

Flash forward to last weekend. I am watching important football late in the season, but it ain't Michigan - oh no. They are 3-9, playing in the toilet bowl. This was James Madison in the playoffs yet again. It's a pretty big school - with a sprawling campus on both sides of I-81. There are 18,000 full time students now. A football powerhouse, they have been ranked #1 in 1-AA since upending the three-time defending champion Appalachian St team. I watched them last weekend, and came away not thinking "wow they are good for a 1-AA team", but rather, "wow, they are good". Also, I am pretty certain that if Michigan had Rodney Landers, who is a complete freak, that they would have gone 8-4 at worst this season. The guy is nasty. Make that Nasty with a capital N. Just watch #7 in these clips. Silly.



Tomorrow night, the Dukes will play in front of a packed house, in front of an increasingly cool and growing stadium, next to a giant parking deck that didn't used to be there, against Montana. On ESPN2. And they are going to win. And then they are going back to the championship. And I sure hope they win that one too. Anyway, the point of this post was that it's nice to actually be interested in your alma mater's sporting fortunes. Go Dukes!

Wednesday, December 10, 2008

Recession + Information = Comeback

Media is all different now. As this week's bankruptcy filing by Chicago Tribune illustrates, nothing is sacred in media any more. Almost all print media is laying off employees, and only those who were extremely forward thinking about the web and its potential will survive intact and profitable. "News" is still available in newspapers, and on the tradition news sites online, like cnn.com and msnbc.com. There is some analysis in the papers as well, in the form of editorials and columns, but, the vast majority is local news or newswire stuff. For better or worse, it seems like the real brunt of the "thought-work" has shifted onto the web. Obviously, since the barriers to entry on the web are low-to-nonexistent, so the existence of authoritative sources of news and analysis on the web are not a product of a name brand, but of the amount of followers the given site has. This is dangerous, but the good definitely outweighs the bad.

In the face of this, the way we react as a nation to the current state of the economy is quite interesting. The last time we were in a situation this dire (by most accounts the Great Depression), the knowledge and understanding about the technical minutiae of the crisis was concentrated in the brains of a very small group of people like Keynes, Schumpeter, Robbins and Hayek. Now, the science of Economics is much more mainstream, and there are far more people out there who understand (at least at some level) what is going on in the economy, what it means, and what to do about it (to a somewhat lesser extent). There are amazing modeling tools that make the what-if part of economics and econometrics so much more productive. Even more fascinating is that these economists are talking to us directly about what is going on, and what it all means. You can read near-daily blog posts from some of the great economic minds of our time about the current events, putting all the economic theory into context.

When I was taking these economics classes during my time at James Madison University, it was pretty rare to get economic theory and context in the same class (thank you Dr. Kreutzer for being one of the good ones who made a real effort to do this). Gregory Mankiw wrote the book I used for microeconomic theory. Now I can read his blog every day. You get real-time comment about such nebulous topics as bailouts, credit markets, unemployment, and whatever else you want. All this from brilliant folks who just want to share. Incredible.

I think that this information availability, and the wisdom of crowds will speed up the business cycles in our country. We have already seen the cycles speed increase on the way up - now we are seeing a blitzkrieg-style downturn. I believe that we will see a similarly quick end to this crisis. (I hope).

Tuesday, December 9, 2008

The Part Where The Java Developer Uses PHP

Any illusions I may have had about my PHP prowess were all but shattered over the past couple of days. What initially seemed like a fantastically successful migration disintegrated into a day of vigorous LAMP-stration, as I struggled through what seemed like a virtually impossible issue. Most everything was working - all read operations were just fine. Many inserts and updates were working as well. After about half an hour of poking around, I realized that the problem was that we weren't able to submit any form that included text with a single quote in it. Shouldn't be a problem right? I know the issue! Let's fix it. Not so fast my friend...

Here is the tale of my woe:

1) My first thought was "Google, single quotes php mysql". That's exactly what I did, and immediately found a reference to 'magic_quotes'. After reading the php help, I was pretty sure this was it. A thing that is built in to php to save the unsafe programmers from the evils of sql injections, by escaping special characters that are submitted as part of a form. That certainly includes single quotes. A-ha! This'll be quick. I verified that on the old server, and locally, this option was being used. I did this by running php -i, to get the php info. Here's what I saw on both of those servers:

magic_quotes_gpc => On => On

So I assumed that when I ran php -i on the new server, I would see

magic_quotes_gpc => Off => Off

Imagine my surprise when I ran php -i | grep magic, and saw

magic_quotes_gpc => On => On

How could that be? This was a definite crossroads in my debugging process, and I chose the wrong road. I could have verified that this was actually the case, but instead what I did was this:

2) Figure out how to escape strings in php prior to inserting into the database. Of course this application isn't using prepared statements - that would be too simple. Despite the availability of this option, no dice. That would solve everything, because the strings would be escaped as part of the persistence logic. Wrong. I played around with mysql_real_escape_string, which would work, but since this codebase has no persistence layer, I would to make a change to every single php file that posts to the database, and that just isn't practical for a product that we hope not to touch too much. So...the next option is to override the query() function in mysqli, to do some logic to escape the characters that need escaping. I started trying to do this, and wasn't getting anywhere, because it was pretty difficult to debug through this issue on the production to make sure that the new query logic was even being called. This was made especially difficult because of the sheer amount of cruft in the php_error_log.

Aside: Broken Windows

The Broken Windows theory is something that I heard a lot about during my time at Blackboard. The idea is that if you clean up the trash on a sidewalk, people are much less likely to litter. If you paint over all the graffiti, people won't tag on that wall. It was discussion in Freakonomics, and it a central theme in New York City's recovery from their crime epidemic of the 70s and 80s. At Blackboard, we had gotten pretty lax about what ended up in the log files. This sucks for a number of reasons. Under heavy use, this fills up the log files pretty quickly, using up disk space and cpu cycles to write the files. Under any usage level, it certainly makes it harder to see what the problems are in your software. The log is a place for things that you want to be there, like errors, warnings, and informational statements that you want there. It's not a good place for "Made it here at line 262", and "id coming in is: 12". That doesn't help anyone, and hasn't helped anyone since the person who put it in the log in the first place. My old manager was very astute in pointing this out, and making sure we did somethin about it. We made it a point at Blackboard to edit any code that did unnecessary print statements, and it really made a difference. Furthermore, nobody wanted to be the one who left gratuitous logging in the code.

Back to the story.

Once I decided that it couldn't be a php code thing, and definitely wasn't a mysql thing, I moved on to sheer despair and anger. This is probably not the best way to go about things, but it's where I was at. A walk to the coffee store with my boss led me to re-examine the php.ini file. See, I had compiled and tried to install php to include some packages that weren't installed initially, and it was a bad bad idea. Now, on this machine there are two versions of php. One is running on apache for the site - it's php 5.1.6. The php I installed was 5.2.6. Now I check and see what the options are for php again. Same thing. No way, I think. I finally did what I should have done a while ago and read the php.ini file. Guess what:

magic_quotes_gpc => Off => Off

How about that. I fixed that, and the problem is now solved. Voila.

The Moral of the Story

When I was doing interviews at Blackboard, I usually asked the candidates a few standard java questions to make sure they had a basic level of competency. Then I dove into problem solving techniques. So many people simply failed to even start any sort of critical thinking. I think that next time I am interviewing, I am going to use a version of this issue as my problem solving question.

Lessons learned - don't install php when it's already there as part of the OS. If you do, make sure that you are using the right version of php. Once you've done that, verify that what is in php -i is actually correct, by looking at php.ini. Biggest lesson learned - if your gut tells you something and you just know it's right, stick with it and follow up on it. It's usually the right path.

Saturday, December 6, 2008

What a Day.

Well today was one of those days where you just rock it out. I woke up early today and started getting ready for Part 1 of the day - Migration.

Migration

I'll probably do another post about this, but I had to migrate that PHP app I've mentioned a few times to a new server that we control. This is a good thing, and theoretically will be the end of my work with the application for all intents and purposes. It's one of those things that's been hanging over me for a while, and crap like that stresses me out. Happy it's done, and happy that it went pretty well, really, considering the hoops that required jumping through. Ahh. After that, I did some nerding out with the YouTube API as well. So cool, all the things you can do with that GData API set. Just wow. I'll probably eventually write about that too. Once I was done geeking, I moved on to Part 2 - Walking.

Walking

It isn't the walking that is so interesting. All I did was throw on the hoodie, walk over to Eastern Market to hit the bank, while listening to some awesome tunes on the Nano. This always puts me in a good mood, and since the migration had gone so well and only really took about an hour, I was on cloud nine. Getting to Eastern Market just made it better. There were wreaths, trees, and assorted holiday cheer on display. I got done at the bank, came back to the market, and went ahead and bought some delicious cinnamon sugar pecans from the Sweet Nuthouse. If you haven't ever had these (or the almonds), then you haven't lived a complete life. So delicious. I then bought a copy of Street Sense (favorite charitable organization in DC), and then donated to the Salvation Army bell ringers. Bless em for being out in the crappy cold. Then I headed back home, fighting the urge to tear into the pecans, and ready to start the third part of my day - Sports.

Sports

Today was a good sports day, albeit poorly scheduled. At 3:30, both Michigan and James Madison were on. I told Jena that I am not sure why these people don't consult me before scheduling these games. She just shook her head. Anyway, Michigan's hoopsters were taking on Duke at home in a rematch of the tournament loss from a couple weeks ago, and James Madison went up against Villanova in a football Quarterfinal. I had the basketball game on TV, and the football game on the computer (at least RCN has ESPN360, which I have to admit is pretty incredible). Michigan played an awesome game against a superior Duke squad, and pulled out another huge win over a #4 team. It was great to watch the team play as a team, and to watch John Beilein's vision coming to fruition earlier than I expected. Meanwhile, JMU jumped out to a 14-0 lead and looked like they were going to romp, but Nova came back and made it a tough game, taking the lead with 6 minutes to go. Not to be denied, the mighty Dukes marched down the field for the winning score, then sealed the deal with an interception in the final minute. Awesome. They will meet the Montana Grizzlies in the semifinals next week. GO DUKES!! With my fill of sports for the day, it was time for part four - Christmas shopping.

Christmas Shopping

I love Christmas shopping. I like to fight the crowds, wandering aimlessly from store to store. Buying things online just isn't the same. I love to go out and 'finish', only to go out again and buy more the next day. While I can appreciate the naysayers' lament of the materialist nature of Christmas, I don't care. I like to buy gifts for people. I like to wrap the gifts, and then I like to give them gifts. Especially Jena. My dad was big on Christmas as well. He used to just continue to buy gifts until the stores ran out, right up until Christmas Eve. The gifts were always exciting, but I think the excitement was more a function of just being part of something that someone was so excited about.

Now I am chilling on the couch. Relaxin. Feeling good. I have had a crappy, busy couple of weeks, but yesterday and today were good days. Some days you just have good days, and since Jena's out of town, I figured I'd tell someone about it.

Wednesday, December 3, 2008

Remove/Update Firefox 'about:config' Preferences (Mac OSX)

So I recently set a preference in my Firefox configuration on 3.0. I entered a string instead of an integer. Now, one would think that you could just switch this preference to an integer, or failing that, delete it. (At least for user-defined preferences). This, my friends was not the case. In case anyone else has this problem, let me help, because all the search results I ran across were wrong, wrong, wrong.

To set a pref:

type about:config in the address bar, add one.

Now, to find it:

/Users//Library/Application Support/Firefox/Profiles/.default

You will see a prefs.js file. This is the one. Now, make sure firefox is closed, and edit/remove the setting you used. When you restart, this setting will have taken effect. Hopefully this will help some other poor soul fight the good fight without wasting 45 minutes like I just did.

Friday, November 21, 2008

Information Overload, or Why Technology Doesn't Necessarily Increase Productivity

So I am sitting here trying to program. I have a lot to do. I am disrupted by:

Adium, connected to three different Instant Messaging Services
Campfire, connecting my decentralized team via chat
Thunderbird, email, duh
Colloquy, in irc chatting with ex-colleagues/good friends
Tweetdeck - following all this Twitter nonsense
Google Reader - Created as a Fluid app on my mac, to keep up on blog subscriptions

All of these wonderful things are 'technology's fault', and while so much of this stuff makes our job easier, and while they can definitely make us more productive, there is definitely a counterbalancing effect.

Also interesting is the personal tipping points that occur in the Facebookosphere, where disparate groups of friends seem to 'tip' at different times. Now for me, it's the high school alumni. Strange how it spreads so quickly. I wonder what happens when you run out of groups? It seems that life and new friendships can't possibly keep pace with Facebook. So interesting.

Thursday, November 20, 2008

PandaStream, or Why The Internets Are So Cool

Tonight, as if I didn't do enough nerdy stuff during the day at my job, I decided I was going to try out PandaStream. As I noted, we had a bit of trouble with our video provider, and my colleague Bob, had stumbled across this open source video package. We can own the entire process, without having to requisition the machinery to support video upload, encoding, and content serving. This is a good thing, as long as it works. Well, I can say it works. Before I go on to describe how it all comes together, let me just describe the surreal realizations I came to...

I am sitting on my couch, wirelessly connected to the internet, creating an application instance in the cloud on Amazon EC2, then deploying a git project to the server running Ruby/Merb, configured to interface with Amazon S3 and Amazon SimpleDB. In 2 hrs, on my couch, I am able to set all this up, using the great set of instructions here. 5 years ago, wireless internet was just getting solid. 5 years ago, I am pretty sure that if Merb had actually been invented, that very few people outside of its creator knew what the hell it was, and Ruby was still a pretty obscure scripting language invented by a Japanese guy. Amazon's web service offerings in cloud computing were but a twinkle in Werner Vogels' eye. Open source applications were gaining steam, but certainly not as trusted or ubiquitous as they are today. I think that this is all pretty remarkable, and it's a testament to many creative and brilliant folks that I am able to sit around on my couch and do these amazing things and have them feel pretty routine. Thanks, smart and creative people. Us mere mortals are in your debt.

So anyway, I had an EC2 account already setup, and bringing S3 and SimpleDB online were a snap (once I realized I needed SimpleDB). Getting the security certs and stuff took about 5 minutes to resolve, thanks to Amazon's great AWS Documentation. I kicked off the panda instance without issue, hopped into the instance via ssh, and jumped into the merb console. This didn't go smoothly as I was presented with a security error that just said I couldn't be authenticated using my credentials. To test my credentials, I grabbed a java library for AWS. I used this library to test my creds with S3, and it worked. Only then did I go and look closer at the error and realize it was related to simpleDB, which I didn't have an account for. Creating that made it work much better. Once I was able to hop into the merb console, there were about 10 commands to run to set up, add security, and configure some default video encoding. This took maybe 5 minutes. From there, I logged into the instance and uploaded a video. Then I took some embed code and stuck it in a test html file. It just worked.

Anyone with any experience with pandastream, we are really curious to see if this is production tested, or if anyone knows anything about it that would make us NOT want to use it.

Next episode, integration via REST APIs. Stay tuned.

RCN Redux

Well after all my rants, I would think that I should share the conclusion of my epic cable saga. I went to the office to grab a DVR cable box, conceding defeat. If it weren't college basketball season, my reaction might have been different, although I must admit RCN internet is great and I only pay $40 for biz-class internet with a static IP, so it's kinda hard to give up. Anyway, now that I am done with my grudging compliments for RCN, the story.

The lady was actually pretty nice, and quick, and I drove home with my cable box, figuring it wouldn't take that long. Starting at 5:15, I should have this thing up and running by 6pm so I can tape the Syracuse-Richmond game for Jena, right?

Wrong.

I follow the instructions, then call the 'automated activation line', where I am told that an activation signal has been sent successfully! Yay. Now they say "wait an hour", like it's a laxative or something. How can this take an hour? After about 40 minutes of zero activity, I call back (now 5 min til gametime), and they tell me because it hasn't been an hour, I have to call back. Of course.

I go to pick Jena up and return to find that still nothing has happened. I call back and get a live person who now agrees to send a "manual activation signal", which of course works. But I find that the actual digital cable features won't load for 2 hours. I have no idea what happened, but it used to be that you plug in your cable box and it just worked, digital, DVR, or basic analog. Why is this so hard?

Anyway, now I have digital cable, with a slow cable box, an ugly guide, and DVR with a smaller hard drive, for $15 more a month. Whoopee. I hate you RCN.

Tuesday, November 18, 2008

Be The Pest!

Everybody needs 'the Pest'. You know who they are - that person who asks the important questions, even if they are unpopular. Strive to be the Pest sometimes. Encourage others to be Pests too. Be the voice of reason, and demand explanations. Delivering cogent explanations makes everyone better at what they are doing. If you can't explain it well, then you can't do it well. I wish I could have had more pain-in-the-ass Pests in all my previous jobs. They make you better, even if you don't really like them/want to give them credit.

Monday, November 17, 2008

Update On How Much RCN Sucks

Well I called RCN, and got right through to a person (who, of course, doesn't know anything).

Allow me to summarize the interaction:

ME: "My cable is out and has been since Thursday"
RCN: "Oh, that's because I see you don't have a cable box"
ME: "But I got notice saying that was happening in October and didn't say I needed a box"
RCN: "No it happened on the 13th, and you need a cable box"
ME: "OK, I just talked to someone last weekend from RCN, and they said I didn't need a cable box, which is why I didn't get one."
RCN: "How many TVs do you have?"
ME: "Two."
RCN: "OK, my calculations are that you need two cable boxes."
ME: "OK, we've established that I need cable boxes. I have a media center PC. Will this still work?"
RCN: "No, you need cable boxes"
ME: "I understand that I need a cable box. Can I just run the signal through the box to my PC, and use the PC as a DVR still?"
RCN: "You need a cable box"
ME: "I know I need a f$%^#$ng cable box. Do you have any documentation that you can send me about using a cable box with a media center PC?"
RCN: "I don't understand what you are asking me"
ME: "Of course you don't - you are just technical support. I need documentation about using a cable box with a media center PC."
RCN: "I have my notes right here. They say that you need two cable boxes."
ME: Click

Now that was infuriating enough. But then I checked the webs to see what I could do to supplement the stupidity that I experienced on the phone. Here's what I found:
The switch from analog to digital affects only over-the-air reception of TV. Unless you have a cable carrier that is taking advantage of the situation to screw its customers, and although there are a few of those Comcast is not one of them, the transition to digital in February will have absolutely zero effect on cable subscribers. Your current setup will work as fine after February as it does now, and you don't need to buy or change anything.
Wow - it just so happens that RCN is one of those carriers - they have encrypted all their stations, so you need a box - now you can't use the media center that you built, because only OEM computers are allowed to be built with cableCARD-compatible interfaces. How about that!?!? So now I am stuck with a media center PC that is unusable. Thanks RCN. You bastards. You just overtook Verizon, #1 with a bullet on the list of EVIL COMPANIES. I hate you.

The Importance of 'The Why'

Why are you doing what you are doing?

Why would someone need this?

What's the goal?

These questions are way more important than "What", or "How". Those are easy in most cases. Why is a much more important question. Why are we doing this? Does it solve some problem that people are seeking a solution to?

Note - "because it looks cool", or "because I think this would be better" aren't good enough.

When you are building something, it's your responsibility to answer "Why" way before you start doing the what. Sometimes the why is simple:

"We are building a house. Why? Because someone needs a place to live."

Other times it's not so simple. That doesn't mean you shouldn't talk about it.

Weekend Update

Well, it's Monday again. As Washington mourns another dull Redskins loss, featuring lots of really bad offensive line play, we dive headlong into new week, fresh with promise.

There are a few things I'd like to get off my chest before starting the week.

First: RCN sucks. We live in a complex that has only RCN wiring run in, so we can't switch to Comcast, and our lovely condo board won't allow DirecTV. Isn't it great how the draconian fools have rendered the benefits of cable competition moot? Usually this wouldn't be a huge deal, but since our cable has been out for four days now, it's kind of annoying. As if it would be reassuring for them to say it, calling the help line tells me that, "Hey it's okay - we know that DC cable is out. We are working on it." My internet works, so it's not an issue with the wiring. What the hell could take four days. Tonight Jena wants to watch the Bills, tomorrow Syracuse is on ESPN in their season debut, and Thursday, Michigan plays UCLA - none of it is on broadcast television. I need cable this week, you a**@#%$s. The response to my email for support:

Thank you for contacting RCN. A member of our support staff will initiate contact within 48 hours.

Thank you,
Customer Support Staff
I suppose that isn't that ridiculous considering the phone wait times hover around 26 hours. Damn you, RCN. Damn you.

Second: I hope something happens quickly with the American car maker bailout. After the election ended, I was looking forward to a more balanced news array on NPR, but GM has rapidly taken the spot of Obama, and Ford has replaced McCain as the new Morning Edition Monopolizers.

I am of the opinion that something needs to happen, but it simply can't involve giving the companies some money so they can just keep on paying it to 'skilled' workers who collect exorbitant wages for doing things that peers in other industries and areas who aren't unionized do (just as wellm if not better) for much less. This is the one good chance for these companies to break down, swallow their pride, and buck the union influence that is sapping their profits, and causing their costs to be simply unsustainable. My argument to any union supporters: Would you rather have lower paying jobs or no jobs? That's what's facing you here - accept reality and think constructively.

Thursday, November 13, 2008

Help Wanted.

I am looking for some good fiction books. Anyone actually read this blog and have a good one to suggest? I have been all history, true stories, business, general non-fiction lately, and need a lighter read. Drop a comment if you have any suggestions.

Wednesday, November 12, 2008

'Third Party Dependencies', or 'Have an Backup Plan'

The interconnectedness of the web is a fantastic thing. There are tons of libraries, expertise, content sources, services, etc out there that make it possible for companies to focus on their core competency. If you are a social networking site, do you really want to build a video player, for example? Maybe, but only if that video player is part of the strategy that is your core competency, or that gives you some sort of competitive advantage. If Previously, you would have to serve your own photos, but maybe now you can use a service like Photobucket, or Flickr. Let the photo storage be their problem - let them handle the disk space requirements and the server load of serving endless quantities of images, right? Right?

Well the answer in my view is maybe. Let's face it. Sites like photobucket aren't going anywhere, but their terms of service might. What they are allowed to do with your content might change, and the conditions of your agreement just might become unfavorable, and there is nothing you can do about it, because now you have given all your content to them, and you don't really have any of it. This could be a bad thing, right? Especially if you aren't able to at least get a copy of it back from them without going through some manual pain.

Many companies simply won't make it. You probably don't want to dive into partnerships or use services like this from companies that you aren't sure are established, because chances are, you will have to start over sometime, and it will probably be really inconvenient. Then your stuff might just be gone, stuck on a server somewhere that gets sold at auction. Prognosis: NOT SWEET.

My suggestions on picking a partner (based on some recent experience) would be this:

1) Find a partner who can solve the business need, first of all.
2) Find a partner that isn't going anywhere (requires crystal ball in some cases)
3) Find a partner that will let you get your 'stuff' back

Once you have chosen a partner, come up with a backup strategy. You are sending content to them, but can you periodically backup this content to a disk that you own and control? At least this way you have the files if something goes wrong, and you can then bulk load them into another tool if need be. Then you are limited to the code changes you have to make to do the API communication, and this should be relatively limited. Rarely do people get things like this right on the first try, and frequently they are lucky, because they never figure that out - sometimes you just try something and it happens to work, but many times it doesn't. If it doesn't, remember the 'fool me once, fool me twice' adage.

Tuesday, November 11, 2008

So...Is It a Good Time to Start a Business, Or Not?

Coasting through the blogosphere, you can find a lot of opinions from venture capitalists, developers, entrepreneurs, and columnists about whether or not this is a good time to start a business.

Some reading I've been doing:

Yes

Do it...now
Don't Panic, Profit
OK, Entrepreneur
Seize the Day
It's A Good Time To Start a Business
Is It a Good Time? Yes!

Maybe-So

Angel Investor Ron Conway

No

...

I looked for about half an hour, which I am sure is not a thorough scan, but I couldn't really find anyone telling me I should not start a business right now.

This is good news to me.

I think that the overwhelming sentiment is that it is a fine time to build a business, but a really bad time to raise capital. Credit crunch and all. And it's a bad time to have a business plan that doesn't project any sort of cashflow for a while. These are probably good things. Slowdowns in the economy are often title as 'corrections'. Stock prices get 'corrected' which is a nice word for common sense-based pricing of assets based on legitimate valuations and bringing PE ratios back in line with reality. Basically, if Google is really only worth $350 a share, but is trading at $450, a correction will see it trading at $350 when it's through. Similarly, corrections weed out companies that have no business existing. If you have an idea that is 'sexy web 2.0' but can't tell someone with a straight face how you are going to deposit checks in the bank, or at least generate something that you can monetize (i.e. user data), then you aren't getting any help. During 'bubbles', this might not be the case.

There are the obvious things that you can do in this economy - build things to help people save money/time. Categories I can think of:

1) job seeker resources
2) ideas to make shin
3) crowdsourcing facilitation - help businesses harness the collective intelligence to improve your situation
4) job retraining
5) price-finder type things
6) college-related stuff (lots of people go back to school in a downturn)

There are always opportunities for good ideas developed by hard workers who have strong networks, and obviously, not all ideas require funding at first - some never do. The key is not to have an idea that will get you cash-flow positive in the first week, but to have an idea that is well thought out and planned so that you have a way to get cash at some point. I think that the idea I am working on now definitely falls under that category, so I am feeling decent about things as of now.

I can't honestly imagine what people did before the Internet. The enabling technologies like blogs, social networking sites, and remote work tools have made everyone powerful. We are all starting about 7 notches higher than you would even fifteen years ago. You just have to act now. Before you had to act, but first you had to build your network in person, gather data in person, and work with each other in person. Now you can work with anyone anywhere, using knowledge you have gathered from folks all over the world, using your web of contacts that you have built both in person and electronically through the years. Wow - it's definitely a good time to start a business.

Monday, November 10, 2008

Updates! Books! Travel!

So, here's the latest:

Things I Am Reading:

Just finished up April, 1865, by Jay Winik. I am pretty sure there is no upper bound to the amount of books I can read about the Civil War or Abraham Lincoln's presidency. It seems that each book touches on something new, or captures something slightly different from other book. This book was certainly more focused on Southern leaders like Jefferson Davis and Robert E. Lee. As someone who grew up in Northern Virginia, driving on Jefferson Davis Hwy, playing against RE Lee and Jeb Stuart high schools, or the Rebels of Fairfax, then going to James Madison, where it would seem that everything was named after a confederate cavalry leader, it was interesting to finally get some of the backstories. Winik is a great writer who mixes just enough military strategy with the right amount of human interest to keep the story moving along at quite a nice clip.

I am almost done with Into The Wild, by Jon Krakauer. It's the basis of the recent movie of the same name. This kid graduates college, goes off the grid, travels to Alaska on an extreme nature soul-searching trip that would frighten any Eagle scout, and eventually dies because he wasn't well-prepared enough. By all accounts, this wasn't some knuckehead or aimless drifter, but someone who really went out of his way to seek his identity. I find this book pretty interesting - not just because I grew up in the same area as the main character, or because his travels were so interesting, and not because it's sad that he died. It's the just audacity of dropping out of society. I could never imagine it. First off, I am no Davy Crockett, so I'd last roughly 15 min in the wilds of Alaska. Second of all, there are just so many people in my life who I couldn't just leave. I think about moving and even the thought of leaving the area is somewhat distressing to me, much less just disappearing from everyone's life wholesale. What he did is impressive, but not admirable, because I can't really call living such an empty life that you can leave it an admirable trait. Either way, it's an interesting read, and Krakauer is just an enjoyable author.

Recently I started The Stuff of Thought, by Steven Pinker. This is an interesting book so far - all about language semantics. It's fascinating when you think about language. There are people out there who are COMPLETE idiots by any standard - people who you meet and think to yourself "wow, that guy is lucky he knows how to get out of bed and get dressed in the morning", but that person has likely achieved a level of mastery of the English language. When you read a sentence and realize that based on context, there can be as many as four meanings, it becomes pretty amazing that the human mind can wrap itself around language. So much nuance is captured in language, making it all the more fascinating that otherwise simple folks can speak it without too much trouble. The other reason I like this book is that there is an entire chapter on verbs. I think that's fascinating. My mom cites thinking like this as evidence that I am becoming more and more like my dad every day. I take that as a compliment.

In the queue:

Alive
The Professor and the Madman

Man I wish there was a way to just read professionally. Not critically, like an editor, but just to read and soak in knowledge and to live the stories. That would be a good job...not that writing software isn't fantastic and all =)

Places I am Going

It looks like we are officially heading to Indiana for Christmas. It's good because my grandparents love seeing family, and have actually been alone for a couple recent holidays. Also good because theoretically we'll finally have our wedding photos by then. They'll also get to see Jena, which is good, since the last couple trips out there, she couldn't make it, which really disappoints them. A LOT. My grandparents have caught the contagious disease that has been spreading through everyone in my life ever since Jena and I met - I call it "IlikeJenabetterthanKirkeventhoughIknewhimfirst-itis". Sigh.

In February we go to Aruba, which is awesome, especially since we have long since paid for both airline tickets and lodging. Seemingly free vacations are very good things, especially to places with awesome beaches and casinos. Yep.

Oh, and we just put in our ticket requests for the Vancouver 2010 Winter Olympics. We find out in December what tickets we get - it would be an AWESOME trip, so fingers are crossed...

Things that are Awesome

1) The battery on my new phone. It lasts for days. My old phone never really did that. And for the last year or so, it was more like hours. It was the 'plugin-hybrid' of cellphones.
2) Michigan's 29-6 victory over Minnesota this weekend - with a walk-on backup QB who had otherwise been terrible, and a bunch of underclassmen on offense, they put up 445 yards, while their beleaguered defense managed to hold the Gophers to 188 yards and two field goals, after getting freaking torched for the past few games...good times.
3) Married Life - people keep asking me "how's married life", and I can always answer without pause "awesome". That's a good thing.
4) Seasons. The trees are beautiful, and I love the smell of Fall.

Things that are less than Awesome

1) Antiquated offices with not-so-nimble heat/ac systems that can't keep up with rapidly changing DC-autumn weather. It was roughly 724 degrees in my office Friday.
2) Darkness at 4:45 PM. Bleh.

Friday, November 7, 2008

Starting Over...

So like I mentioned, I have been involved in trying to start my own business.

I am ready to get back in the game. Round one was a definite loss, but not a knockout. Let's get started again, but this time, let's do it right. I am a developer. This time I am going to be working with one person, also a developer. Developers are good at tech startups, because they know how to build things. They are also bad at tech startups because all they want to do is build things. I have a degree in business, so I would like to claim that I transcend this problem, but I don't. I am a way better carpenter than I am an architect. When presented with a plan, I can execute. That's not good enough for what I am trying to do.

Now it's time to learn how to be the architect, and not just the architect of a software program. An architect of a business, start to finish. In my last venture, I made the mistake of not being involved enough in the early-stage business decisions. That's my fault. I didn't really take part in the research of competitors, in the development of our core premise. I didn't really do my due diligence in figuring out WHO were going to sell to, HOW we were going to get in those ears, WHAT problems we were going to concentrate on solving, WHEN we were going to deliver real demonstrable milestones. You can build the coolest crap in the world, and if you can't sell it, it's worth nothing. It's a bunch of 0s and 1s on a disk somewhere.

I am tired of creating 0s and 1s without a home.

Tuesday, November 4, 2008

Never In My Life Has It Felt So Good To Vote

Ahh, got to the polling place about 6:50, waiting about an hour, but not bad. Everyone was excited, cars driving by honking, a good atmosphere. I got in finally, and there it was (thanks to dcist for the photo) -

Barack Obama/Joe Biden - Democratic

I haven't really felt GOOD about voting for someone for a while. I like Mayor Fenty, but I moved into DC just after the election. This time I wish I was back in Virginia so my vote could be a little more helpful, but it still felt good to vote for Barack Obama. I hope that he turns out to be half as good as a president as he can be. At least things will be different now. Sometimes different is better no matter what different turns out to be, and this seems to me to be one of those times.

So let's cross our fingers and hope that change really does come by the end of the night tonight, and that tomorrow we have a better life to look forward to!

Monday, November 3, 2008

Reasons Why Developer Life at a Startup Is Good

I work at a small company as part of a three-man development team. Some days I marvel at the amount of opportunities this provides, and I thought I'd talk about a few of them, and why they are awesome:

1) You own a big part of your work.


You are often as much as 50% of the development staff. You have broad freedom to implement whatever you see fit. If you identify a problem and you have a solution in your mind, pitch it, and if you have time, you can do it.

There isn't someone looking over your shoulder who will swoop in and fix whatever you messed up. Some people might see this as a bad thing, and I suppose it can be, but it's also really really good. If you write something and toss it into production, it's your time that will be spent rushing to fix it after someone hits the problem and submits their bug report. This makes you more careful, and makes you think about end users while developing, something that's often lost when you are in a bigger shop, abstracted away from the users by five layers of organization.

2) You can really get broad experience in a short amount of time

Just this last couple of weeks, I did the following:

1) Scoped and scheduled a project
2) Set up a LAMP server for a PHP project
3) Did work on the PHP stuff
4) Did work on some Java stuff
5) Evaluated jQuery plugins for a new UI component

At most jobs, you do a whole lot of the same thing over and over again, as you can take advantage of the economies of scale provided by larger staff. While division of labor is a Good Thing, it's not that great for someone who wants to grow their skill set and solve new and interesting problems as part of their everyday work life.

3) You shouldn't work with much dead weight

As I mentioned above, when you work at a startup, often you are more than 10% of the team, maybe even more. Now, while it means that your contributions are crucial, it also obviously means that a lack of contribution is also critical. It's a case of the "chain being as strong as its weakest link". If everyone is doing their job on the dev team, but nobody is marketing, or the marketing and sales teams are incredible, but the developers can't realize the vision, then you are going to fail. It's high pressure, high reward, and usually this means poor performers will either quit or be removed if they are not pulling their weight. This is a significant difference between startup life and big-company jobs.

4) Your opinon counts

If you feel strongly about something, you have the ear of people in charge. You were hired to do this. You weren't hired to be a rank-and-file programmer. That isn't good enough. Learn about the domain you are working in, learn about how the business works, make suggestions. Come up with new things and new ways to do things. You can directly impact the way the company runs, and how it's products work or are positioned. This empowerment shouldn't be squandered.

Now there are a few bad things about working at startups, but not really as many as there are when working in a bigger company, and for someone who relishes challenges and learning, I strongly suggest that you try it out someday.

Friday, October 31, 2008

Go Vote!

Go vote next Tuesday. Wait in line as long as you have to. If you don't vote, you can't complain about anything that happens, because you didn't speak up. It's the one really easy way that every year you can participate and make yourself heard. Go vote. It does matter. Spend some time this weekend reading about the candidates. Figure out who will do best for you, your friends, and your family. Then vote. Seriously. Apathy sucks.

Friday, October 24, 2008

Sports 'News'

Yesterday on the train, I hopped on the web thru my phone to check to see who won the World Series game. The front page of the sports section had a big picture about Brett Favre's alleged tipoff to the Lions about the Packers offense. No mention of the score of game one of the World Series! How is this news, I thought? Reasons this story is stupid:

1) I could give the Lion's a genie and unlimited wishes, and they would go 2-14
2) The Lions play Green Bay twice a year, have film of every game they have played, and scout them. How could they not ALREADY know their offense
3) It's the Lions - how can anything involving the Lions be front page news

The second biggest 'story' these days? Pac-Man Jones. Seriously? This guy gets paid millions a year to do what? Play football and not get arrested. He can't do one half of that. It's pathetic, but is it news? No. It's just not. As part of Obama's plan to increase scientific knowledge in our country, I propose the development of an 'irrelevance ray', that will immediately obsolete people like him who are just such gigantic idiots that they merit no coverage. They will simply disappear and nobody will wonder what happened.

Wednesday, October 22, 2008

I Suppose You Could Do It That Way

So if someone asked you to write a thing that showed three items in a list loaded from a database, on each page in the application, would you:

A) load the items from the database each time and display them using a simple php for loop?
B) do something a little more complex like loading the data once per session, or per key id, and storing it in the app scope
C) get really crazy and use memcached or something like that

or

D) create a nightly CRON job that loads all the possible permutations of data by key id, then write a monolithic XML file, then each time the page loads, read that XML file from disk, using XPath to track down the values to show in the page

Take a wild guess what I just refactored. Hint: it wasn't A, B, or C.

Monday, October 20, 2008

October

October is not really my favorite month. I used to love it - football in full swing, I was still playing fall baseball. The weather had cooled, and the leaves were changing. It's a pretty nice time of year around DC. Then, three years ago this month, my father passed away suddenly. My father was great - he was my best friend; he was just about the smartest, most curious person I have ever known. He was a jock, a nerd, a band-geek, a carpenter, a lawyer, and an Army veteran. He taught me how to think for myself, how to always want to become better, how to take care of people who you care about, and how to be stubborn in pursuit of things that are important to you.

He had a head full of useful and useless knowledge - I am pretty sure he knew the answer to the Jeopardy! questions before Alex Trebek read them, and I personally witnessed him going through at least ten shows where he knew EVERY ANSWER. Why he never went on the show is beyond me, but I would say (admitting my bias) that if he had, nobody would know about that guy from Utah who won all those days in a row.

He never stopped to impress me with all the obvious things, but the more I think about him and look back, the more I remember the little things.

I was driving down Rt. 7 at Bailey's Crossroads the other day and went by what is now a furniture store and DSW Shoe Warehouse. I am sure most Arlington natives will recall that before the days of Home Depot and Lowe's, on that site, we had Hechinger's. My dad spent most hours on the weekends either at Hechinger's buying stuff to build, or in the basement building it in his workroom. Obviously, this meant I spent about the same time in those two places as he did. I would wander around and watch him fill the cart with stuff that would eventually become part of our house, in awe that he even knew what most of the stuff was.

I remember every time we left Hechinger's, I would beg him to stop off in the Toys R Us across the street, and on the rare occasion when he agreed, I would find that AWESOME GI Joe or Transformer, and beg and beg for him to buy it for me, but he never would...but he always remembered what I had been raving about, and I don't think there was a Christmas morning when all those toys wouldn't end up under the tree, in packages signed by different Christmas figures like 'Santa Claus', 'Rudolph the Red-Nosed Reindeer', and numerous Elves, all in my father's distinct handwriting. It didn't matter that I knew they weren't from Santa. It was better that they were from my dad.

I can remember going to the congressional offices on Capitol Hill on Saturday mornings so my dad could talk to some congressman or staffer about some such thing he was working on at the time. I would run up and down the halls of the Longworth Building, doubtless not that amusing to all the folks trying to work, and just when I would get so bored that I couldn't stand it anymore, my dad would appear to take me downstairs to the Longworth cafeteria, where I swear they had THE BEST PANCAKES IN THE WHOLE WORLD. My dad would pick me up so I could see over the counter to order, and I would get a heaping plate of hot delicious food that I never finished, no matter how hard I tried. I am pretty sure it tasted so good because I was eating it with my dad. He would take me on the underground train that went from office to office, which NEVER got old. Then I would sometimes convince him that we should go see the Smithsonian museums AGAIN, and he humored me, looking at the same dinosaur bones and moon landers that we had looked at so many times.

I remember being allowed to stay up late, tuning into WJR760 to listen to Ernie Harwell regale us with the story of the magical 1984 Detroit Tigers. I remember asking my dad why they booed every time Sweet Lou Whitaker came to the plate, only to be reminded that they were saying "Looooooooooouuuuuuuu", just before he rapped a single to start another rally. I can remember living and dying with every Jack Morris strikeout, every double play turned by Lou and Alan Trammell, and every home run off the bat of Kirk Gibson. My dad tought me to love sports, to cherish competition, and how there were so many ways that sport was like life - practice makes perfect no matter what you are doing, sometimes equating math to batting practice. That October was a good one, with the Tigers mopping the floor with the Padres 4-1 in the World Series. We still listened on the radio even though the games were on television.

I remember being in college, moving into a new apartment, and talking to my dad, complaining that it was pretty hot because there was no air conditioning. I came home that weekend, and there was a window air conditioner that he had picked up at a garage sale for me that morning. I just sort of took it for granted at the time, but I realize now that the reason for that is because he had been doing that kind of stuff all along.

It's amazing all the stuff you take for granted. I talked to my dad sometimes 3-4 times a day. He was my best friend, like I said. When Michigan was actually playing well in the first half against Penn State this weekend, I picked up the phone and started dialing my father to express my surprise, like I had done so many times before. I stopped myself after dialing 703, like I have done so many times over the past three years. In the second half, when the tides turned, and Penn State was running away with the game, I started dialing again...

Saturday, October 18, 2008

When Failure Attacks! Startup Edition.

Those who know me would know that I was working on a startup with a few friends/ex-colleagues that I thought had some real promise. We had a couple developers and a couple product managers, and an interesting idea. Recently, the wheels have fallen off. It's been a couple years now, we have a fair amount of code written, we have incorporated, have a bank account, operating agreement, tax documents, computer equipment, a humble web presence, and a bunch of plans. I just wanted to talk about what went wrong and what I would have done differently, and what I WILL do differently when I try again, because I am definitely hooked.

What Went Wrong

1) No Idea Validation - An idea is great in the minds of those who had it. I will admit readily that this idea was not mine, but I still think it's a great idea. The problem is that nobody who was in a position to a) buy the software, b) invest in the company, or c) partner with the company was ever spoken to to find out if this was really a good idea. How far in to the game do you talk to people? Do you worry that those people are going to say "hmm, good idea" and then do it themselves or find a different partner? Do you have faith, draft your NDA and go forth into the fray? Do you trust that it's a good idea and wait until you have something demoable, then go full bore?

2) No Time - We had a large discrepancy between what needed to get done, and how much attention it required, and how much time people were willing to spend to accomplish it. This was a strictly after-hours proposition, and we all worked at challenging jobs, but we all knew that was the deal, and we just didn't make this business a high enough priority. Deadlines weren't met, and worse, they often weren't set. This is an "all-in" game that we were playing, and we weren't giving it "110 percent".

3) No Networking - There are tons of ways to meet people who know people who have ways of helping, investing, or at least validating your idea - there are huge, active communities full of people who live for this stuff, and we didn't harness that at all. Bad, bad, bad. This was totally correctable, and will be one of the first things I do when I come out of mourning.

4) Plans Too Grand - We didn't have good checkpoints. We didn't have a great way to get demoable software out piece by piece. We had a big huge roadmap that included the kitchen sink. It was too much. We were too late in trying to identify the critical path (also see failure #1). We were going to build it all, an entire enterprise software product, in our spare time? Two of us? Yeah right! Who were we kidding? We needed to prove the concept with a small subset of the eventual product so that we could get funded or find a partner. Hindsight...

5) Bad Technology Choices - I take the full blame here. I am a Java developer. It's what I have been doing since I started in this industry. It's what I am good at, what I know, and where I feel most comfortable. So we chose Struts/Hibernate/Tomcat. It's documented, it's established, it's a known quantity. It's also not the fastest way to get something done. If I started again, in 2006, I would have used Ruby on Rails or maybe even PHP. When I start again now, I will use Groovy and Grails. The productivity gains you get from these frameworks are simply too valuable to ignore, especially when you are strapped for time.

So, for these and other reasons, we failed. It sucks, but I will do better next time. Please feel free to comment with any sort of tips or experiences that you've had along the way in your entrepreneurial career.

Happy Saturday!

Well, since I got married (and for a while before, even), I have been the subject of numerous jests from friends about how domesticated I have become. I had to giggle at myself today when I had an entire day free to myself, and did the following:

1) Woke up, got dressed, practiced guitar for about an hour
2) Addressed about 40 thank-you cards
3) Installed two new light fixtures in our walk-in closets
4) Did four loads of laundry
5) Bought a new phone
6) Practiced programming
7) Caught up on my blog reading

Not that many years ago my Saturday would have gone like this:

1) Wake up (late)
2) Locate friends and beer
3) Drink beer with friends

I think that this is a good thing, but I can't say I don't miss the utter lack of responsibility that came with my youth...

The phone I got is the LG eNV. I am not sure if it would pass the 'cool gadget test', but I think it's a lot spiffier than my last phone (LG VX-something-something flip phone). It has a QWERTY keyboard, which is really handy when I am writing my 10-12 weekly text messages. The camera is pretty good, I must say. Most importantly, the speakerphone is excellent - the last phone was completely useless in that respect. I went to the Verizon Wireless store with every intention of buying a so-called 'smartphone', but when I thought about being tethered to the internet, it just seemed like a bad, bad idea. If someone wants me to have a Blackberry, then they are going to have to pay for it themselves.

(Rant alert)
All I could think of as I evaluated the smartphones is all the people that I see/know who sit at the lunch/dinner table half-listening to the people they are sitting with, scrolling through their email, glancing every three seconds to see if another message has arrived, looking down into their lap, as if looking at the phone below the table makes it any less rude. When we were kids, we weren't allowed to talk on the phone at the dinner table, under any circumstances, and it is now one of my most gigantic pet peeves. I don't want to be that guy. Ever. If someone really needs my opinion on something while I am eating lunch or while I am out for a walk, they can call me, and leave a message. Or call twice so I know it's actually important. The fact is, 95% of these people and the messages they are ingesting like crack are not that important. The things can wait - they could wait before RIM incorporated, and they can wait now. Anyone who thinks that that email is that urgent is a bit full of themselves, unless they are working in a position where an immediate response is necessary (ie you run a production server that crashed, or you are a policeman, or something to that effect). I am okay with being unimportant enough not to need my phone attached to a POP3 server, for now anyway.

Sorry that was quite a rant, but today's phone store visit brought it to the surface. More later on failure, and picking yourself back up again.

Wednesday, October 15, 2008

What's Awesome? Fuser.

So I was poking around in the blogosphere and I saw something about Fuser and its latest release. It's a browser app that aggregates all your mail and your myspace and/or facebook account into one webpage, with tabbed view like Yahoo mail.


I need something like this, because I use 5 different computers when you count the dual-boot laptop. All my stuff is scattered in different sent mail folders in Live Mail on Vista, Evolution on Ubuntu, and Thunderbird on my Mac at work. I would rather it be in one place, and with Fuser I get that. It's got a pretty good UI, and seems to work relatively quickly. Setting up your accounts (I have hotmail, yahoo mail, gmail, and an IMAP mail account) is quick and painless, and the initial sync really isn't too painful.

All the basic features are there, except for one thing: Search. (Edit - Emily from Fuser has enlightened me - it's tucked away in the top right, and isn't that peppy, but certainly better than nothing!)

I did have a problem using this site on Firefox 3.0.3 on Mac Leopard, but it turns out it was just something weird with the latest Java update. I found a great post, describing my symptoms, and once I followed the instructions, the site seemed to work again there.

The only thing that would be really great would be to make this site work in Fluid for the Mac, but currently the browser certification doesn't allow to load this page in Fluid. I plan to try tonight in Prism to see if that works instead.

What's That, Amazon?

Now, before I start writing, I have to confess - I love Amazon's recommendation system. I frequently head there whenever I want to find a new book, a new album, or perhaps a new band to check out. 95% of the time when I go there, I think to myself - wow, that's pretty good - I really did enjoy that. They have done a good job harnessing the 'wisdom of crowds' in a way that produces strong output that keeps me coming back. That's why I found this one so funny:


Note the reasoning behind the recommendation of the Opera album:
Recommended because you rated Mother's Milk and more.
I clicked the "fix this button", and it showed me that I got there because I rated Mother's Milk by Red Hot Chili Peppers and Blue Train by John Coltrane. I can't fix that I liked those, so I have to sit idly by and hope that saying I am not interested will result in Amazon clearing it's head of the thought that I want to listen to the great tenors of our time sing opera to slap bass played by Flea and jazz sax by Coltrane. So strange!

Monday, October 13, 2008

Facebook FAIL


A few hours?

When Bad Things Happen To Good People

Man this football weekend was tough. Michigan lost to Toledo, mostly because of a 100-yard touchdown return that was a 14 point swing in the game. (This was the only touchdown Toledo scored). Sunday, the Redskins lost to the lowly Rams, on a long TD return on a fluky, fluky play. That touchdown was...wait for it...the only touchdown that St. Louis scored. What a bad football weekend.

One another and much more positive note, I may have invented a new incredible staple in my football watching menu:

THE STURGER

The sturger is an incredible thing. It's the combination of a 3/5 lb hamburger topped with a thinly sliced, marinated steak, about the size of a hamburger bun. I must say that it was one of the most delicious things I have eaten in a long time, though I can't say that I really was left wanting a second one, which made my friend Richard's double play seem quite amazing.

I think I will be marketing this idea to Carl's Jr, leaving the software profession behind. The sturger is just too good to ignore, and I think I will be able to retire in a year, tops.

Friday, October 10, 2008

Software Estimation Is Hard

So as part of my new role at Sportsvite, I am taking over the leadership of development on partner projects. These are usually slightly smaller projects that are either directly on our site, or somehow interfacing with our site. While they are smaller, they are a lot MORE of them. Like, currently we have six projects ongoing, and I have to estimate all of them.

I don't know how other software developers feel about estimating projects, but for me, it's always the most difficult part of my job. If I developed software like I estimated it, I would be in serious trouble - it would go something like this:
"Here is my code. It may or not work, depending on A, B, and C, and it could be right, but probably not, and you could probably take the expected response time and multiply it by 1.5 to get a more accurate number."
That probably wouldn't fly, right? But for some reason, in software estimation seems to work like that. I think that's kind of crazy, but there hasn't been any better methodology put out there, really? Has there?

From wikipedia on sofware estimation:
The ability to accurately estimate the time and/or cost taken for a project to come in to its successful conclusion is a serious problem for software engineers. The use of a repeatable, clearly defined and well understood software development process has, in recent years, shown itself to be the most effective method of gaining useful historical data that can be used for statistical estimation. In particular, the act of sampling more frequently, coupled with the loosening of constraints between parts of a project, has allowed more accurate estimation and more rapid development times.
So I am not alone! This is a problem for other people, which makes me feel better. There are methodologies:

Function Point Analysis
Proxy-Based Estimating
Evidence-Based Scheduling

The problem is that, especially in a small shop, we

a) don't have comparable projects that can be used to provide historical data, especially for partner projects that are often more one-off than core product development. I can say with some confidence how long it takes to add a new Struts 2 action and mapping - that part is easy, but what about the elements on the page? What about the logic?
b) don't have the infrastructure in place to really record time spent on any one task, and often find that if we did, it would be inaccurate because we wear so many hats, each hat being taken on and off randomly throughout the day/week.
c) can't afford just yet to spend a lot of time making exhaustive estimates, because that's time that won't be spent in construction and testing.

I wish there was a silver bullet that you could shoot at this problem, but it seems like there isn't. Like anything else, there has to be a point where you make something a priority to really solve it, but it's become such a joke in the industry it seems, that people aren't trying too-too hard to really get good estimates.

Ah well, if anyone has an idea, or a good experience as a successfull estimator at a small software outfit, please feel free to leave a comment describing how you did it well.

Wednesday, October 8, 2008

Obscure Things Every Java Developer Should Know Depending On Who You Talk To

In my career, I have found that the best way to learn something is to give a presentation on it. In lieu of that, perhaps writing about it would be a good way to make it sink in, and hopefully someone else can stumble across it and benefit from it as well. Here are some of those things:

hashCode() v. equals()


The following comes from this awesome site javapractices.com:

All objects have both identity (the object's location in memory) and state (the object's data). The == operator always compares identity. The default implementation of equals compares identity as well. Fun facts:
  • if a class overrides equals, it must override hashCode
  • when they are both overridden, equals and hashCode must use the same set of fields
  • if two objects are equal, then their hashCode values must be equal as well
From an interesting blog post on hashmaps and hashcode():
When an object is inserted into a HashMap, the position at which the Value object is inserted in its internal Entry-array depends on the hashCode of the Key object passed in. The hashCode generated by the Key object is not used directly, but is processed by the hash(k) method.
Immutable Objects

What is an immutable object?

Immutable objects are simply objects whose state (the object's data) cannot change after construction.

Why are they so good? They:
  • are simple to construct, test, and use
  • are automatically thread-safe and have no synchronization issues
  • do not need a copy constructor
  • do not need an implementation of clone
  • allow hashCode to use lazy initialization, and to cache its return value
  • do not need to be copied defensively when used as a field
  • make good Map keys and Set elements (these objects must not change state while in the collection)
Wanna learn this stuff visually, without paying tuition??

CHECK THIS OUT - Cal Berkely Data Structures Lectures (kinda awesome)

This is one of those "man the internets are sweet" type things. I will use this to learn all the nasty bits that I don't really want to but might have to.

Humility

Every so often you get to thinking you are pretty smart, and fortunately, someone or something is waiting around the corner to snap you back to reality. I think the only way to get better is to realize that you aren't very good at something. I think that this is good for the soul. The problem is, what if what you need to get better at is something you don't want to get better at?

As a programmer the next step is to be a better programmer, right? But a lot of these high-paying programming jobs that are out there have these barriers in front of them. They are made of giant heaps of time complexities, big o notations, stacks, queues, data structures, algorithms, and all sorts of other terribleness. I don't know any of this stuff, and the only thing that makes me want to learn it is so that I can tell other people that I know it when they ask me. I should want to know it to know it.

In my last job I did a ton of interviewing people, and I didn't really bother to ask these types of questions - why not? Obviously a) because I don't even know the freakin answer, but also b) because I can't really fathom how it was honestly relevant to the position.

So the question is - should I bother to learn this stuff just so I can get a job and not use it, or should I not bother, and then only get jobs in the future that don't require the brainteaser quiz answers? I think I know the answer, but I really dread it. Sigh.

Monday, October 6, 2008

So.Freaking.Awesome


Man it's fun to watch Philly lose.

Friday, October 3, 2008

Nerdy Things I've Learned Today

1) LAMP should be easier. Today, on a new server that had mysql, apache, and php already installed, I had to just through flaming hoops of package dependency hell to recompile php from source using the correct modules to allow for use of mysqli. Seems kind of wacky to me. Rebuild? To use a library? Boooooo. Anyway, thank goodness for google. Anyone who wants an incredibly concise guide to building a LAMP environment on Linux, check this one out - it helped me a lot.

2) The scp command will attempt to eat all your upload bandwidth. It is a greedy command. You can 'throttle' the bandwidth consumption using the -l flag (the number is kb/s):

scp -l 50 large-local-file root@awesome-remote-server:/great-directory

This is the best way I have found to teach scp to share.

3) You need good internet connection to work as a developer if you are serious about it. Ugh.