I've never found this to be a challenge, so I don't quite understand why it's hard for others. Could someone perhaps explain to me why? I'm not being accusatory, I just don't understand why managing whitespacing is hard.
Is python your first or forest really hard language.
Most other languages don't have such an emphasis or no emphasis at all on spacing conventions. So for me it's challenging because I learned Python after learning languages where spacing wouldn't blow you up
I played with old Javascript, then learned Java first, then Python, then revisited Javascript (es6 and higher). I'm entirely self-taught (a side from cs50 and internet resources). My Java code was always well-indented and -spaced because it helps me read what I wrote. I always viewed making the code readable and consistent as a primary part of programming.
Edit: make an implication more explicit
Edit 2: have a rescue upvote because I think your point is valid about suddenly-imposed constraints and the shock that can occur because of it
I mean I know readable code is important, but I would at least in part argue that comments are for more issue than spacing conventions. I can clean a lot more high level from comments than I can from just reading through lines of code
I'm not sure where comments fit into this (do doc strings also count?). For me, they sit at the same indentation as the code block it describes. My comments discuss why I chose to do something or a one-liner for large, important but obvious code blocks. I also sometimes use them to section out blocks as a brief summary for easy quick scrolling. It sounds like managing comments can also be a challenge when learning.
1
u/[deleted] Jul 25 '18
I've never found this to be a challenge, so I don't quite understand why it's hard for others. Could someone perhaps explain to me why? I'm not being accusatory, I just don't understand why managing whitespacing is hard.