3 ms·
I know this is tongue in cheek, but writing functional code in an object oriented language, or even worse just taking a giant procedural trail of tears and spre
by the_sleaze_ 10mo ago
I know this is tongue in cheek, but writing functional code in an object oriented language, or even worse just taking a giant procedural trail of tears and spreading it across a few files like a roomba through a pile of dog doo is ... well.. a code smell at best.
I have a user prompt saved called clean code to make a pass through the changes and remove unused, DRY and refactor - literally the high points of uncle bob's Clean Code. It works shockingly well at taking AI code and making it somewhat maintainable.
- boredtofears 10mo agoCare to share the prompt? Sounds useful!
- the_sleaze_ 10mo agoSure. Please improve it and come back around to let me know. https://gist.github.com/prostko/5cf33aba05680b722017fdc0937f83ec https://gist.github.com/prostko/5cf33aba05680b722017fdc0937f...
- zx8080 10mo agoDoes its output follow the "no comments needed" principle of the uncle Bob?
- KptMarchewa 10mo ago>I know this is tongue in cheek, but writing functional code in an object oriented language, or even worse just taking a giant procedural trail of tears and spreading it across a few files like a roomba through a pile of dog doo is ... well.. a code smell at best. After forcing myself over years to apply various OOP principles using multiple languages, I believe OOP has truly been the worst thing to happen to me personally as engineer. Now, I believe what you actually see is just an "aesthetics" issue, moreover it's purely learned aesthetics.
- coldtea 10mo agoNot so much tongue in cheek, but a little on the light side, sure. I'd argue writing functional code in C++ (which is multi-paradigm anyway), or Java, or Typescript is fine!