Why choose Python for teaching?
| May 7, 2012 | Posted by Karl Beecher under General software engineering, Opinion |
I recently read a tweet by a computer science educator claiming the superiority of a particular programming language for teaching purposes (Pascal, if you must know). Now, I don’t really go for religious wars — each to his own and all that — but I did reply with my opinion that Python might generally be a better choice.
Of course, language choice depends on the audience and what you’re trying to achieve. For very young students (younger than 11 or 12), I’d say a language like Logo is most suitable. Older programmers with experience might have particular requirements that Python can’t fulfil; they might need to learn low-level stuff for example. But for a general introduction to programming, I think Python is ideal.
My suggestion of Python was dismissed by the original tweeter on the grounds that “Pascal is easier to learn” and we have “more experience of teaching Pascal.” I dispute the first reason. And to be honest, I don’t really know what that last reason actually means. Someone able to teach programming languages shouldn’t take too long to learn and adapt to a new one; plus, those doing the teaching in universities are often teaching assistants or graduate students anyway who have probably no experience of Pascal on account of their youth.
Anyway, I thought I’d make clear my reasons for Python preference in a blog post — after all, it’s a bit more flexible than a 140-character tweet.
Clean
Python is famed for how it departs from the norm by assigning meaning to a program’s layout. Instead of using curly brackets or keywords like begin and end, the code’s structure is made clear by how it’s indented. This has resulted in Python being given the nickname “readable pseudo-code”. Pseudo-code is what we normally teach students to draft their programs in first, so it’s a very short step between their draft version and the finished version of a program.
This is just one aspect of Python that gives it a clean overall appearance. Another is how Python disposes of numerous bits of syntax that other popular languages insist on: all those brackets and semicolons, which beginners find distracting.
Playful
When I first started programming, I was using machines like the Commodore 64 or the Sinclair Spectrum. Those who remember them will remember that switching the machine on launched you instantly into the BASIC programming environment. If you had even the slightest curiosity about programming, it wouldn’t be long until you were typing in commands and trying to make your computer do all sorts of cute, fun little things. Remember this?
10 PRINT "FRANKIE SAY RELAX!" 20 GOTO 10
Programming on these old computers was so accessible because they were REPL (Read-Eval-Print Loop) environments. There was no infrastructure to set up, no compilation to worry about, and instant feedback about what you’d done. Programming like this can often be a revelation, because if you’re one of those lucky people who “gets” what all the fuss over programming is about, seeing a program instantly do something can draw you in very quickly. It would be a shame if beginners were put off by “heavy” languages which demand lots of work before their work bears any fruit whatsoever.
Python gives you this same REPL environment as standard. All you have to do is launch the Python interpreter, and you can start instantly entering lines of code for instant feedback.
Wide use in FLOSS
Python is a popular language, but I’m not usually one to let popularity get in the way of making the right choice. However, this popularity does give programming students a distinct learning advantage: Python is widely used in free/open source software projects. (Check out the stats on places like Freshmeat or SourceForge, and you’ll find thousands of projects coded in Python.) Why is this important? Programmers learn best by doing, not by listening to a lecturer or just reading a programming book. The next best thing to writing code from scratch yourself is to get hold of an existing program and go through the source, reading, learning, tweaking, extending. With thousands of FLOSS programs available covering every conceivable type of software, the student is spoiled for choice.
Out-of-the-boxiness
Python provides a few things out of the box which are instantly accessible to the beginner but not enforced. The first of these the student is likely to need are the built-in data types, specifically lists and dictionaries, and using them is as simple as x = ['a', 'b', 'c']. Worrying about other data types (integers, strings, booleans and so on) can be delayed because of Python’s dynamic typing, a helpful feature in itself.
There’s also out-of-the-box support for today’s most relevant programming paradigms, like structured, object-oriented and functional, but unlike some popular languages, none of these are enforced. This means, once a beginner has grasped the very basics of programming, the teacher can easily proceed to teach a particular paradigm still using Python.
Partnering with Agile Workers
| March 29, 2012 | News |
More exciting news. Mirko Böhm, co-founder of Agile Workers Software, has invited me to become a partner in the company. I’ve gladly accepted. Agile Workers is a cool, new Berlin-based start-up that offers a diverse array of software services. (By the way, Berlin really is becoming the place in Europe for tech start-ups. Read all about… read more
More trainings available via Mixin
| February 8, 2012 | News |
I was recently added to the staff of trainers at Mixin, a German-based training company run by Dr. Björn Kesper. My entry into the company means they now offer Java and Eclipse trainings in addition to a whole host of others, including C#, .NET, SQL Server, HTML, CSS and whole lot more. Follow the link… read more
And, WordPress hackers, just in case you’re interested…
| January 19, 2012 | Hacking |
… here’s how I made the earlier slightly tricky change. Using this tutorial page I changed the front page of the site into a static page, which sat at “computerfloss.com/blog”. But I wanted the front page to be at the root of the domain, so I skipped over to this other tutorial page. This one… read more
Computer Floss – Slight URL change. Update your feed!
| January 19, 2012 | News |
I’ve added a new static front page to the computerfloss.com site. (I have some plans to expand here, you see.) The “/blog” part of the URL is no longer needed, so the old RSS address won’t work. Either click the RSS icon or change your feed address to: /feed/rss/ read more
Eclipse trainings available
| January 9, 2012 | Posted by Karl Beecher under News |
I delivered my first Eclipse training just before Christmas last year. I’m happy to say that the clients, just under a dozen programmers working for a large German corporation, have reported being “very satisfied” with my two-day seminar. I’m also happy to say I enjoyed it even more than I thought I would, probably due to the lack of nervousness I thought I might experience. In fact, I was so at ease and enjoying myself, I’m now hugely looking forward to delivering it again for other clients.
For anyone who wishes to know more about the Eclipse training I provide (perhaps you’re interested in it yourself?) here’s the basic overview:
- Downloading and installing
- Introducing the working environment (workbench, views, perspectives)
- Programming using the editor, basic functions
- Backup and versioning, local history
- Using plug-ins and updates sites
- Project administration
- Features for object-oriented programming
- Features for Java development
- Debugging and Running programs
- GUI development using visual editors
- Automated testing using JUnit
- Version control using Subversion and Subclipse
- Developing UML diagrams
- Editing XML files
- Plug-in development
- Practical tips and tricks
These subjects are by no means carved in stone, but they certainly embody what is necessary for beginners to learn (with the possible exceptions of UML, XML and plug-in development) and represent what can be covered in a minimum of two days. Beyond that, my curriculum is flexible and open to discussion.
If you’re interested in knowing more or booking a training, then please feel free to get in touch via [email protected].
Saros: Needs-based synchronisation and a greatly upgraded Whiteboard
| December 22, 2011 | Posted by Karl Beecher under Saros |
I’ve been so extremely busy the last six weeks that I’ve had no time to blog. During that time a new release of Saros went out and I almost let it pass without telling you about it.
Version 11.12.9 of our distributed development tool (the final release of the year) is now available. This is a particularly exciting release because, in addition to a number of very important bug-fixes, there are a couple of great new features.
The first feature is needs-based synchronisation. With Saros you already have the ability to share just a subset of files with your peers, so that you don’t have to spend time sending huge amounts of data over the network. Until now, this meant that if you wanted to collaborate on unshared files, they needed adding to the session manually. Now, with needs-based synchronisation turned on, Saros will monitor the files you work on; when you begin editing an unshared file, Saros will instantly and automatically share the file with everyone in the session.
The second feature is really a group of new features. The distributed Whiteboard has been upgraded with numerous new features, including:
- Line drawing
- Arrow drawing
- Adding text
- Adding shared annotations
- Drawing in your user colour
And finally, a bug that prevented multi-user chat from functioning when connecting to OpenFire servers has been thoroughly squashed.
You can install and update Saros from Eclipse: http://dpp.sf.net/update. For more information visit http://www.saros-project.org.
On behalf of the Saros team, have a Merry Christmas!
Linux likes the Netgear N150… and so do I
| November 9, 2011 | Posted by Karl Beecher under Hardware |
In my new occupation, I continue to treat myself to new kit purchase essential new equipment for my business. I’ve already blogged on my experiences with printers on Linux and now I’ve started using a new wireless adapter I’d like to give that a shout-out too.
Like printers, I had mixed experiences of wireless adapters during my early days of Linux usage. But I’m happy to report that the first adapter I dropped for worked out of the box and like a charm. It is the Netgear N150, a fairly standard USB adapter that needed no installation and cost me a measly €15.
Incidentally, installing this same adapter under Windows 7 was awful. It was so unnecessarily convoluted and the configuration software is ugly and almost unusable. Linux users win on this one.
Recent Comments