← Back to context

Comment by motorest

3 days ago

> Writing code is the design phase.

No, it really isn't. I don't know which amateur operation you've been involved with, but that is really not how things work in the real world.

In companies that are not entirely dysfunctional, each significant change to the system's involve a design phase, which often includes reviews from stakeholders and involved parties such as security reviews and data protection reviews. These tend to happen before any code is even written. This doesn't rule out spikes, but their role is to verify and validate requirements and approaches, and allow new requirements to emerge to provide feedback to the actual design process.

The only place where cowboy coding has a place is in small refactoring, features and code fixes.

It is, as often, a trade-off.

You need a high level design up-front but it should not be set in stone. Writing code and iterating is how you learn and get to a good, working design.

Heavy design specs up-front are a waste of time. Hence, the agile manifesto's "Working software over comprehensive documentation", unfortunately the key qualifier "comprehensive" is often lost along the way...

On the whole I agree that writing code is the design phase. Software dev. is design and test.

  • > You need a high level design up-front but it should not be cast in stone.

    Yes, you need a design that precedes code.

    > Writing code and iterating is how you learn and get to a good, working design.

    You are confusing waterfall-y "big design upfront" with having a design.

    It isn't.

    This isn't even the case in hard engineering fields such as aerospace where prototypes are used to iterate over design.

    In software engineering fields you start with a design and you implement it. As software is soft, you do not need to pay the cost of a big design upfront.

    • > You are confusing waterfall-y "big design upfront" with having a design.

      I do not and I have explained it.

      > In software engineering fields you start with a design and you implement it

      And part of my previous comment is that this "waterfall-y" approach in which you design first and implement second does not work and has never worked.

      > you do not need to pay the cost of a big design upfront

      Exactly, and not only that but usually requirements will also change along the way. The design can change and will change as you hit reality and learn while writing actual, working code. So keep your design as a high-level initial architecture then quickly iterate by writing code to flesh out the design.

      Software is often opposed to "traditional engineering" but it is actually the same. How many experiments, prototyopes, iterations go into building a car or a rocket? Many. Engineers do not come up with the final design up front. The difference it is that this is expensive while in software we can iterate much more, much quicker, and for free to get to the final product.

      4 replies →

    • The difference I see is that in other fields, part of your design process is thinking through the logical details of the thing. Essentially, doing some math. In software, the logical details are the finished product. The math is what you're trying to make. If you've actually thought through all of the details, you have written the software (if only in your head). If you haven't thought through all of the details and only figured out a high level design, you've still written some software (essentially, stubbing out some functionality, or leaving it as a dependency to be provided. However you want to think of it). So naturally, one way to think through things is to write software.

      2 replies →

Operation that uses software developers not as code monkeys but actual business problem solvers that have also business knowledge.

Operation that delivers features instead of burning budget on discussions.

Operation that uses test/acceptance environments where you deploy and validate the design so people actually see the outcome.

Obviously you have to write down the requirements - but writing down requirements is not design phase.

Design starts with idea, is written down to couple sentences or paragraphs then turned into code and while it is still on test/acceptance it still is design phase. Once feature goes to production in a release "design phase" is done, implementation and changes are part of design and finding out issues, limitations.

This response is rude / insulting and doesn't actually add much because you've just asserted a bunch of fallacious opinions without any meat.

My opinion is reality is more nuanced. Both "the code is self documenting" and "the code is the design" are reasonable takes within reasonable situations.

I'll give an example.

I work in a bureaucratic organization where there's a requirement to share data and a design doc that goes through a series of not-really-technical approvals. The entire point of the process is to be consumable to people who don't really know what an API is. It's an entirely reasonable point of view that we should just create the swagger doc and publish that for approval.

I worked in another organization where everything was an RFC. You make a proposal, all the tech leads don't really understand the problem space, and you have no experience doing the thing, so you get the nod to go ahead. You now have a standard that struggles against reality, and is difficult to change because it has broad acceptance.

I'm not saying we should live in a world with zero non-code artifacts, but as someone who hops org to org, most of the artifacts aren't useful, but a CI/CD that builds, tests, and deploys, looking at the output and looking at the code gives me way more insight that most non-code processes.