Hello World in Python

Today I ran a class session as part of the Ubuntu Application Developer week. My topic was a really basic introduction to python, starting with the traditional “Hello World!” program and here is the transcript from the logs:

[19:01] good morning/afternoon/evening all
[19:01] welcome to this Application Developer week session on Python
[19:02] so after jderose turning things up to 11 we are going to go back and start with 1 2 3
[19:02] This session is an introduction to Python from the very very beginning, I going to do my best to assume no prior knowledge at all.
[19:02] just so I can see who is here say hi in the #ubuntu-classroom-chat channel o/
[19:03] great, I love to have an audience :)
[19:03] so Python is a programming language, but not a scary hard one.
[19:03] Python is kind of like BASIC, except you don't have to be embarrassed about saying you are a Python programmer!
[19:04] we are going to write a computer program, which is a set of instructions to the computer to tell it to do some interesting stuff for us.
[19:04] Lets get set up first, we are going to need a text editor to write the instructions in and a terminal to tell the computer to do the instructions.
[19:05] hopefully you will find them next to each other in the Applications-Accessories menu
[19:05] or if you are using unity hit the super key and type gedit and return for the editor
[19:05] and terminal for the terminal
[19:06] they are also somewhere to be found in the apps lens, but that is another story altogether
[19:06] so open both of them now and get comfortable with the three windows on screen, IRC, terminal and gedit
[19:06] are we sitting comfortably?
[19:07] plain old text editor is perfect, none of your fancy IDEs for this session
[19:08] Traditionally the first program you should write in any language is one to get the computer to say hello to the world! so lets do that.
[19:08] in the text editor type the following:
[19:08] print "Hello, World!"
[19:09] that is it, your first program, now lets save it and run it (I did tell you it looked like BASIC)
[19:09] file-save as and call it hello.py
[19:09] this will save it into your home directory by default, fine for now, but you would probably want to be a bit more organised when doing something serious
[19:10] feel free to be more organised right now if you like :)
[19:10] ok, now in the terminal lets run the program
[19:10] python hello.py
[19:10] did it say hello to you?
[19:12] as I saved it in the home directory and terminal starts there by default it should just work, if you are putting things in folders you might need to navigate to it with the cd command or specify the path to the program
[19:13] ok, so that was running the program by running python then the name of our application, but we can do it a different way, by telling Ubuntu that our program is executable
[19:13] What we are going to do now is try to make our program directly executable, in the terminal we are going to CHange the MODe of the program to tell Ubuntu that it is eXecutable
[19:13] so at the $ prompt of the terminal type:
[19:13] chmod +x hello.py
[19:14] now we can try to run it
[19:14] again at the $ prompt
[19:14] ./hello.py
[19:14] oh noes!!!
[19:14] Warning: unknown mime-type for "Hello, World!" -- using "application/octet-stream"
[19:14] everyone get that?
[19:16] ubuntu doesn't know how to run this application yet, we need to add some extra magic at the top of our program to help it understand what to do with it.
[19:16] back in the editor, above the print "Hello, World!" add the following line
[19:16] #!/usr/bin/env python
[19:16] so the /usr/bin/env bit is some magic that helps it find stuff, and the thing it needs to run this application is python
[19:16] now you should be able to save that and flip back to the terminal and run your program
[19:17] ./hello.py
[19:17] that should now run :)
[19:18] as has been pointed out in python 3 you need to put brackets round the string so
[19:18] print ("hello world")
=== mohammed is now known as Guest99895
[19:19] which works in all versions of python
[19:20] OK, lets go on to the next concept, giving our program some structure
[19:20] back to the editor, and between the two lines we have already add a new line
[19:20] while 2+2==4:
[19:20] and on the next line put four spaces before the print ("Hello, World!")
[19:20] and save that
[19:21] Moshanator asked: can i just ./hello.py?
[19:21] lunzie asked: ​ are the quote brackets proper form?
[19:21] the brackets round the quotes are better form as they work on python 3
[19:22] so the while statement we added starts a loop, in this instance it will carry on until 2+2 is equal to something other than 4
[19:22] the double equals means "is equal to" a single equals is used to assign a value to something (more on that later)
[19:23] the colon at the end is an important part of the while statement
[19:23] There is no "until" "wend" "end while" type statement at the end, as you might expect to find in lesser languages :)
=== yofel_ is now known as yofel
[19:23] the indentation of the print statement is not just cosmetic and for our benefit
[19:23] the indentation level is part of the language, when the indentation stops that is the end of the loop (or other structure that you might expect to have an end)
[19:24] this means that python always looks neat and tidy (or it doesn't work)
[19:24] Always use four spaces to indent, not three, not five and certainly not a tab.
[19:24] Other indentations will work, but if you ever have to work with anyone else you must always be using the same indentation, so we all get in the habit of using four spaces.
[19:24] in gedit you can set it up to use 4 spaces instead of a tab
[19:25] edit-preferences, on the editor tab choose tab width 4 and insert spaces instead of tabs
[19:25] many other editors and IDEs have a similar option
[19:25] Lets run our new program, just save it in the editor and run it again in the terminal with ./hello.py
[19:26] and that is 4 spaces per level of indentation you want so if you have a loop in a loop then the inner one will be 8 spaces indented
[19:26] now we can wait for 2+2 to be something other than 4
[19:26] * AlanBell taps fingers
[19:27] or, if you are in a hurry, you can press ctrl+c
[19:28] ok, so ctrl+c is handy for breaking in to an out-of-control python program
[19:28] you can do other fun stuff with the print statement, if you change it to read:
[19:28] print "Ubuntu totally rocks! ",
[19:28] and run it again (note the comma at the end)
[19:29] print ("Ubuntu totally rocks! "), <- for the python 3 contingent I should think
[19:30] it should fill the terminal with text
[19:30] the comma prevents it doing a newline
[19:31] ctrl+c again to break out of it
[19:31] lets do something different now
[19:31] in the terminal, type python at the $ prompt and hit return
[19:31] you should have a >>> prompt and a cursor
[19:32] this is the interactive python console
[19:32] you can type print("hello") here if you want
[19:32] or do some maths like:
[19:32] print 2**1000
[19:32] which will show you the result of 2 multiplied by itself a thousand times
[19:33] python is kinda good at maths
[19:33] you don't need the print statement here either
[19:33] so 2**1000 should work in python 2.7 or 3
[19:34] you could even try 2**100000 it won't take long, and you can always stop it with ctrl+c
[19:35] while we are on the subject of maths, lets get the value of pi
[19:36] print pi won't do anything useful (but feel free to try it)
[19:36] we need more maths ability than the python language has built in
[19:37] so we need to get a library of specialist maths stuff, so type
[19:37] import math
[19:37] it will look like it did nothing, but don't worry
[19:37] now type
[19:37] math.pi
[19:37] >>> import math
[19:37] >>> math.pi
[19:37] 3.141592653589793
[19:38] So we have seen here how to import a library of functions to do something, and called one of the functions from the library (to return the value of pi)
[19:39] ok, so what is in the math package, apart from pi?
[19:39] try typing dir(math) at the python console
[19:39] ['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'exp', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'hypot', 'isinf', 'isnan', 'ldexp', 'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
[19:40] you can also look at http://docs.python.org/library/math.html
[19:40] callaghan asked: Is there a way to see which functions are in the imported library?
[19:40] yes :)
[19:41] and to get more descriptive help on each one try help(math)
[19:41] so dir() lists the names and help() lists names, parameters and a little bit of help text
[19:43] TheOpenSourcerer asked: is help() a python function useful for anything else?
[19:43] try help(help)
[19:44] it is a function that could be used, I can't off hand think of any particularly useful use of it other than for getting help
[19:44] Mipixal asked: Your favourite IDE for dev with Python, on bigger projects. (In before IDE flame wars :p )
[19:45] honestly my favourite is gedit
[19:45] I have used eclipse and pydev
[19:45] and I liked stani's python editor (SPE) for a bit
[19:46] but all I really want is a text editor with syntax highlighting
[19:46] and normally several terminal windows open across a couple of monitors
[19:46] All this command line stuff is all very well, but we want to do applications that have pretty windows and stuff!
[19:47] In the interactive console type or paste the following
[19:47] import gtk
[19:47] which will load a library full of stuff to do with the gtk toolkit that powers the gnome desktop
[19:47] now type
[19:47] foo=gtk.Window(gtk.WINDOW_TOPLEVEL)
[19:47] that assigns a window object to a variable called foo
[19:47] (the name doesn't matter, the single equals does)
[19:48] but nothing much seems to have happened yet, so type:
[19:48] foo.show()
[19:48] yay, a real live little window should be on screen now!
[19:49] lets see what we can do to it with dir(foo)
[19:49] quite a lot! lets try:
[19:49] foo.set_title("my little window")
[19:49] go ahead and change the title a few times
[19:50] so if you type "foo.show"
[19:50] There are 10 minutes remaining in the current session.
[19:51] you get printed out a reference to where the code for the show function is
[19:51] you need to do foo.show() to actually call the function
[19:51] ahayzen asked: In gedit is there anyway of adding code completion for python programming, like pydev in eclipse, via a plugin?
[19:51] teemperor asked: is there any naming convention in python? (because of set_title)
[19:52] ahayzen: I believe there are some plugins for that, last time I tried one it was rubbish though
[19:53] if anyone has any good ones I would be interested to know of them
[19:53] teemperor: http://www.python.org/dev/peps/pep-0008/ here is the python style guide
[19:54] many projects have their own more detailed conventions for object names
[19:54] everyone agrees on the indentation levels though :)
[19:54] Alliancemd asked: In a program changelog I saw a developer saying that he ported the code from python to java to make it faster and he said "because java is sometimes x10-x100 times faster than python". We know that java is very slow, does python have this big impact on speed?
[19:55] this is a myth
[19:55] There are 5 minutes remaining in the current session.
[19:55] sometimes java does take a while to start if it has to launch a JVM, this gave applets a reputation for being slow
[19:56] once up and running it is not particularly slow
[19:56] unless you are doing something massively time sensitive (where every nanosecond counts) then any language will do any task
[19:57] the performance problem is never the language, it is always the algorithm
[19:57] normally rewriting code so that it does fewer disk or database accesses will speed it up thousands of times more than changing the language it is implemented in
[19:58] Alliancemd asked: What do u think of PyQt? Is it that good how people say?
[19:58] mohammedalieng asked: what about python performance compared to Java ?
[19:58] callaghan asked: will there be a follow-up lesson, or where should unexperienced python-devs go from here?
[19:59] not played with Qt much
[19:59] there are some great books
[19:59] snake wrangling for kids is excellent
[20:00] and the dive into python book is in the repos, you can install it from software centre
[20:00] I believe there are other python classes in this channel so check the schedule
[20:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/05/%23ubuntu-classroom.html
[20:00] ok, think I am out of time
[20:00] thanks everyone o/

It was great fun to do, and thanks to David Planella and the classroom team for putting on these regular educational events.

The science of meetings

This post isn’t going to make an huge amount of sense to people who are not using IRC or involved in the Ubuntu project, feel free to let your eyes glaze over and wait for the next article.
The #ubuntu-meeting IRC channel is the place where most of the regular team meetings of the Ubuntu project take place. There was a bot called MootBot in the channel which was there to facilitate meetings, which it did for a number of years. I was never that impressed by what it did with the minutes, there was too much manual writing of meeting minutes which really the bot should have been doing for people. I started making a few tweaks to a copy of the bot so that it would generate formatted minutes in moin wiki syntax for pasting direct into wiki.ubuntu.com I had also been working on a complete rewrite of the code in Python rather than TCL that was started by the Debian project. This was a bit of a background task for me and was nowhere near finished, when a couple of weeks ago the original Mootbot broke and nobody had time to go fix it. As a result of this my next generation meeting bot was pressed into service somewhat ahead of schedule, bugs and all, and is now working hard in the #ubuntu-meeting channel under the name meetingology. The code is at https://code.launchpad.net/~ubuntu-bots/ubuntu-bots/meetingology and patches are very welcome. I am running a development version of the bot in the #meetingology channel, feel free to pop in and test it there.
Meetingology supports rather more commands than the old bot and you can use the old form with square brackets [TOPIC] or just #topic and it isn’t case sensitive about commands. The full list of commands is documented here https://wiki.ubuntu.com/meetingology. In particular note that you can now do “#startmeeting meetingname” to set the overall meeting title. There are a number of improvements and issues to fix with the output minutes, I will get round to that over the next few weeks (patches are welcome remember). Some teams have their own meeting syntax and scripts to parse it, if you want a particular output format for your meeting then do come and find me and we can make it happen. The goal is that the post-meeting effort for the chair is copy-paste-done. Writing up minutes is a task that is not worthy of a human.

OpenERP vs Lotus Domino

I spent last week out in Belgium, the home of fine chocolates, waffles and Open Source Enterprise Resource Planning applications. I was lucky enough to sample all three as I was on a training course in the OpenERP head office. OpenERP 6 has just been released and it is an amazing thing to have a full ERP system that is Free Software and has Ubuntu as the preferred platform (we were all given an Ubuntu VMware/Virtualbox virtual machine for the training course). The training I did covered the technical aspects of the OpenObject framework rather than the accountancy and business management angle of the functional training, in fact throughout the course we did nothing related to moving money and stock about.
Back in the past I used to be a Lotus Notes and Domino developer, building business applications for medium to large enterprises all over the world. Notes has a bit of a reputation for being unpopular with users for a variety of reasons, but if you forget about the email client aspects of it the underlying platform is the granddaddy of all the NoSQL database engines and a forms based development environment which, despite IBM’s best efforts to break it, is still rather powerful. The OpenObject platform is similarly powerful, it has a few advantages and a few drawbacks, what I want to do here is provide a bit of a comparison and terminology cross reference between the two platforms and see what concepts are common to both. I will be referring throughout to OpenObject rather than OpenERP because I am talking about the framework on which OpenERP is written, just like Notes Mail is an application on the Notes framework.

Database / Server

The OpenERP server can host multiple databases, each one contains totally isolated set of applications and a different set of user profiles, I think of this like multiple Name and Address books and as each openERP database effectively has a separate NAB I would compare them to separate servers or perhaps domains in the Notes world.

Modules / Databases

Yeah, I know databases sort of got renamed to Applications in the Notes client but everyone still calls them databases. In OpenObject this maps most closely to a Module. A database is a collection of related stuff that comes together to peform some useful function. A bunch of modules might work together to form an integrated suite, just like a suite of databases in Notes or the OpenERP suite of modules.

Model and Form View / Form

In OpenObject you list the fields an object has in a python class. This is the back end list of fields that corresponds to the fields on a Notes form. There is a separate file in XML format where the layout of the form is defined. There is a slightly confusing terminology clash here, in OpenObject this is called a form view. If you don’t define a form view it will create an automatic one for you just laying out all the fields defined on your model with their labels in a 4 column grid. So in summary forms in OpenObject are done in two parts, back end field definitions in python and front end layout in XML.

_defaults / Field default values

default values can be pre-filled in new documents by creating a _defaults dictionary in your model class. Basically this is a list of the back end fields that you want to give a starting value to and the value you want.

_constraints and _sql_constraints / Validation formulas

The _constraints dictionary is a set of rules that are enforced just in the user interface, these are implemented as python functions that get passed the relevant field values and return true or false and if neccessary give a message to the user on what is required. _sql_constraints are written down to the database layer so will be enforced even if the document is edited programatically without using the forms user interface.

Records / Documents

OpenObject uses PostgreSQL engine as the underlying database engine, this is a big grown up RDBMS, more comparable to Oracle than the fast and lightweight MySQL. The back end of a document in OpenObject is a record in a table. These are abstracted a bit by the ORM (Object Relational Mapper) so you don’t need to worry too much about the underlying tables, text fields can have up to 1GB of text in them and you can do multivalue fields (called selection fields) and have relational fields that you can think of like an array of doclinks but actually they add columns to tables or create new tables to allow joins and things to happen in the SQL layer as appropriate. You don’t need to worry about this bit too much, it just works. Changes work too. If you add a new field to your model you can just start using it, when the server starts and updates your module it will adjust the schema without losing data to accomodate your new field. If the new field is mandatory then you must provide a default value so it can backfill the existing documents, but if not you can just add the field and start using it like in Notes.

Functional fields / Computed and Computed for display fields

Functional fields can be set to store the value to the database or not.

Read only fields / Computed when composed fields

If a field has a default value and is read only then it will act like a computed when composed field in Notes.

Tree Views / Views

So in OpenObject the UI of a document is called the “form view”, when looking at a bunch of documents this is known in the user interface as “list mode” but in the back end it is actually a “tree view” which you might correctly surmise means it can correspond to a categorised view in Notes. There have been some optimisations in version 6 which allow progressive loading of collapsed tree views which allows the client to drill down into a huge view without loading all the rows, a bit like Notes does. Unlike Notes I don’t think it does progressive loading of flat views, so you probably have to be a bit careful of lists with many thousands of rows as it will send all of the data to the client on opening the view.

Calendar Views / Calendar Views

These really correspond rather well from the OpenObject concept to the same thing in Notes, it is just a treeview but you specify the column that is your start time and which one is your duration. Time zone support is a tricky subject in both, but there is no real perfect solution for all situations when it comes to timezones.

Gantt views / n/a

I never really figured out why Notes didn’t grow a nice gantt chart view format, it would have been so easy to do, probably simpler than the calendar view. OpenObject has one and it works fine, similar to the calendar it is just a tree view and you tell it which column is the start, duration and which contains links that draw dependency lines to other documents. Simples.

Diagram Views / n/a

These allow you to map out related objects, I think it was implemented to allow a visual workflow editor to be built but I could see how you would use this to have a dynamically drawn org chart in an HR application for example.

Graph Views / n/a

Graphing data is great and this works in both the GTK desktop client and in the web client with a rather fancy looking Flash graphing object. Again, these are simple to make, just views with a few extra rules to tell it to draw a bar chart or pie chart and whether to group by a particular value and what operator to use when grouping, this allows you to have bar charts that sum values from related documents. This isn’t supposed to be a sophisticated graphing toolkit, just a nice easy way to visualise some of the data in the ERP system.

Domain / Selection formula

Domains in OpenObject are expressed in a rather odd python syntax as a list of tuples and conditions half in reverse polish notation and half in the normal order. They can be used to restrict the number of options in a dropdown list (e.g. a dropdown list of states that shows the right options based on what you choose in the country field) and can also be used to restrict what’s displayed in tree views just like a view selection formula.

Python / Lotusscript

OK so I am going to be a language snob for a bit here. Lotusscript is nice and easy, it is a dialect of BASIC and does allow a reasonable amount of modern object oriented coding, but it just isn’t an actively developed language and nobody wants to be a BASIC programmer. IBM understand this and have been trying for years to get Java to do half the stuff you can do with Lotusscript but without credible front-end integration in Java it just isn’t going to happen. Python is a proper modern language that has an active development community around it. It is as easy to use as Lotusscript, it lacks all the syntactical punctuation of Java and C++ and there is none of the indignity of having to do your own pointer arithmetic like you get with C. There are Python libraries to do pretty much anything you could possibly imagine, there is no great app store of .lsx files waiting to be called in to extend your Lotusscript capabilities.

Access Controls List / Access Control Lists

All the modules installed on your server add options to the central consolidated Access Controls List rather than each application having a separate ACL. Access can be given to groups of users at the record type or object level and you can give read/write/create/delete access. This is kind of like setting the access rules on forms in Notes (the key tab on the form properties that nobody uses because readername fields on a form make bad things happen). For more fine control there are Record Rules, this is where you would implement Author and reader field type security to allow an Employee to see HR records where the EmployeeID is equal to the current user ID for example.

n/a / Replication

This doesn’t really exist in the OpenObject world. It is a client-server model and if you want to do anything you need access to the server. You can have multiple servers in a high availability cluster but there is no multi-server replication. There is support for using the server over XMLRPC which allows a dumb client (i.e. with no locally installed code other than python) to access the full OpenObject API including methods defined in your custom modules. This could be used to write a simple offline client that can then synchronise objects with the OpenERP server. You could even write an interface to synchronise data to a Notes client. Hmm, I might actually do that at some point.

n/a / What You See Is What You Get

Notes is a WYSIWYG development environment. If you want a field label green or change a table border width you just make it so because you are simply editing a block of rich text. This makes form development in Notes falling-off-a-log easy. It also gives you the flexibility to make a right old mess on screen. OpenObject is more declarative, which leads to less addition of random bling and more consistency across the entire database, which is what you want really. A corporate theme (which I haven’t figured out how to do yet) would apply to all modules in the database regardless of where they came from.

n/a / Public Key Authentication

This is just baked in to the Notes API at a really low level and simply isn’t there in OpenERP. Yes, administering ID files can be a pain in Notes and users tend not to want to invest any time in understanding the value of them over a username and password, but having real encryption and signatures as a fundamental feature is awesome, even if they are woefully missunderstood by the development community and undervalued by the users.
One interesting and somewhat related feature on the roadmap is that OpenERP is going to grow OpenID authentication, thus it will allow you to log on to OpenERP using credentials from Google, Facebook, Launchpad accounts etc.

Internationalisation / Domino Global Workbench

OpenObject uses a common internationalisation framework used in Open Source projects based on the GNU gettext format, all modules are written in US English then all the strings are exported to a .pot template files and .po files are created with translated strings for each target language. The Launchpad website has a great collaborative interface for allowing anyone to contribute and validate translations of your modules. I have done multi-lingual notes databases and yes, there was an attempt to integrate translations into Notes in Domino Global Workbench, last time I looked at that it was a bit rubbish.

Workflow / Lotus Workflow,formally known as Domino.Workflow

The graphical workflow engine is an optional extra on the Notes side (and a pig to integrate – yes I have done it) but built in as a standard feature across all modules in OpenERP. It has a nice graphical editor and you can do quite powerful operations and state transitions on multiple objects and call sub-workflows and so on. It does take a bit of getting used to, but it is the same across all modules.

Reporting and Printing / n/a

Actually I always had stuff printing out OKish from Notes, but OpenERP has a proper reporting engine built in based on the RML Report Markup Language It allows you to create fancy looking reports combining data from multiple objects plus images, barcodes and other complicated things.

Text & HTML / Rich Text

Well there is no native concept of rich text in OpenObject, there are text fields which can be big and can contain HTML and in the web client you can shoehorn in a web HTML editor. Basically it doesn’t compare to Notes if you want formatted text as a native datatype. That said, Notes Rich Text is a major pain when it gets down to doing stuff with it at CD record level or hacking about with rich text stored as MIME, or even using the NotesRichTextNavigator object to work with it. Rich text in OpenObject is limited, but that isn’t as much of an issue as you might expect and when you do integrate formatted objects things will at least be standards compliant and you will be manipulating HTML or perhaps ODF or possibly even MediaWiki markup – there is a wiki module but I can’t get it to render the pages – tips on this in the comments please if you know how.

AGPL / Proprietary

The OpenObject framework is licensed under the Affero GPL. This means that to comply with the license all your modules should be AGPL or a compatible license. If your business model relies on restricting the freedom of your customers you can look away now. Personally I always encouraged customers of Notes development work to review and look at my code and share and reuse it, plus I published interesting things developed or discovered for discussion with other developers in the community. I know this isn’t universal and some people do get all protective about intellectual property rights and like to hide their source code. There is actually no conflict at all between meeting the requirements of the GPL and being paid by a customer to build something they want. As long as you can get past this mental hurdle it really makes little difference to a bespoke software development business.

In Conclusion

Notes is OK, but proprietary and closed and quirky and carrying over 20 years of baggage with it. OpenERP has more of a rigorous and correct feel to it with standards compliance, a modern framework, nice APIs and a real grown up relational back end with transactions and atomicity and so on. The NoSQL engine at the core of Notes is a great idea, and new implementations of the architecture such as CouchDB are dead handy, especially for distributed applications.

All these detail comparisons are rather academic, the bottom line is that having poked about at the application development layer of OpenObject and looking back at all the Notes applications I have written over the last 15 years or so I am left thinking that most of them I could rebuild now in OpenObject, but slightly better.

One final note, I am going to delete uninformed and outdated Notes bashing in the comments, if you were going to say something like “I once used Notes 5 in a place I worked and everyone hated using it for email” then please save the wear on your keyboard and don’t bother, but if you have some clueful and current bashing you want to get off your chest (of either Notes or OpenERP) then pitch right in.

PCs with Compulsorily Bundled Software Should Be Outlawed

The Windows Tax

The Windows Tax

I’ve written about the Microsoft Tax many times before and have even had a minor success with regards to getting it refunded.

Now a fellow Open Source blogger and businessman, Dr Adrian Steel of Mercian Labels, is trying, so far without luck, to get the cost of an unwanted Windows License refunded from a company called Fonestop Ltd. He’s kindly providing an ongoing record of the correspondence between himself and the supplier whilst he seeks a fair refund for the software that he does not want nor require.

This example goes a long way to indicate why the bundling of software and hardware in this way is so wrong. It is incredibly hard to buy a computer in the UK that is not already infected with an inefficient, outdated, expensive, bloated and, still alarmingly, insecure operating system called Microsoft® Windows. It is also becoming increasingly difficult to get even a partial refund due to the updated terms in the EULA that comes with version 7 of the OS (you can read most of the license agreements here):

By using the software, you accept these terms. If you do not accept them, do not use the software. Instead, contact the manufacturer or installer to determine its return policy. You must comply with that policy, which might limit your rights or require you to return the entire system on which the software is installed.

In earlier versions the statement about returning the entire system was not there. Here’s what the Vista EULA said:

By using the software, you accept these terms. If you do not accept them, do not use the software. Instead, contact the manufacturer or installer to determine their return policy for a refund or credit.

Reading Adrian’s struggle to get back the money that is rightfully his makes me quite angry. There are plenty of computer users that do not want or need Windows software when they buy a new computer. Even if they are not aware of the great Free Software operating systems such as Ubuntu or Fedora or many others, they probably already have a perfectly legal and valid CD of Windows in a drawer or cupboard anyway. Even I have a legal and valid Windows XP CD in my office; not that it ever gets used nowadays…

So what’s to be done? I really feel like starting some kind of campaign to get the lawmakers here and across the EU to make this kind of practice illegal. I as a consumer should be able to select and buy any computer I like and decide for myself if I wish to pay for a pre-installed operating system or not. That should be a choice I am free to make. Currently, apart from a few very brave and admirable vendors, I do not have this choice. And now it’s even harder to obtain a refund due to the change in the wording of Microsoft’s EULA.

These Brave and Admirable vendors deserve a mention:

  • Brave because I’m sure that they will come under pressure from businesses like Microsoft to bundle their software and conform to the way that they want you to sell Computers.
  • Admirable because they are standing up for something which is good and noble and may not be the most profitable course for their company to take.

As many of you know we started a website some time ago called Naked Computers to track these Brave and Admirable suppliers around the world. It’s been useful to many but it has been quite quiet recently and it could definitely do with a revamp to make it look more appealing (any WordPress Theme designers fancy knocking up a new look and feel for the site?).

In the UK there is one computer supplier that, in my humble opinion, should be applauded for their attitude: Novatech. I think that every machine they sell from their website or retail outlets are offered with or without an Operating System; it’s your choice. It’s quite interesting to look on their site and see just how expensive Windows really is: ~£70 to ~£800 or more!

Recently I noticed Novatech making a few noises on Twitter and I commented positively on their approach to selling naked computers. This was their reply to me:

@opensourcerer Thanks for recommending us, we sell all systems without operating systems as we like to give our customers a choice.

So come on you lot! Let’s try and come up with a plan, ideas and suggestions as to how to go about fixing this problem once and for all… Our company, The Open Learning Centre can host a wiki or something if needed but please use the comments here to start the ball rolling.

Are there any lawyers out there who fancy a challenge? Want to fight for Freedom and allow consumers to make their own choice rather than be forced to pay for something they frequently neither need nor want?

Finally, for those naive souls who believe that an EULA gives you some protection or guarantees, think again…

Another EIF 2 response from an MEP

I was very pleased yesterday to get another response to add to my collection in relation to my letter to my MEPs about the European Interoperability Framework. Now if you missed the fuss in the first place the interoperability framework is a document outlining an EU approach to software that avoids being locked in to particular suppliers, promotes free choice of member states, and protects tax payers from being ripped off by predatory monopolistic practices. Good stuff in other words. It had a few rough edges so EIF 2 was proposed. A draft was written, and public comments from interested parties were submitted. Microsoft and the BSA (which has been accused of being a Microsoft sock puppet at times) were perhaps the most critical, but their comments were generally welcoming and constructive, the BSA in particular pointed to some areas where the proposed EIF2 went impractically far on issues relating to patents. I was, in short, totally fine with these public comments. Some time later a second draft was leaked and this did cause concern. It was nothing like the first draft and after careful reading of every submitted comment I could not see how you could start at the first draft, and by implementing the public comments arrive anywhere near the second. The original letter has a few more details of specific problems, but here is what my Conservative MEP has to say on the matter. (Responses from Conservative, Green and Lib-Dem so far)

Dear Mr Bell,

Thank you for your letter.

I was both concerned and delighted to read your comments. Concerned as to
the matter you highlight, yet delighted to see someone taking such an active
role scrutinising legislation; it is to your credit that you take such an
undertaking upon yourself.

With regard to the’ European Interoperability Framework version 2′ it is my
understanding that although it remains in the drafting stage (the current
version of the draft and more information are available from
http://ec.europa.eu/idabc/en/document/7728) it will be submitted to the
European Parliament and Council soon. When it is presented to the
parliament I will do my best to raise the issues you highlight with the
relevant members and ensure that the specific points you raise are
appropriately addressed.

However, as you are no doubt aware that most of this process is highly
secretive. It is sadly endemic of the EU legislative procedure that it is
formulated and discussed behind closed doors, with deals and compromises
made in circumstances that are often totally unaccountable. You can rest
assured that I share your frustrations with this and will do all I can over
the course of my time as an MEP (as I have until now) to change this.

I am happy to tell you that we are making progress. For the first time
there is an opposition to the existing way of doing business in Brussels.
My Conservative colleagues and our allies in the European Conservative and
Reformist Grouping are doing all we can make the EU accountable and to
expose the process to the full light of public scrutiny. Free to ask the
awkward questions we are fighting to ensure that when laws are passed they
represent the best possible, rather than the just the least bad choice.

I will of course keep you up to date with any and all developments. In the
meantime if I can be of any further assistance please do not hesitate to
contact me.

Best Regards,

Nirj Deva MEP

If you are wondering who Nirj Deva is then take a look at this:

Amazon’s Windows Refund Helps the Earth

On the 21st July 2009 I reported how Amazon had made it really easy for me to reclaim the cost of the Windows XP license on a new Asus netbook. This was a very popular post for my humble blog; especially after appearing on Slashdot thanks to reader and Digital Tipping Point producer Christian Einfeldt.

As a quick digression, I decided to install the 3rd Alpha release of the forthcoming Ubuntu Karmic Koala (what will be 9.10) on my netbook and it is working very nicely. I have discovered one problem with my 3G modem (an Option iCON 225), but this is alpha software and helping to test and find bugs is what it’s all about. I’ve confirmed the bug on Launchpad and will hopefully be able to help diagnose and rectify the issue as the Karmic release progresses.

Back to the topic.

What perhaps wasn’t as clear as it could have been (apparent by some of the dodgy reporting elsewhere) was that the netbook was a prize I’d won for helping to get testers to a Beta trial of the Micromiser energy saving software, specifically written for Linux, by a company called Miserware. As I hadn’t bought it the first place the refund was sent back to Miserware, not to me. That was absolutely fine. It was the principle I was interested in, not really so much about the money. I had thought that should the refund come to me, I would donate it to a deserving (IMHO) FOSS project. I hadn’t decided on any one particular project though as I was doubtful I would get the cash anyway. But that was my basic idea.

When the refund went off to Miserware, I mailed them to let them know it was coming and why. I also mentioned that I had intended to donate the refund and that it might be an idea for them to consider too. A couple of days later they emailed me back to ask if I’d mind them donating it to something a bit different. Not a free software project but something more in keeping with their “green” credentials. Hey! It’s their money; who am I to dictate what they do with it?

I thought it would be good to show you where the Microsoft Tax has gone:

Dear Melissa,

Thank you.

Your support will help the Sierra Club continue its efforts to protect wild places and endangered species, confront global environmental challenges, and keep the pressure on politicians and corporations.

By supporting the Sierra Club online, you also become a member of the Club’s Online Community — helping to save paper and postage and enabling you to get the latest environmental news and information quickly. As a member of our Online Community you can help protect the environment by visiting the Sierra Club Action Center and sending personalized emails to key decision makers on important conservation issues. And, at our Online Member Center, you can subscribe to one of the Club’s email newsletters and electronic publications.

The Sierra Club has been devoted to protecting our natural heritage for over 100 years. And thanks to your support, we can continue to fight and protect our natural resources.

Thanks again.


Carl Pope
Executive Director
Sierra Club

Please print or save this message for your personal records.

Name: Melissa Cameron
Amount: $67.58
Designation: Donation to the Sierra Club

The Sierra Club is:

America’s oldest, largest, and most influential grassroots environmental organization. Inspired by nature, we are 1.3 million of your friends and neighbors, working together to protect our communities and the planet.

I think that’s really cool. From over here in Europe, the USA isn’t exactly perceived as having a strong track record on green issues, although I’m sure that is going to change with the Bush era finally behind us. But nevertheless, it is great to see that there are organisations in the US that exist and promote the environmental agenda. If you’re a concerned American please go and stop by The Sierra Club and say hi… For all of us.

« Previous PageNext Page »