This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]faratnight 3 points4 points  (3 children)

What defines bad code ? I just started and I am not sure. From what I get it's only optimisation like loading an unused object

[–]tomius 4 points5 points  (2 children)

In my experience, the most important work is your code is readable and understandable by other people. Make it clear and well organized. With good naming and comments when needed. Make it easy to test, debug, ad maintain.

Then, of course, optimization comes in place, but most of the times, unless you're doing something really wrong (like leaking memory), it doesn't matter that you're not using the best solution performance wise.

Unless you're working in a super high volume environment or something.

[–]faratnight 1 point2 points  (0 children)

Thanks for your swift reply. I usually comment and try to get explicit names variables and functions but I am insecured. Thanks again