Friday, April 17, 2009

And Now for Something Completely Different

One of the pragmatic programmer tenets is to learn a new programming language every year. I'm a bit behind on that, I haven't learn a new language since 2002 (I don't count objective C because I hate it and have only learnt the bare minimum necessary to get by). Unfortunately the need to earn a living has gotten in the way of random learning.

However I have now been programming in Delphi for 15 years. It's starting to get a bit boring and it's time to kick-start the brain again. While Delphi will be my main language for the near future, I am going to make the effort to learn something different.

The main things I am looking for in my language de jour are
  • Dynamically typed (I have done statically typed languages for decades)
  • Popular (general rule of thumb, should be at least as popular as delphi)
  • Object Orientated
  • Cross platform
  • Batteries included
This pretty much narrows it down to Perl, Php, Python and Ruby. I was initially tempted by Ruby as I don't yet have an R on my alphabetical list of programming languages. However I have settled on Python instead.

Part of the reason for going with Python is the presence of the Python for Delphi components. These promise to let you use python as a scripting language inside delphi apps. These components are used in the PyScripter ide.

The easiest way I have found to get started is to use Portable Python. This will put Python and a few tools (inc. PyScripter) into a portable drive along with a few tools and useful modules such as Django. This is considerably easier for a python newbie than sourcing and installing the packages separately.

Some useful links to get started with:
Official website
Official python tutorial (v2.6)
Dive onto python online book (useful but a bit old)
Pycon US 2009 videos
Reddit python feed

5 comments:

Anonymous said...

A new language per year? I think next I should learn Spanish. I STILL have to look up the spelling every time I write "Embarcadero"!

Yogi Yang said...

Why do you want to use Python?

Python cannot compare to Delphi or even VB as it does not have a true RAD IDE as Delphi has.

Developing a user interface would be a nightmare for a person using Delphi since its interception.

Think again. There are many other alternatives like RealBASIC, KBasic, PureBASIc, PowerBASIC (with Power Objects), etc.

Sean said...

@Yogi
The purpose of learning python is primarily that of learning something new rather than because I want to change my development processes. That is why I have gone for a category of languages that I haven't used before.

I have already used 8 flavours of basic, from TRS 80 Basic to VB.net and RealBasic. Learning another variation won't do as much for my professional development as learning something completely new.

I haven't yet investigated the ide options in any depth but none appear to have anything like the polish that delphi has. That is not yet a concern for me as I am still just playing around.

Deyo said...

I think that learning new language without some good reason will be just waste of time. If you don't use something, you will forget it. Better spend your free time with friends and family, or just go fishing :)))

Sean said...

@Deyo
I don't think learning is ever a waste of time. In this case, I have several opportunities for using python in the near future.