How my beginner Python script for train times in Italy sent me on a wild goose chase
I was backpacking through Italy last summer and figured it would be cool to write a little Python script to pull train schedules from a website. I'm just starting out with coding, so I followed a tutorial online. Well, I messed up the code for parsing the times, and instead of showing departures, it showed arrivals from the day before. I ended up at the station an hour early for a train that never came, and had to ask for help in broken Italian. The funny part was, the station agent laughed when I showed him my code on my phone, and he pointed out my error. It was a bit embarrassing, but now I always double-check my loops and conditionals. For other beginners, I guess the lesson is to test your code with real data before you rely on it, especially when traveling!