▲ 110 ▼ What are some common misconceptions about programming that you'd like to debunk? (programming.dev) submitted 2 years ago by mac@programming.dev to c/programming@programming.dev 179 comments fedilink hide all child comments
[–] saplyng@kbin.social 9 points 2 years 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 permalink fedilink source parent hideshow 4 child comments replies: [–] hawgietonight@lemmy.world 6 points 2 years ago (1 child) One line is fine if used wisely, everybody does it for readability. The issue is when you need more than one. permalink fedilink source parent hideshow 2 child comments replies: [–] Fermiverse@feddit.de 2 points 2 years ago PEP8 is looking at you permalink fedilink source parent [–] Feathercrown@lemmy.world 5 points 2 years ago (1 child) 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 fedilink source parent hideshow 2 child comments replies: [–] pkill@programming.dev 3 points 2 years ago* (last edited 2 years ago) (1 child) 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 fedilink source parent hideshow 2 child comments replies: [–] Feathercrown@lemmy.world 1 point 2 years 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. permalink fedilink source parent
[–] hawgietonight@lemmy.world 6 points 2 years ago (1 child) One line is fine if used wisely, everybody does it for readability. The issue is when you need more than one. permalink fedilink source parent hideshow 2 child comments replies: [–] Fermiverse@feddit.de 2 points 2 years ago PEP8 is looking at you permalink fedilink source parent
[–] Fermiverse@feddit.de 2 points 2 years ago PEP8 is looking at you permalink fedilink source parent
[–] Feathercrown@lemmy.world 5 points 2 years ago (1 child) 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 fedilink source parent hideshow 2 child comments replies: [–] pkill@programming.dev 3 points 2 years ago* (last edited 2 years ago) (1 child) 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 fedilink source parent hideshow 2 child comments replies: [–] Feathercrown@lemmy.world 1 point 2 years 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. permalink fedilink source parent
[–] pkill@programming.dev 3 points 2 years ago* (last edited 2 years ago) (1 child) 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 fedilink source parent hideshow 2 child comments replies: [–] Feathercrown@lemmy.world 1 point 2 years 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. permalink fedilink source parent
[–] Feathercrown@lemmy.world 1 point 2 years 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. permalink fedilink source parent