Naming Things is Hard

Hey! Let’s read jQuery — Part 1: Print that sucker out

(Check here for a capsule background of what this is about.)

So I probably won't do this for every code thing I look at, but when it comes to jQuery, I really wanted to have a hard copy for reference. 

Part of what I'm trying to do with this project is get a better sense of exactly how I want to approach looking at a codebase. I want to start off by looking at the big shape of the thing; what does this thing I'm looking at ultimately *do*? Within that shape I want to find an entry point; where does the code "start," where does magic actually first happen. From there, if I can find clear signs of structure or architecture, repeating patterns or visible seams, a path from one function to the next—any sense of how this big thing might actually be a collection of not-as-big things—I'd feel like I've got at least a hand on the face of the rock wall.

With jQuery, which is ultimately one big file full of JavaScript, it feels like that's something I can do best with paper and sticky flags and a pen that I can tap against a physical stack of pages when I'm feeling particularly flummoxed by completely nonsensical-seeming nested functions.

Also, I need an excuse to look away from my screen now and then. But sometimes still look at code. Because, I'm going so full nerd this year, it's silly.

So the thing to do would probably be to go grab an official downloadble release file, but, because I'm curious and easily distracted, I've grabbed a copy of the Git repo, and I've run the build on that, generating a version 3.1.1-pre file, which you can download below, if you feel like playing along at home. (I've no interest in "keeping up" with jQuery as it develops, so sticking with this snapshot view of the code for the duration of this project (all three posts' or three hundred posts' worth) will be just fine with me.)

Printing a 10,000 line code file, with line numbers, it turns out, isn't exactly the easiest thing in the world to do. Nor the cheapest, though the looks and comments I got at the print shop made every penny worth it. I'll shovel some of that detail off into a separate post, because I'll probably want it again myself some day, and just put links here to my final txt and PDF files. You're on your own finding a cheap deal on long prints (though do let me know your cheapest price-per-page options).

(Todo: add photo of printed stack of jQuery pages, once I get around to fixing image styling in the theme.)

Blog images

A stack of printed jQuery pages, bound together with a large binder clip, and multiple yellow sticky tabs jutting out around the edges.

Download:

jQuery file , jQuery file (with line numbers) , jQuery file (with line numbers) (PDF format)

tags

Home & About & Micro.blog & Feed (Atom)