Dedicated to my late brave, beautiful and silly mummy, Debra Ross. I love you mumster.

Skip navigation

Category archive for programming

Because archives are so much easier than having just hundreds of posts on the home page. I learned that the hard way.

Nitpicking open source and free… again

Despite really like Ruby and Perl, due to time constraints and other obligations I’m still reluctantly using WordPress and PHP on most of my blog powered sites including this one. Until I make the desperatly wanted switch, WP news still affects me and I take a somewhat interested view of what’s going on. Not exactly a glowing endorsement, but then again it is the middle of the day here in Mawson Lakes so if I started glowing it would be a bit of a waste of energy.

It seems the widely used Revolution Theme for WordPress has gone open source. From the Weblog Tools Collection article:

Brian Gardner’s Revolution Theme for WordPress is going 100% Open Source. All the themes that are currently on Brian’s Revolution site will no longer be available as or October 31st and will be replaced with a set of new themes that will be developed and released under the GPL. The original Revolution themes will continue to be supported for those who have purchased them in the past.

Now I hate to be a nitpicker and certainly I consider myself more practical than ideological when it comes to the great software debate, but isn’t this an example of something becoming Free Software and not just Open Source? Aren’t most applications written in interpreted languages Open Source by their very nature because you can read the files? If Brian Gardner is releasing his themes under the GPL, then wouldn’t that make them Free (as in speech as well as beer) instead of just Open Source?

I guess it boils down to disclosure; if you purchase a theme from someone instead of downloading it gratis, there’s probably a clause limiting your right to redistribute or share the code. Still, isn’t that more of an issue of the software not being Free, rather than it not being Open Source?

In any event I congratulate Brian for going down this path. I suspect he will be getting far more users and interest after doing this, and he deserves all of it.

And now I’m off for a Caeser salad. I’ve been having cravings for Caeser salad. Is that healthy?

Just ordered a Yubikey

YubikeyAfter listening to a recent episode of Security Now I’ve gone ahead and purchased myself a Yubikey!

The Yubikey is a phenomenal new device that’s smaller than most memory keys that when plugged into a USB port and the loan button on the case is pressed, a one time password is generated and entered. It does this on any HID enabled operating system including my beloved Mac OS X and FreeBSD without extra drivers because it shows itself as a regular USB keyboard. It’s so beautifully simple!

The best part is that the API is open and accessible from a number of different programming languages such as Ruby, PHP and Python (not sure about Perl just yet).

In the coming weeks I’m going to try to implement my Yubikey into my Ruby CMS. I’m really excited!

Latest computer book haul

Having received payment for my latest one off project today, I celebrated by going down to Wheelock Place and splurging on a Starbucks Venti Dulce de Leche from next door and buying some computer books I’ve been dying to get. I’m a wild guy you see.

Happiness is a stack of new interesting computer books!
Happiness is a stack of new interesting computer books!

I find that I learn new skills much faster if I’m given examples and real world applications of technologies rather than just the usual “an array is a collection of objects yada yada” theory. The O’Reilly Cookbooks are absolutely fantastic for this, what irritates me is that I only just discovered them recently when I had to learn Python in a hurry for an assignment. I learned more from that one book than many hours sifting through tutorial pages and the dry slides from the uni.

Starbucks Dulce de LecheAs for the FreeBSD book, heck I just wanted to see how it works! Perhaps a little over my head right now, but we’ll be looking at the Linux kernel at some point so this could be an interesting side study for comparison.

From the blurbs:

The Design and Implementation of the FreeBSD Operating System
As in earlier Addison-Wesley books on the UNIX-based BSD operating system, Kirk McKusick and George Neville-Neil deliver here the most comprehensive, up-to-date, and authoritative technical information on the internal structure of open source FreeBSD.
Perl Cookbook
Find a Perl programmer, and you’ll find a copy of Perl Cookbook nearby. Perl Cookbook is a comprehensive collection of problems, solutions, and practical examples for anyone programming in Perl. The book contains hundreds of rigorously reviewed Perl “recipes” and thousands of examples ranging from brief one-liners to complete applications.
Ruby Cookbook
The Ruby Cookbook is the most comprehensive problem-solving guide to today’s hottest programming language. It gives you hundreds of solutions to real-world problems, with clear explanations and thousands of lines of code you can use in your own projects. From data structures and algorithms, to integration with cutting-edge technologies, the Ruby Cookbook has something for every programmer.

And now I’m off to bed. 00:07, that’s pretty early for me!

Setting up MediaWiki for registered user edits only

UPDATE: The Whole Wheat Radio wiki is back online again.

With the Whole Wheat Radio outage in effect I decided to create some mockup pages outlining some ideas over on my university intranet’s [sic] MediaWiki installation, but after some vocal opposition I decided to whip up a temporary WWR wiki testbed over at http://rubenerd.com/projects/wwr. Feel free to mess around there with WWR related whatnot while the mothership is offline and you have a Sunday morning to kill as I do right now!

If you’re using a wiki under similar circumstances and you don’t need or want anonymous edits compared to a bigger, more collaborative effort like Wikipedia, all it takes is appending one line to your ./LocalSettings.php file:

# Block edits by anonymous users
$wgGroupPermissions['*']['edit'] = false;

I know, I know… that was actually TWO lines, but the point is only the last line actually invokes the functionality described, the first is just a comment… which you should always include. Okay, okay I see your point.

On Adobe Air, limited accounts, updating, BSD

Despite having reached version 1.0, Adobe Air on Mac OS X still has some glaring usability issues.

When you load your Air application, instead of displaying what you told it to, Air prompts you with an update screen… almost every time. What if I have a good reason for not wanting to update yet? And not only that, but if you’re using a limited account for security reasons, as usual you enter your username and password for you administrative account, and as usual Air hangs during the update and you have to force quit. Adobe Air is the only application which requires me to log into my administrative account at all, just to update it and log out again.

You could say that I’m bitter than Adobe still refuses to release a 64 bit version of Flash, or any version of Flash on FreeBSD at all. That’s probably true. But I can confidently say that I’m only putting up with Air because Twhirl is the best graphical Twitter client. I certainly won’t be developing anything serious with it myself, nor will I be actively looking for more Air apps.

Adobe’s idea for a cross platform application framework that’s friendly to web developers was a great idea, but alas it seems to have failed in its implementation.

Cutting Mono out of GNOME on FreeBSD

Despite many people writing up detailed, phone-book length blog posts vehemently saying Mono isn’t a necessary or an integrated part of GNOME (who are they trying to convince, us or themselves?), the simple reality is that most package managers do treat it as such, including FreeBSD’s ports system.

GNOME Terminal running in FreeBSD showing the removal of Mono

If you installed GNOME either with the gnome2 metaport or metapackage you’ll get Mono and Monodocs, which if you have a problem with Microsoft’s patent litigation or just don’t like seeing Microsoft get their claws into free software, you can remove (albeit with a warning you have to supress with the -f switch):

  1. # pkg_info | grep mono
  2. # pkg_delete -f mono-x.x.x.x

I’m mostly a KDE and Xfce person trying out GNOME as my DE for a week, so I’m by no means an authority on its package requirements. That said though, having removed Mono on Friday and using the bundled applications I haven’t had any issues at all. Obviously I won’t be using Banshee or Tomboy, but I didn’t need them anyway!

Richard Stallman at the launch of the GPL v3
Richard Stallman at the launch of the GPL v3

For those who don’t know, Mono is an open source implementation of Microsoft’s .Net framework. I don’t agree with a few of the things Richard Stallman says, but his summary of why Mono is problematic hits the issue right on the head:

Mono is a free implementation of Microsoft’s language C#. Microsoft has declared itself our enemy and we know that Microsoft is getting patents on some features of C#. So I think it’s dangerous to use C#, and it may be dangerous to use Mono. There’s nothing wrong with Mono. Mono is a free implementation of a language that users use. It’s good to provide free implementations. We should have free implementations of every language. But, depending on it is dangerous, and we better not do that.

And my own argument can be described in three words and a phrase: embrace, extend, extinguish, and those who don’t learn from history are destined to make the same mistakes.

I guess it just bothers me that more people aren’t bothered by Mono. It would be useful if people were using it to migrate existing software they had spent time and money on over on Windows, but creating software from scratch with it just doesn’t sit well with me.

All this said though, this is another great thing about the free and open source software world on the desktop, if I don’t like a particular application or the language/framework it’s been written in, I can slot in an alternative free application that I prefer. For example, who needs Mono-encumbered Banshee when there’s the gorgeously designed Exaile written in Python!

Faulty Intel DQ35JO motherboard fun

As I mentioned in a recent post, I’ve assembled another computer recently for number crunching and compiling applications for other machines and for university projects. Given these needs, I figured I’d buy a motherboard with simple onboard graphics and use the money I saved to buy more RAM. After all, I won’t be playing any games on here (save for some terribly addictive little KDE games!) or encoding video. In fact it’s quite feasible to think sometimes I wouldn’t even interface with it directly at all, but rather just send it tasks remotely from my MacBook Pro through SFTP or NFS, or check up on it with SSH or TLA.

Anyway life story aside, I finally settled on the Intel "Executive Series" DQ35JO board with the Intel Core 2 Duo 8400 3.0GHz CPU and two sticks of 1.0GB Kingston HyperX low latency PC2-6400 RAM.

Problem is, it’s as reliable as I am… without coffee! The order of events:

  1. Once booted into FreeBSD it works beautifully
  2. After a random unspecified amount of time, all processes on the machine visibly slow to a crawl
  3. Eventually it stops responding to all keyboard and mouse input and has to be physically turned off
  4. After waiting a few seconds and powering it back up, the display refuses to come back on
  5. 10-15 seconds pass, the motherboard reboots itself
  6. After another random unspecified amount of time ranging sometimes from 5 minutes to 5 hours it can be turned back on again with the video output.
  7. Lather, rinse, repeat

It’s downright maddening. I’ve flashed the BIOS to a newer version, I’ve stood in a circle around a campfire chanting various lines, I’ve stood on one leg while singing Majulah Singapura and Advance Australia Fair backwards… nothing seems to make any difference. What bothers me most though is the randomness, at least if it failed and worked again predictably it would be easier to figure out what’s going on.

For now I guess it’s back to the store. Fortunately I bought the parts from Skylet and Cybermind at SLS which both have 7 day on the spot replacements in addition to the warranties.

I’m sure it’s just an inevitable manufacturing defect which statistically is bound to happen when you buy electronic components, but it’s still disheartening. While it was working, this computer was the fastest and most responsive system I’ve ever used, period! Not to mention the time it took to compile kdebase from FreeBSD ports… wow I’ve never seen the compiler notices fly by so quickly!

More as the story develops.

On low profile PCI cards and Microsoft tax

While I love Apple computers and use my MacBook Pro probably more than any other machine I own, I also love putting together machines myself for eight critical reasons:

  1. It’s cheaper
  2. I choose everything, no need for compromises
  3. I don’t ever have to pay the Microsoft tax
  4. Microsoft doesn’t get any money with bundled Windows
  5. I’m not supporting Microsoft
  6. I can install FreeBSD or NetBSD from the beginning
  7. Much easier to upgrade
  8. I don’t give any money to Microsoft

The latest machine I’ve put together is assembled in a slimline MicroATX tower case to make it easier to take to Adelaide when I go back to study, plus it takes up much less space on my already critically full desk.

The downside is because it’s so slim, the PCI and PCI express slots are only half the width. Doing a bit of research it seems for this machine at least I’ll be limited to using "half height" or "low profile" cards. They certainly do look strange!

It’s less of a concern for this machine because I’m using it primarily for raw number crunching and compiling large amounts of crap, so I’m just using the onboard graphics. Plus, the board has inbuilt FireWire 400 ports, gigabit ethernet and a generous number of USBs… I’ll probably need another gigabit ethernet port before anything else.

Anyone know where you can get a low profile PCI express gigabit ethernet card? ;-)

RichardDawkins.net