I’m betting most people won’t be interested in this, but if anyone’s curious how this programmer goes about building up a perl module from scratch, you can watch along on as I build XKPasswd 2.0 over on GITHub: github.com/bbusschots/xkpasswd.pm.

I’m re-implementing XKPasswd from scratch. The resulting functionality will be mostly the same, but with some additions. The reason for starting over is two-fold. Firstly, the first implementation of XKPasswd was very much a prototype, and as with any prototype, I learned some valuable lessons, and there are lots of things I’d do differently if I was doing it again. Secondly, the first version of XKPasswd is almost three years old now, and since then, my Perl skills have increased a lot. Probably the single biggest difference between the me of 2014 and the me of 2011 is that I read Perl Best Practices, and started to run all my Perl code through Perl Critic. Another big difference is that, thanks to JQuery, I’ve fallen in love with Code References in all the languages I use that support them, including Perl.

Since this is a re-write, I’m really focusing on building a solid foundation, so I’m starting with the utility functions that will let me build up functionality gradually, and I’m writing the user documentation in parallel with the code. Before every commit to GITHub, everything that’s done so far is getting documented with POD, and, the code has to pass Perl Critic with no warnings.

Tagged with:

I spent the weekend majorly re-factoring XKpasswd.pm, my Perl random password generation library. V0.1 was the last thing I wrote before reading Perl Best Practices, and looking back on that code really illustrated the value of that book when used in combination with the perlcritic code analyser.

The new version of the module provides all the functionality the old one did, and more. The refactoring has made the module simpler to use from within scripts, as well as easier to modify and extend. Some new features have also been added, including the ability to use the www.random.org web service as the source of randomness for the library. A full list of bug fixes and new features is included below.

I had hoped to distribute this version as both a ZIP file and a .PKG file, but XCode 4.4 is not being cooperative on the new Mountain Lion, so that will probably have to wait until version 0.3.

Update – 6 August 2012: The link below has been updated to point to version 0.2.1 of the code. Details of the bugs fixed in the release notes.

Download

Read more

Tagged with:

I recently moved to a new machine (a hand-me-down G5 20″ iMac), and when it came to installing my new apps I decided I’d had enough of Adobe AIR and the whole idea of web apps pretending (poorly) to be native apps. I like OS X, and I want the full power of OS X in my apps. I also like how OS X apps all look and work similarly to each other. You just don’t get that with AIR apps like Twhirl (which had been my Twitter client up to that point). Not long before I got my new Mac listener Scott had contributed a short review of Syrinx to the NosillaCast, so I decided to give it a go.

I took and instant liking to the app because it’s a proper OS X app, because it uses the OS X keychain to securely save my password, and because it has Growl support. The fact that it’s free also helps of course! I’ve been using it for a month or so at this stage, and I’m still happy enough with it to keep it as my current client on all three of my Macs. It’s also under very active development at the moment with updates coming out regularly, so I have high hopes for this app’s future.

Read more

Tagged with:

Note: these instructions also work on OS X 10.6 Snow Leopard, and OS X 10.7 Lion

A few years ago I did a similar tutorial for installing mod_jk on OS X 10.4 Tiger, but yesterday I discovered that those instructions do not work for Leopard. It took my quite a bit of googling and trial an error, but I’ve found a solution that works, which I’m going to share here. This solution is, in my opinion, a best practices solution, and does not involve any changes to your core apache configuration file (httpd.conf). These instructions are for the default install of Apache 2.2 that comes pre-installed on OS X 10.5 Leopard. I can verify that these instructions work for Tomcat 5.0.30, but I would be 99% sure they should also work un-changed for Tomcat 5.5.X and Tomcat 6.0.X.

Read more

Tagged with:

As some of you probably know, I’m a long-time Thunderbird user, from back when it still had the cool blue Phoenix logo, and when what we now call FireFox had only just changed from being called Phoenix to FireBird. In other words, from when Mozilla still looked at BOTH their browser AND their mail client as being important products. Since those days I’ve watched in horror as Mozilla first neglected Thunderbird, and then abandoned it. While FireFox has gone from strength-to-strenght, Thunderbird has languished. The project was effectively thrown out of Mozilla and left to fend for itself. It also lost its lead author, and has stagnated. It’s a good mail client, but it’s behind the times. It’s missing simple features like a tabbed interface, and FireFox 3’s new, non-retarded, way of dealing with problem security certs. For all these reasons I was very excited to see the announcement of a beta version of Postbox this week. It’s a fork of Thunderbird being led by Thunderbird’s old lead, so in many ways, it’s a glimpse of where Thunderbird could have been, had it not been neglected by Mozilla. It definitely is a beta, but it’s a glimmer of hope at long-long-last!

Read more

Tagged with:

Update (18 June 2012) – A more up-to-date version of these scripts can now be found here.

My Myers Briggs personality profile insists that I “prefer economy of effort”, you can probably translate that to “is a lazy sod”. Because of this I like automating repetitive tasks. It all started when I wanted a quick and easy way to prepare my images for posting to my website. I wanted them resized with my URL and the Creative Commons icon added in, and I wanted to be able to process a whole directory of images in one go. I started by playing around with the GD libs in PHP, but soon realised it would be quicker and easier to use Perl to shell out to the command line tools from Image Magick. At the time I wrote a post on my choice to do this which also contained the initial code. That code has been expanded and evolved since, and now includes functions for rendering nice (in my opinion) borders and titles on my better images. If you want to see examples checkout the Photo of the Week category on this blog..

[tags]Perl, Image Magick, script, programming, image processing[/tags]

Read more

Tagged with:

FireBird becomes FireFoxI’ve been recommending FireFox for years now. In fact, I’ve been using it as my primary browser since it was called FireBird. It has been a more secure and a more feature-rich choice for years. (If you’re interested in the security aspects then you might enjoy reading a recent article I wrote for the International Mac Podcast blog comparing Safari and FireFox from a security point of view.) What got me hooked on FireBird was it’s plugin architecture. The idea of being able to customise my browser really appealed to me and as FireBird has grown into FireFox the list of available plugins has grown too. No other browser is as expandable as FireFox. If you can think of it, the chances are someone’s written a plugin for it!

However, FireFox has long suffered from two major shortcomings, memory leaks you could pilot a large ship through, and a non-native look. FireFox has been chewing up insane amounts of RAM for years, and has always looked like a fish out of water, particularly on OS X. These two problems are both fixed in FireFox 3 and if that was all they’d done I’d be recommending it highly, but they’ve done much more.

[tags]internet, browser, FireFox, FireFox 3[/tags]

Read more

Tagged with:

This week’s Leopard update from Apple sparked a thought in my head that’s been brewing for a while now. Three Dead Trolls in a Baggie seem to have been on to something when they sang Every OS Sucks a few years back (lyricsvideo).

[tags]Leopard, OS X, Mac, Apple, Vista, Microsoft, Linux, Three Dead Trolls and a Baggie[/tags]

Read more

Tagged with:

In my first article on simulating tilt-shift miniature faking with the GIMP I linked to instructions from Gimparoo!. Firstly, these instructions are no longer completely correct on the latest version of the GIMP because some of the menu sequences used have changed. Secondly, I’ve been looking at other sets of instructions on the web for doing this with PhotoShop and comparing them to the Gimparoo! instructions (particularly these instructions). What I’ve found is that the Gimparoo! instructions are not entirely complete so I’ve decided to write my own.

As usual I want to stress that I am not making any claims that these instructions are in any way definitive. There may well be WAY better ways of doing this. What I’m saying is that this is the best way I’ve found of doing it so far and that it works for me.

[tags]Tilt-shift Photography, Tilt-shift, photography, GIMP, miniature faking, photo editing[/tags]

Read more

Tagged with:

Tilt-Shift Photography With the GIMP

Filed Under Photography on April 14, 2008 | 3 Comments

Tilt-Shift photography is an interesting technique which can be used to make the real world look like a miniature model. The ‘right’ way to do it is with a special Tilt-Shift lens but they are not cheap. Hence, people have found ways of cheating by taking the shot with a regular lens and then adding in the Tilt-Shift effect later during post-processing. I found a nice tutorial for doing this with the GIMP today so I figured I’d give it a go.

Unfortunately it takes a certain kind of shot for this to work well and it turns out I don’t have any well-suited images in my library. I did find one shot that was close to what was needed so I had a go with that. The results aren’t great but I guess it gives some sort of idea of what I’m on about. I’m going to keep an eye out for opportunities for taking suitable shots and should I succeed I’ll post back with my results. In the mean time, here’s some examples of how it should be done.

Tilt-Shift example

Update (16 April 2008): I’ve created my own more current and more detailed tutorial here.

[tags]Tilt-Shift, Photography, GIMP[/tags]

Tagged with:

keep looking »