DEV Community

Mohammad Faisal
Mohammad Faisal

Posted on • Originally published at mohammadfaisal.dev

What Nobody Told Me About Software Design

*To read more articles like this, visit my blog
*

It was years ago when I was tasked to design a medium-sized system on my own. I was really excited as it was time to show the world how awesome a software designer I was.

Before that, I only saw systems that were designed by others and wondered why the heck did they miss so many things?

But as I started to design the system myself I realized how difficult it was to build even simple things. So many dependencies, so many limitations, so much pressure!

I feel guilty about my own design although it is working fine. Because I know the loopholes of my system. I know how many good things I had to skip to finalize the design.

But recently I read a book by Steve McConnell where he expressed the truths about design and after reading that my mental peace was restored :P

So today I am sharing 5 truths about design that all of us need to keep in mind before designing anything again.

1. There is Nothing Clean about Software Design

Software design is a very sloppy and dirty process. The finished product is good and polished but the process is not nearly as tidy as the end result.

The product is clean but the process is dirty.

Design is sloppy because you have to hit many blind alleys. You have to make mistakes. You get things wrong. In fact, that’s the point of the design.

2. It’s All About Tradeoffs and Priorities

There is nothing called a perfect design. design is all about good for a particular cause.

An Ideal system would take zero space, have zero latency, Cost nothing to maintain, and support millions of customers at the same time.

But in reality, we have to make trade-offs. Sometimes as a designer, you have to choose a slightly poor architecture because you have time constraints.

Development time and feature support often can cause you to reconsider your design.

3. Design and Imagination Often Clashes

Design is about creating possibilities and sometimes restricting possibilities.

If we had an infinite amount of time we would build a system that would support every possible feature imaginable. But unfortunately, we are limited by time and resources.

As a designer, you should choose what you don’t want rather than what you want.

So, accept the fact that you can’t do everything and pick your sacrifices wisely.

4. Multiple Design Can Be Correct at The Same Time

If you give 3 separate people to design the same feature each of them would come up with a completely 3 different design. But all of them can be correct at the same time.

There is no silver bullet in software design.

Sometimes as human beings we become arrogant with our own design and reject everything else that doesn’t match our idea of doing things.

So you have to be open about other people's ideas while working in a collaborative environment.

5. It’s a Rolling Ball

One tidy way of summarizing all of these is design is emerging. It’s a continuous process. It’s like a rolling ball that gathers good and bad things along the way.

We can’t get many things right until we start implementing the design in real life. Sometimes we have to change parts of the design. Sometimes we have to re-write it.

There is nothing wrong with an imperfect design.

You just have to accept the fact that what you designed can be absolutely rubbish and there is no shame in accepting a better one. It’s the one single truth about software design.

Conclusion

That is some of my thought about software design. Hope you will find it useful.

Happy Coding! :D

Get in touch with me via LinkedIn or my Personal Website.

Top comments (4)

Collapse
 
efpage profile image
Eckehard

Your experience depends much on the tools you are using. Our mental capacity to handle complex interrelationships is limited, so we easily get into trouble if things get too complex.

There have been approaches in software design, that made it easy to deal with very large codebases of some 100.000 lines of code. OOP was one approach to break a large codebase into smaller, maintainable units, that could be developed and tested separately.

It seems a bit, the lessons learned from the software crisis in the late 80´s have partly been forgotten.

Collapse
 
jackmellis profile image
Jack

Sometimes as human beings we become arrogant with our own design and reject everything else that doesn’t match our idea of doing things.
Yeah this is super true. The longer I spend in the developer communities, the more frustrated i get with people’s arrogance and narrow mindedness. What’s worse is that I’m often one of them 😩

Collapse
 
ant_f_dev profile image
Anthony Fung

Thanks for sharing!

It's true that we could never have the perfect design - requirements changes and time constraints mean we have to sometimes cut corners. However, some techniques can help the code to be more manageable if used correctly. That said, they probably lead to inefficiencies at runtime. As mentioned in the article, it's all a compromise and about getting the right balance.

It's also import to have a mentality of being ok with failing fast. Try new ideas. It's ok for them to not be right all the time - it just means we can fix them before straying too far.

Collapse
 
taijidude profile image
taijidude

Nice article with good reminders. Could you add a Link to the book fromm Steve McConnell? I'm interested top check it out.