Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So your telling me code can be imperfect, just good enough?

I can leave an extra "." in the code and nothing bad will happen?



Yes, you absolutely can leave an extra "." in the code and nothing bad will happen. The compiler will complain, you'll fix it, and then you move on.

More generally, I expect programmers I work with to know basic things like the language syntax. If you don't, learn them, and then you know them. I'd be surprised to see someone "working" in the industry if they can't get their code to compile.

The interesting stuff happens when you start using those tools to build things where there's no right or wrong answer. Being able to write code that runs is just a tool; the big question is "what can you do with it?" And if you keep the mindset that everything has to be perfect, you'll find yourself locked out of many of the interesting things you can do with computers.


Consider a poorly written program: Cryptic variable names, lack of documentation, tightly coupled.

The code would be far from perfect, but if it works then it may be considered 'good enough'.

In fact, I'll go out on a limb and suggest that most (if not all) non-trivial code is imperfect yet 'good enough'.


Sometimes nothing bad will happen, for certain values of "bad."

Have you ever had to do Risk Analysis? I have to do it on my (an others') code pretty frequently. One thing to consider is what is the "bad" thing that can happen. If the worst impact of the bug is that a line of text has an extra period at the end, that's generally not a big deal. If the database is corrupted because an extra period causes a parse error; that's High risk.

The entire planet is imperfect, yet we stumble through life somehow.


There's a difference between the syntax of your code and the program as a whole.

We're all able to express our ideas perfectly (or near-perfectly) with the English language. Subjects, nouns, punctuation - those are relatively easy things. But I challenge you to ever find one perfect idea expressed by those rules. The same is true for software.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: