Posts Tagged ‘MySQL’

On Software Patents, Oracle & VisiCalc

The web is aflutter at the moment with discussion of the patent system and its relationship with the software industry in particular (the most thought-provoking piece on the subject so far comes from Nilay Patel and is fully worth the requisite time investment). Should we let people patent software? At what point does math become a patentable invention?

Like most people, I’m unversed on patent law, but I am a sometime software developer. Personally, my gut feeling is that if a piece of software is developed for an explicitly commercial application then it absolutely should be protected under law, particularly if the software effectively IS the business (Google, for example). Surely it isn’t right that I invent something, someone else brings an identical product or service to market and my company is forced out of business? But gut feeling seems to be what most pundits are running on, and is not necessarily the best way to approach the issue.

Current hysterics calling the system ineffective or broken should consider two software cases from near the dawn of our industry, over three decades ago. The first case is Software Arts’ VisiCalc, the first electronic spreadsheet program for personal computers. Although a new invention, the fundamental concept – an electronic spreadsheet – of VisiCalc was not patented, and within a couple of years of its release the market was populated with alternatives, most notably from Lotus and Microsoft. If the core idea behind VisiCalc had been patented, 1-2-3, Multiplan and later Excel would not have existed, or would have needed to invent a totally new spreadsheet metaphor to be permitted under law. But Software Arts did not patent the electronic spreadsheet, and consequently the only time they or VisiCalc are mentioned these days are as points in patent discussions.

Dan Bricklin, one of the co-creators of VisiCalc doesn’t argue for specific change, but does intimate that the patent system is not best suited to the software industry. However, in the same post he actually states that the lack of a VisiCalc monopoly (which would have been enabled by a patent of Software Arts’ take on the electronic spreadsheet) encouraged competition and improvement in quality of all the available software packages (Multiplan correcting the mistakes of 1-2-3, which improved on the shortcomings of VisiCalc etc…). If the core concept behind Archie had been protected by law at the beginning of the ’90s, Yahoo!, Google et al. perhaps wouldn’t exist. Because the overarching concept of a web search engine isn’t itself patented, but the effective and novel technical innovations that make a great search engine can be, we have multi-billion-dollar companies built on the foundations of innovation, protected by the patent system. Bricklin is correct to assert that the broad metaphor of an electronic spreadsheet doesn’t benefit from being patented, much as the fundamental idea of an internet search engine wasn’t. But the current patent system has demonstrably fostered protectable innovation in the case of Google – not so broken in that case, apparently.

One company famous, perhaps more so than any other, for developing, patenting and licensing high technology is IBM. In the 1970s, researchers at IBM developed the relational database model, a vastly superior means of storing and operating on data to the existing database paradigms on the market at the time. To protect the revenue streams provided by their existing database systems however, they chose not to immediately market products based on the new technique. Instead, one Lawrence J. Ellison and colleagues formed a company of their own to being a product to market based on an implementation of the SQL concept outlined in IBM’s research – the Oracle Database.

Oracle, the company, was started to market a software concept developed but not exploited by another organisation, and just like Microsoft with Multiplan and Lotus’ 1-2-3 they may not have invented the central idea but they have innovated on it and created a technologically progressive sector of the industry where there would instead have been a monopoly.

Those are the two cases which spring immediately to my mind when I meditate on this subject (again, not one which I am educated to consider from a legal standpoint). It’s difficult to separate my feelings as a developer – if I invented the RDBMS and Larry Ellison ate my lunch, I wouldn’t be very happy – from my thoughts as an observer – had IBM patented the RDBMS concept or SQL as an implementation thereof, this site wouldn’t be running (and the LAMP stack wouldn’t exist). It seems to me that if any changes need to be made, and again, I’m not a lawyer, they need to be made to what kind of patents you can be granted rather than whether you can patent software at all. Larry Page’s patent on PageRank doesn’t preclude anyone else from creating a search engine, but it isn’t allowed to work just like his does, which is what forms the core of his competitive advantage. And in Oracle’s ongoing complaint against Google and Android, Oracle shouldn’t be allowed to own the idea of a VM with JIT compilation, but they should be able to protect the innovations which they own to do with its operational techniques. The legal system would be best improved by stipulating the breadth and application of concepts eligible for patent protection, as well as those who are permitted to action upon them (no trolls, please).

Super Simple WordPress Backup Program

Whatever you do with your computer, it’s absolutely vital to back up your data. Never is this more true than when you’re administering a website, where creating backups should be a well organised and regular procedure.

This site is no exception to that rule, so to help me out with my daily backups I’ve written a small program in the Python programming language which automates the process of archiving daily snapshots of my site. For peace of mind, I still prefer to launch and organise backups myself rather than use completely automatic solutions; this program helps make that process much quicker.


You can download the program by right-clicking here and pressing ‘Save As’/’Save Target As’.

If you want to download straight to your Linux machine from the command line, use wget:

$ wget

The program is designed to run under Linux, but theoretically it will work on any Unix system (Mac OS X, Solaris etc…) with Python installed.


All you need to feed the program is the path to your WordPress installation (the directory containing your wp-****.php files). The database login credentials are borrowed from WordPress, and the backup is placed in a date-stamped folder for easy archiving.

Each backup contains a dump of your MySQL database and a tarball of your installation directory – everything you need to restore your site in case of a disaster. The backup will be created in the folder from which you start the program.

To launch the program:

$ ./wordpressbackup /path/to/wordpress/installation

For example, if your site is located in the directory ‘/home/randymarsh/web’, the command would be:

$ ./wordpressbackup /home/randymarsh/web

If you need help or more information, use the help & about functions:

$ ./wordpressbackup help

$ ./wordpressbackup about

Hopefully this little script can help out anyone else like me who only trusts a backup they’ve done by hand. Enjoy!


Web & Coding Tools for Mac OS X

Here’s three essential tools for anyone who uses Mac OS X for coding or remote admin.

FTP: FileZilla

If you work on a remote machine of any sort the chances are you’re going to need to send files to and from your local terminal.

FileZilla is not just the best open source FTP client I’ve ever used, it’s the best FTP client I’ve ever used period – it’s fast, free and dead easy to use, as well as being available for all three major platforms. I can’t recommend the Mac OS X version highly enough – it’s essential.

You can grab the latest version of FileZilla here, and remember, it’s donation-ware so if you love it, hit up PayPal and help out.




Migrating WordPress Sites Between Servers

As detailed elsewhere on the site, I’ve recently replaced my server, which has meant migrating my site and it’s associated bits and pieces from old to new. Here’s a handy ‘all-in-one-place’ guide for migrating a WordPress-powered site from one server to another with the minimum of hassle.

[If you have a basic WordPress configuration, this guide will get you up and running quickly and easily. For more complex configurations, you will probably need to do some more research after reading this]


Your WordPress site is linked in with and heavily reliant on a MySQL database for its operation, and the first port of call is to copy this database to the new machine. This, of course, means that your new system needs to have MySQL installed – Ubuntu Server gives you the option to install LAMP server packages (Linux/Apache/MySQL/PHP) in its setup process, but they are all freely available online if you haven’t already got them installed.

In order to copy your database, we need to dump it to a file and transfer it to the new machine.

Using mysqldump

For this stage, you need to know your MySQL login details. If you don’t remember them, they’ll be right at the top of your existing ‘wp-config.php’ file in the root of your WordPress installation. (more…)

Welcome to Lumpy Gravy

Welcome to Lumpy Gravy indeed. The site appears no different today than yesterday, but behind the scenes it’s a whole different story.

After 6+ months of good service, Uncle Meat, the HP DL380 which has hosted this site since October of 2010, has been replaced. Running a system which was designed to (and formerly did) occupy a corporate datacenter in your home sadly proved impossibly noisy, and Uncle Meat was moved to the garden shed shortly after coming online.

This was actually a pretty decent (if hacky) solution – the shed was freezing cold all winter and noone went outside because of the unfriendly weather. However, things in Sussex have taken a turn for the lovely, and with temperatures outside approaching 30 degrees, Uncle Meat has met a couple of issues which have precluded its continued employment.

This DL380 sports a pair of 2.80GHz Xeons, which are great for number crunching but, because of their NetBurst architecture, kick out a phenomenal amount of heat. Because of this, running 24/7 in 30 degree plus heat (even with the window open) is not the most reliable environment, and a far cry from the air conditioned datacenter it formerly called home. The noise of the cooling array is what evicted it from the house originally, and with more time being spent in the garden it’s no longer an okay place for Uncle Meat to be.

It’s been great fun learning the ropes on this machine, but life must continue and this site now has a newer, quieter and faster home – introducing Lumpy Gravy.

Lumpy Gravy is a decent step up in specification despite coming into existence on a shoestring budget, and it’s been designed with practicality in mind from the outset. Specs are as follows:

  • Intel Core 2 Duo E6600 (2.40GHz, 4MB L2)
  • 2GB Corsair XMS2 DDR2
  • 500GB Western Digital Caviar Green HDD
  • Ubuntu 10.10 64-bit

The Core 2 CPU is a decent amount quicker than the pair of Xeons it replaces, and has much better energy saving features. It’s running at a cool 30 degrees using only the stock Intel cooler, spinning at just 850rpm (= quiet!).

Even though this is definitely a system on a budget, I went for decent quality RAM – Corsair XMS is designed for overclockers and both DIMMs have heatsinks on either side. Because I’m not overclocking, this should be a really stable solution (it’s always very reassuring to be working with components well within their tolerances). I’ve been building with ASUS boards since the late 90s and they’ve never given me any reason to change allegiance. This one has really nice square VRMs which are designed to fit perfectly with the outer fins of the CPU cooler – a neat touch which helps with heat dissipation and should keep this rig stable. It’s running a G31 chipset, with a minimal 8MB RAM shared with the integrated GMA 3100.

Western Digital is another brand I’ve used almost exclusively for over a decade now, and their current range of Caviar drives is very well thought out, providing clear options depending on the system builder’s priorities. In this case, my priorities were minimal power consumption, quiet operation and long term reliability. The Caviar Green was the obvious choice for me – it spins at 5400RPM (quieter, longer life) but has 32MB of cache memory, ideal for a web server.

I’ve also taken this opportunity to upgrade Ubuntu to the latest and greatest – 10.10 in 64-bit. Yes, I’m only running 2GB RAM, but this gives the opportunity to upgrade past 4GB in the future, as well as the (occasionally noticeable) performance benefits of running 64-bit software.

So that’s Lumpy Gravy, the new home of and my associated ‘cloudy’ bits and pieces. I’m currently working on a handy guide for anyone porting a WordPress site from one machine to another, and there’s some exciting new configurations I’m working on with Apache 2 which will be written about shortly as well.