3 ms·
every programmer's gut reaction to binary search is "that's easy!" Perhaps I'm not a programmer then. Or I'm a strange one I guess. I tend to approach every
by abstractbill 17y ago
every programmer's gut reaction to binary search is "that's easy!"
Perhaps I'm not a programmer then. Or I'm a strange one I guess.
I tend to approach every programming problem assuming the worst: This will be much harder than it seems. There will be corner-cases. I will miss some of them and do the wrong thing for other ones. I should try to enumerate every weird condition I can think of, and then throw random inputs at things to catch the stuff I missed.
- darthpanda 17y agoI bet you're an experienced programmer considering the attitude. It's funny, the longer you stay in programming the more you start to truly grasp how much you don't know. But you get better knowing that. Paranoia about one's own abilities and planning accordingly creates confidence and quality. Unwarranted hubris just causes you to work weekends.
- deleted 17y ago[deleted]
- sukuriant 17y agoSounds like I'm not a programmer, either. Working on the Programming Team for my school for many years taught me to consider edge-cases. And personally, there's quite frequently SOMETHING I forget when writing a binary search, and it usually ends in it infinite looping -- so, I often have to go find my stupid mistake.