View source
On learning by stealing, the tutorials that didn't work, and what happens to the on-ramp when everything ships minified.
Nearly everything I know about building for the web, I learned by looking at somebody else’s work.
Not from a book though I own a couple. The courses did more for me than I usually give them credit for. I worked through a lot of the video ones, in order, the kind with a track and a checkmark at the end of each module, and they handed me the vocabulary and a sensible sequence to meet it in. I’d have learned all of this eventually without them and I’d have learned it in a much worse order. But the actual mechanism, the thing that moved me from “can’t” to “can,” was right-click, view source, and then a lot of staring.
I don’t think that’s unusual. I think it’s how most of the people whose work I read learned, and we don’t talk about it much because it sounds a bit like admitting you cheated.
What a course can’t hand you
A course gives you a finished thing and a set of steps. Which is genuinely useful, and I got a lot from them, but the thing I could never get that way was taste. The steps tell you what to do. They don’t tell you what the people who are good at this actually do when nobody’s watching.
View source did. Because a real site isn’t a teaching example, it’s somebody’s actual decisions under actual constraints, including the ugly ones. You’d open a page you admired and find a hack in it. A hardcoded pixel value with a comment saying “don’t ask”. A class name that was obviously the third attempt. And that was the education, honestly, more than the clever bits: the realization that the sites I thought were made by wizards were made by people going “ugh, fine” at 6 pm.
The other thing is that it was specific to what I wanted right now. I wasn’t learning “CSS positioning” as a topic. I was looking at one particular nav that did one particular thing I wanted, and I’d pull the thread from there. That’s a much better ordering than any curriculum because the motivation is already in the room.
The sites I thought were made by wizards were made by people going "ugh, fine" at 6 pm.
The property that made it possible
Here’s the bit I’ve been chewing on, and the reason I’m writing this instead of just being nostalgic.
That whole education depended on an accident. The web shipped its source code to every visitor because it had to. HTML and CSS and JS go over the wire as text, they arrive on your machine as text, and the browser will show you the text. There was no decision to make the web a teaching medium. It just is one, structurally, as a side effect of how it works.
And I don’t think that property is guaranteed.
Because a lot of the sites I’d view-source today mostly don’t read like some of the sites I learned from. Everything’s minified or uglified, which is correct and I do it too. Class names come out of a build step and look like .a4f2b. The markup is generated rather than written; instead of a person’s reasoning in it, there’s a compiler’s output. A growing number of pages ship a mostly-empty body and build themselves in JavaScript, so view source shows you a <div id="app"> and a script tag and that’s the whole document.
None of that is anyone doing anything wrong. Every one of those is a reasonable engineering decision and I’ve made many of them on client work. But the aggregate effect is that the thing which taught me is quietly becoming unavailable to the person who’s where I was a year or two ago.
It’s not that hard
I want to steelman this properly because there’s a version of this post that just sounds like whining.
The strongest counter is that the on-ramp today is getting better and better all the time in ways that make it negligible to lose the value of view source. There’s CodePen where the whole point is that you can see somebody’s work and fork it and break it. There’s GitHub where you can read not just the source of a page but the entire history of every decision in it with the arguments attached. There are free courses that are arguably better than the ones I’ve been paying for at Treehouse. Stack Overflow, for all of the mockery, answers in 20 minutes a question that would have taken me a week to figure out on my own.
That’s all true and it’s a lot. Somebody starting now has more available to them and somebody starting a few years from now will likely have even more available to them.
I’d just say the shape is different. All of those are destinations. You go to them, deliberately, having decided to learn something. View source was ambient. It was attached to the thing you were already doing, which was using the web, and the distance between “huh, that’s neat” and “oh, that’s how” was one click and zero intent. I don’t know how to measure what that’s worth, but I suspect the number of people who become developers is quite sensitive to how low that first step is.
Be the change you want to see in the world
While I don’t ship unminified CSS to make a point, as that would be punishing my clients’ users for the sake of my own nostalgia, I have started leaving comments in the source of things I control. Real ones, in the HTML, that survive to production, explaining why something odd is odd. It costs a few bytes and gzip eats most of them. And on personal projects I’ve stopped reaching for a build step by default, not out of principle but because I noticed I was adding one before I had a problem it solved.
The other thing, which feels small and might be the only bit that matters, is that when somebody else who’s learning asks me how something works, I try to show them the thing rather than explain it. Open the site, open the source, scroll around, be unimpressed together at how it’s held up with tape. That’s the actual lesson I got and it isn’t really technical. It’s that the web is made of stuff you can look at, by people who are guessing, and you’re allowed to go and see.
Anyway, this might be more sentimental than useful, and I’m aware I’m only a couple years in and am writing like I’m 40 or something, but I do think about it when I’m minifying something. Not enough to stop. Just enough to notice.