Right now I am on a mission to learn python. Why you may ask? In my school there is a strong emphasis on java which is introduced to students as their “first-language” when they are starting out in computer science and programming in general. However after taking some classes mostly centered around the usage of java I decided it was time for me to learn a new programming language. I had been hearing the buzz about python for some time and so I decided to see if it lived up to the hype. All I can say now is that it has become my current favorite language because of its philosophy of getting more done with lesser lines of code. Concepts like iterators, recursion and even objects are very easy to understand with python. Lists and dictionaries have become my current favorite data structures. Even with the limited python I have accumulated so far, I already find myself having more fun and being useful. Oh and even though the standard interpretor works nicely, I have found ipython to be useful because it is an enhanced version of the python shell with cool features like TAB completion for keywords, methods, variables and files.
Well learning a new programming language goes beyond just reading a book or just reading the documentation to know its syntax. It is not a big surprise that programming is very much like maths in the sense that it requires practice. I highly recommend Project Euler which is meant to be a place where you sign-up and attempt at solving a series of mathematical problems by using the programming language of your choice. The fun part is that when you submit the correct answer, you are given access to the message board to that particular problem where others post their solutions. The real benefit is by comparing your own solutions to others in the message board, especially when you are relatively new to a programming language and find out how others can code in a more efficient/faster way. Now the other thing I am trying to do is try to convince my professors to let me do programming assignments/ research projects in python unless the nature of the class restricts that. This semester I am taking a class on “Programming Languages” which does give me the freedom to do assignments in the language of my choice. The next step for me would be to start some small project in python that I can work during my free time. I still have a lot to learn in python but I hope that can change soon.
Not sure if this is too advanced for you, but it has a lot of information that you could spend years amassing about writing good Python.
- Paddy.
Thank you very much. I was looking for a good style reference and the link you gave looks great.
I’ve found that with Python you can code a lot of problem domains without much “syntax” lookup or error or similar “oh-shit-what’s-the-problem-with-this-syntax” notoriously found in other languages such as C [for a newcomer]. The code flow i find is very smooth and the huge std library provides nice sets of work ranging from interfacing with C/C++ to byte-level operations to some protocol design implementation fairly quickly.
Programming I’ve found is a tough job! Given today’s market for rolling applications yesterday, Python does well in that domain with its well though-out documentation and lot of other help available. Welcome to blogosphere =)
Was going through this IPython =) just occured to me that you could also use WingIDE-101 Python IDE (“beer” free) which is pretty good I’ve found.
Checkout PyDev (pydev.sourceforge.net), it’s pretty good IDE for Python.
Check out http://www.web2py.com. You are going to love python more.
python is really cool. while *real* programming in any language is a tough feat (http://norvig.com/21-days.html), unlike other languages u can learn python in a couple of hours (given that u have done programming before)..
after a lil ride with python u can also try http://www.pythonchallenge.com/
good luck!
Thanks for the comments guys. I will look into everything mentioned here soon.
All in all, python is nice in that it’s fairly intuitive whatever way you proceed. I find it interesting that I can do java-like static typing , call C extensions and still manage to use good stuff from functional languages like reduce, generators and yield.
Being scripting language adds a lot of power to it too. If you are into web stuff… go check djangoproject.com and djangobook.com. IMO django has some good features rivaling those provided by JEE and rails.
The best thing about python is that it’s succinct and really fun to program in.
Anyways, keep updating on your CS life and adventures into the exciting pythonic world.