Despite my upcoming classes on XHTML and CSS filling quickly, I still get funny looks from some when I tell them that in my classes I teach code, not tools like FrontPage or Dreamweaver. “It’s still necessary” I say rather unconvincingly despite my intentions since they don’t look convinced. Well, while reading Dreaming in Code by Scott Rosenberg I discovered “The Law of Leaky Abstractions“, first described by Joel Spolsky.
In his blog post Spolsky is talking about programming languages but I think it applies to almost any software tool. The basic point is that whenever you use a tool (Dreamweaver) to create something else for you (XHTML/CSS) the tool is an abstraction of what you’re you’re doing. Whenever you involve an abstraction, there’s always a chance of loosing something in the translation, a leak. The more level of abstractions you add, the more leaks and the more that’s lost in the translations.
Here’s the bit that was quoted in Dreaming in Code that’s relevant to why I teach code:
One reason the law of leaky abstractions is problematic is that it means that abstractions do not really simplify our lives as much as they were meant to….
The law of leaky abstractions means that whenever somebody comes up with a wizzy new code-generation tool that is supposed to make us all ever-so-efficient, you hear a lot of people saying “learn how to do it manually first, then use the wizzy tool to save time.” Code generation tools which pretend to abstract out something, like all abstractions, leak, and the only way to deal with the leaks competently is to learn about how the abstractions work and what they are abstracting. So the abstractions save us time working, but they don’t save us time learning.
And all this means that paradoxically, even as we have higher and higher level programming tools with better and better abstractions, becoming a proficient programmer is getting harder and harder.
This is exactly the point I try to make when I “explain” to folks why I teach code instead of the tools. Maybe the next time I need to defend my methods I’ll start by calling on The Law of Leaky Abstractions and see if that gets their attention.
I could not agree more.
I use DreamWeaver extensively because it manages my server interaction and a myriad of other assistive goodies, but it is no substitute for understanding the code and being able to build and modify by hand when needed.
I code completely by hand; that way, I know exactly what is going in there. I’ve also seen automatic code generators break things and make a mess of things, adding unnecessary code, thus increasing page sizes which leads to higher bandwidth usage, increased costs, and slower loading pages.
More importantly for me, it frees me from relying on a particular tool to get the job done. If I end up needing to create a page, I won’t be stopped if a particular tool isn’t available to me.
Good grief! How many times can you not get Word to do what you want? Any other WYSIWYG is the same way. Knowing the code allows you to do what you want and only what you want without tripling the size of the code.
Love it! I’ll be using the “Law of leaky abstractions” too. When I teach Dreamweaver classes, we look at the code all the way through the class. By the end I always have some recruits for html and css classes.