Earlier quoted context omitted.
Usually it's when they get their first non-seed round of investment and realise their product doesn't let them grow as fast as they'd like. Products growing through sales can go without proper cleanup for decades. Friends have told me stories of single SQL queries taking upwards of 15 minutes to run (and then being rewritten in SQL+PHP that does the same in 20 seconds)
I've seen my share of awful (but trivially optimizable) queries taking forever to run - but can you elaborate on what PHP has to do with it?
You Should Write Ugly Code
51–56 of 56 posts
Re: You Should Write Ugly Code
#52Earlier quoted context omitted.
I've seen my share of awful (but trivially optimizable) queries taking forever to run - but can you elaborate on what PHP has to do with it?
Just that PHP is considered slow compared to a RDBMS, but is much much quicker when used appropriately.
Re: You Should Write Ugly Code
#53- Of course, ugly code is fine for experimening, short-lived code, or code that won't be touched again.
- But beautiful code makes me enjoy my work, which is really important.
- It makes lives of other devs better. Devs want more money for working with ugly code (ie. it costs the company money).
- Ugly code supports the culture that aesthetics is not important.
Re: You Should Write Ugly Code
#54I had a really great post for this topic about the utility of ugliness in language design. Ocaml provides imperative features but makes them ugly, subtly encouraging a functional approach in most cases. Clojure quite brilliantly makes OOP and heavy Java interop possible but very ugly (because the language's ultimate goal is platform-agnosticism) while making idiomatic Clojure beautiful. Making something ugly is often…
I feel like functional and non-OOP languages are probably unpopular in the corporate world because when you're using one, there is not really any need to have a business analyst design the application in UML diagrams or Microsoft Visio. Java, on the other hand, is perfect for that, if that's what you're looking for. Java and enterprise software were made for each other.
Re: You Should Write Ugly Code
#55Earlier quoted context omitted.
Thanks, "Technical debt" is the word here. "Beautiful" might not come close to "valuable" in terms of importance, but "Clean" should come close, because accumulating too much crap makes maintenance & feature addition painful. Uncle Bob's "Clean Code" does a great job at detailing that.
How does one define the difference between "Beautiful" and "Clean"?
"Clean" -> Modular, separates concerns, loosely coupled, not in need of significant refactoring, easy to write unit tests for