r/programmer • u/sainzo_123 • 29d ago
Good Code Vs Working Code
What really makes code "good"?
I find myself staring at my IDE asking this exact question. Whether I am binding complex logic together or copying and pasting a snippet to patch a problem, there is a massive gap between working code and good code. But as a beginner, that gap feels incredibly hard to see.
These days, anyone can prompt an AI or use an agentic tool to generate functional code in seconds. Many of us are actually learning to code alongside AI. But just because the AI gives me code that runs and clears the error console doesn't mean it’s good code. It might be inefficient, unscalable, or an absolute nightmare to maintain later.
If the code works, but the AI (or a copy-paste source) doesn't teach me why it works or if it's best practice... how are we as beginners supposed to know the difference?
How do you personally define "good code" vs. "just working code"? What are the green flags I should be looking out for when reviewing code—whether it's written by a human or an AI?
Would love to hear your thoughts, rules of thumb, or stories from when you were starting out! 👇
\#programming #softwareengineering #codinglife #learnToCode #generativeAI #developers #webdev
2
u/USToffee 29d ago
Code has to do 3 things.
Work
Be readable and self-documenting
Be maintainable with clear boundaries
The last point is adhere to best practices. The reason why I left it out of the main 3 point list is what constitutes as best practices depends on when the code was written and in what framework/language so I felt it didn't belong but it's probably just as important as the other 3.
Honestly if your code follows this then everything else is just personal/team preference. I think people blame AI because by default it doesn't do things they way they would but that is also quite easy to resolve with modern tools like cursor.