Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of the biggest traps self-taught developers fall into is not recognizing (seemingly) complex problems have likely been solved before.

A simple example in Python:

  for dog in dogs:
      print dogs.index(dog)
      calculate_dog = something_complex(dog)
vs.

  for i, dog in enumerate(dogs):
       print i
       calculate_dog = something_complex(dog)


I've seen CS degrees do these kinds of things as well.


I don't see your example as a trap a self-taught developer would fall into. The non-usage of enumerate just indicates that it is a code from some one who has started with python and any self taught developer who groks pydocs would eventually discover enumerate.


I guess that's kind of my point - there's no motivation to grok pydocs, because you don't realize there's a better way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: