3 ms·
* Horrible duplicate code. * Functions with more than 200 lines. * Functions with about 16 parameters. * A deploy process that consisted of copy and pasting usi
by sergiotapia 12y ago
* Horrible duplicate code.
* Functions with more than 200 lines.
* Functions with about 16 parameters.
* A deploy process that consisted of copy and pasting using FTP.
* No source code control. Not even regular file backups, the 'code' was just on production and everybody worked against that.
* If else cases in the double digits.
- shoo 12y agoUgh. > Functions with about 16 parameters. I am reminded of a talk by Kevlin Henney [1]. He mentions this quote from Alan Perlis: "If you have a procedure with ten parameters, you probably missed some." [2]. Kevlin goes on to give anecdotes about code he has encountered or heard stories about while consulting / teaching - the record was a function with around 370 parameters, and that function was still growing. I'd prefer to see a function with a dozen arguments than a "function" that takes no arguments, returns void, and secretly communicates using global state. Explicit horror beats surprise horror. [1] http://www.infoq.com/presentations/architecture-uncertainty-nordevcon-2014 http://www.infoq.com/presentations/architecture-uncertainty-... [2] http://www.cs.yale.edu/homes/perlis-alan/quotes.html http://www.cs.yale.edu/homes/perlis-alan/quotes.html