this space intentionally left blank

May 9, 2012

Filed under: tech»os

Apropos of Nothing

Over the last six months, I've consistently given three pieces of advice to my students at SCCC: get comfortable with the Firebug debugger, contribute to open source, and learn to use Linux. The first is because all developers should learn how to debug properly. The second, because open source is a great way to start building a resume. And the last, in part, because Linux is what powers a large chunk of the web--not to mention a dizzying array of consumer devices. Someone who knows how to use an SSH shell and a few basic commands (including one of the stock editors, like vi or emacs) is never without tools--it may not be comfortable, but they can work anywhere, like Macgyver. It all comes back to Macgyver, eventually.

At Big Fish, in an effort to take this to its logical extreme, I've been working in Linux full-time (previously, I've used it either on the server or through a short-lived VM). It's been an interesting trip, especially after years of using mostly Windows desktops (with a smattering of Mac here and there). Using Linux exclusively for development plays to its strengths, which helps: no fighting with Wine to run games or audio software. Overall, I like it--but I'll also admit to being a little underwhelmed.

To get the bad parts out of the way: there are something like seven different install locations for programs, apparently chosen at random; making changes in the graphical configuration still involves arcane shell tricks, all of which will be undone in hilariously awful ways when you upgrade the OS; and Canonical seems intent on removing all the things that made Ubuntu familiar, like "menus" and "settings." I ended up switching to the XFCE window manager, which still makes me angry because A) I don't want to know anything about window managers, and B) it's still impossible to theme a Linux installation so that everything looks reasonably good. Want to consistently change the color of the window decorations for all of your programs? Good luck with that. XFCE is usable, and that's about all you can honestly say for it.

The best part of Linux by far is having a native web stack right out of the box, combined with a decent package manager for anything extra you might need. Installing scripting languages has always been a little bit of a hassle on Windows: even if the base package is easily installed, invariably you run into some essential library that's not made for the platform. Because these languages are first-class citizens on Linux, and because they're just an apt-get away, it opens up a whole new world of utility scripts and web tools.

I love combining a local server with a set of rich commmand-line utilities. Finally, I can easily use tools like the RequireJS optimizer, or throw together scripts to solve problems in my source, without having to switch between contexts. I can use all of my standard visual tools, like Eclipse or Sublime Text, without going through a download/upload cycle or figuring out how to fool them into working over SFTP. Native source control is another big deal: I've never bothered installing git on Windows, but on Linux it's almost too easy.

So there is one axis along which the development experience is markedly superior. It's not that Linux is better built (it has its fair share of potholes) so much as it's where people curently go to build neat tools, and then if we're lucky they bring them over to Windows. Microsoft is trying to fix this (see: their efforts to make NodeJS a first-class Windows platform), but it'll probably always be an uphill battle. The open-source developer culture just isn't there.

On the other hand, I was surprised by the cases where web development is actually worse on Linux compared to Windows. There's no visual FTP client that's anywhere near as good as WinSCP that I can find. The file managers are definitely clumsier than Explorer. Application launching, of all things, can be byzantine--there's no option to create a shortcut to an program, you have to manually assemble a .desktop file instead, and then XFCE will invariably position its window someplace utterly unhelpful. Don't even get me started on the configuration mess: say what you like about the registry, at least it's centralized.

None of these things are dealbreakers, the same way that it's not a dealbreaker for me to need GOW for a decent Windows command line. But if I was considering trying to dual-boot or switch to Linux as a work environment, instead of just keeping a headless VM around for when I need Ruby, I've given that up now. When all is said and done, I spend much of my time in either Eclipse or Firefox anyway, and they're the same no matter where you run them. I still believe strongly that developers should learn a little Linux--it's everywhere these days!--but you can be perfectly productive without living there full time. Ultimately, it's not how you build something, but what you build that matters.

If you do decide to give it a chance, here are a few tips that have made my life easier:

  • Install a distribution to a virtual machine using VirtualBox instead of trying to use a live CD or USB stick. It's much easier to find your way along if you can still run a web browser alongside your new OS.
  • The title of this post is a reference to the apropos command, which will search through all the commands installed on your system and give you a matching list. This is incredibly helpful when you're sitting at a prompt with no idea what to type. Combined with man for reading the manual pages, you can often muddle through pretty well.
  • By default, the config editor for a lot of systems is vi. Lots of people like vi, I think it's insane, and I guarantee that you will have no idea what to do the first time it opens up unexpectedly. Eventually you'll want to know the basics, but for right now you're much better off setting nano as the default editor. Type "export EDITOR=nano" to set that up.

May 3, 2012

Filed under: culture»america»usa

The One

One of my favorite sections in The One is when author R.J. Smith tells the story of James Brown firing his backing band and hiring Bootsy Collins' band, the Pacesetters, as a replacement (renaming them the JBs). The JBs are rawer, less tolerant of his fines and his abuse, but they're also talented and on the cutting edge of the new funk sound. Few artists would have had the nerve to make such a huge change--particularly few artists whose music was so dependent on the sound of their backing players. But the change revitalizes Brown: the result is the classic "Get Up (I Feel Like Being Like A) Sex Machine (Parts One and Two)."

Byrd grunts "Get on up!" like a hog hot on some truffles, and then the guys enthusiastically second the boss--yes, as a matter of fact, a sex machine sounds like an excellent thing to be in the present situation. The brothers are laying down a whole new sound: Bootsy's bass a flickering, alive thing, [guitarist] Catfish evoking the metallic chank of Nolen but lighter, freer. Brown spontaneously sat and decanted a little aromatic piano. Two takes and they were outta there. Seeya.
Or maybe my favorite section is when Smith describes Brown's habit of shooting up clubs in Georgia:
In the emergency room, a witness remembered the scene as nothin' but "Who shot you?" "James Brown."

"Who shot you?" "James Brown."

"And who shot you?" "James Brown."

One person came in who was stabbed. "Who cut you?" "James Brown."

He was a bad, bad man. But then again, since I was reading a biography of the original b-boy on the way to the International Soul Society Festival, I also loved this passage near the end of Smith's book about the qualities of Brown's dancing:
He is more than good enough, an embodiment of what Zora Neale Hurston called "dynamic suggestions," a quality she considered the essence of black dance. However explosively or fiercely he moved, Brown telegraphs that there's more we don't get to see--his actions exert maximum impact with a minimum of exertion (coolness), a withholding that compels the viewer to follow the gesture through in the imagination. His dance wasn't supposed to be appreciated with detachment. It was meant to pull you over to where he was, to engage you in the act. You can't sit still.

Asked to demonstrate the boogaloo by a TV show host, Brown danced around a Hollywood soundstage in a way that looked exactly like a boxer throwing punches and owning the ring. To Brown, dancing was competition--"Can you jerk? Watch me work/Can you do the slide? Then watch me glide..."

I could quote this book all day. It would be hard to write a boring book about James Brown: the hardest working man in show business, his drive and temper were both legendary. The great strength of Smith's book is that it's based on an enormous number of interviews dating back to Brown's childhood friends and family. As a result, we not only get a ton of great stories like the ones above, but it also makes a strong case for why James Brown was who he was. A man who grew up in a constant blur of conflict and motion, he didn't know any other way to be: when his younger band members thank him one day for pushing them to be more disciplined, Smith writes that Brown's reaction was one of surprise, as if the concept of a relaxed workplace had simply never occurred to him.

Smith's book is roughly chronological, but he still finds ways to give each chapter an approximate theme. Some of these are more interesting than others: the chapters midway through the book that examine Brown's complicated political views and alliance with Nixon are particularly fascinating: Smith notes that "Say It Loud" and "I Don't Want Nobody to Give Me Nothing" were recorded only a few months apart on opposite sides of the election, forming a bizarre diptych. But later, as Brown's music falls out of style and his work ethic begins to exhaust even his energy, Smith turns to darker subjects, like Brown's abusive relationships with women, his shaky financial arrangements, and his use of PCP before his death in late 2006.

Today is James Brown's birthday, and it's hard to think of many people who had such a tremendous effect on popular music. Rooted in gospel but (more importantly) riding on that always-important downbeat, James Brown's music was a worldwide sensation that influenced musicians from Atlanta to Africa. It was the soundtrack to the early hip-hop movement (literally!). It kicked off careers ranging from Parliament to Al Sharpton. That's a lot of ground to cover, and The One does it well--even if, as Smith told NPR, there are still stories from those interviews that remain untold. And maybe it's best we don't know quite everything. He was super bad, that James Brown. Say it loud.

April 26, 2012

Filed under: meta»announce»delays

Delayed on Account of Soul

Soul Society, that is. Back next week.

April 19, 2012

Filed under: fiction»industry»ebooks

Antitrust

Before anyone gets too excited about the DOJ antitrust suit against "agency-model" book publishers, it's important to reiterate the following important facts:

  • Amazon is not on your side.
  • Apple is not on your side.
  • The publishers are definitely not on your side.

Who is on your side? We will assume, for the purposes of discussion, that you are, but I retain the right to be skeptical.

I'm trying not to have an emotional investment in this case (see opening list). Belle and I use a lot of Amazon services (did you know in Seattle you can buy your groceries from them? We do), but I'm fully aware that when it comes to both strong-arming suppliers and providing unfettered access to content (read: AmazonFail a few years back) they've got more issues than New Yorker archives. I'm just having a hard time, ultimately, seeing how the publisher's problems dealing with Amazon should be my problem (or any other customer's problem), or why they should be allowed to fix prices just because they feel threatened.

There has been a lot of good commentary written about this. Charlie Stross uses the suit as an opportunity to propose that DRM is dead, since it's the primary weapon that publishers have against Amazon. This is an interesting pitch, although I'm not sure it actually makes sense: Amazon has been selling other media, such as MP3s, unencumbered by DRM for some time and it doesn't seem to have done much for them either way. Moreover, I don't buy Kindle books because they're locked to the platform--I do it because the process is practically frictionless, as opposed to requiring a connection to a PC every time I want to buy a book. But then, I find Stross informative but not always particularly prescient, such as this disastrously wrong post from 2007 (shorter version: there will never be a cheap e-book reader. Five years later, you can get a Kindle for less than $80, and dropping).

As far as the antitrust case goes, the government's case seems pretty straightforward: yes, the publishers colluded to fix prices, using Apple as a middleman but also trading e-mails (with notes attached reminding each other to delete said e-mails at a future time) and having private meetings at fancy restaurants. From this we can conclude that these are people who have not watched either The Sopranos or any other mafia movie made in the last thirty years.

In fact, it's kind of amazing how much this case lets us learn about the book publishing industry--stuff that, frankly, seems entirely insane. This is an industry that, as Obsidian Wings notes:

  • does little or no marketing for its actual product,
  • barely edits its product,
  • buys books that it will not print, and
  • buys back and destroys stock that didn't sell from the store.

Ignore the questions of price-fixing. Set aside the (debatable) arguments that publishers provide valuable editing and marketing services that full-time authors cannot handle for themselves. Forget about the fact that, under their preferred agency model, they are happy to sell you fewer books at a higher price, or that this all seems weirdly similar to the way the music industry campaigned for self-immolation post-Napster. Just look at that last item: this is a business model that pays retailers to destroy stock solely to keep distribution channels stuffed.

Even people in the publishing industry tend to agree that this is basically insane. Call me an anarchist, but you'll have to forgive me for being incredulous when they propose we let them do whatever they want to keep their institutions intact. Anti-trust? Yeah, that seems about right.

April 11, 2012

Filed under: gaming»software»mass_effect

Husbands and Wives

This is not a post about Mass Effect 3's ending. Of course, the ending is fine. No, it doesn't account for the whole of player choice during the last five minutes--but you get plenty of choice and repurcussion for previous choice during the entire rest of the game (I brought the same Shepherd through all three). No, the final reveal doesn't make a lot of sense--neither did the endings for BSG or Lost or every William Gibson novel ever written, but nobody started petitions to force the creators to change those. It says a lot that after years of trying to get games recognized as art, huge swathes of the community still seem to be blissfully unaware of what that would actually mean: artists don't have to alter their work just to fulfill your expectations.

Ahem. Not a post about the ending.

Although it would serve everyone right, I think, if Bioware's upcoming patch just removed the treacly "stargazer" narration from the end.

Anyway.

I think the progressive side of the gaming blog community tends to spend a lot of time calling out the many, many ways that developers screw things up, via sexism and racism and all the other various -isms. This is a good thing--public shaming can and does have an effect on the industry. But lately I've wanted, as a counterpart, to give credit where credit is due when things go right. And for all its issues, I do think Mass Effect 3 gave me a pleasant surprise when it came to its take on LGBT rights.

The game contains a number of same-sex couples, but the moment that really stuck out for me comes early on, when Commander Shepherd drops in on the ship's shuttle pilot, Steve Cortez, to find him replaying a recording by his now-deceased husband. The dialog doesn't make a big deal out of that--it's not a "More You Know" teaching moment. It's just a guy who's torn up because a loved one was killed. I like to think that it only underscores the in-game banality of gay marriage that Bioware then makes Cortez a romance option, for people who really enjoy playing as "creepy rebound Shepherd."

The usual suspects have, of course, chimed in, and it's genuinely heartwarming to see that EA isn't taking their demands seriously here or elsewhere. Although, to be fair, when the demands include people using headlines like "rebel fleet surrenders to gay empire," they're not exactly struggling against the eloquence of history's greatest activists here.

There are still plenty of other deeply problematic nits I could pick with ME3: the weird and uncomfortable "sexy robot" character, the lingering shots of Miranda's leather pants, or female Shepherd's anatomically-correct armor plate, to pick a few. The Asari still seem like they were imported from one of the Star Trek episodes where Will Riker makes out with Aliens of Low Self Esteem. But progress doesn't come all at once, and I'm glad to see that neither Bioware nor its parent company is rolling over the moment they get hit with some criticism.

Now, if they can just grow a backbone when it comes to the ending parts of the game that this post is not about.

April 4, 2012

Filed under: meta»announce

School In Session

This week, once again, I'm starting a new quarter of teaching at Seattle Central Community College, for Intro to Programming and Intro to JavaScript. If you're one of my students looking for my class materials, or if you're just interested in what I'm teaching, head over to my SCCC portal and check out the classes and the new student forum.

March 29, 2012

Filed under: tech»coding

Test Driven Testing

Next week a new quarter of Intro to JavaScript will start, and while I'm almost sick of writing about it, it's been constantly on my mind. I've talked a little here about some of the changes I'll be making--primarily I'll be teaching jQuery first--but there's another big experiment I'm going to try: using test-driven development tools to give students feedback on assignments and quizzes throughout the class. I did this in a limited way during the Winter quarter, with an assignment and an exam built using unit tests, but now I want to make it much more widespread. Why use testing this way? Two reasons: to force students to code, and to encourage them to think more critically about their mistakes.

The first reason may seem odd--they're in a programming class, shouldn't that force them to code already?--but it is really an extension of drill learning. I am not good at teaching via drills: I appreciate the value of repetition when I'm learning myself, but I hate standing in class and going through the same exercise again and again. I'd much rather give lectures about theory and application than do drills. But it's clear from last quarter that many students do not get enough practice from lectures. They may be too busy to write code at home, and assignments don't usually force them to use all the constructs of the language.

Drill and repetition are important because, just as with a spoken language, it's not enough to learn the rules of grammar. You need to go out and practice, so that the mechanics become natural and you can concentrate on expressing yourself. That's the motivation behind Zed Shaw's Learn Python the Hard Way series, and I tend to agree. Take the humble for loop, for example. I've written loops for so long I could do them in my sleep, but if you're just starting out there are a lot of moving parts that need to be grasped: for (var i = 0; i < list.length; i++) { //loop goes here } We've written a keyword (for), a series of semicolon-delimited statements inside parentheses, a block (represented by the curly braces), and we haven't even gotten to the actual loop. Just within this boilerplate, we're initializing a counter with the arbitrary name of "i" and giving it an initial value, testing it, and incrementing it. All of this is expressed in a peculiar syntax (the test and increment are tossed in after the setup statement, not placed in the order where they actually get executed), with a lot of very particular punctuation, plus a lot of bookkeeping to track mentally.

Writing for loops (or conditionals, or functions, or almost anything else) is therefore as much about learning a very specific arrangement of characters as it is about the overarching concepts. Languages can make this slightly easier to grasp (as with Python's comprehension-style loops and no-braces indentation), but I don't think you ever get away from it entirely. It is my goal this quarter to make students write as many of any given construct as possible in class, so that the low-level syntax becomes automatic, while using tests to keep the high-level goals in sight.

Which brings us to the second reason for using constant testing: students need to learn how to find mistakes by thinking critically about their output. Part of that process involves teaching them to use the developer tools: how to read a Firebug log, understand an interpreter error, and examine values in the debugger. But it also means they need to learn to check their code constantly, and to have thought about what they expect to get out of any given block. While I'll be providing tests on quizzes and homework assignments, so that students can immediately see if their answer was correct, the ultimate goal is to have them write their own simple tests to check their own code.

It's my belief that most of my students know what they want to do at the very highest level, but they're not able to break those goals into smaller pieces, and they don't know how to figure out when the smaller pieces stop working. My hypothesis is that writing tests may not be enough to create critical thinking where none exists, but it will serve as a good starting place for discussions of problem-solving strategy: what caused this test to fail? What were our expectations, and how were the results different? Was this test actually a good test to begin with, even if it "passes?" These are questions that good programmers ask, perhaps naturally, but I refuse to believe that they can't be encouraged in any student.

March 21, 2012

Filed under: culture»america»race_and_class

A Life of Reinvention

When I speak, I don’t speak as a Democrat, or a Republican... I speak as a victim of America’s so-called democracy. You and I have never seen democracy; all we’ve seen is hypocrisy. When we open our eyes today and look around America, we see America not through the eyes of someone who have — who has enjoyed the fruits of Americanism, we see America through the eyes of someone who has been the victim of Americanism. We don’t see any American dream; we’ve experienced only the American nightmare. We haven’t benefited from America’s democracy; we’ve only suffered from America’s hypocrisy. And the generation that’s coming up now can see it and are not afraid to say it.

--Malcolm X
I have always found Malcolm X fascinating, even before I had any idea of who he was beyond that of a Black Power boogieman. The Autobiography of Malcolm X sits on my shelf of favorite books--ironically, right next to Gene Sharp's Politics of Nonviolent Action trilogy. Obviously, though, I never lived during Malcolm's actual lifespan. I never experienced the political environment and struggle of his times. So it's easy to be more taken with the legend than with the actual person. It was with that in mind that I devoured Manning Marable's Malcolm X: A Life of Reinvention these last few weeks.

Reinvention opens with a description of Malcolm's assassination, then jumps back to tell his story from the beginning, from his family's Garveyite black nationalism through his criminal youth, joining the Nation of Islam, and then his protracted shift into independence and orthodox Islam before his death. Marable draws extensively on historical documents and interviews, which sometimes reveals interesting new angles on his subject: although the evidence that the young Malcolm may have had sex with an older man for money has gotten a lot of attention, the most fascinating tidbits may be those that explore his relationship with his wife and children, which was often contentious and distant (or contentious because of his distance). Marable is also able to produce a detailed portrait of Malcolm's complicated dynamic within the Nation of Islam, which bloomed under his attentions but also continually worked to rein in his political ambition.

Marable describes his book as a "deconstruction" of the Autobiography, and I think that's a fair description. Haley and Malcolm's narrative is that of an acutely intelligent man struggling from low beginnings to enlightenment. Marable's digging does not contradict this, but it exposes a more complicated story: as he points out, Malcolm and Haley both had their reasons to exaggerate the arc of redemption, Malcolm for the purposes of legend-making and Haley (as a liberal Republican) to drive it towards an sensational, integrationist conclusion. The Autobiography thus tends to play up Malcolm's criminal youth (which was never really that criminal), and it short-changes his organizational struggles with the civil rights movement and with his own independent groups, the MMI and OAAU (not to mention his Nation of Islam connections with white-supremacist groups like the KKK). That filling in these details does not diminish the man is a tribute to both Marable's skill and the force of Malcolm's character.

In his epilogue, Marable looks for the core of Malcolm's impact on America--as he puts it, "the social architecture" of his subject's life:

There is now a tendency of historical revisionism, to interpret Malcolm X through the powerful lens of Dr. Martin Luther King, Jr.: that Malcolm was ultimately evolving into an integrationist, liberal reformer. This view is not only wrong, but unfair to both Malcolm and Martin. King saw himself, like Frederick Douglass, first and foremost as an American, who pursued the civil rights and civic privileges enjoyed by other Americans. King struggled to erase the color bar of stigmatization and exclusion that had relegated racial minorities to second-class citizenship. As in the successful 2008 presidential campaign of Barack Obama, King wanted to convince white Americans that "race doesn’t matter"—in other words, the physical and color differences that appear to distinguish blacks from whites should be meaningless in the application of justice and equal rights.

In striking contrast, Malcolm perceived himself first and foremost as a black man, a person of African descent who happened to be a United States citizen. This was a crucial difference from King and other civil rights leaders. ... Malcolm perceived black Americans as an oppressed nation-within-a-nation, with its own culture, social institutions, and group psychology. Its memories of struggles for freedom were starkly different from those of white Americans. At the end of his life he realized that blacks indeed could achieve representation and even power under America’s constitutional system. But he always thought first and foremost about blacks’ interests. Many blacks instinctively sensed this, and loved him for it.

The Malcolm that Marable reveals was a charismatic leader and an intriguing thinker, but a mediocre organizer and an absent family man. He spent his entire life struggling his way free of one toxic system, often only to fall headlong into another--too big to fit within the apolitical confines of the Nation of Islam, while unable to completely grow beyond its restrictions. His story is in many ways a tragedy, and like the best tragedies it was partly due to forces beyond his control, and partly built on the strength of his own principles. Marable explores how time and time again, Malcolm reinvented himself, but couldn't completely shed the legacy of prior reinventions.

Historical revisionism has served to sanitize both X and King--the latter's history as a strong anti-war speaker and a controversial advocate for social justice has been nearly erased in favor of a bland, easily-appropriated anti-racism. Malcolm, meanwhile, is often reduced to a double-sided parody: either the straight-laced, separationist Muslim in a suit and bow-tie, or the militant Black Power revolutionary held aloft by a new generation. The truth as Marable shows it is more shaded, more imperfect, and more difficult to reduce to a single ideological point of view. It's always better to see our heroes as people, not as cartoons, but for Malcolm X it's in line with the sum of his life: a constant demand for complexity and engagement. In this, Marable's book is sometimes unflattering, but it also represents a deep respect for its subject, one that leaves readers more admiring of the man than the myth.

March 7, 2012

Filed under: tech»coding

jQuery as a Second Language

At this point, with the winter quarter at SCCC drawing to a close, I'd like to add onto my earlier comments on teaching JavaScript. I would still argue that it's not a great first language--too much reliance on other technology stacks (the browser, HTML, CSS), among other things. But John Resig's original post also talks about working around that complexity with libraries, and that speaks to a deeper divide in the JavaScript community: should newcomers learn "JavaScript," or "jQuery?" In this, I'm increasingly on Resig's side.

It's easy to understand why many JavaScript programmers are so adamant that newcomers should learn the language first. Sites like Stack Overflow are full of people whose answer to every JavaScript question is "use jQuery," even in response to simple problems that should be solved more directly. There are a lot of people out there whose idea of being a JavaScript programmer means "I can include jQuery and a few plugins on my page." Not that there's anything wrong with that.

But is the solution to teach people the DOM? That seems like cruel and unusual punishment--a kind of Protestant work ethic: real programmers suffer. The browser document object model ranks up there in the history of terrible API design: it's overly-verbose, inconsistent, and tedious. If you use it for any amount of time, you will end up recreating at least the traversal parts of jQuery--searching up and down the tree for related elements--if not the animation and CSS methods as well. Traversal isn't a hard problem per se, but as with anything involving recursion, it's kind of a lot to throw at a beginner.

In fact, it probably gets in the way of doing any real, productive learning. This quarter, caught up in the desire to do things "the right way," I taught JavaScript from the DOM methods up. As a result, we didn't get to jQuery until the sixth week--halfway through our time!--and several students asked "why would we ever use this?" The jump from the DOM to actually being effective is just too far for beginners, and without that reinforcement, they're likely to throw up their hands and give up.

The other argument for JavaScript-first education is that learning jQuery will leave you with blind spots in the underlying language. That sounds reasonable, but is it true? I myself didn't learn the DOM methods first--I started with jQuery, and then I picked up the lower-level functions as I went along, usually as a way to write more efficient event listeners or work with XML. I would have a hard time pointing out any ways in which learning jQuery held me back from learning the language.

I suspect the opposite is actually true: jQuery serves as a better introduction to modern JavaScript than the DOM methods do. Over the last few years, the way people write JavaScript has evolved rapidly: greater use of closures and functional coding, creative abuse of objects as hashes, and a variety of inheritance methods. Using the DOM will not help you learn these common patterns, while jQuery relies on them heavily. Teaching the DOM methods first means less time to cover the many uses of first-class functions, meaning that students who go on to use underscore.js or d3.js (among others) are likely to be completely baffled by the code style they see there.

Ultimately the call to teach "real JavaScript" first is exactly the kind of macho posturing that's far too common throughout tech culture, like saying that only assembly programmers are "real programmers" and only people who build their own computers "really understand" them. It's ridiculous there, and it's still ridiculous in the browser. No-one would suggest starting a basic programming class by introducing the Win32 COM API, but we're supposed to force JavaScript programmers to learn at the lowest, least-useful level of abstraction? Most tellingly, if you asked people who are advocating for DOM methods, I have no doubt that they're all using jQuery (or another library) when it comes time to get work done.

As with any subject, foundation is important. But that doesn't always make it the right starting place. When teaching bass, for example, we wouldn't make someone master chord theory before we taught them a simple scale. Instead, we can start at one level of abstraction and work both up and down. It's the same when coding: by starting people with jQuery, I suspect it's easier to get them into the DOM later. We can still teach the fundamental patterns of the language without being caught up in the implementation of a bad API.

March 1, 2012

Filed under: fiction»reviews»kindle

Digital Bookshelf: Rainy Season Edition

Winter in Seattle seems to be a pretty good time to get some reading done. On the other hand, although I'm riding the bus a lot, my individual commutes are much shorter. I no longer find myself with three hours a day that I can devote to that week's book. As blessings go, that's definitely mixed, but on balance I'll take it.

Grant Morrison's Supergods is, like its author, a weird and rambling mess. Part autobiography, part examination of the cultural impact of superheroes, and part discourse on cyclical history, it ranges from brilliant to tedious (sometimes within a few pages). I bought this mainly on the strength of Morrison's reputation, having never really read his work. People who are actual fans may find it less uneven than I did.

The Cold Commands, by Richard K. Morgan, is a disappointing follow-up. Morgan is one of my favorite science fiction authors--he often writes a kind of hard-boiled, transhuman noir that's like putting The Maltese Falcon through Marvin Minsky's upload process--so I was a little nervous when he wrote The Steel Remains, but it turned out to be a dark, subversive take on the genre: a gay war hero in a homophobic society, a Lovecraftian view of the supernatural, and no small amount of contempt for the tropes of genre. The Cold Commands continues the setting and characters, which is fine, but then it squanders its entire plot on nothing much in particular. Too long and too little, it makes me hope that the buildup is worth whatever Morgan has planned.

Let's Get Free: A Hip-Hop Theory of Justice reads like a clear case of fitting a hook to a topic rather than letting it flow naturally. Author Paul Butler, a former prosecutor, has good points to make about how the American justice system is broken in ways that unduly punish black men, and his comments on how jail culture has spread out into hip-hop are thoughtful and interesting. But his answer is less a "hip-hop" theory of justice than a "common sense" or "progressive" theory. I guess that's not quite as marketable. It's worth reading if you're interested in the subject for its own sake, and not if you're hoping for some kind of wild cultural blend. Maybe that's a problem of my own expectations.

If you're looking for good, old-fashioned science fiction, you could do worse than The Door into Elysium by Joan Slonczewski. It has aliens! Matriachy! Genetic engineering! Distant and oppressive empires! For all that, it is also partly a book about non-violent social protest, which puts it right up my alley. It reminded me in many ways of le Guin's work--a thoughtful, steadily-built character drama at a subversively large scale. It is also (vaguely) like Dune, at least plotwise: the plot pits one planet of near-feudal bureacrats against a group of environmentally-aware anarchists. Recommended if you like books about institutional politics (read: not more tedious court intrigues), or if you're a sucker for the book's ecological setting.

I didn't hate Jacqueline Cary's Santa Olivia--a goofy pulp title about genetically modified boxing-- but her follow-up, Saints Astray, is criminally bad. Somewhere between the two books, Carey appears to have forgotten to write dialog without relying on annoying verbal tics, and the book is virtually plotless. It reads like wish-fulfillment--not something genre fiction (and particularly science fiction) needs any more of. You cannot skip this book fast enough.

Having never played The Witcher, I didn't really know what to expect when I picked up The Last Wish and The Blood of Elves, which are two of the books by Andrzej Sapkowski on which the games are based. They turned out to be surprisingly good (particularly The Last Wish). Although they feature Sapkowski's mutated monster-hunter Geralt as a main character, half the stories seem to be parodic takes on various fairy tales, showing how they twist and turn when placed into more realistic circumstances. Although there are serious dramatic moments, there's also a thick slice of black humor running throughout, and Sapkowski has a gift for wry dialog that the excellent translation preserves. Blood of Elves is probably more skippable, since it's apparently an out-of-sequence middle book, but they're both easy to recommend.

Simon Morden's Equations of Life feels like a William Gibson novel that's trying too hard--and given Gibson's output lately, which has spiraled into a loop of tedious trendspotting, that's not a compliment. A noir-ish yarn about a Russian mathematician in post-disaster London tangling with Yakuza and killer nuns, it's too proud of its unoriginal ideas, and not willing to give its characters enough leash. For all that, Morden isn't a bad writer, so it's a quick read, but not a memorable one.

The Quantum Thief, by Hannu Rajaniemi, is one of those post-human "big idea" books that, for me, crosses the line from science fiction into tall tale. Yes, yes, sufficiently advanced technology indistinguishable from magic and all that, but when it all comes down to it, once you get far enough from the pre-Singularity here-and-now, your uploaded-consciousness yarn runs the risk of becoming either A) Mary Sue (i.e., John C. Wright) or B) unbearably twee. Rajaniemi's book, with its characters who manage their memories like social networking profiles, ends up closer to the latter, and it's to the author's credit that the best ideas don't get swamped under either exposition or deus ex machina. It's probably worth reading once it's out in paperback.

Now here is one of those rare titles: historical fiction wrapped in sci-fi, and it's (intentionally) laugh-out-loud funny. To Say Nothing of the Dog is one of a loosely-related series by Connie Willis, in which historians at Oxford travel back in time and meet with various mishaps. In this case, the main character is sent back to the Victorian era to repair the timeline (somehow--the instructions get lost along the way) while recovering from a serious case of time-sickness (and while knowing absolutely nothing about Victorians, except that he once read Three Men in a Boat, which he then inadvertently inspires). If the denouement can't quite live up to the hilarious first two-thirds of the book, that's little enough to complain about.

Finally, after reading 5 Very Good Reasons to Punch a Dolphin in the Mouth, which is a collection of Matthew Ingram's comics for The Oatmeal, I have an unfortunate confession: I don't think I actually like The Oatmeal very much. Ingram's comics are internet-famous, I just don't think they're actually that funny. Half of them are flat nerd humor straight out of Reddit, and of the rest, the charm wears thin across an entire book collection. Maybe they read better when they trickle out a little bit at a time. It's free from the Kindle Lending Library if you're an Amazon Prime member, but otherwise I wouldn't recommend it.

Past - Present - Future