|
|
|
|
|
by donaq
4837 days ago
|
|
Hi, I used to write code like your 21 nested callbacks, so I'm baffled by your friend's assertion that no programmer would be so patient. I've always thought that the patience to grind endlessly at a problem (or bug) without an obvious solution was one of the more laudable shared virtues of our tribe. Patience is, in fact, a vital part of my learning process. In fact, I think that's probably a part of the reason why some programmers don't have patience for beginners with a lot of questions. It's because beginners actually have Google and StackOverflow these days, so it might seem like laziness to someone who had to learn using books and man pages. It's not that they don't like to share their knowledge, it's that they think the answer is already there if you'd bothered to look. I'm not saying that they're right to have that attitude, by the way. I'm just trying to present things from their perspective. |
|
Sure, you can spend an afternoon or so to write and debug those 20 nested callbacks, but surely, it is more fun and thus better to spend a couple of _days_ thinking of the problem, googling for solutions, getting distracted by some nice algorithm, attempting to apply that in a totally distinct, perfectly working part of your codebase, renaming a couple of functions, etc., and finally replace that nested thing with some carefully placed '.each' or '.map' (after gauging which solution looks best, aesthetically)
Yes, there may be commercial pressure to ship a product, but in the hearts of many programmers, the journey is the reward.