Re:How to Build Good Software
by spuz on Monday August 19, 2019 @08:29AM
(#20737121)
But what if the definition of 55 changes? You'll be glad to have your table of constants then.
[ Parent
| on HN ]
The project also defined HTTP, COLON, SLASH, WWW and DOT so that you would have:
string url = HTTP + COLON + SLASH + SLASH + WWW + DOT ...
I swear I'm not making this up....Reminds me of http://pk.org/rutgers/notes/pikestyle.html
> "There is a famously bad comment style: ...
Don't laugh now, wait until you see it in real life."
Re:How to Build Good Software
by snovv_crash on Monday August 19, 2019 @01:07PM
(#20739542)
Well at least a typo sould give a compile time error for some subset of typos.
But in the trade-off in code readability was probably the cause of many other mistakes, so probably ended up further behind.
Sounds like a PHP codebase I'm currently working in. I shit you not, $LI = '<li>' is in the functions file, along with $LI_END.
It was a very enterprisey Java codebase from the bad old days of J2EE - it had somewhere over 30 layers of abstractions between the code in a JSP and a web service call.
[NB 30 isn't an exaggeration - I think the vast team who wrote it were paid by the abstraction or something].