this post was submitted on 30 Oct 2024
531 points (99.6% liked)

Programmer Humor

32479 readers
309 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 20 points 2 weeks ago (5 children)

I don't get it, what's so bad about boilerplate?

[–] davel@lemmy.ml 22 points 2 weeks ago (2 children)
[–] veganpizza69@lemmy.vg 5 points 2 weeks ago (1 children)

Writing code is bad!

Writes condensed configurations and properties files in 3 different languages instead. Cloud deployment uses yet another source of configurations and properties.

Doesn't write documentation for configuration and properties.

Ah, yes, that's much more readable.

[–] davel@lemmy.ml 3 points 2 weeks ago* (last edited 2 weeks ago)

Sure, though you’re arguing against an entirely different thing. Nobody said writing code is bad.

[–] Swedneck@discuss.tchncs.de 8 points 2 weeks ago

well why is it good? why not just assume the boilerplate as the default and require the user to override it if they want to do something fancy?

it's just busywork to always need to write the same stuff, and it also makes the code less readable and many people look at all that boilerplate and nope the fuck out.

This is why python is so good for getting people to realize that programming isn't magic, you just write the equivalent of one short sentence and BAM text in the terminal, no need to import the basic ability to print text which is so incredibly inane.

[–] MyNameIsRichard@lemmy.ml 7 points 2 weeks ago

It's boring to write

[–] Aceticon@lemmy.world 5 points 2 weeks ago

It's the most boring thing of the technical side of the job especially at the more senior levels because it's so mindnumbingly simple, uses a significant proportion of development time and is usually what ends up having to be redone if there are small changes in things like input or output interfaces (i.e. adding, removing or changing data fields) which is why it's probably one of the main elements in making maintaining and updating code already in Production a far less pleasant side of job than the actual creation of the application/system is.

[–] yogthos@lemmy.ml 3 points 2 weeks ago

Boilerplate is bad because it's fundamentally just noise. When you read the code you want to be able to tell what the purpose of the code is and what the problem it solves. Ideally, code should be expressing that as clearly as possible. Having a lot of boilerplate is typically an indication that the language semantics don't allow you to express the solution in a clear way and you have to write a lot of incidental code. The more code you have to read the more cognitive overhead there is in understanding it and keeping it all in your head.