2 ms·
I've never programmed competitively, nor have I ever solved a programming puzzle. Quite honestly, I don't see the point of it. Programming is not a competitive
by kstenerud 13y ago
I've never programmed competitively, nor have I ever solved a programming puzzle. Quite honestly, I don't see the point of it.
Programming is not a competitive process; it is cooperative. Some of your greatest resources are the people around you. Even after 15 years in the industry, I'll still ask questions of my coworkers at least once every couple of days.
A puzzle is something designed by another person, with the specific intention of tricking you. That's not quite the same thing as a real-world stumper problem, although there can be some similarities. And once again, the times when you're stumped are precisely the times when you want to talk to your coworkers about it. Often the very act of explaining the problem to someone else is enough to give you the solution! Sitting there on your own, banging your head on the keyboard is the stupid way to do it.
The most important thing when it comes to debugging is to understand how things work at least one level below where you're working at (such as understanding how the library calls in the language you use translate to system calls, or being able to dissect HTTP requests/responses, or even TCP/IP frames, or if you're programming in C for example, understanding how the compiler works, how it optimizes, where the edge cases are, or even knowing some assembly language so that you can look at a stack dump and figure out what the computer actually did vs what you thought you told it to do). I dislike puzzles for the same reason I dislike trick questions on exams. They're not designed to test your knowledge or ability; they're designed to see if you can find the needle they've oh-so-cleverly hidden in a haystack. That sort of thing is fine if it's for your own amusement (people do, after all, enjoy crossword puzzles), but as hiring criteria I find them misguided at best.
Learn new things from time to time, but focus on what you're passionate about. You'll gain deep knowledge and you'll have the motivation to solve whatever problems crop up.
- SamReidHughes 13y agoProgramming "puzzles" in interviews are not made with the intention of tricking you. They aren't designed to make you find some metaphorical needle in a haystack, either. They're designed to be easy problems with clear avenues or multiple avenues of attack to solve. And people asking them are well aware that applicants sometimes get stuck, which is why they ask multiple questions (unless applicants get stuck on the easy warm-up question).