Archive for the ‘Uncategorized’ Category

How to keep attendance down

Monday, January 25th, 2010
  • Hold an expensive wine tasting … at McDonald’s
  • Hold a Yankees rally … at the Cask & Flagon
  • Hold a cloud computing seminar … at 8 A.M.

All time favorite television characters

Wednesday, January 13th, 2010

jimmyjames1. Jimmy James, News Radio (Stephen Root)
2. Al Swearengen, Deadwood (Ian McShane)
3. Omar Little, The Wire (Michael K. Williams)

Yours?

P.S. Tubalcain

Bold Statement: Code coverage by checked exceptions

Friday, January 1st, 2010
This is the first in what will hopefully be a series of statements that I may not entirely believe, but to put out there to see if they are viable…

Conventional Wisdom: Unit tests are great, you should have lots of them. More code coverage is better.

Conventional Sentiment: Checked exceptions are a hassle, more trouble than thier worse, promote sloppy coding, etc.

Bold Statement: Checked exceptions are a better way to address code coverage than unit tests.

On a scale of 1-10 of using and advocating for checked exceptions, I’m probably an 11. I completely disagree with pretty much all of the conventional complaints against them. They do not promote spaghetti code, they actually clean up your normal logic and neatly compartmentalize your error handling. They do not promote sloppy behaviors like exception swallowing, that’s entirely the programmer’s fault. Adding or removing exceptions breaks client code. Yes, it does, why is this a problem? You added additional error conditions, meaning you changed your contract with the clients, and they should be revisited. If you didn’t have this obvious way to signal a change, chances are that the client would handle things incorrectly. Even some of the major voices in computer science have fallen out of love with them, but usually the reasoning is based on people using them wrong (or being too hard to use right).

On a scale of 1-10 of using and advocating for unit tests, I’m probably a 2. They absolutely have their uses. A straight-up algorithm, especially things like math and parsing, should be unit tested for various input values to assure they’re returning the proper value. However in most modern business/consumer software these represent a very small portion of your code. There are far more lines of code dealing with things like authentication, user inputs, file loading, database and network operations, etc. These are complex activities. Even simple CRUD applications can end up invoking hundreds of functions across dozens of libraries for every operation.

The crux of my argument is that if you use exceptions properly, you don’t need to test if an operation completed properly. If the operation completes, it did so properly, all other conditions would fail to complete. Since you want to be using exceptions properly anyways for cleaner code, unit testing this code is redundant but a waste of time and energy to write and maintain. Not only that but exceptions give you code coverage at compile time AND error handling at run time, which unit tests cannot do.

If you disagree, please tell me why!

Palm Pre

Tuesday, June 23rd, 2009

Palm PreI was impressed with the iPhone when it came out, but not enough to warrant the expense of the device and the overpriced service plan and dealing with switching carriers (especially to AT&T). I had the Spring PPC-6700 at the time, which was decent and got me hooked on having a mobile calendar and contact database without carrying a PDA. When Palm announced the Pre, I decided I would wait for it, and if it wasn’t up to snuff, I’d cave and buy an iPhone.

Luckily, the Pre is a fantastic device. I haven’t spent enough time with the iPhone to compare it honestly, but it seems like a much more polished experience. It automatically syncs my Google calendar, my girlfriend’s calendar, my work calendar, the Red Sox schedule. It easily unifies contacts from Facebook, Google, AIM, etc. I can send someone an IM, they can respond by SMS, it all goes into a common stream. It comes with both Sprint GPS and Google Maps.

Hardware-wise, it’s a little thicker, and a little shorter than an iPhone, more along the lines of a conventional phone. The screen is fantastic, it works in the sun and is crystal clear. The touch screen is well designed even for my round fingers, it seems to intuitively know what I meant to click on. The keyboard is small, but effective.

Minor issues so far: A bug in the instant messaging client that chews through an entire battery in 6-8 hours. I disabled it and it now goes 2-3 days with light internet usage. Supposedly this will be fixed via software update. Charging uses a tiny USB connector and a cover that doesn’t feel very durable once opened (but very durable when closed). I didn’t get a touchstone (the new induction charger) yet, but I probably will, which should remedy that. The fact that it doesn’t do video is not really an issue for me, my other phone did it and I think I used it once in 2.5 years.

My major problem with now is that for some reason, Palm has not released the SDK to the public yet, and has not accepted my application. This means they missing really useful features like an RSS reader or the hundreds of other standard apps out there. There are only 30 applications to download right now, the iPhone has 50,000. Even if 99% of those are total crap, that’s still alot more than Palm is offering. They really need to open this up soon, while they’ve got some shininess.

Neil Poulton is a Jackass

Monday, December 15th, 2008

I recently bought a 1TB Lacie Hard Drive that was “designed” by Neil Poulton. I imagine that the design session went something like this:

Lacie: “Neil, we need you to design a hard drive for us”
Neil: “Excellent! I’ve got a brilliant idea!”
Lacie: “Tell us!”
Neil: “Well, I will tell you but you have to put my name all over the box, and not put anyone else’s name on it. Especially the people that are actually going to work late nights and weekends to do the engineering required to make this piece of commodity hardware fit into my stunningly brilliant design”
Lacie: “Sold!”
Neil: “OK, here it is, picture in your mind a shiny black rectangle”
Lacie: “I love where this is going!”
Neil: “Now picture in your mind a blue light”
Lacie: “Ooooh, sexy”
Neil: “Excellent, I’ll send over the invoice”
Lacie: “…”

Vista: Day 600

Tuesday, October 14th, 2008

So, I had meant to do this sooner, but here’s the follow-up to my 1-day update after 18 months of using Vista.

  • I haven’t downgraded to XP, nor felt any need to. On the flip side I’m still running XP at home, and haven’t felt the need to upgrade.
  • It hasn’t crashed. Nope, not once.
  • The one vista feature I’ve grown to use is the “Start Search” box, which is basically a slower/simpler version of Quicksilver, but provides most of the functionality you need (i.e. finding programs and files you don’t use all day).

Well, that’s about it.

Oh, the Macbook I gave to Phil when I got the PC? He used it for a while, but after too many problems with it, he eventually had to go and buy a replacement (his 4th Macbook in 2 years).

So THAT’s What a Debate Is

Friday, September 26th, 2008

This is a politics-free blog, but this needs to be said. I’ve watched most of the debates since the laughable Clinton/Dole ones, through the confusing Bush/Gore ones, and through the pitiful Bush/Kerry ones, and that was the first real presidential debate I’ve ever seen. Two smart guys going at it (after a bit of prodding by Jim Awesomepants Lehrer), minimal bald-faced-lies, presenting real differences of beliefs and leadership. Maybe this whole democracy thing actually works…

Hudson Balloon Festival

Sunday, August 10th, 2008

Hot Air BalloonThere’s an annual balloon festival in Hudson, MA. The festival itself isn’t much, a dozen or so local vendors, but it happens to be across the street from Reeny, so it’s hard to argue against checking it out. I was somewhat surprised that it seems fairly easy to get one in the air, you roll it out, blow a fan into it, and fire it up when it’s almost ready. I’m sure there are some tricks, but they’re typically launched by just a few people. It was also a good test of one of my new toys, the circular polarizing lens filter, which can really make the blue sky and clouds pop.

Hot Air Balloon in Flight

Hot Air Balloons at Night