H
7

Finally got my first Python script to actually do what I wanted...

After about 3 weeks of tutorials I was still just copying code examples. But last Tuesday I sat down and wrote a script that reads a text file and counts how many times each word shows up. It took me like 4 hours and I had to google every other line... but it ran without errors on the first try. For anyone else starting out, when did it click for you that you could actually write code from scratch?
2 comments

Log in to join the discussion

Log In
2 Comments
the_mason
the_mason1mo ago
Oh man, "it ran without errors on the first try" - that is the most beautiful feeling in the world, right? I remember my first win was a stupid little calculator that I built from scratch. Took me all night, kept getting syntax errors every 3 lines, and then suddenly it just printed out the right answer. I literally sat back in my chair like I'd cured a disease or something. The funny thing is looking back now, that script was probably like 15 lines of janky if-else statements. But yeah, that first time you write something that actually works and you didn't copy it from someone else, thats when you know you're actually learning.
2
ninas70
ninas701mo ago
That feeling never gets old either! @the_mason, you nailed it with the calculator story, that's exactly how it goes. I've noticed the same thing happens with all kinds of skills, not just coding. Like learning to cook without a recipe, you mess up a few times, then one day you just whip up something tasty and realize you actually know what you're doing. It's that moment when you stop following a step-by-step guide and start building stuff from what's in your head. That's when the real learning clicks, whether it's 15 lines of janky code or a simple pasta dish.
2