Hacker News new | past | comments | ask | show | jobs | submit login

Nope. One of my first experiences with removing many lines of code was in college. It was a compilers project (we had to hand-write it, no YACC or anything). I had written about 10k lines of code in a flurry of activity, and discovered some really gnarly bugs.

I spent a day with just a pencil and paper, considering each detail of the algorithms and came up with several key insights which reduced the whole thing to about 1k lines of code. The reduction was a combination of C macros (which I wouldn't use today, but I'd use higher-order functions to accomplish the same thing now) and just smart generic code (no special handling of an add operator versus a multiplication operator, they were both binary operators; differentiating the output for each case happened in one place at the end).

That was when I found out I liked deleting code. I'll happily reduce a code base by 90% if the result is clearer and easier to maintain or extend.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: