Trevor Burnham

Sure, it works in practice…

Entries Tagged as 'design'

Flicker-​​free Typekit

January 28th, 2010 2 Comments

I’m a fan of Typekit. Being able to go beyond the old Arial-​​Verdana-​​Times-​​Georgia paradigm, on any modern browser, without Flash (unlike sIFR), and with selec­table text (unlike Cufón), is a dream come true.

One problem, though: It takes a few mil­lisec­onds to load up and render those fonts. That’s not so bad in itself; what’s bad is that the browser renders every­thing in non-​​Typekit fonts first, creating an annoying flicker every time the page loads as the text gets replaced by fancier fonts.

For­tu­nately, there’s a fairly easy solution (though not an offi­cially sup­ported one—see below). Just add this to your site body:

1
2
3
4
5
6
7
8
9
10
11
12
13
<body id="domain-com">
  <script type="text/javascript" src="http://use.typekit.com/KIT_ID.js"></script>
  <script type="text/javascript">
    document.getElementById('domain-com').style.opacity = 0;
    setTimeout("document.getElementById('domain-com').style.opacity = 1", 1000);
    Typekit.load('KIT_ID', {
      afterLoad: function(data) {
      	setTimeout("document.getElementById('domain-com').style.opacity = 1", 1);
      }
    });
  </script>
  <!-- content goes here --> 
</body>

Then sub­sti­tute your actual domain for domain-com, and (impor­tant!) your site’s unique Typekit ID for KIT_ID. You can get this ID by logging in to Typekit, launch­ing the Kit Editor, and clicking the “Embed Code” link; it’s an 8-​​letter alphanu­meric combination.

Here’s a breakdown:

  1. The <body> ID on line 1 isn’t just a good selector; it’s good form. The most common con­ven­tion is to use your domain (with a dash instead of a dot), which makes things easier for the Grease­mon­key types.
  2. The script include on line 2 brings in the Typekit descrip­tion of your site’s kit. You can move this line up to your <head> section if you want.
  3. Line 4 makes your entire site dis­ap­pear. Because this is at the top of your body, nothing is going to get rendered. It’s impor­tant that this line be here, rather than in another file or even at the foot of your body.
  4. The call to Typekit.load does the actual loading of the fonts, and the afterLoad callback will be executed right after that happens. That’s when we want to make the body opaque again, right? Well, not quite. It seems that there’s a small delay between the callback and text refresh. For­tu­nately, using setTimeout to add a tiny delay (1ms) seems to elim­i­nate this, finally ridding us of the dreaded flicker.

Caveat: The afterLoad event is cur­rently con­sid­ered exper­i­men­tal. An official solution for avoiding flicker is likely to be added in the future.

Tags:      

Sloppy Notation Costs Lives

January 12th, 2010 1 Comment

Blackboard equationsI had a grotesquely familiar expe­ri­ence in an econ class today: The prof drew up a simple example of a simple concept, yet no one—myself included—understood it. Why? Multiple incon­sis­ten­cies. A variable name meant one thing in the premises, and some­thing else in the con­clu­sion; a vector was used inter­change­ably with its distance; the matrix dimen­sions didn’t match up. Indi­vid­u­ally, each of these small errors could have been caught and cor­rected. But taken as a whole, they destroyed every trace of coher­ence. As a result, half the lecture was spent with the frazzled pro­fes­sor trying to clarify things, only to confuse the audience further, to the point that students were yelling, “Enough! Forget it! Let’s move on!” These are PhD-​​level students at one of the top econ programs in the world. Yet the sit­u­a­tion was so ago­niz­ing that it drove them to pan­de­mo­nium.

When will people learn? If you’re address­ing an audience, it is your moral imper­a­tive not to waste their time. In par­tic­u­lar, there are three goals you must pursue:

  1. Accuracy: Check your facts, and be rigorous
  2. Clarity: Address points of possible confusion
  3. Density: Convey as much infor­ma­tion as you can in as little time as possible

This doesn’t just go for math­e­mat­i­cal lectures. It goes for any inter­ac­tion with your fellow human beings, with the imper­a­tive growing stronger in pro­por­tion to the size of your audience. No matter how much you value your time, if you’re giving a talk that hundreds will attend or writing a book that thou­sands will read, you owe them your most strin­gent efforts. Think about it numer­i­cally: If you save 3,600 people one second each, you’ve just saved someone an hour.

The desire not to waste other people’s time has always been one of my defining traits. Not that I always succeed, but at least I’m embar­rassed when I fail. Some­times I worry that this men­tal­ity is not widely shared.

Tags:    

Calculus: The Videogame

January 9th, 2010 Comments Off

Last semester, I took a graduate-​​level course called Videogames and Learning, taught by Barry Fishman of the UMich Edu­ca­tion depart­ment (who also teaches an under­grad version). Needless to say, the class is widely beloved, despite its dense syllabus of readings on the theory of learning and moti­va­tion. I decided to write my final paper on the question, “Why aren’t there any games that teach calculus?” (At least, not any suc­cess­ful ones.) There are some terrific games, like the Zoom­bi­nis series, that teach basic logic; and there are some com­pelling games, like the free online Lure of the Labyrinth, that teach arith­metic and algebra; but no one seems to have made a game that goes past the 8th-​​grade level. At the same time, no one has made an edu­ca­tional game as rich and immer­sive as, say, Mass Effect, a game so slick and well-​​written that it’s like living in the best sci-​​fi movie since The Empire Strikes Back.

Over time, I realized that this was not a topic con­ducive to academic pub­lish­ing, so the project drifted from a research paper to a design one. The result is an attempt to describe how a game could be made to teach calculus, proof method­ol­ogy, and ways of math­e­mat­i­cal thinking—all within the context of a gripping adven­ture. The paper is called Math Effect. I hope you enjoy it. And if you’re a game designer, I hope it gives you ideas.

Tags:    

Perfectionism

January 7th, 2010 Comments Off

Bembo font sampleLet me tell you the tale of a real perfectionist.

There once was a Yale pro­fes­sor by the name of Edward Tufte. He wanted to write a book about the pre­sen­ta­tion of sta­tis­ti­cal data. It was going to be rich in plots and graphs, accom­pa­ny­ing the text on every page. Instead of tiny, clumsy foot­notes, or pageflip-​​inducing endnotes, it would have wide pages with margins per­fectly suited to his numerous cita­tions and inter­jec­tions. It was, alas, going to be an expen­sive book to print. And so, no pub­lisher would take it in its intended form. They would cheapen it, separate the images from the text, make it just another for­get­table academic treatise doomed to gather dust on library shelves. Rather than accept this fate, Edward Tufte decided to self-​​publish the book that would redefine his career: The Visual Display of Quan­ti­ta­tive Infor­ma­tion.

Now, when I say “self-​​publish,” you may have visions of Tufte upload­ing a PDF to iUni­verse and ordering a dozen copies. No. This was 1983. Self-​​publishing was an arduous and expen­sive process—but Tufte was obsessed. So, he went all in, taking out a second mortgage and setting up a printing press in his garage.

For­tu­nately, the book was a smashing success, the first in a tetral­ogy of books that have come to define the inter­sec­tion of design and sta­tis­tics. The books are hallowed in both industry and academia for making one of the nerdiest subjects imag­in­able into an utter pleasure acces­si­ble to any reader.

Within this epic arc, there is a smaller story that may yet secure Tufte’s visage a per­ma­nent place in the dic­tio­nary next to the word “per­fec­tion­ist”: When it came time for Tufte to convert his printing process to a purely digital one, it turned out that the digital version of the font he had been using, Bembo, was too spindly for his liking. Whereas an ordinary person would readily accept this minor defi­ciency (aca­d­e­mics commonly publish in Euclid, one of the spindliest fonts ever devised), or switch to some other serif, Tufte worked with pro­fes­sional font design­ers to design a new and improved version of his beloved typeface. Such atten­tion to detail is an inspi­ra­tion to us all.

And so, if you pick up Tufte’s latest book, Beau­ti­ful Evidence, and turn to the colophon seeking elu­ci­da­tion on the book’s typog­ra­phy, here is what you’ll find: “Composed in ET Bembo.”

Tags:  

Re-​​Freshing

December 31st, 2009 Comments Off

Posterous makes blogging ridiculously simpleThe con­ven­tional wisdom says that winning a micro VC com­pe­ti­tion like Y Com­bi­na­tor or Tech­Stars takes a bold new idea, some­thing no one else is doing (or, at least, not doing well). And that’s usually the case. But if you look closely, many of the projects they’ve funded—in fact, many of the most suc­cess­ful ones—are almost iden­ti­cal in concept to well-​​established rivals with massive brand recog­ni­tion and deep pockets. The trick is that those older rivals aren’t just old; they’ve gone stale.

Pos­ter­ous is a poster child for this category. Their idea: hosted blogs. Their biggest rival: Google’s Blogger, which has been around for more than a decade now—and barely changed in that time. In a way, it can’t: Blogger is one of the most popular websites around. Mess with the formula, and they might get New Coke’d. So Pos­ter­ous comes in with their hip, clean, fresh design, seamless inte­gra­tion with Facebook and Twitter (and, yes, Blogger), and an emphasis on mobile devices, and they’re attract­ing users like crazy.

But Pos­ter­ous didn’t just succeed with the same idea as the dod­der­ing, decrepit Blogger. They were also fol­low­ing the popular Tumblr by a meager two years, and the sites are in close com­pe­ti­tion for new features. But Pos­ter­ous’ bor­der­line pre­pos­ter­ous devotion to sim­plic­ity dis­tin­guishes them from everyone else in a crowded field. Tumblr seemed fresh when it started, but guess what? It’s not 2007 anymore. If you don’t watch your back, stal­e­ness can catch up quick.

Pos­ter­ous’ pitch is three words: “Dead simple blogging.” I’d cut it down to two: Blogger, fresher.

[Update, 1/​19/​10: A pre­cisely contrary opinion may be found here. We fun­da­men­tally agree that design is extremely impor­tant, but disagree over which of the two top-​​notch sites has the better design. I believe that Tumblr’s pop­u­lar­ity is mainly due to first-​​mover advan­tage. The truth will out.]

Tags: