December 2008 Archives

Hackiness Index

All software is at least a little bit hacky. Hackiness is bad, but often required to get the job done. As the time alloted decreases the hackiness increases, but this has always been an imprecise way of measuring how horribly hacky a piece of software is. To satisfy this obvious need to precisely determine how horrible a piece of software is, I’ve come up with a formula.

hackiness_index.gif

Where constants are defined as:

  • alpha = 10
  • beta = 2
And variables are defined as:
  • b sub t = the number of backticks or other system commands in your program
  • c sub p = the number of copies and pastes in this program either from another piece of software, or from somewhere else inside this program
  • Perl is true when a line of code is written in perl
  • LOC is a line of code in your program

In other words, the hackiness of your program is equal to the product of the sums of the number of backticks and the number of times you’ve pasted into the code, divided by the multiplicative inverse of the probability that any line of code in your software is written in Perl.

It’s a crude algorithm, but at least it’s a start towards a world of better software.