Thursday, 21 September 2017

So why did I choose Python? What about other Programming Languages?

The short answer is: Python seems to be the best compromise between power and simplicity.
There is also the advantage that, at my current stage of learning, Object-Oriented Programming in Python is optional.

Choosing and championing programming languages can seem like religion rather than computer science. There are proselytisers, explaining why their language is clearly the best, and other languages are fatally flawed. Practitioners have faith in their language, and have scepticism, if not outright prejudice, towards others. My experience of other languages is both small and shallow, so I am certainly not claiming any expertise in this hotly contested subject, so anything I say about each language below is purely from my own viewpoint. But I like to think of myself as open-minded and ecumenical.

Java

I don't think I would have got into Java on my own - it was actually a requirement of my Open University course.
The good: It is a powerful, professional language. A lot of off-the-shelf software is written in Java, including my favourite, Minecraft. Anything that helped create Minecraft must be good.
And yes, I did get into it for a while. I could write simple programs as required by the course.
The bad: Everything is required to be a class, as per OOP. This makes the archetypal "Hello World" program a lot longer and more complicated than in simpler languages. For a noob like me this is quite off-putting.
It's a compiled language, rather than an interpreted language, so when you want to run programs, you have to compile it first. My approach to programming involves a lot of running, testing and debugging - a kind of messy, unstructured version of rapid prototyping - compiling just slows that down.

Perl

I have to say, it was a fairly close choice between Python and Perl for me - this blog might have been titled "Progressing Through Perl" after having a go at 'Learning Perl' by Schwartz, Phoenix & foy (O'Reilly's Llama book) . What tipped the balance was relative popularity, particularly in the job adverts. There are still fairly regular vacancies for Python developers. Requests for Perl developers are very rare.
The good: It's available on any Linux system and can easily be installed on Windows (I used Strawberry Perl).
It's simplicity is comparable to Python, at least at the levels I was at (which was noobishly simple).
It's interpreted, so testing programs is quick, allowing rapid correction of problems.
The bad: Syntax isn't great. Having said that, I don't find it as off-putting as some people do.
Another thing is that it isn't really suited to Object-Oriented Programming. I understand it can be done, but it's more of a work-around than an inbuilt feature. And despite my misgivings about Java, I recognise that if I am to be taken seriously as a programmer in the workplace, I need to do OOP.

QBasic

I know that very few take this one seriously. And I don't think I ever took it that seriously. But it is what it is - a simple language primarily intended for education and training.
My first ever computer was a Commodore 64. That had BASIC on powering up. Although I was never serious about becoming a programmer until I started the OU course, that Commodore 64 gave me my first taste of programming. So when I found I could download and run a version of BASIC, in this case QBasic, on a Windows PC, I did so. I didn't get very far, but it reminded me that I can program (if only "Hello World" at that stage). I think that was more about familiarity and maybe nostalgia than seriously trying programming.
The good: It is deliberately simple, at least to start with. Some advocates (yes there are a few out there) say that QBasic has hidden depths - I haven't got round to exploring those myself, but I'll take its supporters' word for it.
The bad: As one might expect, it was created primarily as a teaching tool rather than a professional language for commercial applications. I don't know if mentioning it on your CV is sensible or not.

No comments:

Post a Comment