The 5 Commandments of Automation (06 Aug 2012 00:26:23 EST)

Programmers automate things—it's what we do. In fact, it's pretty much all we do. Some of us automate payroll and billing, some of us automate the process of flying combat missions, and some of us automate the process of stalking people you knew in high school, but we're all in the automation business.
more...

Floating-Point Numbers (19 Nov 2011 01:14:23 EST)

Do you use floating-point numbers? Should you be using them? If you're not sure, then you probably shouldn't be. Do you know enough about them to use them properly? Again, if you're not sure, you probably don't.
more...

Check Your Math Using Alphabets (07 Nov 2011 20:47:40 EST)

There are lots of simple tricks to help you check your math. There's a good chance that you already know about casting out nines to check arithmetic and using dimensional analysis to do a sanity check on your models. But there's one technique that I've found useful, but that I've never seen anybody else advocate (possibly because it can make your math look a little goofy). When doing math by hand, I've found that you can avoid lots of silly mistakes by using different alphabets for different types of values. (Warning: You may need a decent Unicode font installed to make sense of the rest of this post.)
more...

My Most Productive Cronjob (01 Oct 2011 11:24:27 EST)

I waste way too much time on the web. Most people I know do—it's the TV of the new generation. Sure, the web is more interactive, more informative, and more social than TV ever was, but most of my web-surfing is still just time-wasting. And it's addictive. I had real trouble keeping myself away from the web. Then I figured, “I'm a programmer. I bend computers to my will, not the other way around. I can fix this.”
more...

Write a Factorial Function (22 Aug 2011 23:35:04 EST)

Every so often, I hear about interviewers asking job-seekers to write a function to compute factorials, and I'm forced to wonder why anyone would ask that. I mean, I realize that the interviewer is trying to figure out whether the candidate has ever heard of recursion (or maybe whether the candidate can write code at all). But asking someone to write a factorial function is just inviting them to spew buggy and inefficient code onto a whiteboard. And in most cases, the interviewers apparently don't notice that there's anything wrong with it.
more...