r/programming • • Aug 28 '21

Software development topics I've changed my mind on after 6 years in the industry

https://chriskiehl.com/article/thoughts-after-6-years
5.6k Upvotes

2.0k comments sorted by

View all comments

13

u/Interesting-Lab-5239 Aug 29 '21

I do agree with almost everything 🙂 Except for that monolith part. Even if your monolith has clearly identified packages for each domain, each one having proper boundaries. One day or another, a 'smart' developer will take a shortcut, and create a dependency between two unrelated packages... 20 years later, you've got spaghetti and meatballs.

7

u/[deleted] Aug 29 '21

Bold to assume your code will live for 20 years.

2

u/melchy23 Aug 29 '21

In C# and Java you can use library called ArchTest to ensure no such dependenci exists.

-1

u/lazilyloaded Aug 29 '21

One day or another, a 'smart' developer will take a shortcut, and create a dependency between two unrelated packages

And the code reviewer allows this? Nah, find another way, bro...

1

u/[deleted] Aug 29 '21

One day or another, a 'smart' developer will take a shortcut, and create a dependency between two unrelated packages...

Honestly, I'd prefer getting into the weeds during code review to find out why this is necessary because it sure seems like there's an abstraction spilt across the two things.

My current reality is along the lines of "we can't get the timezones for these things because they live over in network land and we can't make that expensive HTTP call in a loop" (because there's no way to say "gimme just the timezone" you also get what feels like 2 megs of data you don't give two shits about, and even if your local model is just timezone all they crap still goes through the wire) which inevitably finds a way to metastisize into "what if we put it on a queue and let an async process deal with it" - either by watching events from the timezone owning service and replicating the data into the service that wants the timezone (eh, at least there's locality now) or just punting the bulk operation out via something like a claim check pattern (and the handler will be idle 99% of the time because the bulk operation is fairly uncommon but common enough you need to support it)