BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Moving away from exclusive use of OOP and Curly Brace Languages to reduce code waste?

Moving away from exclusive use of OOP and Curly Brace Languages to reduce code waste?

This item in japanese

Bookmarks
Bob Warfield argues in his recent blog article that at least 70% of code is written to build components which would be taken for granted by the client because every comparable product offers them as well, e.g. forms, UI, database connections, messaging, data feeds, caches… He views this code as "wasted" because it does not add any competitive differentiation to the final product.

And for this reason it is condemned to be very average because it wouldn’t matter for the business anyway. Warfield calls it “a tax on innovation.” Programmers are "constantly reinventing the wheel" building the same components over and over again and often from scratch. This issue has also been raised by Albert Wenger who believes that there is a need for a new platform providing out of box features whereas Warfield advocates for facilitating code reuse.

Warfield is aware that “programmers hate to reuse code because they hate to read and understand" it. He argues however that this is not inherent to the nature of programmers but rather due to the fact that employers “rarely invest in letting their developers learn” and to extensive use of C-driven languages. Warfield believes that these "Curly Braced Languages" do not help to reduce the code waste and to facilitate its reuse. They are all descendants of C which was created to build Unix and which is considered a Systems Programming Language characterized by its ability to create “most difficult types of software, such as operating systems” and to “get down to the finest levels of detail without making any assumptions.” However, these Curly Braced Languages are commonly used to build Application Software:

So what happens with my Curly Brace Language when I want to do Application Programming instead of Systems Programming? […]It can talk to your hardware, but scarcely knows your operating system. […]Without an Application Framework, Curly Braced Languages can’t do much except write, “Hello, World.”

Even though these frameworks are “supposed to be standardized so everyone can reuse that code", they are numerous and hard to learn. In the same time, these frameworks do not really provide solutions for the code waste since they do not provide features for building the 70% of components which are undifferentiated. Albert Wenger also believes that today’s industry is “using tools that simply were not made for the job.” According to Warfield, to reduce the waste of code and to improve its reusability, it is necessary to “forget the Curly Braced Power Tool perspective for a minute” because these tools are to be used for building components which would create "the proprietary advantage"

The “70% of functionality that is undifferentiated” could be build using simpler, service-oriented approach that would minimize the potential learning burden is the code components were to be reused. Warfield believes indeed that SOA is more conducive to code reuse than OOP which is “ about controlling the fine grained behavior of objects in intricate ways” and makes many things “happen implicitly and in many and varied locations” resulting in a less readable code. In the second part of his post, he elaborates on the advantages of moving away from using a single, Curly Braced, Language:

Those languages are too low-level. There is no support there for multi-tenancy, web pages, security, scaling, or any of the myriad of problems one encounters when building a Web 2.0 or SaaS business. You have three choices: write all of that yourself and pay the 70% overhead tax or become a Polyglot Programmer and minimize the overhead by choosing the best tools for the task and leaving your Curly Braced Power Tools safely in the workshop only to be brought out when some highly custom proprietary work needs to be done.

Warfield refers to the idea of polyglot programming developed by Martin Fowler and Niel Ford and gives the example of some “smart companies” which, in his opinion, have already adopted this approach: Facebook, Amazon or Google that have created “their own Component Architecture Frameworks or Core Technology”.

One can argue that C++ isn’t really the language of Google; rather, MapReduce, BigTable, and the Google File System are their language.  C++ is just the assembly code used to write the modules that these other platforms mash up.  In fact, it makes sense to think that C, Java, and C++ are all just portable assembly languages.  

Warfield believes that this kind of approach enables companies “to focus a much greater proportion of its resources to create a proprietary edge for itself.” Moreover such a language agnostic approach makes it possible for these vendors to build a platform that would offer solutions to reduce the innovation tax, a platform Albert Wenger would like to have, “created from the ground up to enable modern web sites and applications.” 

Rate this Article

Adoption
Style

BT