« archives

January 2008
S M T W T F S
« Dec   Feb »
 12345
6789101112
13141516171819
20212223242526
2728293031  

recently

news from around the web

» view all

Archive for January, 2008


Static vs. Dynamic Typing

Friday, January 25th, 2008

Every good programmer probably has to write about their opinion on this subject once in their lifetime, so here’s my take

As part of my consulting gig I work on “Enterprise Java” code. I just had to write this line after receiving two separate exceptions on the matter (types obfuscated to protect the guilty (and they are oh so guilty… I won’t get into that)):

String somenumber = (String) ((TypeAttribute) TypeCache.getTypeFromCache("Thingie") .getAttribute("someNumber")).getValue((Thingie) object);

You’re a freaking computer! Figure it out for me!

Also, xkcd, as always, says it the best.

It’s revealing to be a Java programmer every 2 weeks, and a Ruby and Flex developer the next 2 weeks, with PHP and JavaScript by night. I understand everything about why static typing is good and proper, but today, when computers (and compilers especially) are powerful and intelligent, I think the computer should do what a computer is great for, namely figuring out extremely complex yet orderly relationships between types of things, leaving the programmer to focus on much more important stuff.

When I’m coding in Java, it takes me 50 lines of rudimentary logic and typecasting muck in a new inline comparator class to do something as simple as sorting custom objects.

In Ruby it’s a one-liner. I don’t care how much less efficient that is for the computer (and it’s not), that is worth its weight in gold in programmer time and code elegance.

I enjoy dynamically typed languages, and any good programmer knows that it’s programmers having fun that makes good software, not programmers spending 50% of their time dealing with code that gets in their way. What kills me most is that computers are really good at automatically doing the stuff that’s not fun—that is in fact what they’re designed to do—and there are people who have fun making that stuff fast, so why don’t we just let them?

Brooke Waggoner - Fresh Pair of Eyes (Free EP!)

Tuesday, January 22nd, 2008

Brooke Waggoner - Fresh Pair of Eyes EPMost artists or bands today barely manage three or four good songs on an album, so it’s quite a feat when a musician puts out a full EP of six songs that are each as good as the next and impossible to stop listening to. Especially when that musician is someone who has a degree in composition and orchestration, and lists Chopin as one of her influences.

I haven’t had a favorite album in a few months, but I like this one a lot. If you’re into good music you should definitely give Brooke Waggoner a listen. The EP “Fresh Pair of Eyes” is 100% free as a download from her web site right now, so you have no excuse not to. Her style is sort of piano folk/singer-songwriter with classical influences and an incredible skill and sense of music and sonority. She can go from some slow quiet notes and speed up and build to an expansive full-orchestra climax in the span of a single song, and her lyrics are intelligent and interesting to match. The music feels extremely natural and easy to listen to and matches so well with what she’s trying to convey, like she was somehow able to pull the emotions out of her heart and place them straight into your ears.

Give it a listen at her myspace page or go to her site to grab the totally free download.

Comments on Automatic Public Restroom Devices

Monday, January 21st, 2008

Ever gone in a public restroom and seen one of those new-fangled sensor-activated automatic devices? They range from toilet flushing to soap dispensing and everything in-between these days, but some of them make more sense than others. Here’s my analysis.

1. Automatic Sinks – Marginal Usefulness. People touch the sink fixtures before and after hand washing. Before doesn’t matter, because you wash your hands just after turning on the sink, but generally having to turn off the water means there’s risk of post-washing contamination. There are ways to turn off most normal sinks after hands-washing by means of arms, elbows, or feet, so this isn’t a complete necessity, but is still very useful. Also, these save water by only being on when used. Kudos.

Read the rest of this entry »