24 October 2008

Compare and contrast

Sarah Palin says clothing budget row is sexist

versus



Picture by Callie Shell, from an excellent Digital Journalist piece here.

11 October 2008

Why I'm voting for Barack Obama

While I lean so far to the left on most things that I'd be more at home in someplace like Boulder or Berkeley (perhaps), I can't think of any of the Republican candidates who were noteworthy.

Rudy Giuliani: noun verb 9/11. He's an idiot, too, showing poor judgment with Kerik, his affairs, etc.

Mike Huckabee: very personable, so long as you overlook his fundamentalism and the corruption when he was governor of Arkansas. Sorry, I have no tolerance for any religious fundamentalists: Christian, Muslim, Jewish, etc.

Mitt Romney: the smartest of the bunch, and certainly he has some business credibility, but he was very quick to change his views to match what people want (and eerily reminiscent of a Stepford husband).

Fred Thompson: please. An actor? Did we learn nothing from the disaster that was Reagan, worst president until W?

On the Democratic side, I liked Kucinich (a lot) for saying the things that needed to be said, but he was nowhere near viable.

I couldn't support Hillary Clinton because she voted for the invasion and occupation of Iraq (as did Biden). That, and I don't want another ruling family.

I like Chris Dodd a lot - smart guy, good record - but his relationship with the insurance companies was a little uncomfortable.

I like Bill Richardson for a number of reasons - record on foreign policy, record at the Department of Energy, he's governor of my favorite state, he isn't another white guy, etc. - and I was really pulling for him.

I didn't care for Barack Obama at first: his lack of experience annoyed me immensely, and I couldn't understand why people were talking about him. Just like with John Edwards, he came from nowhere to national prominence without actually doing something noteworthy, and I'm sorry, but I still believe you have to pay your dues, get your scars, earn your experience.

However, his choice of Biden addresses most of my concerns about experience (most), and Barry has earned my respect, which is no mean feat.

Look, he's been campaigning for almost two years now, he's been all over the country, he's talked to thousands of people, and he's managed to stay civil, focused, and commanding. Unlike the bitter old white guy running against him.

Barack Obama's campaign is and was much better run (ethically, financially, etc.). Both McCain and Clinton had poorly run campaigns during the primaries, and it doesn't speak well of their organizational abilities.

Barack Obama is smarter, more even-tempered, and more ethical than John McCain. No contest here.

Barack Obama did a much better job at picking his Vice President. Much, much better. I have always liked and respected Biden (apart from the Iraq vote).

Finally, Barack Obama is younger and healthier than John McCain, and the thought of Sarah Palin being anywhere near the oval office scares the hell out of me.

It should scare the hell out of everyone.

Look, we have some serious, serious problems:
  • an impending worldwide recession, possibly even a depression
  • the end of cheap oil, in a culture built entirely on cheap oil and with no viable alternatives in sight
  • global warming, massive habitat destruction, and an increasing extinction rate
  • the impending death of the seas from rising CO2 and increasing ocean acidification
  • religious fundamentalists, here and abroad
This is some terrifying stuff, and ignoring it, jumping in the SUV, and going down to the mall to load up on Cheetos and DVDs isn't going to change it.

I'm looking for someone who speaks to our better natures, who can inspire us to work together to make the world a better place, to lead us into the 21st century and away from fear, poverty, war, and ignorance.

John McCain is not that person.

Barack Obama is.

So get out there and vote. It really is likely to be the most important election of your life.

03 October 2008

Using devcon to update a driver

If you work with drivers, it quickly becomes a PITA updating them, although I've gotten quite fast at doing this on XP, thanks to muscle memory.

(Vista doesn't change the focus properly in the Device Manager wizard, by the way, so my muscle memory doesn't work on Vista.)

Anyway, it turns out there's a tool available from Microsoft called devcon: it lets you do pretty much everything from the command line that Device Manager does, and then some.

For example, here I'm using it to update a driver:











By the way, the grep I'm using is from UnxUtils.

02 October 2008

Excess commenting considered harmful

With apologies to Dijkstra.

I'm a big fan of comments, provided they're in the right place and convey the correct information.

While the near-total lack of comments in my current codebase irritates me, I also come across stuff like this in some of our common code which is utterly pointless:

//----------------------------------------------
// File: spizzbar.cpp
// Author: Earnest Programmer
// Created: 8/05/2008
// Purpose: Implements an API that will allow...
//----------------------------------------------
// Changed: never
//----------------------------------------------


Let's start with the lines of dashes which separate the comment block into regions:

//----------------------------------------------

I'll admit to still occasionally doing such things, and I'd argue in the case where you have a small set of headers (2, in the case of our current SDK) and the headers are likely to be the documentation users of the SDK are most likely to see, you can get away with such cruft, but 99.9% of the time, it's pointless (and I really need to stop).


Next, we have a line which tells us the name of the file:

// File: spizzbar.cpp

Umm, if we're reading the code, it's already in a file and it already has a file name and it came from version control, which can tell us all the different names this file has ever had, so this is also pointless.


Next, we have a line which tells us the name of the original author of the file:

// Author: Earnest Programmer

Aw, your mom sure must be proud. However, this information is also in the version control history, so why are you cluttering up the code with it?


Next are a couple of lines which tell us when the file was created and last modified:

// Created: 8/05/2008
...

// Changed: never

You can guess where this is going, so repeat after me: "this information is also in the version control history, so why are you cluttering up the code with it?" Nicely done, thanks.


Finally, we come to some lines which purport to add value:

// Purpose: Implements an API that will allow...

So let's see:
  • it's a .cpp file, so I'm pretty sure it's implementing something.
  • the API is in the matching header (presumably spizzbar.h), so the purpose of the API should already be documented there

In conclusion, there's no value here: the entire comment block is useless.

"So what's the big deal?", you may ask.

Fair enough: let's go through this.

Comments are no different than code: they have to be maintained, and useless comments are like dead code. Linkers usually strip dead code, but programmers spend most of their time reading code, so we're optimizing for that scenario.

Also, the DRY principle says you want to abhor duplication, so if you document a function in the header, you don't need to copy the documentation to the implementation. Otherwise, you'll have to maintain comments in both locations.

Finally, like every line of code, you should look at every comment and ask yourself: If I ripped out this comment and I or someone else came back in six months to look at this code, could we still understand the code? If the answer is yes, strip the comment.

I believe part of our focus as software developers should be on writing as little code as possible - most of the cost of software development is maintenance, and the more you have to maintain, the more it costs - and this extends to comments.

As the phrase misattributed to Einstein goes:
Everything should be made as simple as possible, but no simpler.

29 September 2008

Phoning it in

Nice juxtaposition here:
“Some people have criticized my decision to put my country first, but I will never, ever be a president who sits on the sidelines when this country faces a crisis,’’ said Mr. McCain. And Mr. McCain, who spent this weekend in Washington working the phones, but did not actually return to Capitol Hill , said: “I know that many of you have noticed, but it’s not my style to simply ‘phone it in.’ ”
Priceless.

Why are we even having an election? It's not like there's a choice.

Roads to Madness

Yep, another Queensrÿche song title.

So now I'm running the scrum planning meeting, and the first point of contention - after me internally going "WTF?!" and trying not to show how pissed I was - was whether we really need to have the product manager at the meeting.

Yeah, let's leave the stakeholder out: that worked so well in the past.

27 September 2008

Last Time in Paris

I think I'll continue my new trend of song titles for post titles, this time a single from Queensrÿche.

I just read a great post on localization at the always-excellent Progressive Development blog with some good advice and a very nifty tip I hadn't come across before: use a pseudolocalized build for testing so you can tell
  • which strings are not still in resources and localized
  • which strings are clipped
This last item is incredibly useful. Thanks again, James (aka Maven).

25 September 2008

Working Man

So now I'm using Rush song titles for my posts: interesting...

Work has become very, um, challenging.

The first challenge has been the resignation of my boss, the director of software development and the person most directly responsible for me taking the job. After two years of struggling to get the software department aligned with a product development process that can best be described as chaotic, after telling senior management time and again that the demands placed on the software organization exceeded our capacity by almost 200%, even with the most optimistic estimates, I guess he got tired of pushing the rock up the hill.

With his departure almost three weeks ago now, I've been drafted to assist my boss's boss, the VP of product development, as we first try to figure out where we are with all the products - all 67 of them.

Seriously. 67 products.

You have to page down three times to get to the bottom of our CruiseControl page, and that's just for the products being actively maintained. It's insane.

We then have to figure out how to take steps to continue product development while also going back and fixing all the shortcuts and bandaids and just plain screwups we made getting the products out the door as quickly as possible. This week, that involved 4 solid days of meetings - 9:00 AM to 6:00 PM - with test-driven requirements, planning poker, etc. Grueling, especially since I had to lead all the meetings and I was the one standing at the board writing down all the use cases and leading everyone through this. Ugh.

I've also been going to way too many meetings with senior management, including some with the CEO. I now believe all the stories I've heard about people leaving meetings with the CEO's spittle on their face (from him screaming at them). The CEO hasn't screamed at me (yet), but he definitely has anger management issues. I want to get back to where I don't interact with him or any of the other senior staff as quickly as possible, but that may be a while: we have yet to interview anyone for VP of software engineering.

On the positive side, we finally got some C++test licenses, and it's a very interesting tool (not cheap, though). More on C++test later...

So, at this point, I'm hating on this job. I've got a couple of things lined up, including a company in Vero Beach which looks like a great fit if they pay enough and if they'll go for a couple of days a week of telecommuting. And yes, I do get work done when I'm sitting out by the pool with the laptop, thank you very much!

I'm also looking longingly at some jobs out in Reno (gambling systems) and in Grass Valley, CA (video, much better), but that's mainly to keep me sane. We just moved into a big house in Rockledge with an awesome pool, so Barbara and the kids will probably miss me if those turn out to be viable options, but still... Grass Valley is only a couple of hours from San Francisco, and Reno is an extra hour. Intriguing, and I've had this itch to go west for about 5 years now, and it keeps getting stronger.

Anyway, this is getting long, and I need to get home. I'd like to close with a shout out to my friend who cannot be named, and I hope this post gets him the review he's been waiting for. With that raise he's sure to get, he can probably afford to upgrade his monthly cable to HD and maybe have a little left over to buy some fancy treats for the dog.

I kid, I kid...

Breaking the Silence

References to Queensrÿche songs aside, it's been a while since my last post.

I was in the middle of composing a post, in fact, when I got the news about Angie, and we're all still dealing with the loss of someone who was - in every real sense of the term - a member of our family.

Three months later, it's still hard to accept that she's gone, but I'm very grateful for the time we did manage to spend together, and I'm especially glad she was able to see Nate grow up into a truly wonderful - although sometimes frustrating! - young man. I'm glad that she was also able to know Jen and Julianne and all the other members of this interesting extended family of ours, and we all miss her dearly.

One good thing, if one can say that, to come of all this is that we reconnected with Angie's mom Judy and were also finally able to meet her good friends Kyle and Kelly and meet other friends and family at the service. It was difficult afterwards being in this great little house she was living in at the time of her death, seeing all these traces of her, even catching scents which triggered memories, but although her life ended far too soon, she definitely was loved and will be for as long as we all remember her.

Life moves on, though, with no regard to whether you want it to, so don't take it for granted.

Angie, we love you and we miss you.

05 June 2008

Snowflake

Original image from http://www.focusmag.gr/id/files/2831/snow-leopard.jpg

So the current rumor is that Mac OS X 10.6 - "Snow Leopard" - will be announced at WWDC in Monday's "Stevenote" and ship at the beginning of 2009.

Given that I've started on Snowflake - interesting name alignment, considering I thought of it the day before I heard about 10.6 - it would seem I've got six months to wrap up this foray into The Life.

I have less than 1,068 days and a 3-year-old G4 PowerBook, so it seems I have my work cut out for me...