Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I work with a guy, long time ago, who would take code already split into functions and refactor it into one big function. I am not joking here, actually happened.


I've seen that too. I don't think it was intentional -- the programmer simply didn't understand what the existing code structure was for, and "defactored" it.


Just think of all the function-call overhead he saved!


There are actually systems where this is a non-trivial gain. I've heard some of the Extream software (since acquired by HP) guys tell stories about having to inter-operate with ancient mainframes their customers refused to replace. In order to get throughput on some of the logic up to an acceptable level, they had to do just this. Amdahl's Law, a-gogo!


Happened to me in a college course - fortunately I haven't seen it since. However the CURRENT codebase I'm working on is a whole other set of nightmares.

Bonus points for the fact that they don't let me fix it...




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

Search: