Python – the first and last language you’ll ever need

Ok, the title of this post is a bit controversial, I know. I’m aware that there are very good reasons why for particular tasks you would want to use particular (other) languages. However, I started to think about writing this post here when during the heated discussion that took place on about my recent Python vs. Java speed comparison post I learned about a new way to describe Python: Executable pseudo code.

I should mention here that at SnapLogic we are developing our data integration server in Python, so obviously I have a strong interest in this language and in spreading the word about it.

Apparently, the comparison between Python and executable pseudo code has been made before, I just wasn’t aware of it. Nevertheless, I think this is an excellent description! Ever since I started to work with Python I always wondered how to best convey that funny feeling that I get with this language: The feeling that there just isn’t much standing in the way between my ideas and a running program. Compared to other languages that I was familiar with, mostly the likes of C/C++, Java, Pascal, Assembler (all the traditional ones), translating an idea into a working program appeared downright trivial. The same is probably true for a number of other dynamic languages, but Python was my first exposure to the world of power scripting languages.

So, if Python can be seen as executable pseudo code then one would think that indeed it should be ideally suitable for beginners to learn the concepts of programming. Conveniently, you can cover all the important programming and development concepts with Python, including object-oriented programming.

When we talk about teaching programming, we are not only talking about a university level course. I am also considering high-school or even younger students. I have taught programming before on several occasions. I used BASIC or even C. The nice thing about BASIC was that the very first running program (‘Hello World’) was easily written and explained:

    10 PRINT "Hello world!"

Everyone could understand every single aspect of that ‘program’ without much difficulty, which helps to put the mind of the student at ease. But of course, BASIC has other limitations, and it would be nice if a more ‘industrial strength’ language could be used for teaching. So, how about C? I have actually used C in a beginner’s course before, and it worked reasonably well. But here is what ‘Hello World’ now looks like:

    #include <stdio.h>
        printf("Hello world!\n");

Hm. Now you either need to introduce include files, functions and special characters, or you need to hand-wave a lot. It is much more satisfying for a beginner to be able to understand all he/she is doing. It can be nerve wrecking if you need to wade through more and more stuff that ‘we will get to later’ and to keep all of that in mind. It’s good to understand what’s going on.

After a while, Java appeared on the scene, and everyone thought that this is THE language to learn and to teach. So, what does our example look like in Java?

    class HelloWorld
        public static void main(String args[])
            System.out.println("Hello World!");

Oh dear! Now I have to explain classes, member-access modifiers, class methods, argument passing, arrays… Or I need to hand-wave over a whole lot of stuff. Not at all good for a beginner.

This then brings me back to Python. What does ‘Hello World’ look like in Python?

    print "Hello World!"

Whoa! That’s even simpler than BASIC! So, with Python we have a language where you can get started in teaching programming without having to hand-wave or explain too much other stuff. You can just get going. Very often you can simply write down your ideas, and it ends up being running code. This of course becomes interesting also for university level courses, where the concept of pseudo code is usually introduced.

Importantly for the teacher the same language also allows you to introduce lists, hash-tables, functions, classes, objects, (a little bit of) functional programming and almost any other concept you would like to cover in the more advanced stages. Interestingly, once I started to search around to see if other’s had similar thoughts I came across a number of other postings and opinions, which were discussing this. For example here. So, I’m certainly not the first one who thought about Python as a beginner’s language.

However, the title of this post is Python – the first and last language you’ll ever need. As discussed, it’s a good language to introduce programming and many of its concepts. But is it also a good language to build industrial strength, real-world applications from? Well, we know the answer to this already. Just ask Google and the many others who have had great success with it. We here at SnapLogic also can confirm the ease with which it enables the development even of complex applications.

So, I can imagine that entire career paths should be possible where indeed Python is the first and last language. I’m not actually recommending it, though: Learning other languages will broaden your perspective, and will give you more choice when selecting the right tool for a task. Nevertheless, with Python we seem to have a language that is equally suitable for teaching programming, as well as for the development of large-scale applications.

That, I think, is quite remarkable.

Category: Data

We're hiring!

Search and find your once in a lifetime opportunity.

View current openings
Contact Us Free Trial