Live data from Hacker News

Ask HN: How do I stop being obsessed with software architecture?

news.ycombinator.com

1–10 of 38 posts

Ask HN: How do I stop being obsessed with software architecture?

#1
So, I'm an experienced dev with more than 10 years of experience. I do mostly web development.

Every once in a while, I catch myself obsessing about architecture. It usually goes like this: I got some free time, I start to think that my current code sucks and that I need to rewrite it "the proper way".

This usually means proper separation of concerns, layers, abstractions and what not. I'd go crazy with that. I get troubles sleeping, I get very stressed mainly because I want to do it quick so I could go back to actually adding features and fixing bugs.

This mainly apply to my side projects, as at work I rarely have the luxury to rewrite stuff or introduce big changes. But it's really bothering me. For example right now I have an app that makes some money and I want to scale it by adding more features. But I got caught into this architecture obsession and so I want to rewrite it because right now there are no abstractions whatsoever. HTTP requests comes in, I do raw sql queries and get shit done. But I want to make it nice, have clean architecture, onion architecture, proper domain layer. But none of this matters. It's a one man show, and it works.

And yet, I got stuck in this mode for the past couple of days, and I can't seem to get out of it. The sad thing is that I start the refactor, realize midway that I did not think it through, waste a day of my life, go to sleep, and repeat the same tomorrow thinking that I have found a "better way" to do it, just to make the same mistake again in a different place.

How do I stop being obsessed with software architecture and actually focus on getting shit done?

Re: Ask HN: How do I stop being obsessed with software architecture?

#2
start to make money with your side projects.

I have thrown up a wordpress site and marketed it to people interested in it (Facebook Groups, Reddit, SEO, etc) and it makes money on it's own.

No software architecture, just a side project that provides value to people.

Re: Ask HN: How do I stop being obsessed with software architecture?

#4
Intentional refactoring is not a waste of time. I mean you are learning right, both how to refactor and the right way to represent your problem domain. So that is not bad nor a waste of time necessarily. Do the refactor as it will help you create new features later and as you gain experience you will start using the design patterns from the beginning.

Re: Ask HN: How do I stop being obsessed with software architecture?

#5
I can relate to this, especially on a side project where there is no one looking over your shoulder or holding you to a deadline, it’s very easy to spend too much time on the wrong things.

The stress you feel is the feeling of not having enough time to actually do the thing you’re wanting to do. But it’s important to recognize that the reason you don’t have enough time is because the thing you are working on, will not move the needle on the side project.

Deep down you know this, but it doesn’t matter because it’s hard to stop when you get stressed and emotionally deregulated. This is a very common trait in ADHD.

When I start to feel that stress, I typically will try to force myself to step away from whatever I am doing and take a five minute break. After I take a break if I still want to work on whatever it is, I force myself to put an end time on it, and also to relate the task back to a larger goal that will move the needle on my project. If I can’t do either of those things, then I stop the task. Hope it can help, it’s not easy.

See if you can get yourself obsessed with working on things that will move the needle like a new feature instead of rewriting old code.

Re: Ask HN: How do I stop being obsessed with software architecture?

#6
Obsession usually means your emotional reasoning is over powering your logical thinking ability.

I suggest - Every time you rewrite, document your architectural changes in a long form article.

You are essentially journaling your thought process, but explaining it to someone else forces you to break the emotional connect you have with your code.

This way you will start to view software architecture with a balanced mindset.

Re: Ask HN: How do I stop being obsessed with software architecture?

#7
It's the same urge to abandon the current side-project and start a new one. It's normal, all Devs have it. Your brain always wants to do new fun stuff. You see a new shiny framework you want to use it. For me what took me out of this habit was to get rid of all the online-dev-community noise. Don't listen to any of the new trends, new frameworks, new architectures. They are just noise. And at the same time focus on why you started your side project in the first place: to solve real problems of real people. None of these people care what fancy tools you use or what architecture your backend is built with. What they care about is if you solve their problem. So focus on that. And if at some point your bad architecture from 5 years ago stops you from solving real problems, then change it. But from my experience the probability that no one will use your app in 5 years is way way higher than the probability that you have so many users that your architecture will actually matter.

Re: Ask HN: How do I stop being obsessed with software architecture?

#8
I found it useful to set deadlines that force me to prioritize features that add value/functionality. Since for me these are just personal projects, I try to add accountability by telling friends "hey, Monday I want to show you this really cool thing I did". This helps sharpen my focus.

Re: Ask HN: How do I stop being obsessed with software architecture?

#9
My current hack is reminding myself it's better to have a poorly architected system that's finished / functional than a half-finished "well architected" one

Once I notice things creaking I start doodling a new arch.

Or if I notice I'm spending too much time on addressing the product of my currently suboptimal design then I might refactor it, but it usually isn't or shouldn't be the most important thing

Post reply on HN