this post was submitted on 06 Feb 2024
110 points (94.4% liked)

Programming

17375 readers
447 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 [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 9 points 9 months ago (2 children)

Lines of separation are bad? I like adding a few empty lines to denote a different logical section so it's easier for me to read back later :c

[–] [email protected] 6 points 9 months ago (1 children)

One line is fine if used wisely, everybody does it for readability. The issue is when you need more than one.

[–] [email protected] 2 points 9 months ago

PEP8 is looking at you

[–] [email protected] 5 points 9 months ago (1 children)

The idea is that often you could be using actual logical separations (functions etc.) instead of whitespace. IMO whitespace has its place though, including for this.

[–] pkill 3 points 9 months ago* (last edited 9 months ago) (1 children)

uhh seen this shit with some rewrites with no regards to your code being idiomatic to the point of it all feeling almost verbatim. Like some PHP devs getting confused by the lack of classes in Go and instead of using method receivers and composition over inheritance creating one 250-line behemoth public function to replace a PHP class.

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago)

Oh no

At work I'm currently trying to chop up a 3500 line file into multiple components... separation of concerns, people! To be fair it's like the oldest one we have so there's a lot of cruft in there.