How to learn Python?
Over the past few weeks, I've chatted to quite a few people who are starting to learn Python primarily to analyse financial markets and all of them were keen for a bit of guidance of where to start. Hence, I thought it would be useful to collect together a few thoughts on the subject in this blog article. You could argue that "coding" is easy, but unfortunately it takes some time to get to grips with it, if you've never seen a programming language. After all the complexities of a real human language are far more subtle. However, the difficulties in a programming language is that there is less ambiguity, hence, in order to "speak" it, you need to be a lot more precise about your grammar and how you "speak" to a computer.
First, if you've already coded before, it's fairly straightforward to get the gist of the basics in Python, understanding the syntax etc (although you'll still need to spend time understanding all the various libraries). It's still worth however, quickly going through a basic Python tutorial, to specially see the differences. There are also specific tutorials floating around on the web, if you're used to other programming languages eg. MovingToPythonFromOtherLanguages. I've listed a few Python tutorials below, but it is by no means an exhaustive list below:
- The Python Tutorial - Python Software Foundation (this is the one I used a few years ago!)
- learnpython.org - where you can actually run Python in your browser
- Think Python: Think like a computer scientist
If you haven't coded before, it'll probably take a bit more time to go through the tutorials, but I think it's worth it! I started coding when I was a kid. However, when I got to university, I ended up relearning how to code, as I'd picked up a lot of poor programming habits, making variable names too short, not bothering to properly understand what object oriented programming is and so on. I guess the moral, is to have a bit of direction, when you learn to code, whether that's from teachers, books, YouTube tutorials etc. so you you avoid picking up bad coding habits (eg. copy and pasting code is NOT code reuse!)
Read the full post on the Cuemacro blog here.
Udemy has several great courses you can do, both for syntaxing and modules like panda and numpy. In the discussion of language of choice it's always people that mean python is not mainstream and that commercial languages should be preferred. With open source new personnel often has to learn a lot from scratch and hired programmers are more reluctant to take over projects. Any thoughts on this? Personal I'm a big fan of python due to it's multiple areas of use, from time series scripting to application programming.
Yogendra Choudhary
This happens to be on my mind lately! Thank you.
Facundo Batista mira!
About the time to refresh my Python coding syntax. thanks for sharing!