this post was submitted on 30 Oct 2024
277 points (100.0% liked)

Programmer Humor

853 readers
1 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] ddplf@szmer.info 7 points 6 days ago (2 children)

This sounds just extremely dumb to me, as in "do something manually for 2 minutes or spend 2 days automating it"

Also, DRY in 90% of the cases is a sham

[–] bleistift2@sopuli.xyz 1 points 1 day ago

Completely depends on how often you need to write boilerplate code, and how error-prone it is.

After writing hundreds of instances of ‘fetch this from the server and show an error if it doesn’t work’, I finally wrote a helper for that. It took 2 hours, shouts at me if I use it wrong, and instantly makes my classes easier to read because all the boilerplate is gone. As an added bonus, the invocation is so small that Copilot can write it error-free, which it couldn’t before.

So fetching things is now a thing of a few seconds instead of one minute with a chance of making a mistake. I say it’s worth it.

[–] nilloc@discuss.tchncs.de 3 points 5 days ago

DRY, but also pre-optimization and dependency hell are bad.