Picture of admin

Building the Enterprise Hammer, Part 4

  • Posted By admin on December 02, 2005

In Part 3, I argued that programming languages need to be flexible, and support powerful abstractions. But, there is a concern: Many developers and managers alike fear that more flexible, powerful languages are dangerous. They’re right, but there is a solution: testing and transparency.

To continue with the Enterprise Hammer example: One approach to making the Enterprise Hammer safer is to limit its power and generality. If the hammers can only strike with a certain amount of force, then the hammer cannot accidentally break strong structures. Moreover, if the linkage between the hammers and the frame is deliberately complex, nobody will attach other implements that might damage something.

This safety comes at an extremely high price. The problem with reduced power becomes obvious as soon as you need more power. The problem with reduced generality is more subtle, and therefore even more damaging. When solutions cannot be generalized, work must instead be duplicated. Poor generalization is the leading cause of “code bloat”. And the damage from code bloat is not linear. Poor generalization makes software geometrically more expensive to build and maintain (think “spaghetti code”). Even worse, tools that inhibit generalization inhibit genius—those cross-disciplinary leaps of imagination that move the industry forward.

The “safe language” argument appeals to fear, while the “flexible language” argument appeals to a sense of opportunity and adventure. Both are powerful motivations, so for a long time this argument has been a stalemate. Happily, that period is coming to an end. Two new factors have come into play: automated testing and transparency. Over the next five years they will turn the balance totally in the favor of more flexible languages.

Automated testing turns software on itself. By using code to evaluate that other code functions correctly, we can reach a much higher level of assurance than was ever achieved by the stopgap measure of weakening our tools. Instead of building small, soft hammers, and placing them in a low-powered frame, we build exactly the parts we need. We then test each of the parts individually (unit testing), test aggregates of parts working together (functional testing), and test the entire system (acceptance testing). If we decide to modify the frame, engine, or hammers, we can quickly re-execute our tests and verify that the entire system still works as before.

Transparency comes from open source. Other things being equal, developers who depend on open source will outperform developers who do not. To return to the Enterprise Hammer: Imagine now that frame and engine are covered with an opaque outer shell, to prevent hammer developers from seeing (or tinkering with) the internals of the Enterprise Hammer. This is the closed source world. If the frame and engine are performing perfectly, then the people building and using hammers may not care much. But when problems or questions arise, the shell needs to be removed. There are, of course, halfway measures such as documentation and technical support. But those are never as good as the code itself.

Are testing and transparency recent discoveries? No. What is new is their widespread adoption and acceptance by developers. Something else is new too: developers today understand the basics of OO. When James Gosling designed Java, it gave developers plenty of new stuff to think about. Most developers were new to OO, and had yet to learn inheritance, polymorphism, etc. Developers now understand OO, and understand automated testing. In other words, developers are ready to learn something new, and they have a great safety net (testing) to use along the way.

For evidence that testing and transparency foster good code, take a look at Spring. Spring has succeeded wildly with only a fraction of the investment (time and $) that has gone into closed-source J2EE stacks. But doesn’t Spring’s success argue in favor of Java, not more flexible languages? Stay tuned for the next installment.

Comments
  1. Greg VaughnDecember 02, 2005 @ 03:02 PM
    Stu, I wanted to bring this up to you at the Dallas NFJS, but the opportunity didn't present itself. You mention the same statement in this blog that caught my attention then: "developers today understand the basics of OO". During my consulting years, based on the developers I was exposed to, I would agree with you immediately. However, after spending some time within a large enterprise, I find myself questioning that. Lack of OO knowledge by front line developers in my company is a huge issue I face daily. How much does your argument truly hinge on this point? I am truly fearful of giving a flexible language to developers who don't have a decent understanding of OO, but it's a justifiable fear. Sure, I'd prefer to spend more time in flexible languages myself, but I've got to consider more than myself when making recommendations in an enterprise environment.
  2. JohnDecember 02, 2005 @ 05:14 PM
    Every programming language comes out of a basic idea. The driving idea of Java appears to be to make it easy for low-skill programmers to churn out code. Choices are restricted; things that require deeper understanding (i.e. multiple inheritance) are eliminated. It is easy to get Java programmers. Alas, it is difficult to get **good** Java programmers. Most Java code I have seen or worked with lacks any sign of Object Orientation. Classes are bags into which programmers empty procedural code. Contrary to what one might expect, I find more object orientation in Ruby code. Perhaps, because rubyist are more engaged in language and programming aspects? Maybe, but then again maybe not. I have given people with no experience with Ruby and no particular interest in it the task of writing test scripts (for the Watir testing tool). I see people fall naturally into a more OO style than I have ever seen in Java beginners. Some languages seem to make OO programming more natural than others. For whatever reason, I find that the rigidity of Java leads programmer away from the OO style. Ruby seems to encourage OO style. That's my experience, at least.
  3. Espial Before PeriodMay 01, 2006 @ 03:16 AM
    Thanks :(
  4. By Clock PeriodMay 01, 2006 @ 06:46 AM
    I think it would be usefull for other users also :)
  5. Calendarios De La TainaMay 04, 2006 @ 02:43 AM
    The problem is my browser...
  6. Inuyasha FanartMay 05, 2006 @ 02:10 PM
    I'm working :)
  7. Davis Gilt Audience Decoration ShaniMay 06, 2006 @ 01:55 AM
    Very clear :)
  8. Gonna have to give it a try :(
  9. Lipitor Altace Natural AlternativesMay 08, 2006 @ 02:49 AM
    Very nice write up :(
  10. Prey Riley VidsMay 08, 2006 @ 12:27 PM
    Very clear...
  11. New York WildflowersMay 08, 2006 @ 11:42 PM
    Thanks for taking the time to do it!
  12. Just thought I'd make a note about a problem!
  13. Sports HighlightMay 09, 2006 @ 09:28 PM
    Very nice write up...
  14. Best Media For Sony Dvd Rw Dw D56aMay 10, 2006 @ 12:09 AM
    Thanks for the write-up...
  15. Alltel Telephone HoldMay 10, 2006 @ 04:38 PM
    I think it would be usefull for other users also :(
  16. Edward GibbonMay 12, 2006 @ 11:09 AM
    Thanks. Updated appropriately.
  17. Viridity Laser Pointer Outflank PriceMay 12, 2006 @ 11:30 PM
    Thanks for the write-up.