(05-24-2010 12:14 PM)ZiNgA BuRgA Wrote: As for my code, unfortunately, it's not really neat - I tend to code for speed, and often omit comments here and there... >_>
I am hardly one to comment on the code commenting part. That's something I do depending upon which way the wind is blowing at the time.
Commenting has always struck me as being one of those possibly needless areas. Granted, in large code structures it can possibly help to find a section quickly when scrolling through the code, but in general, my opinion is that people should have enough of an eye to realise generally what each portion/section does without comments if they're at the point where they are delving into the code. I class it more as cruft than anything. As I say though, I do actually do it on occasion.
Legibility, (for example indentation, so that it's easier to follow the flow of the code and spot omissions/errors), and robust, secure coding practices are far more important, IMHO.
Sanitisation, validation and escaping are three points which really need some serious highlighting, as they are the three areas which tend to be sadly lacking in a lot of the existing information online and which always seem to be prevalently lacking in a lot of user code.