3 ms·
> I often make trivial mistakes just trying to get a "first draft" of a program out In my experience, it's helpful to add simple tests as you go. I have done
by dkarl 5y ago
> I often make trivial mistakes just trying to get a "first draft" of a program out
In my experience, it's helpful to add simple tests as you go. I have done some live coding tests in Python recently, which I'm not super familiar with, and the first couple I did, I made a lot of trivial errors that caused my solution to fail until I went back and cleaned them up. Luckily the interviewers kept their mouths shut while I was coding, and I was able to clean up quickly afterwards, but I could tell it wasn't a great look to say, "Okay, I _think_ this solution is correct," only to have it flame out spectacularly.
After those first two, I started writing simple tests for everything I did. Not only did it avoid embarrassing fails when the solution was supposedly complete, not only was it quicker overall, but every interviewer I've done this with has commented approvingly about it.
- kevinburke 5y agoI address this in the post and part of the problem is that this is more difficult on Coderpad, and also interviewers (n=~8 out of 10 or so) discourage writing tests.