r/developer • u/Ok_Veterinarian3535 • Aug 19 '26
The "If I Could Rewrite It" Project Post-Mortem
Developers who have worked on a large, well-known, or legacy application: If you could go back in time and change ONE architectural decision from the start, what would it be and why?
5
Upvotes
4
u/magicmulder Aug 19 '26
I've recently built two large apps running on the same server that both have roles/rights management. I should've planned a centralized admin with a shared component before. Well, hopefully it's only a couple days to refactor.
3
u/bocsika Aug 19 '26
DONT change a bit in logic.
First year: write the missing unit andintegration tests.
Second year: partially understand the code, and move it to its logical place / restructuring.
But for the sake of god, do not try to change the logic until the third year.
2
u/PmMeCuteDogsThanks_ Aug 19 '26
It was a bad decision that no two applications may be built in the same language. So we now have about 10 applications, each in its own language (Java, C#, C, C++, Go, Rust, TS, VB, Erlang, Haskel).
1
u/Amr_Rahmy Aug 19 '26
I had a device I needed to support. It was end of life already and needed a very specific list of instructions to install the sdk, and you can’t uninstall it properly once installed because it was throwing files in like 4 different temp folders including c:\windows c:\Temp and a few other places like c:\program files (x86), c:\program files. ..etc.
Uninstall was not clean. Old sdk won’t install correctly after first time. Newer sdk needed to be installed on top of the old sdk because newer sdk was missing files from old sdk.
At the time I made a list of instructions to install the device on a new machine and gave it to the “support engineer” to install which almost never worked. They never followed the instructions and would try to uninstall and reinstall when facing a problem.
I kept updating the instructions after talking to the manufacturer’s support team which would take 4-5 hours of troubleshooting from their support team until we figured they were not cleaning their mess on uninstall in places like c:\Windows, and it lead to a lot of support hours trying to remotely tell people how to delete and reinstall this buggy sdk and drivers that barely work.
Today, I would have bypassed their setup, used their windows driver files and DLLs, modified their integration DLL, and placed all the needed files with my application. No setup wizards, no throwing files in different places and overwriting old DLLs with newer DLLs.
1
u/ghandimauler Aug 20 '26
Working on new tech, nobody (even engineer) and we were starting on MS framework (MFC) and the idea was that maybe we could use the framework for the project (the piece for realtime logging).
It took us a month or so to discoverthat MFC could provide object persistance. However, what we really needed was not a single instance of and unique object which is useful if you are just wanting to get the current view of that instance but that's not what we needed. We needed to send the snapshot into a storage in the right order and have each change created and kept. We even tried hacking MFC and removing the fact that it only really wanted to have one instance of the same object.
Honestly, the problem was a lot of the people had never been into real time military stuff and the engineer was not good for the slide and the project manager was going through a breakup of the marriage and we were suggested to use the fancier Technologies and most of us have never touched them including the engineer. It was just poorly put together but if I'd had the time I'd like to go back and recognize that you break hard I found and take a different design.
1
u/BlimpIntolerant Aug 20 '26
I really wish I'd done centralised configuration across the application suite rather than having it all over the place.
1
u/TornadoFS Aug 20 '26
Not use document store database
1
u/recon_demon1859 Aug 21 '26
Deciding up front which clock every timestamp comes from.
I build live tournament software, so there's a countdown running on a phone, a TV display and an operator's laptop all at once and they all have to agree. Early on I let call sites just use Date.now() because it obviously works. And it does, right up until someone's laptop clock is wrong and their blind levels start advancing early.
Ended up having to go back and route every elapsed and remaining calculation through one server-adjusted clock, because the timestamps I'd already persisted were server-adjusted and mixing the two inherits the whole skew.
The bit I'd actually tell past me is that it's two different kinds of time and I needed to name that on day one. Time you do maths with has to come from the server. The other kind, audit entries, cache keys, stuff that's only recording when something happened, that can stay local and it doesn't matter. I didn't separate those, and working out later which was which was most of the job.
0
u/HiCookieJack Aug 19 '26
that we went for microfrontends and microservices for one single application with just 40 devs.
We should just have built a modulith frontend and backend and orchestrated different deployments through build-time composition.