You are viewing a single thread.
View all comments
17 points
*

Myth: code can be ugly as long as it works, don’t spend company time on making it look good or on minor optimizations.

The truth is that you can tell when effort has been put into a job. Even if it just works, the lack of discipline means that in the end it will be difficult to maintain and probably will fail in unexpected situations.

Every language has its conventions, but if I spot more than a line of separation between blocks of code, that is a common telltale sign of noob. Run from that shit.

permalink
report
reply
9 points

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

permalink
report
parent
reply
6 points

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

permalink
report
parent
reply
2 points

PEP8 is looking at you

permalink
report
parent
reply
5 points

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.

permalink
report
parent
reply
3 points
*

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.

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

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



Community stats

  • 3K

    Monthly active users

  • 1.7K

    Posts

  • 28K

    Comments