“groovy mother...”

Filed under 'programming'

March 3, 2010

2010 CWE/SANS Top 25 Most Dangerous Programming Errors

Every programmer should read this list now. If you don’t have a high-level understanding of all of these (and a deep understanding of the ones that affect the platform you build on), you’re dangerous.

January 7, 2010

Don’t Be Cute with Your Test Data

Exciting news to start my day. A piece I contributed to O’Reilly’s forthcoming 97 Things Every Programmer Should Know has been picked for inclusion in the book. I’m “published”!

Below is my piece. The opening example isn’t exactly historically accurate, but it’s pretty close to something that almost got me fired from my first job!

It was getting late. I was throwing in some placeholder data to test the page layout I’d been working on.

I appropriated the members of The Clash for the names of users. Company names? Song titles by the Sex Pistols would do. Now I needed some stock ticker symbols — just some four letter words in capital letters.

I used those four letter words.

It seemed harmless. Just something to amuse myself, and maybe the other developers the next day before I wired up the real data source.

The following morning, a project manager took some screenshots for a presentation.

Programming history is littered with these kinds of war stories. Things that developers and designers did “that no one else would see” which unexpectedly became visible.

The leak type can vary but, when it happens, it can be deadly to the person, team, or company responsible. Examples include:

  • During a status meeting, a client clicks on an button which is as yet unimplemented. They are told: “Don’t click that again, you moron.”
  • A programmer maintaining a legacy system has been told to add an error dialog, and decides to use the output of existing behind-the-scenes logging to power it. Users are suddenly faced with messages such as “Holy database commit failure, Batman!” when something breaks.
  • Someone mixes up the test and live administration interfaces, and does some “funny” data entry. Customers spot a $1m “Bill Gates-shaped personal massager” on sale in your online store.

To appropriate the old saying that “a lie can travel halfway around the world while the truth is putting on its shoes,” in this day and age a screw-up can be Dugg, Twittered, and Flibflarbed before anyone in the developer’s timezone is awake to do anything about it.

Even your source code isn’t necessarily free of scrutiny. In 2004, when a tarball of the Windows 2000 source code made its way onto file sharing networks, some folks merrily grepped through it for profanity, insults, and other funny content. (The comment // TERRIBLE HORRIBLE NO GOOD VERY BAD HACK has, I will admit, become appropriated by me from time to time since!)

In summary, when writing any text in your code — whether comments, logging, dialogs, or test data — always ask yourself how it will look if it becomes public. It will save some red faces all round.

August 26, 2009

Episodes: for timing web pages

Framework for tracking web performance on end-user machines, from Steve Souders, author of “High Performance Web Sites”.

Deep Profiling jQuery Apps

Fell into my lap serendipitously this afternoon, as I was thinking about the very issue of speeding up user-side code.

July 31, 2009

Anatomy of a feature

Great description of all the thought that is needed for “a quick feature”. Just gone through implementing one of these this evening!

May 29, 2009

The Origin of Ada Lovelace

Fantastic comic strip on the origin of the first programmer.

April 21, 2009

Some Notes on Distributed Key Stores

Leonard Lin’s summary of “the market” of distributed key stores. I haven’t needed to do anything terribly large-scale yet, so redis has been Good Enough for me.

November 1, 2008

lbrandy.com : Demotivating a (Good) Programmer

Posted without comment.

October 4, 2008

Programmers Don't Like to Code

“Programmers don’t like coding, they like problem solving.” Yes! Coding is that dull chore between solving a problem and finding out if your solution works.

September 29, 2008

Hadoop + Python = Happy

Framework that combines Jython and Hadoop to make writing distributed mapreduce in Python easy. This might finally get me to dive into Hadoopyness.

July 31, 2008

It's a Different Set of Rules - The Daily WTF

Forwarded to me by a co-worker after a grammar argument. “The comma is supposed to go inside the quotes.”

July 8, 2008

Protocol Buffers: Google's Data Interchange Format

A smidgen of Google’s secret sauce — a lighter-weight-than-XML data interchange format, with heavily optimized cross-language serialization routines. Just the thing for shuttling and persisting data.

The Greatest Bug of All

Or “Why you need to understand operating system fundamentals if you want to ship end-user software”

July 5, 2008

Queue everything and delight everyone

Good thoughts from Les Orchard — Your webapps don’t have to do all your work the second a user clicks the button on a form. Queue up tasks and respond quickly, and everyone wins.

March 18, 2008

ClassNamer

“Can’t think of a good class name? Try this” Also handy for filling in status reports. “This week, I optimized the WritableCommandVector.”

December 26, 2007

SpiderWorks: Learn Objective-C on the Macintosh by Mark Dalrymple and Scott Knaster

I’m giving Mac programming a go over the festive break — This seems to be a good (cheap) e-book to get me started with Objective C.

Cocoa Dev Central: Learn Cocoa

Mega-wicked-simple “getting started with Cocoa” tutorial.

December 14, 2007

appscript

Control AppleScript from Python. The prospect of using Python to hack on my iTunes library is massively exciting!

September 21, 2007

Jumble

JUnit test tester. Works by changing your code and making sure your unit tests break! Wonder if there’s a Python version…

September 19, 2007

Strategy Letter VI - Joel on Software

Good article on where Joel sees web development going — some kind of higher-level language that compiles down to Javascript, HTML, and whatever else runs in browsers. I think there needs to be “Assembler programmers don’t have groupies.” t-shirts.

saute-swinish