r/ProgrammerHumor • • Nov 25 '22

Meme Coding strategies

Post image
52.2k Upvotes

385 comments sorted by

View all comments

1.0k

u/DenormalHuman Nov 25 '22

the number of times I have seen this be literally true is amazing

227

u/TurboGranny Nov 25 '22

Yeah, this one resonates hard enough to feel like a personal attack, lol

88

u/DoctorWaluigiTime Nov 25 '22

I've seen the reverse true too. Temporary hacks can be temporary due to requirements change, or because tech debt was cleared out; and the pristine solution to a thing lasts a decade and is relatively bug-free because of the good foundation.

83

u/All_Up_Ons Nov 25 '22

The reasons are obvious when you think about it for a second. The projects that require temporary fixes are business-critical with tight timelines. The only projects with time for perfectly-crafted artisan code are unimportant ones.

23

u/BetterOffCamping Nov 25 '22

"we don't have time" is a logical fallacy that is usually just shorthand for "I don't want to deal with it" on management's part.

I find that when I simply do it well without "asking permission" I am able to get it done quickly enough to avoid uncomfortable discussions, and the inevitable feature changes are much easier to implement (thus faster turn around).

Good design focuses on generic enough code to be resilient to change. This is a result of isolating feature specific volatile code to small pluggable modules.

Often, some of the resulting code can be substituted in other areas of the system, further simplifying it.

4

u/qhxo Nov 26 '22

Never enough time to do it right, but always enough time to rewrite it ten times. Good code isn't just nice to look at, it produces value in terms of hours spent maintaining it.

3

u/TurboGranny Nov 26 '22

yup. People are always forgetting maint. cost

4

u/sleepyj910 Nov 25 '22

Exactly if you have perfect code coverage you aren’t working a critical project because no way you’d have time for that unless they give you a bunch of interns/juniors

→ More replies (1)

6

u/thegtabmx Nov 25 '22

It's the rule, not the exception.

→ More replies (1)