4 ms·
A great computer scientist != a great programmer.
by zaph0d 15y ago
A great computer scientist != a great programmer.
- deleted 15y ago[deleted]
- ender7 15y agoYeah, this looks like academic code to me. I've never found an academic codebase that didn't make you want to cry.
- deleted 15y ago[deleted]
- ahmadss 15y agosince i'm a target audience for this course (non-technical person aspiring to learn how to code), how would i learn proper programmer convention (ie the Python way) vs. the computer scientist convention?
- jholman 15y agoThe first observation is that there is no computer scientist convention, only a heterogeneous collection of bad habits. :) Again, unlike this post's uncle and grandparent, I'm unwilling to assume that Sebastian is a bad coder in general, but this particular code is unPythonic. Maybe that's because he's a bad coder, maybe that's because he had teaching goals that I don't fully understand. I am aware of two reasonable answers to the "how do I learn idiomatic style" question (in any language, although Python is the only language in which I personally have deliberately sought a better accent). 1) Read great codebases. For Python, the #1 target here is probably the standard library. People also often mention high-profile projects like Django or Twisted; since I haven't tried that I don't know what percentage of that code is beautiful, but I'm guessing it's probably a mix (so you'd have to apply some judgement). 2) The path I have taken is to read a lot of blogs and Stack Overflow questions and so on. Consider this: http://stackoverflow.com/search?q=pythonic http://stackoverflow.com/search?q=pythonic In particular, answers by Alex Martelli are reliably very informative (even if I find his prose style a little sub-optimal). 3) Oh, and this is a bit abstract, but if you haven't typed 'import this' into your Python interpreter, you should do that, for some guidance about the abstract ethics of "being Pythonic".