Failure is inevitable


Why var is a very important keyword in a recursive JavaScript function...

I actually don't hate JavaScript.  I'm typically not a fan of duck-typed languages, and JavaScript has caused me no small number of headaches, but it has its uses, and it beats the alternative.  I could be writing in VBScript, after all... Still, there are a few things about JavaScript that really, really tick me off.  One of those just bit me badly this morning.  Take a look at the following block of code: 1: //Recursively sets the nodes and their children to the 2: //specified checked state. 3: function UpdateChildren(nodes, checked) ... [More]

Peer Reviews

Peer reviews seem to be a source of seething hatred for many developers.  I can sort of understand why (no one likes rocks being pitched at something they created), but they can actually be very beneficial if done correctly.  This post will lay out the case for doing peer reviews as well as an approach to performing reviews that I happen to like (stolen from my friend, 'Poprythm').  If you have any suggestions for ways to improve this approach, please share in the comments!  Also, if you're not doing peer reviews, I'd like to hear why. Purpose ... [More]

What is Machine Learning?

I'm going to be doing some posts on machine learning, artificial intelligence, and data mining over the coming weeks and months as I try to crank out a thesis.  Since machine learning isn't a topic that a lot of developers are familiar with, I decided it would be best to write up a brief summary of what machine learning encompasses and why you should care.  If you have any questions after reading this, please let me know in the comments.  I need to be very solid at explaining machine learning to an uninformed reader if I'm going to crank out a decent thesis... Machine learning,... [More]

How to run a software development company (INTO THE GROUND) - Part 5

Damn, we're at part five already?  You might think that I'd be running low on material by now, but fortunately I have witnessed a horrifying number of ways in which people have tried to run a software project, most of which ended in disaster.  This week we're going to touch on something that I'm still dealing with at least once a week... The OMFGWTFBBQ Method of Bug Triage Because the people working for you are software developers, the people working for you suck.  You know this is true because I have a blog and I just wrote this.  Because the people working for you suck,... [More]

Oh great, another browser!

I'm super pumped (not really)! Google has decided that designing for two browsers (three if you count Safari, which I don't) simply wasn't enough, so they're going to up the game and release their own browser.  Factoring in the various versions of the dominant browsers, we already have Firefox 2, Firefox 3, Internet Explorer 6, Internet Explorer 7, and Internet Explorer 8, and none of them are anywhere near perfect, so yeah, why not go ahead and throw another turd in the bowl?!? Thanks, Google, for making life even harder for web app builders and web designers. S... [More]

How to run a software development company (INTO THE GROUND) - Part 4

It's Friday, so it is time for part 4 in the series that Time magazine calls "... a breakthrough in blogging."  Ok, they didn't say that, but I'm sure they would if this series was actually a breakthrough in blogging.  Practice Dragon Management Dragon Management is a brand new approach to managing your peons that is guaranteed to bring you riches while keeping the office a barren wasteland of productivity and sorrow (because we all know that productivity is directly related to pain and suffering; that's why they whipped the slaves that were building the pyramids!) ... [More]

Using LINQ to elegantly initialize arrays FAIL

Whoops.  I screwed up.  As it turns out though, I'm not the only person who was mistaken.  I've updated the post in question with a working way to populate an array of reference types.

The importance of testing

Grad school just started back for me today, so this is going to be a short post.  Hopefully I'll still be able to do three (hopefully high-quality) posts a week once things stabilize. I ran into an issue today where one of the systems that I maintain at my day job had been rendered completely unusable by a series of code changes that had been committed over the last month.  The particular system in question is mostly a web forms app, so it's a bit difficult to unit test and therefore has very low test coverage.  Because of that, it falls to the developer making changes to thoro... [More]

How to run a software development company (INTO THE GROUND) - Part 3

I am really, really glad it is Friday.  It's been one of those really, really (not) awesome weeks.  Anyway, here's how you, too, can successfully take your software development ship and crash it into an iceberg, killing everyone on board!  In a change of pace, I'm going to start putting a "why you shouldn't do this" section at the end that explains things with a bit less sarcasm. Never. Fire. Anyone. Firing.  Even the word sounds bad.  As you pilot your software development company to guaranteed fortunes the likes of which haven't been seen since the dotco... [More]

Using LINQ to elegantly initialize arrays

**CORRECTED 8/26/08: Apparently my initial code did not work correctly.  This appears to be a widespread mistake, as I found about a dozen other people doing the exact thing I was doing with reference types.  Corrected code and the non-working example are below.** I am tired of writing array initialization code that looks like this: 1: TermVector[] vectors = new TermVector[6]; 2: for (int i = 0; i < vectors.Length; i++) 3: { 4: vectors[i] = new TermVector(); 5: } I couldn't believe that there wasn't a better way to... [More]