My mentor marked up my first Python script with a red pen and it stung in the best way
Six weeks into learning Python, I showed my neighbor Dave (a dev of 12 years) my little script that renamed photo files in a folder. I was proud of it, and he handed it back covered in red pen with one line circled three times: "you repeat this block four times, that's what functions are for." He also quoted me where I'd left a print statement in the middle of a loop that fired 40 times, and said "if a user sees this scroll by, they'll think your program is broken." I was a little annoyed until I cut the file from 60 lines down to 31, and it ran the same. Now every time I finish a script I ask myself two things: is there a chunk I could wrap in a function, and does anything print that the user doesn't need? The best part is the second pass always turns up something dumb I missed the first time. Dave also pushed me to write small comments, not huge ones, just a short note on what each block does so future me isn't lost. Curious what kind of feedback made your early code click, was it style, structure, or something about testing?