MVC / Design Patterns with Python – Links

I’ve been doing a lot of research into design patterns lately, Model-View-Controller (MVC) in particular. I do most of my coding in Python and I found some useful links long the way if you’re interested in this kind of thing.

For those people using my Tubecaster application: That is undergoing a major MVC overhaul at the moment so watch this space for updates.


Tubecaster – new version

I’ve just released a new version of my Tubecaster application which allows you to download YouTube videos and converts them to MP3. Get it from the Tubecaster homepage.

It was broken for a little while thanks to YouTube changing (or at least changing the access to) their video caching mechanism. When I first created the app in October the Google caching backend site easily allowed you to paste the video id onto the end of a certain URL and returned the video .flv file which I then used Tubecaster to grab and convert, fetch the title from the webpage etc. Now that caching site is unavailable and I had to find a different way to do things.

I found a little script called youtube-dl (link on the Tubecaster homepage) which is a command line utility (also written in Python thank goodness) which really downloads the videos the correct way. It basically creates a proper HTTP request in the same way that the Flash video player does and retrieves the video that way. This means it is far more stable and likely to keep working long-term unless YouTube makes major changes.

This release is pretty basic at this stage, but new features coming soon depending on how much time I can put into it this weekend.


The Problem(s) with Linux

I started using Linux in 1999. At the time I was sorely frustrated with the state of Windows, as are tens, if not hundreds, of thousands of people every day. I was hugely excited to discover Red Hat Linux 5 at the time. Finally there was a solid competitor for Windows. Or so I thought. In those days it was still very easy for us to accept the abundant shortcomings of Linux for the sole reason that we were only too happy to have an alternative.

Eight years on I still haven’t been able to make the complete switch over to Linux. There are many problems with Linux, most of which it has had from very early on and which, surprisingly, have not progressed very much towards resolution since. My personal requirements are not particularly complicated. My every day tasks include web browsing, email access (mostly through my web browser anyway), a bit of programming, for which Linux is especially well-geared, some office-like tasks such as word processing and the occasional game. Mostly typical of most modern computer users. Just about every one of those tasks has significant barriers in any Linux system I have tried.

Open Source – the No Money Choice

The open source development model is one which I hold very close to my heart. Typically any software I create for the sole purpose of scratching a programming itch I release under the GNU GPL. Linux has been released under the GNU General Public License which means anyone can take the software and do whatever they like with it, as long as they pass that same freedom on to anyone else who might get hold of it.

Linux is refined by tens of thousands of volunteer developers all over the world working in their free time. There are two sides to this model. The first is that you have more passion for quality built into the system than you will ever get with commercial software development. The other side is that you end up with 5 developers with 8 immediate itches to scratch between them and once those itches have been scratched then that’s the end of it. There is no long term vision. There is no sense of what is best for the entire project in the context of the competition. Whether we Linux people like to admit it or not, we are competing with the Windows world.

Stop Playing Catch-Up!

When Linux first started Linus Torvalds never intended for it to become the comptetitive powerhouse it is today. The determined angry-with-Windows developers are responsible for the Windowfication of the system. There was always, and there continues to be, an inferiority complex inside the Linux world which causes Linux people to feel like they need to match what Windows is doing. I would like to point out that it is highly unlikely that Linux will ever get to that point. The situation is 10,000 volunteer, largely unorganised “bedroom-devs” working when they can, if they feel like it versus 1000(?) highly paid, intensely focused, uber money enriched programmers. There can be no real competition unless the 10,000 become more focused.

In comes Mark Shuttleworth…

One Small Step For OSS, One Giant Leap For Freedom

When Thawte Consulting founder, astronaught and Open Source technology guru Mark Shuttlworth picked up his laptop, some pocket change and a megaphone the Open Source world (myself included) gasped in hope. He was going to pay some of the best developers the Linux world had to offer to work on one super Linux distribution to top them all. Ubuntu was to crush the last shortcomings of Linux and shove it down the phonelines of every desktop, laptop and server in the galaxy. We finally had some money being pumped into our world. This could only work, right? Sadly, no.

While we had glimpses of moves in the right direction, like the Windows migration tool in Ubuntu 7.04, we seem to have exactly the same unfocused chaos as we had before. Each version of Ubuntu seems to be worse than the last. Three versions ago I could boot up the CD and install without a hitch. Every version since has made it more and more difficult not only to support older hardware (although my laptop is not even two years old) but they are crippling the troubleshooting tools available. In 7.04 I couldn’t get a graphical installer up without passing in some special kernel options, switching to a second terminal and modifying my xorg.conf file but in 7.10 they’ve removed the text editor from that runlevel! What for? This means that even if an “average Joe” user took his laptop to a Linux guru friend the friend couldn’t even try to fix things at a low level anymore.

Sure, if Ubuntu does work on your machine the first time, as it does for many people, that’s great but it won’t be long before the huge gaps become glaringly apparent. Got a standard, not-too-new Logitech webcam? Great! There’s support built in… oh, no wait that’s a slightly different firmware revision so it won’t work. File a bug report. OK no problems I’ll just connect my USB memory stick, I know those have been working since Linux 2.4… *plug*… hmmm unrecognised… Try again 20 minutes later and it works. But it’s the best Ubuntu yet! Dell machines come shipped with it! We’re in talks with HP!

OpenSuSE 10.3 gave me a glorious graphical installation, installed fine on my laptop and gave me 1280×800 right out of the box and recognised my memory stick right away.

Back to Basics

It’s about time one of the big distributions stopped trying to make our desktops turn around and look like a 3D cube with bouncing windows and basic NTFS access and bring things back down to earth. Shuttleworth’s done it once already. Take the current Linux kernel, even a slightly older one if necessary and create some baseline driver architectures that can be adapted more easily to specific needs. Create some decent APIs that anyone (within reason of course) can pick up and plug their drivers into. What about Wine for drivers? It’s been done with ndiswrapper. Surely with enough time and money some headway can be made into some real innovative features. Some key objectives worth focusing on:

  • Pump some money into the Wine project, if not creating an entire team just to work on that.
  • Work on the big vendors to create, or at least make it easier for others to create, open device driver architectures.
  • Forget the spinning 3D desktops and spend some time on the basic software. Why not create an Open Office team to take what has already been done with Open Office and create some true innovation? No more catching up to MS Office. Make it easy to get the basic applications working.
  • Stop giving us so many choices! I would much rather have only one brilliant web browser or one amazing text editor that has everything and the kitchen sink than 20 that don’t work. Decide on what works the best out of what is already there and consolodate it all into some standards. Don’t be scared of making your own new software if necessary. Let’s put the open nature of Open Source to good use!

In Conclusion…

By the time Vista came out we should have had a viable desktop alternative in Linux. It’s not too late. With real collaborative, focused effort on getting the basics right we can get there in no time. There are no more excuses.



The time has finally come for me to start writing a blog. Until now I’ve never really felt the need to have a blog but nowadays I feel like writing a bit. If you don’t know me you may not have any reason whatsoever to read anything here but who knows, you may just find something interesting.