| > Those 100 line functions wouldn't make it through any half decent code review. True but I have worked on worse. The codebase we inherited from SQL-Ledger is quite a bit worse and was even more poorly commented when we forked (the only comments, aside from two lines describing the module, and copyright notices, were magic comments which if you delete things, stuff breaks). And some of the modules were 4-5k lines with 1000-line functions. In a codebase of over 100k lines :-P. As we continue to pull out this logic, our codebase increases in functionality and decreases rather significantly in size. Oh, and it was Perl which relied on sloppy global scoping and so you couldn't test it. But hey, we are replacing the code at a pretty good clip. What is really frustrating with the SQL-Ledger codebase (at least as of 2.6 and 2.8, I haven't looked at 3.0) though and is probably the case in the code you are linking to is that the developer had over 10 years of progress in this and still never seemed to manage to improve: IS->post_invoice(\%myconfig, \%$form);
Really? That's like pass by reference to dereferenced reference, right?It's one thing to write crappy software. It's quite another to write it for over a decade and never improve. |
- 2 decades in development
- just under 3k "scripts", mixture of php html "fusion", php classes, and last decade or so templates have been added
- last wc -l check, was well into 1m lines in house code
- database (we have a few), >300 tables, it used to be around 4 but we culled some tables / systems
This is our oldest system, still in use, still extremely business critical, we're doing a similar thing to you moving things out, cleaning house so to speak. But its going to be ongoing for a long time to come thats for sure.
Some of the people in this thread should get together and start a new dailywtf clone. Pretty sure we could preload a years worth of content with nothing but grep and git-log.