Clean Markup..

siforek

New member
Other than making things easier/more organized for myself, I know there's not really any requirement in writing clean markup. I guess I'm just that much of a perfectionist, but I'm wondering how many others do, and if there's any additional advantages?
 
I think clean markup is essential in all programming or coding, not only for that fact that it is more understandable but also for illness and other issues where by the main coder or programmer is unavailable and someone is required to take their place however temporary.

I often for sites, divide them into 3 seconds allowing for easy reuse of code and also for ease of integration which will also be the method put forward in tutorials that myself and my team write. By no means do I recommend commenting code to high heaven though as I have seen many people do as this is a pure indication for those who rip sites as to “take this bit of code to do....” but commenting sections is helpful as well as clearly indenting div’s and content within the code.
 
I mite comment parts of a stylesheet php file if it'll save me time when making quick edits, but other than that comments are worthless to me. However I can understand where more details would be needed, like open source software, etc. Indents are essential IMO..
 
For the most part, before posting my code to the site, I often strip comments from the code (unless I'm doing testing). The smaller I can keep the file, with less lines etc, the faster the page loads. Sure it's only a few extra lines, but everything counts in this day and age.

I usully keep a marked up version here locally and use it for troubleshooting (if necessary) - but other than that, I usually try to dump comments before uploading to the web.

When I used to work for a large corporation doing programming, the removal of comments pretty much ensured job security also :) Hiring a programmer to decode what I had done is often a lot more expensive than just asking me to fix "xyz" in a program.

That said, when I hire outside programmers to make something, they are required to produce a flow chart and commented code as part of the purchase price.
 
Smaller files are one thing, but I just can't understand how someone can make changes in a timely manner when it takes ages just to find what needs to be altered in the mess of many sites I've seen.
 
It's like Conor said - part of it is about job security. Another part is about reducing file size. Quite often, it's just quality of work. Some providers are just more professional than others.
 
I agree there is no explicit need to do this, but I do it anyway :D I like my code extremely clean. Some people say that this is hard to achieve and just takes away your time. It's just a matter of preference, if you do it clean do it clean from the beginning. Who knows, one day browser developers will decide clean markup must be a standard :)
 
Unfortunately, I don't foresee that happening anytime soon.

Me too, but I'm a dreamer :D It's interesting how this works:

Work of bad coders is accepted by the browsers, so those coders stir from correcting their mistakes and gaining proper knowledge. So coders get more sloppy and the browser more disrespectful of standards. It's just getting worse and harder for the browser developers to get on the right track and we face a much more rubbish code on the net whilst.
 
Back
Top