Cedric on Testing

I like how Cedric articulates his approach to testing:

Typically, I code a feature, iterate over it a few times and I reach a point when I’m pretty happy with its shape: it’s looking decent, it gets the job done and while there is obviously more work to be done on it, it’s mature enough that writing tests for it at this point will not be a waste.

Fresh Start

Sony gives you the option to remove crapware from certain new Windows 7 PCs. They call it their “Fresh Start” option, as shown here:

Fresh Start

Problems:

  • A crapware-free PC should be the DEFAULT selection, not an easily missed opt-out selection
  • Fresh Start is only available for Win 7 Professional

This leaves me with a very uneasy feeling about Sony. If I were to buy a laptop from them, it would be Win 7 Home Premium. But since Fresh Start is not available with Home Premium, what kind of crap is pre-loaded?

Great DROID Review

I thoroughly enjoyed Smartphone Showdown: iPhone 3GS vs Motorola Droid. It’s a very well-written, objective comparison between two great phones.

Magic Mouse

A family member got a Magic Mouse so I had some time to play around with it.

Magic Mouse

Here are my thoughts:

  • Step 1 – Go to System Preferences and enable right click. Duh.
  • Left and right click work perfectly, unlike the Mighty Mouse which I never could get to work reliably. You won’t mis-click with the new mouse.
  • There are no buttons, but the whole mouse does physically move and click, so it feels right.
  • The twoone-finger vertical swipe to scroll vertically works well.
  • I do not like the two-finger horizontal swipe gesture. This makes your browser go back and forward. The problem is, the entire mouse moves when I swipe horizontally. So I have to awkwardly hold the mouse while trying to contort my fingers…it’s not good.
  • For me, the mouse is far too dainty and tiny. Women and children will love this mouse. Men with big hands might be better served by a Logitech mouse.

Death by Spoon

I love the Internet.

FAIL Manifesto

Finally, a manifesto I can get behind.

Unit Tests are Tests

James Carr writes:

Unit Tests are NOT “tests” in the classical sense… they instead should be used to drive your design, to help you think about how the system you are writing should work, to illustrate functionality.

I disagree with the all caps “NOT”. I think unit tests are primarily for testing, and are particularly valuable for regression testing. I do find that writing tests as I write code influences and usually improves design, but they certainly are “tests”. The fact that tests can drive your design and illustrate functionality are often nice side effects, but they are not the primary reason I write tests.

He goes on to write:

If you ever find yourself running a code coverage tool after writing fresh code, step back and realize that you’re doing it wrong.. my suggestion is if you run a code coverage tool and find parts of your freshly written code aren’t covered, delete that code and try again.

Deleting and rewriting code is a bit too extreme for my taste, but I often do something similar. When fleshing out new work, I’ll often write new classes and interfaces, bounce ideas off coworkers, and rename / refactor heavily. Once I feel like I’ve found the right approach, I will sometimes comment out blocks of code, write a quick unit test (that fails), and then replace the code.

Helpful Alert

When I plug in headphones, the Realtek HD Audio Manager shows this informative alert:

Useless Alert

State Capitals 1.1.0

I just published a new version of State Capitals to the Android Market. If this were an iPhone app, who knows how long that process would take. On Android, the app is available within seconds of publication.

This version features one bug fix and completely new graphics. You can find it on the Android Market under the Applications -> Reference category.

Home Screen

The app does have menus to set configuration options, but everything else is through the touch screen. The new graphics show where the state resides and where the capital resides within each state.

Missouri

State Capitals is free (as in beer), and is also ad-free. Enjoy!

U.S. Music Royalty Fee

I haven’t studied my XM Satellite Radio bill for a few months. Starting a few months ago, they added a “U.S. Music Royalty Fee” to my bill, adding $1.98 per month.

They explain it here:

Music royalty rights were established by Congress and are the product of the Copyright Act. Unlike terrestrial radio, both SIRIUS and XM are required to pay copyright music royalties to recording artists, musicians and recording companies who hold copyrights in sound recordings (the actual recording of a work). These royalties have risen dramatically as a result of a decision of the Copyright Royalty Board.

So terrestrial radio gets to skip the fee. I’m guessing they have more lobbyists and political influence. This reminds me of additional state taxes levied on satellite TV providers.