Feb 13
Twitter Bootstrap - An open source project by closed minded individuals? Say it ain’t so Twitter
I came across twitter’s bootstrap project a few months ago. True to its name, it provides developers the ability to quickly style their webpages. What I find most appealing about the project is the fact that you do not have to rely on the ‘bootstrap.css’ and ‘bootstrap.js’ files to get your project going. Both of those files are actually just a concatenation of smaller chunks each of which can be directly embedded into your own CSS / JS files to suit your needs. Moreover, each JS chunk is written as a jQuery plugin. Let’s say you want to use the ‘tooltip’ (formerly known as ‘twipsy’) plugin in one of your JS files and don’t really need the other plugins, you could simply prepend the contents of ‘bootstrap-tooltip.js’ file in the appropriate JS file and get going without the need to load the other plugins into your page. This architecture gives bootstrap a lot of flexibility. I’m completely sold on Bootstrap’s claim that it is ‘flexible’.

Recently, the bootstrap team released version 2.0 of the project. It is quite easy to switch your current project to that version. The most annoying part of the switch though, are the missing semicolons in the JS files. If you are simply using the concatenated ‘bootstrap.js’ file in your project, you will notice no difference. But when a plugin file is “embedded” into an application, you will most likely get an error stating something along the lines of “undefined is not a function”. Especially, if you do not run the resulting file through a minifier like ‘uglify-js’.
This is what happened to me when I upgraded. It is such a minor issue and at the time, I was almost certain that it would be fixed in a later commit, so I added the missing semicolons myself and moved on. I must note that it only required ONE semicolon per plugin file to fix the issue.
Yesterday there was a post on Hacker News that brought my attention to comments made by the maintainer of bootstrap, github user @fat, mentioning his aversion to semicolons. Alas, bootstrap’s flexibility was already starting to wane all because of ONE semicolon. Not wanting that to happen, I quickly forked the main repo and added a simple Makefile target called proper that could automate the process of adding the semicolons. I understand every developer is picky about code semantics so I don’t hold it against @fat that he doesn’t want to see the semicolons. A make target should surely be OK right? He doesn’t see the semicolons and for people like me, we get the flexibilty bootstrap promised us. It does not affect anything in the code. You can choose to ignore it if you like. But if you want semicolons, all you need to do is call make proper. Seems reasonable right? NOPE. My pull request was closed this morning without any explanation.

Technically, nothing is wrong. JS surely allows you to leave out the semicolons. Automatic semicolon insertion is supposed to take care of that for you. So sure, nothing is wrong. But seems like @fat has not accounted for use cases such as mine. Or perhaps, use cases like mine are discouraged.
So I’m going to maintain a fork of the main repository on github for a “semicolon”. People may have to choose which repo they get their bootstrap source from. Luckily, with git, the previous point is not an issue since you can pull from multiple repos. But wouldn’t it be nice to have a real explanation of why the semicolon is such a big step backwards for @fat / twitter. Is it really that bad? If JS were to pick sides, which side do you think it would pick? Make semicolons WRONG and break all existing JS code, or, REQUIRE semicolons and break bootstrap. JS is so awesome that it lets us have it both ways. But we need to be practical ourselves as well right?
I mean no disrespect to @fat. I’m sure there are considerations beyond what I am aware of. Yesterday in the discussion on hacker news, I said that I hate ideologues. I actually don’t. There are ideologues that are inspiring and amazing. But a healthy debate will benefit all of us.
BTW, here is a link to my fork https://github.com/rajivnavada/bootstrap