Thinking vs. Coding

Thinking vs. Coding

When I was growing up as a programmer, it was the time of object-oriented-everything. You were first supposed to do object-oriented analysis (where you you tried to understand the part of the system/domain you were about to implement), then there was object-oriented design (where you'd come up with the program structures that represent what you'd analysed in a way that had the right -ilities and degrees of freedom) and then, finally, you'd grab your IDE and write the code.

This rather strict sequencing is crazy, especially when, as it was kinda normal at the time, it was combined with a waterfall process; the analysis and design phases could last weeks. There were nice german words for the documents you were supposed to write, the Lastenheft and the Pflichtenheft. And the processes of the day, eg., the Rational Unified Process had dozens of dozens of documents you were supposed to produce before you were supposed to start coding. I remember a project at the end of the 90s where the architect expressed his delight about the fact that the RUP was "customizable" for the context it was used in, and that we only had to write 80 of these prescribed documents (no exaggeration here, it was 80). Luckily, hardly anybody did it this way.

Today we're living in a world of agile where any kind of document has a bad rep. Remember, the Agile Manifesto states that we value "working software over comprehensive documentation" and "responding to change over following a plan".

This is often (mis-)interpreted as saying that we should not think about the domain or problem before we start coding; just build it, write tests and then see if it's useful. The agile pioneers didn't mean it that way. They wanted to prevent exactly these weeks and months long of paper production phases. This is because they realized that the stakeholders often don't really know what they want until we start building early versions of a system, that requirements change over time (even during the time it takes to build a system), that requirements documents cannot be tested or otherwise verified for consistency (and so they are often incomplete, inconsistent and inscrutable), and that even developers and requirements analysis cannot build layers and layers of mental models without first implementing something and then continue building mental models on top of that executable system.

But here is the problem: many people today really do understand the Agile "prescriptions" as "let's talk about what the customer needs for a few minutes, and then let's build something, we can always iterate and change". This might work alright for simple systems. But if you're trying to represent a complex domain in software -- for example as a DSL, but also in other shapes -- you have to spend some time to try and understand

  • what are the core abstractions of the domain and how do they relate
  • which variability and special cases exist in these abstractions
  • which parts of what people tell you as "requirements" are really relevant for the new system and which are just historic accidents and should be ignored or replaced with something better
  • in which form should we let users interact with the domain (syntax, etc.)

These "analysis sessions" can last for hours, usually include software (language) people and domain experts, and yes, sometimes we even produce a couple of pages of written material.

The key to success of such sessions is three things:

  • There must be some people in the session with significant knowledge about the domain for which we want to define the system to answer questions about how the to-be-built system should work. If you are building a system that replaces an existing one, they also have to be able to distinguish how the current system works versus how a new system is supposed to work.
  • Everybody in the group must be able to abstract. You will be conceiving mental models of how a future system should work. If participants can't do that, this will be a problem.
  • People must also be able to communicate precisely and clearly both about the domain, and about how the currently-designed system works based on the current state of the mental models you are building.

A final very important ingredient for these "thinking sessions" is that you recognize when you have to stop thinking and start coding. The pyramid of mental models can only become so high before even the best abstractionists run out of steam or when feedback from future users is needed. At this point stop the session, build a prototype, and learn from it. Go back thinking later, if needed.

Very interesting vs debat. My 2 cents on this topic is “learn by doing” - knowing a domain and breaking it to sub domain improves by experience. At the same time we need thinking that allows this evolution to happen with least friction.

Like
Reply

Hello Markus Great article and very relevant problematic in particular in the context of entreprise IT. I would say the missing key ingredient is for building teams to have tangible awareness/experience of the consequences of lack of design, to balance their biais towards quick & dirty. Challenge in creating this awareness is that those consequences are generally mid/long term, so more abstract, less immediate, and many times outside their concern of their role.

Like
Reply

To view or add a comment, sign in

More articles by Markus Voelter

  • Die Mechanismen sind das Problem! Ein Aufruf an die Medien

    Aus meiner Sicht ist das politische System derzeit de facto nicht mehr ausreichend handlungsfähig. In diesem kurzen…

    7 Comments
  • 12 Ingredients for Developing Medical Software Systems Using DSLs and Cryptography

    Abstract Lots of systems in healthcare are moving into the digital space. System for digital therapeutics, drug trials…

    10 Comments
  • On Meeting Efficiency

    I think everybody agrees that there are too many meetings in software projects these days. Holger Schill recently wrote…

    12 Comments
  • omega tau ist zu Ende

    Vor 15 Jahren, im Sommer 2008, waren meine damalige Freundin Nora und ich auf der Suche nach einem gemeinsamen Projekt.…

    24 Comments
  • How do you prototype requirements?

    One of the things I emphasize in my book How To Understand Almost Anything is the validation of your understanding. As…

    7 Comments
  • Stop using Slides!

    Well, not generally. It's perfectly fine to use them for presentations -- remember, a presentation is when somebody…

    6 Comments
  • You gotta change the rules of the game!

    I my work as a consultant, I am often involved with innovation projects. These, in turn, are often part of larger…

    2 Comments
  • On the Relationship between Domain-Driven Design and Domain-Specific Languages

    I have always been surprised why the domain-driven design community has so little interest in DSLs. So when I recently…

    15 Comments
  • Yet another attempt at explaining Domain Specific Languages

    As you may know, I always try to find (more) convincing and (more) accessible ways of explaining why using DSLs is a…

    2 Comments
  • How to Build Discrete Event Simulations

    Let's assume you develop some kind of software system whose internal state evolves over time. You want to let users…

Others also viewed

Explore content categories