Friday, October 31, 2008
Candy Corn's Dirty Secret
Thursday, October 23, 2008
Six Month House-iversary
- Install a dishwasher
- Install more shelving in the home office
- Add exterior electrical outlets to the front and back of the house
- Run a network cable from the home office down through the walls to the basement and up to the living room (for my Mac Mini media center / home server)
- Put a pond in the backyard (that will have to wait till next Spring)
- Try some basic X10 home automation
Tuesday, October 21, 2008
Don't Make Me Think (About Code)
seed += lastSeed++;
I had do a double-take on that line. It's short but ugly and easily confusing. Does lastSeed increment before being added to seed or after? I even checked with a coworker and he wasn't totally sure the order of operations here. (Yes, lastSeed gets incremented *after* being added to seed. I even ran some test code to confirm it.) I'm pretty sure I had questions like these on my college C programming exams.
I once read a book about web usability titled Don't Make Me Think by Steve Krug. The point of the book isn't that web sites should be dumbed down to be usable, but that their structure should flow naturally. A user shouldn't have to stop and decipher confusing or ambiguous links. Eg: Do I click "About Us" or "Support" to find a company's mailing address?
Likewise, an important aspect of clean code is that it should be obvious how it works. It shouldn't rely on obscure language features or shortcuts. You shouldn't have to stop and ask yourself "Wait, what is this doing?"
In the end, I made a simple change to the code:
seed += lastSeed;
lastSeed++;
Yes, I added an extra line of code, but I removed any possible confusion about the order of operations. Sure, it's a simple example, but imagine if this code was being used for financial calculations. It would be way to easy to introduce a bug when it was being done all in one line. Cleaning up these things isn't just a matter of making things safer for junior level programmers (as the Java Ranch Style Guide reasons) - even the most experienced programmers make dumb mistakes. Straightforward code makes life easier for everyone.
Monday, October 20, 2008
Mac Mini Memory Upgrade
Thursday, October 9, 2008
iMac Hard Drive Failure
Tuesday, October 7, 2008
King of Prussia Lego Store Grand Opening
Friday, September 19, 2008
Willowbrook Mall Apple Store Opening
Tuesday, September 2, 2008
Thrift Store Roomba
Wednesday, August 27, 2008
Art of the Brick
Friday, August 15, 2008
Hello World
Hi, I'm Rob, a web developer and software architect living in Philadelphia, PA.
Back in early 2000 I had started a weblog that I authored for a few years. Like many weblogs, it was a mix of personal experiences, links, commentary, political rants, photography, etc. I eventually neglected it and the site disappeared when the free hosting service went away. I started a dedicated photolog a couple years back and have been doing a decent job keeping it updated.
Lately I've found myself wanting to write about technology, programming and projects I've been working on (or planning to work on) so I'm giving regular blogging (God, I hate that word!) another shot. I'm going to avoid writing about personal stuff, which gets weird when you find out family and coworkers are reading it. I'm also going to try to avoid politics, since there's a million political blogs out there already, and, frankly, current American politics just makes me want to emit a steady stream of expletives anyways. I was originally planning to make this only about projects I'm working on, but I could use an outlet for my thoughts on computers and technology as well.