The Good vs. The Bad - Web Dev Style
I’ve been constantly reading about the HTML media elements over the past few days, and in the process, learned quite a few things about web development as a whole.
I frequently come across code that looks absolutely hideous. Those kinds of moments where I think to myself, “where in the hell did they learn this?!”. Those moments when dirty code gets dropped in your lap to figure out are a developers’ worst nightmare.
The great thing about web development is that the majority of the languages your interact with are documented extremely well. On top of that, this documentation is always available to you. You don’t have to purchase anything, you don’t even have to dig for it, it’s just there.
In my reading up on media elements, I came across quite a few tutorials that people have put together. Tutorials are great ways to learn things, but the thing about learning exclusively from tutorials is that they frequently riddled with mistakes. I can’t tell you how many tutorials about usage of the audio and video elements introduced in the HTML5 spec that have been erroneous on the same simple thing, the controls attribute.
Now the HTML5 spec states very clearly (WHATWG 4.8.10), that the controls attribute is boolean. This means, quite simply that it’s either present or not present. So the thing that blows my mind is how many people have published tutorials where controls is assigned a value, presumably a containing element.
So that got me thinking, how did all these people simply ignore that? I can only assume that all this reliance on tutorials instead of the actual official standards results in a chain reaction that exponentially reproduces a simple mistake throughout learning resources everywhere.
And that ladies and gentlemen, is why there’s such a variance between good and bad web developers that the industry is cram-packed with people that can get a job done, with or without regard for doing it right. It shouldn’t be as simple as whether or not something works, but rather whether or not it works properly. Strive to own your shit, and own it good folks. Doing it right for yourself results in doing right for everyone.