1
I finally got why my python script kept breaking after 3 years of just copying code from stack overflow
Last month, I spent a whole Saturday in my kitchen trying to fix a script that pulled weather data, and I realized I'd never actually learned what the 'if __name__ == '__main__':' line at the bottom of my files even did, so I just started reading the official python docs for the first time.
3 comments
Log in to join the discussion
Log In3 Comments
adamgreen16d ago
Yeah... it's like you're building a house with no blueprints. You can copy the fancy trim work from a picture, but you never learn why the wall needs a stud every sixteen inches. So when you try to add a window, the whole thing falls down. Reading the docs is like finally looking at the building code... you stop just making it look right and start making it work right for real.
5
dylanmurray16d ago
Exactly. Spent a week trying to get a database query to run faster by copying Stack Overflow answers. Finally cracked the actual docs and learned about indexes. Suddenly it made sense why my first attempts were so slow. That's the moment you go from guessing to actually knowing what you're doing.
8
jamie_white13d ago
Docs also show you the dead ends.
8