programming posts

Exceptional Exceptions

Thursday, August 27th, 2009

I’ve heard a lot of mantras regarding how to handle exceptions properly in programming languages that support checked exceptions (eg Java).  Sometimes these mantras are regarded a little too highly, even doing harm in some situations.  I’d like to dissect a couple of these. Never Sometimes catch the top-level “Exception” class. There are times when
[read more]

My Favorite WMP Bug

Friday, April 10th, 2009

Found a very interesting bug in Windows Media Player (WMP).  An embedded player will fail to play if the URL of the page it is embedded into is too long. This is fun because you can see this on any website. I have only tried this in Firefox and Internet Explorer 7 on Windows, but
[read more]

JavaScript: The Replace Secret

Thursday, December 25th, 2008

I was taking a look at the MDC page for JavaScript’s replace function and noticed something interesting: It can take a function for its second argument.  That page is a little fuzzy on the details and other docs on the internet generally don’t even mention this option.  So I explored a little.  Here is an
[read more]

A Find Idea

Friday, November 21st, 2008

Check out this suggestion IntelliJ IDEA makes when I try to find a file: Never mind the terrible file name.  Notice how it finds it even though I didn’t know it had an underscore in the name.  Making the search do exactly what you expect would have been fine, but a real programmer thinks about
[read more]

Don’t Just Do It

Monday, October 20th, 2008

The most important programming skill I can think of has nothing to do with programming.  It is the ability to think of every task in the context of the software that is being made. The task: write an HTML parser in one week.  A good programmer gets it done.  A great one explains why the
[read more]

About | Other Stuff