Coding Horror

programming and human factors

For a Bit of Colored Ribbon

For the last year or so, I've been getting these two page energy assessment reports in the mail from Pacific Gas & Electric, our California utility company, comparing our household's energy use to those of the houses around us.

Here's the relevant excerpts from the latest report; click through for a full-page view of each page.

Pge-page-1-small

Pge-page-2-small

These poor results are particularly galling because I go far out of my way to Energy Star all the things, I use LED light bulbs just about everywhere, we set our thermostat appropriately, and we're still getting crushed. I have no particular reason to care about this stupid energy assessment report showing our household using 33% more energy than similar homes in our neighborhood. And yet… I must win this contest. I can't let it go.

  • Installed a Nest 2.0 learning thermostat.
  • I made sure every last bulb in our house that gets any significant use is LED. Fortunately there are some very good $10 LED bulbs on Amazon now offering excellent 60 watt equivalents at 9 watt, without any of those pesky early adopter LED quirks (color, dimming, size, weight, etc).
  • I even put appliance LED bulbs in our refrigerator and freezer.
  • Switched to a low-flow shower head.
  • Upgraded to a high efficiency tankless water heater, the Noritz NCC1991-SV.
  • Nearly killed myself trying to source LED candelabra bulbs for the fixture in our dining room which has 18 of the damn things, and is used quite a bit now with the twins in the house. Turns out, 18 times any number … is still kind of a large number. In cash.

(Most of this has not helped much on the report. The jury is still out on the Nest thermostat and the candelabra LED bulbs, as I haven't had them long enough to judge. I'm gonna defeat this thing, man!)

I'm ashamed to admit that it's only recently I realized that this technique – showing a set of metrics alongside your peers – is exactly the same thing we built at Stack Overflow and Stack Exchange. Notice any resemblance on the user profile page here?

Stack-overflow-user-page-small

You've tricked me into becoming obsessed with understanding and reducing my household energy consumption. Something that not only benefits me, but also benefits the greater community and, more broadly, benefits the entire world. You've beaten me at my own game. Well played, Pacific Gas & Electric. Well played.

Davetron5000-tweet

This peer motivation stuff, call it gamification if you must, really works. That's why we do it. But these systems are like firearms: so powerful they're kind of dangerous if you don't know what you're doing. If you don't think deeply about what you're incentivizing, why you're incentivizing it, and the full ramifications of all emergent behaviors in your system, you may end up with … something darker. A lot darker.

The key lesson for me is that our members became very thoroughly obsessed with those numbers. Even though points on Consumating were redeemable for absolutely nothing, not even a gold star, our members had an unquenchable desire for them. What we saw as our membership scrabbled over valueless points was that there didn't actually need to be any sort of material reward other than the points themselves. We didn't need to allow them to trade the points in for benefits, virtual or otherwise. It was enough of a reward for most people just to see their points wobble upwards. If only we had been able to channel that obsession towards something with actual value!

Since I left Stack Exchange, I've had a difficult time explaining what exactly it is I do, if anything, to people. I finally settled on this: what I do, what I'm best at, what I love to do more than anything else in the world, is design massively multiplayer games for people who like to type paragraphs to each other. I channel their obsessions – and mine – into something positive, something that they can learn from, something that creates wonderful reusable artifacts for the whole world. And that's what I still hope to do, because I have an endless well of obsession left.

Just ask PG&E.

[advertisement] What's your next career move? Stack Overflow Careers has the best job listings from great companies, whether you're looking for opportunities at a startup or Fortune 500. You can search our job listings or create a profile and let employers find you.
Discussion

Touch Laptops

I'm a little embarrassed to admit how much I like the Surface RT. I wasn't expecting a lot when I ordered it, but after a day of use, I realized this was more than Yet Another Gadget. It might represent a brave new world of laptop design. How can you not love a laptop that lets you touch Zardoz to unlock it?

Zardoz-surface-unlock

(I'll leave the particular unlock gestures I chose to your imagination. Good luck hacking this password, Mitnick!)

I have an ultrabook I like, but the more I used the Surface, the more obsolete it seemed, because I couldn't touch anything on the screen. I found touch interactions on Surface highly complementary to the keyboard. Way more than I would have ever believed, because I lived through the terror that was Pen Computing. If you need precision, you switch to the mouse or touchpad – but given the increasing prevalence of touch-friendly app and web design, that's not as often as you'd think. Tablets are selling like hotcakes, and every day the world becomes a more touch friendly place, with simpler apps that more people can understand and use on basic tablets. This a good thing. But this also means it is only a matter of time before all laptops must be touch laptops.

I've become quite obsessed enamored with this touch laptop concept. I've used the Surface a lot since then. I own two, including the touch and type covers. I also impulsively splurged on a Lenovo Yoga 13, which is a more traditional laptop form factor.

Yoga-13-rotation

One of the primary criticisms of the Surface RT is that, since it is an ARM based Tegra 3 device, it does not run traditional x86 apps. That's likely also why it comes with a bundled version of Office 2013. Well, the Yoga 13 resolves that complaint, because it's a Core i5 Ivy Bridge machine. But there is a cost for this x86 compatibility:

 Surface RTSurface ProYoga 13
weight1.5 lb2.0 lb3.4 lb
volume27"39"78"
runtime8 hr6? hr5.5 hr
display10.6" 1366×76810.6" 1920×108013.3" 1600×900
memory2 GB / 32 GB4 GB / 64 GB4 GB / 128 GB
price$599$999$999

The size comparison isn't entirely fair, since the Yoga is a 13.3" device, and the Surface is a 10.6" device. But Surface Pro has x86 internals and is otherwise as identical to the Surface RT as Microsoft could possibly make it, and it's still 44% larger and 33% heavier. Intel inside comes at a hefty cost in weight, battery life, and size.

You do get something for that price, though: compatibility with the vast library of x86 apps, and speed. The Yoga 13 is absurdly fast by tablet standards. Its Sunspider score is approximately 150 ms, compared to my iPad 4 at 738 ms, and the Surface RT at 1036 ms. Five hours of battery life might not seem like such a bad tradeoff for six times the performance.

I like the Yoga 13 a lot, and it is getting deservedly good reviews. Some reviewers think it's the best Windows 8 laptop available right now. It is a fine replacement for my ultrabook, and as long as you fix the brain-damaged default drive partitioning, scrape off the handful of stickers on it, and uninstall the few pre-installed craplets, it is eminently recommendable. You can also easily upgrade it from 4 GB to 8 GB of RAM for about $40.

But there were things about the practical use of a touch laptop, subtle things that hadn't even occurred to me until I tried to sit down and use one for a few hours, that made me pause:

  1. The screen bounces when you touch it. Maybe I just have hulk-like finger strength, but touching a thin laptop screen tends to make it bounce back a bit. That's … exactly what you don't want in a touch device. I begin to understand why the Surface chose its "fat screen, thin keyboard" design rather than the traditional "thin screen, fat keyboard" of a laptop. You need the inertia on the side you're touching. The physics of touching a thin, hinged laptop screen are never going to be particularly great. Yes, on the Yoga I can wrap the screen around behind the keyboard, or even prop it up like a tent – but this negates the value of the keyboard which is the biggest part of the touch laptop story! If I wanted a keyboardless tablet, I'd use one of the four I have in the house already. And the UPS guy just delivered a Nexus 10.

  2. A giant touchpad makes the keyboard area too large. On a typical laptop, a Texas size touchpad makes sense. On a touch laptop, giant touchpads are problematic because they push the screen even farther away from your hand. This may sound trivial, but it isn't. A ginormous touchpad makes every touch interaction you have that much more fatiguing to reach. I now see why the Surface opted for a tiny touchpad on its touch and type covers. A touchpad should be a method of last resort on a touch laptop anyway, because touch is more convenient, and if you need true per-pixel precision work, you'll plug in a mouse. Have I mentioned how convenient it is to have devices that accept standard USB mice, keyboards, drives, and so on? Because it is.

  3. Widescreen is good for keyboards, but awkward for tablets. A usable keyboard demands a certain minimum width, so widescreen it is; all touch laptops are going to be widescreen by definition. You get your choice between ultra wide or ultra tall. The default landscape mode works great, but rotating the device and using it in portrait mode makes it super tall. On a widescreen device, portrait orientation becomes a narrow and highly specialized niche. It's also very rough on lower resolution devices; neither the 1366×768 Surface RT nor the 1600×900 Yoga 13 really offer enough pixels on the narrow side to make portrait mode usable. You'd need a true retina class device to make portrait work in widescreen. I began to see why the iPad was shipped with a 4:3 display and not a 16:9 or 16:10 one, because that arrangement is more flexible on a tablet. I frequently use my iPad 4 in either orientation, but the Yoga and Surface are only useful in landscape mode except under the most rare of circumstances.

  4. About 11 inches might be the maximum practical tablet size. Like many observers, I've been amused by the race to produce the largest possible phone screen, resulting in 5" phablets that are apparently quite popular. But you'll also note that even the most ardent Apple fans seem to feel that the 7" iPad mini is an inherently superior form factor to the 10" iPad. I think both groups are fundamentally correct: for a lot of uses, the 3.5" phone really is too small, and the 10" tablet really is too big. As a corollary to that, I'd say anything larger than the 10.6" Surface is far too large to use as a tablet. Attempting to use the 13.3" Yoga as a tablet is incredibly awkward, primarily because of the size. Even if the weight and volume were pushed down to imaginary Minority Report levels, I'm not sure I would want a 13.3" tablet on my lap or in my hands. There must be a reason the standard letter page size is 8½ × 11", right?

  5. All-day computing, or, 10 hours of battery life. The more devices I own, the more I begin to appreciate those that I can use for 8 to 10 hours before needing to charge them. There is truly something a little magical about that 10 hour battery life number, and I can now understand why Apple seemed to target 9-10 hours of battery life in their initial iPad and iPhone designs. A battery life of 4 to 6 hours is nothing to sneeze at, but … I feel anxiety about carrying the charger around, whether I've charged recently or not, and I worry over screen brightness and other battery maximization techniques. When I can safely go 8 to 10 hours, I figure that even if I use the heck out of the device – as much as any human being reasonably could in a single day – I'll still safely make it through and I can stick it in a charger before I go to bed.

To appreciate just how extreme portrait mode is on a widescreen tablet, experience it yourself:

Yoga-13-landscape-small Yoga-13-portrait-small

This isn't specific to touch laptops; it's a concern for all widescreen devices. I have the same problem with the taller iPhone 5. Because I now have to choose between super wide or super tall, it is a less flexible device in practice.

The Yoga 13, if representative of the new wave of Windows 8 laptops, is a clear win even if you have no intention of ever touching your screen:

  • It boots up incredibly fast, in a few seconds.
  • It wakes and sleeps incredibly fast, nearly instantaneously.
  • The display is a high quality IPS model.
  • A rotating screen offers a number of useful modes: presentation, (giant) tablet, standard laptop.
  • Touchpad and keyboard work fine; at the very least, they're no worse than the typical PC laptop to me.
  • Does the prospect of using Windows 8 frighten and disturb you? No worries, smash Windows+D on your keyboard immediately after booting and pretend you're using Windows 7.5. Done and done.

It's a nice laptop. You could do far worse, and many have. In the end, the Yoga 13 is just a nice laptop with a touchscreen slapped on it. But the more I used the Yoga the more I appreciated the subtle design choices of Surface that make it a far better touch laptop. I kept coming back to how much I enjoyed using the Surface as the platonic ideal of what touch laptops should be.

Yes, it is a bummer that the only currently available Surface is ARM based and does not run any traditional Windows apps. It's easy to look at the x86 performance of the Yoga 13 and assume that Windows on ARM is a cute, temporary throwback to Windows NT on Alpha or MIPS which will never last, and understandably so. Do you see anyone running Windows on Alpha or MIPS CPUs today? But I'm mightily impressed with the Tegra 3 SOC (system-on-a-chip) that runs both the Surface RT and the Nexus 7. Upcoming Tegra releases, all named after superheroes, promise 75 times the performance of Tegra 2 by 2014. I can't quite determine how much faster Tegra 3 was than Tegra 2, but even if it is "only" ten times faster by 2014, that's … amazing.

I think we're beginning to uncover the edges of a world where lack of x86 compatibility is no longer the kiss of death it used to be. It's unclear to me that Intel can ever reach equivalent performance per watt with ARM; Intel's ultra-low-end Celeron 847 is twice as fast as the ARM A15, but it's also 17 watts TDP. In a land of ARM chips that pull an absolute maximum of 4 watts at peak, slapping Intel Inside will instantly double the size and weight of your device – or halve its battery life, your choice. Intel's been trying to turn the battleship, but with very limited success so far. Haswell, the successor to the Ivy Bridge CPUs in the Surface Pro and Yoga 13, only gets to 10 watts at idle. And Intel's long neglected Atom line, thanks to years of institutional crippling to avoid cannibalizing Pentium sales, is poorly positioned to compete with ARM today.

Still, I would not blame anyone for waiting on the Surface Pro. A high performance, HD touch laptop in the Surface form factor that runs every x86 app you can throw at it is a potent combination … even if it is 44% larger and 33% heavier.

[advertisement] Stack Overflow Careers matches the best developers (you!) with the best employers. You can search our job listings or create a profile and even let employers find you.
Discussion

A SSD in Your Pocket

Updated August 2015

I woke up a few days ago and realized I was still carrying the same 32 GB USB flash drive on my keychain that I purchased in 2010. I thought to myself, this is an unacceptable state of affairs. Totally. Unacceptable.

It's been few years since I seriously looked at USB drive performance. Premium USB flash drives typically eke out about 10-20 MB per second, strongly favoring reads, but I've recently purchased a number of inexpensive 4 GB USB drives that barely got to 4 MB per second. That's OK, since they were only intended as cheap floppy drive CD and DVD replacements. Based on that experience, I wasn't expecting much improvement in the status quo.

USB 3.0 is finally becoming somewhat prevalent on PCs and Macs, so I figured I'd:

  • Switch to a current-generation USB 3.0 flash drive.
  • Bump up to 64 GB storage this generation, one step over the 32 GB model I currently carry.
  • Optimistically hope against hope that they've gotten fast enough by now to get anywhere near USB 2.0 throughput limits.

I checked around and the Patriot Supersonic series gets good reviews. The price seemed about right at $75 for a 64 GB device. So I bought one. I plugged it in to one of the USB 3.0 ports on my PC and …

Usb-drive-read Usb-drive-write

Holy. Crap.

But wait! That was way back in Ye Olde 2012! I upgraded to the 128 GB Supersonic Rage 2 today and …

365 MB/s reads and 254 MB/s writes? Yes please!

Needless to say, this thing handily saturates a USB 2.0 connection at around 27 - 30 MB/sec — but plug it into one of those blue USB 3.0 ports on newer Macs or PCs and prepare to feel like the "blown away" guy in the Maxell ad.

I haven't run a full set of benchmarks on this guy, but the only downside I've noticed so far is that it is a bit chunkier in width than my previous USB flash drive. It might be a bit more to carry, and might not fit some USB ports depending on what's adjacent.

Even in the mere 3 years from 2012 to 2015, for the very same $75 we have

  • doubled capacity (128 GB vs 64 GB)
  • 1.5 × read speed
  • 1.7 × write speed

Now I feel like a total dork for continuing to carry around a 2010 era flash drive that I thought had decent performance at 20 MB/sec. Forget that noise. Now we can darn near carry pocket solid state hard drives on our keychains! Nobody told me, man!

So now I'm telling you. Enjoy.

[advertisement] What's your next career move? Stack Overflow Careers has the best job listings from great companies, whether you're looking for opportunities at a startup or Fortune 500. You can search our job listings or create a profile and let employers find you.
Discussion

Do You Wanna Touch

Traditional laptops may have reached an evolutionary dead-end (or, more charitably, a plateau), but it is an amazing time for things that … aren't quite traditional laptops.

The Nexus 7 is excellent, the Nexus 10 looks fantastic, I can't wait to get my hands on the twice-as-fast iPad 4, the new Chromebooks are finally decent and priced right, and then there's the Microsoft Surface RT. In short, it is a fantastic time to be a computer nerd.

Revenge of the nerds

I love computers, always have, always will. My strategy with new computing devices is simple: I buy 'em all, then try living with them. The devices that fall away from me over time – the ones that gather dust, or that I forget about – are the ones I eventually get rid of. So long, Kindle Fire! I knew that the Nexus 7 was really working for me when I gave mine to my father as a spontaneous gift while he was visiting, then missed it sorely when waiting for the replacement to arrive.

As I use these devices, I've grown more and more sold on the idea that touch is going to dominate the next era of computing. This reductionism is inevitable and part of the natural evolution of computers. Remove the mouse. Remove the keyboard. Remove the monitor. Reducing a computer to its absolute minumum leads us inexorably, inevitably to the tablet (or, if a bit smaller, the phone). All you're left with is a flat, featureless slate that invites you to touch it. Welcome to the future, here's your … rectangle.

tablets

I've stopped thinking of touch as some exotic, add-in technology contained in specialized devices. I belatedly realized that I love to touch computers. And why not? We constantly point and gesture at everything in our lives, including our screens. It's completely natural to want to interact with computers by touching them. That's why the more unfortunate among us have displays covered in filthy fingerprints.

Although I love my touch devices, one thing I've noticed is that they are a major disincentive to writing actual paragraphs. On screen keyboards get the job done, but if I have to scrawl more than a Twitter length reply to someone on a tablet or phone, it's so much effort that I just avoid doing it altogether, postponing indefinitely until I can be in front of a keyboard. By the time that happens I've probably forgotten what I wanted to say in the first place, or that I even needed to reply at all. Multiply that by millions or billions, and you have a whole generation technologically locked into a backwater of minimal communication. Yelp, for example, does not allow posting reviews from their mobile app because when they did, all they got was LOL OMG raspberry poop Emoji.

Omg-raspberry-poop

It's not good. In fact, it's a little scary. I realize that there are plenty of ways of creating content that don't involve writing, but writing is pretty damn fundamental to communication and civilization as we know it. Anything that adds a significant barrier to the act of placing words on a page is kind of dangerous – and a major regression from the world where every computer had a keyboard in front of it, inviting people to write and communicate with each other. So the idea that billions of people in the future will be staring at touchscreen computers, Instagramming and fingerpainting their thoughts to each other, leaves me with deeply mixed feelings. As Joey Hess said:

If it doesn't have a keyboard, I feel that my thoughts are being forced out through a straw.

When I pre-ordered the Microsoft Surface RT, I wasn't expecting much. This is a version one device from a company that has never built a computer before, running a brand new and controversial operating system. On paper, it doesn't seem like a significant change from all the other tablets on the market, and its primary differentiating feature – the touch keyboard – can be viewed as merely flipping a regular laptop over, so the "fat" side is on the display rather than the keyboard.

Laptop vs. Surface

Surface is just like the first iPad in that it has all the flaws and rough edges you'd expect in a version one device. But it is also like the first iPad in that there is undeniably the core of something revelatory and transformative here – a vision of the future of computing that doesn't sacrifice either keyboard or touch.

Reviewers think Surface is intended to be a tablet killer, but it isn't. It's a laptop killer. After living with the Surface RT for a few days now, I'm convinced that this form factor is the replacement and way forward for the stagnant laptop. I can't even remember the last time I was this excited about a computer. The more I use it, the more I think that touch plus keyboard is the future of all laptops.

How wonderful it is to flip open the Surface and quickly type a 4 paragraph email response when I need to. How wonderful it is to browse the web and touch whatever I want to. And switching between the two modes of interaction – sometimes typing, sometimes touching – is completely natural. Remember when I talked about two-fisted computing, referring to the mouse and keyboard working in harmony? With Surface, I found that also applies to touch. In spades.

The Surface RT in my lap

This isn't a review, per se, but let me get into a few specifics:

  • Yes, it is ridiculous that the keyboard cover is not included in the base Surface, as the near-perfect integration of keyboard with touch is the whole story here. Don't even consider buying a Surface without the touch keyboard cover. Within an hour or so I was hitting 80% of my regular typing speed on it, and it's firm enough to be used on a lap without too much loss of accuracy. Astonishingly, the tiny fabric touchpad is quite good, better than the ones I've used on many laptops. Which probably says more about the sad state of the PC ecosystem than it does about Surface, but still.
  • Yeah, yeah, it doesn't run x86 apps. So your beloved copy of Windows Landscape Designer 1998 won't run on Surface RT. You'll need to wait a few months for Surface Pro to do that, but you'll pay the Intel Premium™ in price, battery life, and size. Rumor has it that Intel will get their act together with Haswell, and finally be competitive with ARM in price, performance, and power consumption, but I'll believe that when I see it.
  • The hardware design is beyond reproach; I'd even argue it's better than Apple quality hardware design. Unless you're required by God to hate all things touched by Microsoft, There's no way you could handle a Surface and not think that this is a genuinely well made thing.
  • The default Surface mail application is an embarrassment and everyone associated with it should be fired. Android and iOS both have decent default mail apps, as well they should, because email is bedrock. Not having this right really hurts. If Microsoft doesn't get their A Team "hey dummies, all you have to do is just copy Sparrow already" team on that soon, they'll be sorry.
  • Many of the native applications currently available run poorly on Surface RT due to lack of optimization and testing for the ARM platform versus x86. Probably not terribly different from the iPad 1 on launch day, but it remains to be seen how quickly that will get resolved.
  • The web browser is stellar and a model of how the Internet should work on a tablet. You are almost always in fullscreen mode, swiping around with nothing but content on your screen, the way it should be. However, back button performance is bizarrely slow, and the way IE10 handles web hovers is poor, much worse than Mobile Safari and Chrome. Try upvoting a comment on Stack Overflow to see what I mean.

Notice how the 2010 iPad 1 is already obsolete? Expect the same thing with the Surface RT. It's a fascinating glimpse into the future, but it'll be totally utterly obsolete in 2 years. Do not buy this device expecting longevity. Buy it because you want to see tomorrow today.

The received wisdom about touchscreen interaction with computers was that it didn't work. That you'd get "gorilla arm". That's why we had to have special tablet devices. But Surface proves that's not true; typing and touching are spectacularly compatible, at least for laptops. And I'm beginning to wonder about my desktop a little, because lately I'm starting to I think I wanna touch that, too.

[advertisement] How are you showing off your awesome? Create a Stack Overflow Careers profile and show off all of your hard work from Stack Overflow, Github, and virtually every other coding site. Who knows, you might even get recruited for a great new position!
Discussion

The Future of Markdown

Markdown is a simple little humane markup language based on time-tested plain text conventions from the last 40 years of computing.

Meaning, if you enter this… …you get this!
Lightweight Markup Languages
============================
According to **Wikipedia**:
> A [lightweight markup language](http://is.gd/gns)
is a markup language with a simple syntax, designed
to be easy for a human to enter with a simple text
editor, and easy to read in its raw form.
Some examples are:
* Markdown
* Textile
* BBCode
* Wikipedia
Markup should also extend to _code_:
10 PRINT "I ROCK AT BASIC!"
20 GOTO 10

Lightweight Markup Languages

According to Wikipedia:

A lightweight markup language is a markup language with a simple syntax, designed to be easy for a human to enter with a simple text editor, and easy to read in its raw form.

Some examples are:

  • Markdown
  • Textile
  • BBCode
  • Wikipedia

Markup should also extend to code:

10 PRINT "I ROCK AT BASIC!"
20 GOTO 10

You can think of Markdown as a radically simplified and far more human readable form of HTML. I have grown to love Markdown over the last few years. If you're a programmer of any shape, size, or color, you can't really avoid using Markdown, as it's central to both GitHub and Stack Overflow. For that matter, my new project uses Markdown, too.

Markdown is a wonderful tool, but it does suffer a bit from lack of project leadership. The so-called "spec" is anything but, and there are dozens of different flavors of Markdown out there, all with differences in the way they behave. While they are broadly compatible, Stack Overflow and GitHub have both tweaked Markdown in ways that can trip you up if you're familiar with one but not the other; compare GitHub Flavor with Stack Overflow Flavor.

That's why I was so excited to get this email from David Greenspan a few days ago:

I'm the creator of EtherPad (a collaborative WYSIWYG editor), now working at Meteor. At Meteor, we're trying to "pave the web" for developers by writing better components. For example, we just released universal login buttons that talk over WebSockets and are wired into the users table of the app's database. Since Markdown is increasingly ubiquitous for writing content, it's going to be part of the Meteor toolchain. I wouldn't be surprised if we end up releasing a component like Stack Overflow's editor, with the full "Meteor" standard of code quality, so that no one has to roll their own again. Today, we use Markdown in our API docs generation, and we're going to be writing more and more content in it -- which is a scary thought.

I think you and I share some concern (horror?) about Markdown's lack of spec and tests. The code is ugly to boot. Extending or customizing Markdown is tricky (we already have some hacks and they are terrible), and I worry about "bit rot" of content if the format doesn't have a spec. I'm evaluating the possibility of starting over with a new implementation coupled with a real spec and test suite, and I've been thinking a lot about how to parse a language like Markdown in a principled way. I'm pretty fearless about parsers, by the way; I wrote a full ECMAScript parser in a week as a side project.

I want this new language – working name "Rockdown" – to be seen as Markdown with a spec, and therefore only deviate from Markdown's behavior in unobtrusive ways. It should basically be a replacement that paves over the problems and ambiguities in Markdown. I'm trying to draw a line between what behavior is important to preserve and what behavior isn't.

I was excited because, like David, I freaking love Markdown. I love it so much that I want to see it succeed and flourish over the next 20 years. I believe the best way to achive that goal is for the most popular sites using Markdown to band together and take ownership of Markdown as a standard. I propose that Stack Exchange, GitHub, Meteor, Reddit, and any other company with lots of traffic and a strategic investment in Markdown, all work together to come up with an official Markdown specification, and standard test suites to validate Markdown implementations. We've all been working at cross purposes for too long, accidentally fragmenting Markdown while popularizing it.

Like any dutiful and well-meaning suitor, we first need to ask permission for this courtship from the parents. So I'm asking you, John Gruber: as the original creator of Markdown, will you bless this endeavor? Also, as a totally unreleated aside, have I mentioned what a huge Yankees fan I am? Derek Jeter is one of the all-time greats.

Yankees_logo

I realize that the devil is in the details, but for the most part what I want to see in a Markdown Standard is this:

  1. A standardization of the existing core Markdown conventions, as documented by John Gruber, in a formal language specification.
  2. Make the three most common real world usage "gotchas" in Markdown choices with saner defaults: intra-word emphasis (off), auto-hyperlinking (on), automatic return-based linebreaks (on).
  3. A formal set of tests anyone can use to validate a Markdown implementation.
  4. Some cleanup and tweaks for ambiguous edge cases that exist in Markdown due to the lack of a formal specification.
  5. A registry of known flavor variants, with some possible future lobbying to potentially add only the most widely and strongly supported variants (I am thinking of the GitHub style code blocks which are quite nice) to future versions of Markdown.

And that's it, really. I don't want to extend Markdown by adding tons of crazy new functionality, or radically change the way it currently works, or anything like that. I'd be opposed to such changes. I just want to solidify and standardize the simple, useful version of Markdown that is working so well for everyone right now. I want there to be an unambiguous, basic standard that everyone using Markdown can expect to work in the same way across all web sites in the world when they begin typing.

Markdown mark

I'd really prefer not to fork the language; I'd much rather collectively help carry the banner of Markdown forward into the future, with the blessing of John Gruber and in collaboration with other popular sites that use Markdown.

So … who's with me?

[advertisement] Stack Overflow Careers matches the best developers (you!) with the best employers. You can search our job listings or create a profile and even let employers find you.
Discussion