I view some sites much the same; they can look great in the browser, but once you open up the hood and view the code, they slowly sink. And by sink, I'm looking at things such as:
- In-line JavaScript or CSS
- Utilizing JavaScript when HTML or CSS could suffice
- Not documenting code.
- Bad naming conventions
In-line JavaScript or CSS is simply bad. It makes your code more difficult to read, and if you are trying to edit something, say change a link for image rollovers or change the color of anchor text, then it can be a damn pain just to edit one element of it.
With this, I notice many sites utilizing JavaScript where HTML/CSS can easily suffice (and what's worse, many of these sites put it all in-line). This can cause compatibility issues with certain browsers, and cause slower, older computers to not even run the script correctly. I have an iBook that I test things on (as I am spoiled with several quality machines), and can't even begin to name how many times sites have caused it to crash because of their extensive use of JavaScript. As a person who strongly believes in accessibility, I'd definitely label this as something which limits it.
Further, not documenting script code is just as bad, especially if you are writing up templates for, say, WordPress, or trying to rearrange divs. I can't name how many headaches I've had while trying to fix sites other people have made, only to be unable to simply because they did not document their code properly.
Along with documenting code, naming conventions are one of the most elementary ways to organize your code. It's very annoying to have to go back and make edits later on, and not know what .omkpc is supposed to stand for, especially if it is handed to another designer.
These four few and easy things make things much easier for many people; not just yourself, but anyone else who may need to go back and make edits to your code.
No comments:
Post a Comment