Code bloat

Friday 13 August 2004This is more than 20 years old. Be careful.

Bob links to Jason Marshall’s The Exponential Nature of Lines of Code:

There’s more here than just a vague fuzzy warm feeling that the code is ‘tight’. It means longer code-build-test cycles, more resource requirements from the code, and harder-to-solve optimization issues. Worst of all, replicated code means replicated bugs. It means developers are spending a lot of time doing the same work over and over again, with slightly different details. Slogging the same boring code over and over again is essentially menial labor, and is bad for morale.

Comments

[gravatar]
If you think that's bad, look at this :(
This frickin expression is so long, the author thought comments would help! Beats me!

if (((! xact->ios_input[0]) && (kp->flags & DATA_REQ)) ||
((xact->ios_input[0]) && (!(kp->flags & (DATA_REQ+DATA_OPT)))) ||

(((xact->ios_input[0]) && (kp->flags & DATA_CHK)) &&

/* ENTERED DATA LENGTH */
((xact->ios_input[0] < (char)kp->minl) ||
(xact->ios_input[0] > (char)kp->maxl) ||

/* ENTERED DATA VALUE (only if maxv not zero) */
(kp->maxv &&
((xact->ios_value < kp->minv) ||
(xact->ios_value > kp->maxv))))) ||

/* BITS TO BE TESTED (IF ANY) */
(kp->test && (! test_bit(kp->test))) ||

/* MODULO CHECK ENTERED DATA */
((kp->mod) && (fmodulus(kp->mod,""))))

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.