20
Just got my first Python script to run without any errors
About two months ago, I was trying to write a simple script to rename a bunch of files. I would just copy and paste code from different websites and hope it worked. It never did. I'd get an error, not understand it, and just delete everything and start over. Last week, I sat down with a free online course and actually learned what a 'for loop' does. Yesterday, I wrote the script again from scratch. It took me three hours, but I read each error message, looked them up, and fixed them one by one. When it finally ran and renamed all 50 photos, I felt like I actually understood what the code was doing, not just copying it. Has anyone else had that moment where things just started to click?
2 comments
Log in to join the discussion
Log In2 Comments
the_uma18d ago
That first clean run is the best feeling! I had the same thing happen with a web scraper. Finally understanding why the code works makes all the difference.
1
emma76818d ago
Yeah, that "finally understanding why the code works" part is so real. It's like the puzzle clicks. @the_uma, what was the specific thing you finally got about your scraper that made it run clean? For me, it's usually some tiny rule about how the website is built that I missed (like waiting for a page to load fully). That moment of figuring out the actual problem is way better than just getting it to run.
2