Wrestling With Python 3

I recently received my Subject Knowledge Audit from the University of Nottingham. Ughh. Kill me now. The SKA is essentially a list of topics within Computer Science that the university will assume you have the necessary knowledge and skills to teach. If there are any outlying areas that need further development, then you are given the majority of the summer holidays to brush up on said topics. During the process of bombarding the poor admissions assistant with countless e-mails in relation to anything and everything, I was informed that my placement school would be teaching Python. A programming language which I was glad to see the back of after completing A-Level Computing, in 2011.

Even more interesting was the fact that Python had undergone various improvements and releases over the last 4 years, and version 2.7, the version which I was taught, was practically considered a  legacy language. With that in mind, it only makes sense that I spend summer doing some light reading around the subject and get to grips with any basic syntax/paradigms that it makes use of.

Python this, Python that, what exactly is it?!

Python is a (supposedly) easy to learn, powerful programming language. The language is named after the BBC show “Monty Python’s Flying Circus” and unfortunately, has nothing to do with reptiles. It has efficient high-level data structures and a simple but effective approach to object-oriented programming.

So what is your problem with it?

Coming from the .NET Framework, practically every single line of code was written in good old Visual Studio. Writing programs in IDLE (Integrated DeveLopment Environment) is something which just seems… Odd. For a good four years, I lived and breathed C#. If it was up to me, I’d continue to program in Visual Studio, rather than PyCharm or any other environment. Although with that being said, Microsoft have recently released Python Tools for Visual Studio, which seems exciting, an approach which you would not really expect from a company like them.

Ohhhh, interesting! So what are the advantages of Python?

Now that you are all excited about Python, you will probably want to examine it in some more detail. The biggest advantage of Python is that It has got a pretty cool logo.

As a language, Python is one which can save you considerable time during program development because no compilation and linking is necessary. Everything runs straight off the interpreter. Naturally, once the application is deployed, then compiled applications will perform at a considerably faster rate.

If you can learn/know Python, then you can learn/known C#, and vice versa. It’s not a paradigm shift. Some keywords here, braces there, need to say what type you mean there, a different base library… different environment (you have to fight some to get to a REPL, but it’s doable in Visual Studio.) How developers like/learn/use it is another story. Basic C# syntax is very procedural — once again, pretty much like Python (for-expressions, nested functions, statement/expression divide).

Cross-platform development. Python is huge, and is used on countless servers and across a wide range of operating systems. This is a huge benefit for me, as it means that the code I write in my Ubuntu machine will work with little to no effort on my Windows machine, and vice versa.

Support, support everywhereAnyone who has ever run a distribution of Linux will have come across Python. Saving files to Dropbox? That’s Python. Playing Civ IV? That’s Python. Viewing cat photos on Reddit? Python. Spotify’s back-end? Python. Anything Google/YouTube related? Almost definitely Python. Downloading perfectly legal videos via BitTorrent? You guess it, that’s Python. Although its main purpose is to be used as a scripting language, it is implemented across the board and is extremely versatile, meaning that websites like StackOverflow are full of developers old and new more than willing to offer a helping hand. Something which I have been taking advantage of despite only embarking on this adventure a little over 3 weeks ago.

Surely this Python must have some disadvantages?

“Knock, knock.”

“Who’s there?”

very long pause….

“Python”

Python is a general-purpose programming language. As such, it can be used for almost any imaginable task except, perhaps, for highly intensive CPU bound applications, since it’s currently not as fast as other languages It’s slow. I mean really, really slow. A lot of times this does not matter, but it definitely means you’ll need another language for those performance-critical bits.

How are you learning Python?

It probably comes as no surprise that I have not got much code snippets to show, primarily due to the fact that I only started coding about a week ago (yes, I know what I just did there). Nevertheless, I have been using Dive Into Python 3‘s extremely helpful website, as well as the University of Reddit’s section on Basic Python Programming. Python even has it’s own humour section within its documentation, full of extremely sad, cringe-worthy programming jokes.

Oddly enough, the title of this blog post originates from Rob Mile’s “Wrestling With Python” website, so be sure to check that out if you like dabbling into the odd little world of Python. Alternatively, pick up your own copy of Python here, what’s the worst that could happen?!

I will always have a soft spot for Python, it was the first programming language that I was taught, and I am absolutely buzzing to be able to impart my knowledge to children come September.

Are there any crucial points that you feel as if I have missed out? Any tips that you would give to someone about to embark on their journey in regards to learning Python? Leave your thoughts in the comments section below!

4 thoughts on “Wrestling With Python 3

    1. I was planning on looking into this. However, I have not really had a chance to gather enough resources regarding it. Definitely an aspect of Python programming that I need to add to my arsenal.

Leave a Reply

Your email address will not be published.