“Is code engineering an art or a science”? by Ivar Jacobson

I received this question in an interview with SDTimes.  Although answering this question is like walking through a mine-field, I was so intrigued by the question that I accepted the challenge.

Code engineering is an interesting term that I so far have not come across.  It instantly has a built in conflict because it implies that coding is an engineering activity and if it is, then it can't be an art or a science.    Neither of these would be an engineering activity. Thus, the question is broken.

It would be easier to answer the question "is coding an art or a science".  I think it is neither.  It is more like a craft.  However, when do you really need craftsmanship when writing code?

When you implement interesting new algorithms,  you really need excellent coding skills.  However, the total amount of code of this nature is small.  I dare say that more than 80% - 90 % of code written for applications in banking, telecom, defense, etc. are just plain implementations of relatively simple features.  The coding job is quite straightforward, most of it doesn’t require great craftsmenship. Understanding the business processes (or how you can change them), the user's needs, the architectural principles and values, the available solutions as prefabricated packages or frameworks etc. are then as critical as having good coding skills.

Now, is there a case when someone could motivate talking about code engineering.  Yes, if everything you do would be about coding.  When you think about new business processes, you express them as code.  When you think about what the software should do (requirements) you express it as code.  When you think about the architecture and design, you express it as code.  Then of course code engineering would make perfect sense.  On the contrary if you think about code engineering as a discipline besides other engineering activities (requirements, architecture, design, etc.), then you would sub-optimize the work you have to do while coding, and that would be a serious mistake – not smart!

Follow the conversation with me on Twitter.