What's the stupidest programming mistake you've made?

@vaporeon_ probably the most recent mistakes I have made were bash-related. I made some wrong assumptions regarding scope rules for variables, resulting in situations where variables in loops had values from previous iterations of the loop that I didn't expect, causing subtle bugs that took me hours to unravel

@wallhackio Got an example? I am Unaware of the scope rules for Bash, actually, but I'm guessing based on your comment that they're different from the scope rules for C?

@vaporeon_ if I declare a variable in a for loop in C, it "resets" each start of the loop

That does not happen in bash, obviously, but I wrongly assumed that it did

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.