.

 

The CPU

I read a lot of computer language hermeneutics on various websites. It's rare to see people talking about syntax but instead they discuss how the language will be interpreted and understood. This makes sense, because according to two men who love wizards, Abelman and Sussman, “programs must be written for people to read, and only incidentally for machines to execute.” At the same time the CPU is an ideal reader, the ultimate consumer, the final arbiter and interpreter.

I always nodded when I heard that efficiency is overrated and programmer time is more important than processor time. It soothed my autodidact's ego. But then a year ago I sat down at my desk with a quarter-million 600DPI images and a content database containing two million triples that can be viewed five million different ways. And I was not prepared. At first a single HTML page took 30 seconds to build; then 10 seconds; then, once I learned to re-use my data and indexes, and once I knew where all the variables were—a fraction of a second, a 300-times speedup. I've been researching and I know there are whole sections of code I can cut and replace with simpler, faster routines. I still have a long way to go, and much to learn, before I can slow things down again.

The perfect website is exactly one page, the one the visitor wants. But nearly every page on the web is about changing your mind—“There's more over here!” The economic model for the content-driven web requires accumulating pageviews, and the way to make room for more pageviews is to speed things up: caching, gzipping, embracing the combinatoric explosion with relational databases and gigahertz multicores. But now I find my inner editor battling with my inner programmer, wondering whether, instead of letting people explore the data set on their own, which requires much from them, I should create a core, smaller set of useful pages, working out problems of audience and utility ahead of time, measuring the connections between topics, assembling content automatically, and forcing the processor to do more work. I want to make the computer my partner in editing. And once I have more understanding of the CPU I should perhaps reverse my goal: no page should take less than 30 seconds to cache. If that page finds 10,000 new readers over the next few years because it's more valuable (in my experience, with the way Google works, this does happen) then I will have achieved a far more relevant kind of processor efficiency: three extra milliseconds per-page upfront processing per new reader. This is very cheap.

To better understand what efficiency actually means I have been flipping through books to learn about how a processor interprets programs, to figure out how wall-socket electricity is turned into a website. It turns out that a computer is simply billions of postal gnomes riding buses, picking up or dropping off bits. In the margin of my programming books I see which band names I can spell out in hexadecimal—0xdefcab4c00dee equals 3,922,828,592,156,142.

Assembler is the Latin of programming. It helps you understand all the languages that came later; everyone feels guilty for not learning it; but there's a lot of rote learning involved and it's easier to skip (as I have, with both assembler and Latin). But reading about registers, after my decade of programming high-level languages, is like going back to Shakespeare or the Bible and realizing how many times I've heard Hamlet or Julius Caesar, or a proverb about pigs, repeated back to me in books and speeches—it's always been there; I just didn't know to see it.


[Top]

Ftrain.com

PEEK

Ftrain.com is the website of Paul Ford and his pseudonyms. It is showing its age. I'm rewriting the code but it's taking some time.

FACEBOOK

There is a Facebook group.

TWITTER

You will regret following me on Twitter here.

EMAIL

Enter your email address:

A TinyLetter Email Newsletter

About the author: I've been running this website from 1997. For a living I write stories and essays, program computers, edit things, and help people launch online publications. (LinkedIn). I wrote a novel. I was an editor at Harper's Magazine for five years; then I was a Contributing Editor; now I am a free agent. I was also on NPR's All Things Considered for a while. I still write for The Morning News, and some other places.

If you have any questions for me, I am very accessible by email. You can email me at ford@ftrain.com and ask me things and I will try to answer. Especially if you want to clarify something or write something critical. I am glad to clarify things so that you can disagree more effectively.

POKE


Syndicate: RSS1.0, RSS2.0
Links: RSS1.0, RSS2.0

Contact

© 1974-2011 Paul Ford

Recent

Recent Offsite Work: Code and Prose. As a hobby I write. (January 14)

Rotary Dial. (August 21)

10 Timeframes. (June 20)

Facebook and Instagram: When Your Favorite App Sells Out. (April 10)

Why I Am Leaving the People of the Red Valley. (April 7)

Welcome to the Company. (September 21)

“Facebook and the Epiphanator: An End to Endings?”. Forgot to tell you about this. (July 20)

“The Age of Mechanical Reproduction”. An essay for TheMorningNews.org. (July 11)

Woods+. People call me a lot and say: What is this new thing? You're a nerd. Explain it immediately. (July 10)

Reading Tonight. Reading! (May 25)

Recorded Entertainment #2, by Paul Ford. (May 18)

Recorded Entertainment #1, by Paul Ford. (May 17)

Nanolaw with Daughter. Why privacy mattered. (May 16)

0h30m w/Photoshop, by Paul Ford. It's immediately clear to me now that I'm writing again that I need to come up with some new forms in order to have fun here—so that I can get a rhythm and know what I'm doing. One thing that works for me are time limits; pencils up, pencils down. So: Fridays, write for 30 minutes; edit for 20 minutes max; and go whip up some images if necessary, like the big crappy hand below that's all meaningful and evocative because it's retro and zoomed-in. Post it, and leave it alone. Can I do that every Friday? Yes! Will I? Maybe! But I crave that simple continuity. For today, for absolutely no reason other than that it came unbidden into my brain, the subject will be Photoshop. (Do we have a process? We have a process. It is 11:39 and...) (May 13)

That Shaggy Feeling. Soon, orphans. (May 12)

Antilunchism, by Paul Ford. Snack trams. (May 11)

Tickler File Forever, by Paul Ford. I'll have no one to blame but future me. (May 10)

Time's Inverted Index, by Paul Ford. (1) When robots write history we can get in trouble with our past selves. (2) Search-generated, "false" chrestomathies and the historical fallacy. (May 9)

Bantha Tracks. (May 5)

The Moral Superiority of the Streetcar. (1) Long-form journalism fixes everything. (2) The moral superiority of the streetcar. (3) I like big bus and I cannot lie. (May 4)

More...
Tables of Contents