Learning Programming - Made easy
Recently, I have been reading the book “How to think like a Computer Scientist - Learning with Python“. Its a ebook published under GNU Free Documentation License and one can grab it here. This book, it seems, was based on a book written for teaching Java (!!! God knows how and why
). Python seems a better fit here as the author himself quotes in preface as follows.
Python greatly simplifies programming examples and makes important programming ideas easier to teach. The first example from the text illustrates this point. It is the traditional “hello,world” program, which in the C++ version of the book looks like this:
#include
void main()
{
cout << "Hello, world." << endl;
}
in the Python version it becomes:
print “Hello, World!”
Yet another point which the author makes which impressed me is the following..
There are thirteen paragraphs of explanation of “Hello, world!” in the C++ version; in the Python version, there are only two. More importantly, the missing eleven paragraphs do not deal with the “big ideas” in computer programming but with the minutia of C++ syntax. I found this same thing happening throughout the book. Whole paragraphs simply disappear from the Python version of the text because Python’s much clearer syntax renders them unnecessary.
Hence one can concentrate more on “programming concepts” rather that worrying too much on language syntax and confusing the students mind. Eventually the student will also learn to choose the language best suited for his work and learning a new language will not be difficult any longer as his programming concepts foundation is pretty strong. This methodology, if incorporated in our education system, will do wonders and India will soon erase its image as Software Consumers and create the image of “Creators of future products”. We will not rely any longer on “outsourced” jobs. We shall have our own markets.
This book begins with a simple “hello world” program and goes till explaining a few data structure concepts. A few algorithms are also discussed en-route. To cut things short - Just Amazing! Must read. Hats off to the author.
February 10th, 2008 at 1:26 pm
First of all, nice post; I will have to take a look at Python. It looks a lot simpler than other languages, and probably more efficient for somebody who doesn’t want to have to write so many lines of code.
I don’t want to be an arsehole, but the Hello World for C++ is actually a bit different (that one will not compile):
#include
using namespace std;
int main ()
{
cout
February 10th, 2008 at 3:18 pm
Python is really lucky in this respect, there are lots of high quality books available for free.
Here are the ones I know about (shameless plug):
http://openboox.com/tags/python
February 11th, 2008 at 11:49 am
Be warned, python can be addictive. Suddenly you will be dreaming about snakes
February 11th, 2008 at 10:17 pm
A rewrite of this book is available here: http://www.greenteapress.com/thinkpython/
(How to Think Like a (Python) Programmer)
February 15th, 2008 at 12:39 am
nice post!
c++ is a good foundation too….
phyton is powerful than C++? hhmmm….:)
hey baiju! nice book…….