GWT and the Static Versus Dynamic Religious War

Never get involved in a land war in Asia.

-- Vizzini, The Princess Bride

.

gwt
Also, never get involved in a religious war about statically versus dynamically typed languages. Well, maybe just this once. :-)

Periodically, an angry Javascript developer will let loose and flame GWT as a misbegotten spawn of evil. Then all the GWT developers point and chuckle and move on to developing more cool applications. Every so often, though, someone will make a thoughtful comment about GWT, and then we have a fruitful discussion that helps clarify what GWT is and what it does and doesn't do well.

William Shields has either posted such a thoughtful comment or a very high end version of a flame, entitled Lost in Translation or Why GWT Isn’t the Future of Web Development. It is well worth reading, along with Google's Joel's somewhat heated response.

What I want to take issue with is Shields' statement that "Between Javascript, PHP, Python, Perl, Ruby and other languages over the last decade (and yes some have a history going far earlier than that) have clearly demonstrated that indeed the sky hasn’t fallen with loose and dynamic typing."

I'm very much a right tool for the job kind of guy. I love my Groovy and my Ruby, but I also like C# and Java for some things. So, has the sky fallen? I would say yes.

Over the last decade, I've run a software development company that practices agile development. One crucial aspect of our practice is Test Driven Development (TDD). We strive for a high level of code coverage, typically over 85%.  With this approach we deliver software where the number of bugs post-release converges rapidly toward zero, even with enhancements and new features being added.

Now while TDD is great for all software development projects, it is absolutely essential of projects developed with dynamically typed languages. Where statically typed source code without unit tests is like a toxic wasted dump, dynamically typed source code without unit tests is like a nuclear holocaust. Those types of projects just throw off new bugs like a frat house in summer.

Given that many JavaScript and PHP (and Rails, for that matter) projects are developed without unit tests, either because the practice of TDD wasn't common in the organization, or because dynamically typed languages are often the choice of amateurs and, well, "what's a unit test?"

We often take over code developed by other development shops. Sometimes that code has no tests and the client is predictably upset about the bugginess and fragility of the code. I'm usually calm when we take over a statically typed code base, but I'm extremely nervous when the code base is dynamically typed. That's not religious, that's just pragmatic.

Related posts:

  1. Josh Bloch Intro Q&A
  2. Remain Static or Go Dynamic?
  3. Static Typing and the Paranoid Style of Programming
  4. Complexity and Dynamically Typed Languages
  5. Refactoring versus Rewriting

Leave a comment

Powered by WP Hashcash

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com