4 ms·
It depends a lot on what you mean by "Learning Python". Is it "Learning Python as a second or third programming language", or "learning programming using Python
by bigiain 9y ago
It depends a lot on what you mean by "Learning Python". Is it "Learning Python as a second or third programming language", or "learning programming using Python"?
Understanding libraries and idiomatic language constructs is important - but only if you're well past the "Hello World!" stage. If you can't get close to a working fizzbuzz yourself - you're probably not ready for BeautifulSoup or Numpy or Django. You _might_ be able to copy paste Stack Overflow examples, but there's some basic "learning programming" that needs to be done before you'll understand what you're doing...
- nlawalker 9y agoAh thanks, I've always looked for a way to sum up this distinction and you've captured it perfectly (particularly "learning programming using x".. I think a lot of books called "Learning X" should be called that instead). Is there any recommended material for learning Python as a second or third language?
- icebraining 9y agoThere are a few guides out there in the form of "X for Y programmers", eg. Python for Ruby programmers. Personally, I find it more helpful to use regular materials and skip the stuff I already know.
- reificator 9y agoWhen I do that, I miss the details that can catch you off guard. If I had done that with Javascript, I can assure you that function based scoping would have destroyed my brain in trying to debug. But since I read a book on Javascript[1] that assumed familiarity with other languages, I was prepared for it. [1]: https://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691 https://www.amazon.com/Professional-JavaScript-Developers-Ni...
- dagw 9y agoI disagree in the case of numpy. If you're going to be using python for numerical work almost all of your data will be numpy arrays so there is not reason to not get used to them from the beginning. You don't have to go digging into the obscure corners of numpy, but you should be familiar with basic arrays and how they work.
- PeterisP 9y agoIt's not a given that you'll need to work with numpy arrays. It's quite likely that numpy arrays will be used behind the scenes, but you'll be working in a different abstraction (e.g. pandas dataframes or tensorflow tensors) that will hide pretty much all of numpy stuff from you.
- dagw 9y agoBut I'd argue that even in those cases they are easier to understand if you already know numpy arrays as they share a lot of syntax. And if you're ever going to interact with other python numeric libraries you're sooner or later going to be converting your dataframes and tensors to and from numpy arrays anyway.