TechForge

17th September 2012

Share this story:

Tags:

Categories::

Cloud file hosting service Dropbox is now running in CoffeeScript over JavaScript, with Dropbox devs converting and debugging more than 23,000 lines of JavaScript into CoffeeScript during Hackweek.

According to the developers’ blog, the primary reason for the switch is because CoffeeScript takes out a lot of unnecessary coding syntax – more than 5000 lines of code were taken off from Dropbox after the conversion (23437 for JS against 18417 for CoffeeScript, respectively).

The developers used converter js2coffee for their mammoth rewriting task, mainly to avoid doing the dull-although-it’s-got-to-be-done conversion tasks.

“Considering the strange, difficult and rushed circumstances of its origin, JavaScript did many things well,” the blog states, “but is it any surprise that it got a bunch of things wrong too?”

Similarly, the Dropbox devs disagree with an argument from Ryan Florence concerning the deficiencies of CoffeeScript (to which Florence has since stated he’s a CoffeeScript convert).

Of particular interest, and where the Dropbox team disagrees, is the argument that while CoffeeScript may be faster to read, JavaScript may be faster to comprehend.

In total, 5020 lines of code were dropped, 9276 tokens were shaved off and 205863 characters were lost.

The team does admit, however, that regarding complexity of code, it’s not as easy to measure it in terms of throwing a few figures out there.

“Regardless, fewer lines is beneficial for simple reasons”, the team explains, citing fitting more code into a single editor screen as an example.

Not everyone’s satisfied, of course. The first comment on the blog reads: “You guys seriously have nothing better to do than rewrite software that already works?”

This is not an unfair criticism, especially if one considers that CoffeeScript compiles into JavaScript.

But what is the solution? Were the Dropbox developers right to move to CoffeeScript?

About the Author

James has a passion for how technologies influence business and has several Mobile World Congress events under his belt. James has interviewed a variety of leading figures in his career, from former Mafia boss Michael Franzese, to Steve Wozniak, and Jean Michel Jarre. James can be found tweeting at @James_T_Bourne.

Related

10th November 2026

9th November 2026

5th November 2026

4th November 2026

Join our Community

Subscribe now to get all our premium content and latest tech news delivered straight to your inbox

Popular

20303 view(s)
13520 view(s)
11758 view(s)
10341 view(s)

Subscribe

All our premium content and latest tech news delivered straight to your inbox

This field is for validation purposes and should be left unchanged.