this post was submitted on 03 Sep 2026
34 points (92.5% liked)

Programming

28403 readers
264 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] cosmicrose@lemmy.blahaj.zone 6 points 5 days ago (1 children)

I can agree with this, mostly. More recently I’ve been trying to become aware of how much knowledge I’m encapsulating within functions, preferring to hide more stuff in them rather than less, and avoiding shallow functions that just, say, wrap a single line just passing along the arguments. I’ve realized over my career that I’d prefer a longer function that I can just read straight through rather than jump between a bunch of shallow functions trying to piece things together.

[–] Womble@piefed.world 5 points 5 days ago

Honestly, as long as the functions you are creating are pure and reasonably named, I think its pretty much always a win to wrap any coherent operation up into one.