4 ms·
> I don’t think I’ve ever written one correctly on first try. Please don't take offense, but this is odd to me. I honestly severely doubt I am some sort of pro
by Gene_Parmesan 7y ago
> I don’t think I’ve ever written one correctly on first try.
Please don't take offense, but this is odd to me. I honestly severely doubt I am some sort of programming super genius, but I have never had any issues setting looping logic correctly. (I took four years to teach myself programming & CS and now I've been at my first professional dev job for ~6 months.) None of my colleagues seem to have such issues either. What are you experiencing trouble with most? Off-by-one?
- akavi 7y agoI mean, I've written at most a couple dozen in my 7 years as a professional programmer (usually tight loops for perf), so sheer unfamiliarity is a big factor. But yeah, syntax (what order the arguments go in) and off-by-one issues are the majority, I think. Plus figuring out what my initial accumulator needs to be. Idk, map/filter and friends are just a much more direct mapping of how I think of programming.
- prirun 7y agoFor those who may have trouble with loops, take heart: after 45 years of non-stop programming, often 10+ hours a day, I still find myself sometimes doing mental loop simulations with small (few element) data to make sure a loop is correct. It's usually much easier to take extra time to make sure it's right than to debug it later.