Web Development,  Writing

Dangerous Punctuation

Originally published on Figment on April 18, 2012, as a dramatization of this Github thread, in which Bootstrap opted not to use semi-colons in their JavaScript, which didn’t work in Douglas Crockford’s JSMin (and didn’t make Mr. Crockford very happy). Not using semi-colons in your JavaScript is a way to start a culture war, so I decided to write this culture war to its logical end:



Dangerous Punctuation

Chapter 1

Jacob Thornton leaned back in his chair, folding his hands behind his head. He was left with another free afternoon in the offices of Twitter from all the time saved in not inserting unnecessary semi-colons. Yes, life was beautiful.

Suddenly, Douglas Crockford stormed into the office, red-faced and sweating, and bee-lined right for Jacob’s workstation. “You asshole!” shouted Doug. Jacob sat up quickly and jolted the desk, nearly toppling his mug of Stash chai green tea. Doug continued his tirade: “What’s this lack of semi-colon shit that broke JSMin? It’s insanely stupid code. Learn to write JavaScript properly or I will fucking end you.”

Quickly, Jacob assembled in his brain just what the heck was going on. For a while now, he’d been writing JavaScript without semi-colons ever since he learned they were optional in the language. It was a style of coding he’d come to love, and he’d never heard any objections about it. Recently, however, one of the JavaScript libraries that he’d open-sourced had become popular, and had apparently come to the attention of Doug.

Doug was the Old Guard, one of the early educators of JavaScript. Doug was, like, the guy that you would talk about when you talked about what JavaScript really was. In the early days of the Internet, when everyone was doing JS wrong, Doug was the guy who came along and told everyone how to do it right. If there ever was a national monument erected of JavaScript Greats, Doug’s face would be the first to be carved in stone.

And now, Doug was standing in front of him and trembling as if he might soon transform into a large, inarticulate, green humanoid.

Jacob tried to choose his words carefully. “Doug, I’m not sure–“

“Don’t give me that shit!” spat out Doug. “You know this is about Bootstrap. A well-meaning JS programmer tried to put your stupid library into my tool, and it didn’t work! And then, you had the sheer audacity to tell him that the problem was with JSMin! JSMin is perfect! I designed all of it myself, and it works with all JavaScript code, as long as they write it correctly.”

Jacob sighed. “I did write it correctly. Not every line has to end with a semi-colon. In fact, most don’t. As you’ve said yourself, JavaScript is the world’s most misunderstood programming language, and the idea that semi-colons end statements in JS is one of the biggest things people misunderstand.”

As soon as Jacob saw Doug’s reaction, he knew it was probably a mistake to use Doug’s owns words to imply there was something about JavaScript Doug had misunderstood. And he was right.

“How… DARE YOU?!” screamed Doug, shaking more violently.

“Everything alright in here, man?” came a voice from behind Doug. It was Mark Otto, Jacob’s broheim at Twitter, or so he liked to call himself. Jacob suppressed a smile. Mark always had a good sense of timing.

Doug jumped at the voice and whipped around. “I… uh…” he started and trailed off, looking between the two Twitter employees. Doug glanced around and realized that nearly everyone was watching him in the open workspace, and his anger seemed shaken upon being publicly observed, but only for a moment. Doug turned back to Jacob, his face once again contorting with rage. “Fix that library,” he said in a raspy whisper, “or get this lackey to do it for you. I don’t care. But don’t you ever say there’s a mistake in my work again.”

Doug whipped around and pushed aside a surprised Mark, who didn’t quite get out of the way in time. Doug took a few more steps, spotted a trash can, and attempted to push it over. Jacob and Mark watched, bemused, as Doug struggled against the can. Finally, Doug seemed to realize that he wasn’t going to succeed, and stood up and walked out as if nothing had happened.

Mark turned back to Jacob, eyebrows raised. Jacob leaned back and let out a long breath.

“Jesus,” said Jacob. “Jesus, man, Jesus.”

“Really?” said Mark. “I thought it looked more like Doug Crockford.”

Jacob laughed and shook his head. “What the hell, man. Dude was pissed.”

“About Bootstrap?”


“The semi-colons?”


Mark rolled his eyes. “These old coders and their baked-in ways. It’s not enough if your code works, it also has to live up to their standards of beauty. I’m suprised he didn’t go on another rant about four spaces versus two spaces to indent.”

Jacob grinned. “He probably would have gotten around to it eventually, but on the other hand, that probably wouldn’t break JSMin.”

“Oh, brother. JSMin. You mean the code minifier that doesn’t correctly minify unless you write your code ‘correctly’ ?”

“That’s the one.”

“Coders and their minifiers. Most of the people getting upset are probably building small-business websites. I doubt they’ve ever tested minified code against non-minified code to see if there’s any performance difference. They do it because they believe that’s what they’re supposed to do, because people like Doug Crockford have said it’s what they have to do.”

“In a blog post comparing 100,000 concurrent website requests with minified versus unminified code.”

“Exactly. And then they get righteous about it, even though their website gets 100 hits a month.”

Jacob thought about this for a moment. They were, of course, exaggerating, and likely a number of people who raised their voice about the “right” way to do things ran sites with significant loads. But, in his experience, the majority of coders who were dogmatic about what you should do were unjustifiably so. In fact, likely the reason they tried to impose their views on others was because their work had so little influence. That was one of the advantages of working at Twitter. You didn’t have to convince anyone about how you should do it. You did things the way they made sense to you and the other guys in the office, and you let the rest of the world work it out for themselves.

And they didn’t really have anything against minifiers. At Twitter, these were also necessary, because they really did have hundreds of thousands of web requests, not by the day or month, but by the minute. Yet they never minified their HTML or CSS classes, and no one ever seemed to complain about that, or insist that everyone shave off a few more bytes. It was probably too much work. Or maybe no guru had come out with a CSS minifier that they insisted everyone use. If Paul Irish tweeted about such a thing tomorrow, then they were all fucked.

“So, what do we do about Bootstrap?” said Jacob. “Anything?”

Mark sighed. “We might as well look at JSMin, since a lot of people use it. If the change is small, who cares? It’ll make Doug happy. But I don’t think we should start throwing in semi-colons everywhere.”

Jacob shook his head. “No, I’m not about to go back to a semi-colon-riddled world.”

“Yeah, stuff like this calms down and is forgotten in no time. I mean, we know that better than anyone, don’t we? People will probably tweet a bunch of angry things about semi-colons if Doug makes a fuss about it, but they’ll be back to re-tweeting Felicia Day in no time.”

Jacob nodded. Mark was right. There was no reason to let Doug get under his skin. Coding JavaScript without semi-colons was just… cooler, and he didn’t see any need to change. After all, it was just JSMin and a few other code minifiers that were the issue. It’s not like leaving off a semi-colon was the end of the world.


Chapter 59 (I skipped a bit.)

Fire and ashes were beginning to fall on the buildings in the distance.

“Now, you fools!” shouted Doug, not letting the eyes leave the console of the machine he had built. It was the machine that was going to save them all, and he wasn’t going to avert his focus from it, even for a moment. He reached out his hand and opened and closed his palm. “NOW!” he shrieked again.

Jacob swallowed, then quickly stepped forward and put the memory stick into his hand. Doug carefully oriented it and plugged it into the USB port.  Jacob began sweating even more than he already was. He glanced at Mark, who returned the same unspoken question: Did we do enough testing?

But they had. It was the most important piece of JavaScript they had ever written, the critical piece that handled the firing sequence for Crockford’s machine. And they’d tested the hell out of it, and had every one of their team at Twitter hand inspect it, as had everyone in the open source community. Jacob felt another twinge of guilt about some who had responded to their code by demanding the number of indented spaces be changed. He still wasn’t sure if Obama should have executed them, but because of what was at stake, maybe it was for the best. He looked at the fires outside. There was a good chance the four-space indenters were in a better place than him right now.

Doug rapidly typed some commands on his keyboard. My GOD he could type fast. Jacob watched his fingers fly as he loaded their code.

Doug took a deep breath. “Here we go,” he said in a deep breath. Everyone tensed.

He pressed “Enter”.


Then, worse, his machine began to make a high-pitched whine.

Doug stepped back, his eyes growing wider. “No…”

The whine in the machine turned into a clatter. Doug stepped forward and began frantically typing, amazingly at a faster speed than just before. Jacob ran next to him. “What’s wrong? We ran this through every simulation. What’s happening?”

“I don’t….”  Doug kept typing. “It’s your code,” he said with a dead finality.

Defeat and despair hit Jacob. “No, it can’t be. We tested everything. Everyone looked at it.”

Doug continued rapidly typing. “It’s failing. It’s failing on every line. It barely gets anywhere.”

Jacob looked at the screen. He saw the list of errors, but at the same time, he saw something else. It was the error console for JSMin. But it wasn’t JSMin. It was the machine’s JavaScript interpreter.

“What the fuck?” said Jacob. “This isn’t the virtual machine we tested on. Why does it look like JSMin, Doug?”

Without turning away, Doug said dismissively, “You don’t think I would just plug your JavaScript into my machine without having something check its syntax beforehand, do you? This is too important.”

The clattering in the machine turned into a loud clanking. People in the room began to back towards the door.

Jacob saw it now. Doug was insane. And his insanity was to a depth where the only JavaScript interpreter Doug trusted was himself.

And Doug loved semi-colons. And Jacob’s code had almost none.

Rage bubbled up in Jacob, and he grabbed Doug, twirling him around, looking the bearded bastard in the eyes. “ARE YOU FUCKING SER–“

Jacob didn’t remember the explosion. There was just that moment, and then there was the moment after, where he was opening his eyes. There was pain in his whole body, but as he came to and began to move, nothing felt too damaged.

He lifted his head up and looked around. Through the dust cloud, he could see that most of the room was demolished, the windows blown out. He saw Doug at the same time he saw the console embedded in his chest. Doug’s head was hanging down, motionless, his eyes peering at the console, as if he was still trying to understand the problem, even in death.

There was a coughing behind Jacob. He sat up and turned around. Mark was propped up against the wall, holding his stomach. His shirt was soaked red.

“Mark?” Jacob crawled over to him, just as his head slumped over. He caught Mark’s head in his hands just before it would have hit the floor.

Mark’s eyes were unfocused, but eventually found his face. “Jacob?”

“Yeah, buddy, it’s me. We’re going to be okay.”

Mark slowly shook his head. He knew, just as well as Jacob did. “Were we…”

“What?” asked Jacob.

“Were we… too self-righteous? Did we do it wrong?”

“No,” said Jacob, the tears beginning to fall on Mark’s shirt. “We did it just right, broheim.”

Mark sighed. “Good.” And that was the last thing he said.

Eventually, Jacob Thornton put Mark’s head on the floor and stood up. There was a deep rumbling and vibration that seemed to come from nowhere and everywhere.

He walked over to Doug’s body and looked down. Amazingly, the console embedded in Doug’s chest still had power, and even though the screen had several cracks running through it, he could clearly see a line of code and a small flashing cursor.

He recognized the code. It was a line he had personally written. But it had been altered. It looked like one of the last things Doug had done had been to insert a semi-colon at the end. The cursor was flashing after this new character.

Jacob knelt down and turned the blood-spattered keyboard towards him.

He pressed a single key.


I'm a product designer, author, humorist, and web developer. You can find me on Twitter.