10
Finally realized I was nesting my IF statements completely wrong after 3 months of broken scripts
I was writing 8 levels deep with no proper indentation and a random comment on a YouTube video about a Python tutorial in Austin made me look at my code sideways and see the mess.
2 comments
Log in to join the discussion
Log In2 Comments
james_martin931d ago
8 levels deep? I've seen some messy code in my time but that's almost impressive. Unless you were writing assembly or something, Python handles indentation by default so I'm wondering how this even compiled without throwing errors constantly. A random comment on a YouTube video about a tutorial in Austin is the most 2024 debugging method I've ever heard.
4
williams.amy1d ago
Honestly, 3 months of broken scripts is rough but it happens to the best of us. I did something similar back when I was learning and had a function that was just a mess of if/elif/else blocks that went on for like 12 levels deep. It worked sometimes but I could never figure out why it broke on random inputs. Random YouTube comments are legit debugging tools now though, I found a bug in my own code from a comment on a video about MySQL indexing. The Austin tutorial comment thing is so specific it has to be real. Hope your scripts are working now, that feeling when you finally see the pattern is amazing.
2