Adventures into Python
When in Rome… After installing Linux – it was kinda anti-climatic. Everything was installed without me doing anything – and using the browser and the small utilities quickly was… meh. So, new project – learn a programming language that would run on Linux.
Enter a lot of confusion. I had no idea what-so-ever where to start. So, turning to StackOverflow (this was the question and responses) – I decided to try out Python – I mean how hard could it be… Installing Vim with the Package Manager was easy… and I couldn’t find it… I looked through all the menus… tried re-installing it… read up on it on google… Saw Cream (GUI extension on top of Vim) and installed that. Woo, an editor… erh… texteditor. I searched in vain for the Build and Run functions…
Then it dawned on me – Windows methodology doesn’t work on Linux. Back to the drawing board (read: Google). I had to save the edited file – and once it had a .py extension – I had syntax high-lighting (well, to some extent – a dynamic language doesn’t really have that much that highlights). In the process of reading up on how to program in Python – I did the ‘When in Rome…’-deal. I turned to the Terminal – and now things started to pick up. Two terminals – one running Vim – the other just being a terminal. Save in Vim – Execute on the Terminal.
I found a cheat-sheet on Vim – and it can really do magic. I haven’t found more than 10 shortcuts that I can remember – but the list is growing pretty quickly – and I already wish R# had these… And I like the ! when you mean business. :q means “Quit, but if i forget to save – warn me” :q! means “Quit, GDI”. I like having a GDI-command… (For those of you wondering: GDI – GodDammIt).
Now, to Python. Working with a dynamic language is really a shell-shocker when you are used to static type-checking. For me so far – it feels like the safety-net has been taken away… my training wheels are off, and my dad isn’t holding the pole… My parachute was left back in the cockpit… well, you get the picture. It feels like you are cheating (but.. but… I didn’t say it was a float… why do you treat it like one). And no debugger to say: “You forgot the ;, you moron” when you compile… because… you don’t compile. Python is compiled on the fly.
I’m still with the basic stuff – learning to load libraries and my own files. So, stay tuned for more Python madness.