Until Crypt::HSXKPasswd comes out of beta, I’m not going to upload it to CPAN, so until then, the betas need to be manually installed. You can get the latest release of the library by downloading the appropriate .tar.gz file from GitHub.

For Perl regulars, the process is likely to be familiar, because the module is packaged using the very popular Module::Build. The process is quite straight forward, but there are a few potential pitfalls for the uninitiated.

For quick reference, here are the commands needed to install the module:

perl Build.PL
sudo ./Build installdeps
./Build
./Build test
sudo ./Build install

Read more

Tagged with:

It’s been a while since I released a new version of XKPasswd.pm, the open source Perl module that powers the secure memorable password generator at www.xkpasswd.net. The main reason for the big gap is that I needed to learn some new skills to get the code to where I wanted it to be. There were three main problems I wanted solved:

  1. To get wide adoption, the Module needs to be available via CPAN
  2. The module needs unicode support to deal with non-English languages
  3. It needs to be easy to edit and tweak a config with the www.xkpasswd.net web interface, and then use it in your scripts.

While solving those problems, I also took the opportunity to tidy up some other odds and ends in the code base. It’s not that code was broken, it just that a few parts of it had a bit of a fishy smell – it seemed like there was probably a better way to do that, and there was!

So, here’s a summary of what’s changed from the the point of view of a user of the Module:

  • The Packaging – the module has a new name, and is now packaged with Module::Build, so it’s easier to install, and ready for distribution via CPAN.
  • Unicode Support – if it’s a unicode character, you can use it while generating passwords.
  • Redesigned Word Sources – more bundled with the module, and easier to create your own.
  • Redesigned Sources of Randomness – more bundled with the module, a better default, and easier to create you own.
  • A switch to Named Arguments (in both the constructor and functional interface).

I’ve put a lot of time and effort into developing this entirely free and open source module. If you find it useful, please consider making a donation:

*Download Beta of Crypt::HSXKPasswd via GitHub*

Read more

Tagged with:

I spent of a bit of time tweaking my server backup script this week, and figured there was no reason not to share it with others. This is not the be-all-and-end-all of backup scripts, or the most flexible backup script in the world, it does what I need from a backup script, and nothing more or less! It might meet your needs, or, more likely, it might make a useful starting point for a script that meets your exact needs.

You’ll find the code and the documentation over on my GitHub account.

Tagged with:

I’ve just completely re-skinned my IP subnet calculator over at www.subnetcalc.it, hopefully making it much easier on the eye. The original skin was basically the same as the one I used for XKPasswd which is fixed-width and hence very old fashioned. The biggest problem with a fixed-width design is that it doesn’t work well on either large or small screens, which is almost everyone these days!

The new skin is variable-width, so it should scale much better for people. Assuming people like this basic style, my plan is to migrate www.XKPasswd.net to this same basic design. In effect I’m using this new site to beta-test some ideas for XKPasswd.

I’d love to hear any constructive feedback people have.

Tagged with:

Taming the TerminalI’ve not been happy with any of the free subnet calculators I’ve found online, and that came to a head when I was looking for something I could feel happy recommending within the Taming the Terminal series. The great thing about being able to code is that you can scratch your own itch!

The calculator I’ve written is primarily designed around expanding out the network information users will find in the Windows Control Panel, OS X System Preferences, or from terminal commands like ipconfig (Windows) and ifconfig (Linux, Unix, OS X). It’s not realistic to expect users to convert netmasks from one notation to another, so the calculator is very liberal in the netmasks it accepts.

The secondary audience for the calculator is students and anyone else interested in understanding the math behind IP subnets. To that end there is button that will expand the interface out to show the binary calculations being carried out under the hood.

Check it out at: www.SubnetCalc.it

This is a very new site, so I’m definitely open to constructive criticism, but please bear in mind the target audience is home users, not IT Pros, so I’m going to be very reluctant to follow through with any suggestions to add more complication to the interface.

I started this project by developing a set of JavaScript classes for representing and manipulating IP addresses, Netmasks, and IP Subnets. I’ve released that library under a BSD license over on my GitHub page – bartificer.ip.js.

Tagged with:

It’s hard to believe, but it’s been nearly three years since I released my first attempt at a Perl library for generating secure memorable passwords. The original spark of inspiration came when Steve Gibson released and talked about his Password Haystacks page at around the same time as the now famous correct horse battery staple XKCD comic was released. Take the idea of using words as the basis for passwords from XKCD, add computers to introduce real randomness (we humans are terrible at being random), and season with come well-chosen and intuitively placed symbols and digits to increase the size of your haystack, and voila, passwords are are both human-friendly and secure!

The first version of the library worked, as evidenced by it’s years of service powering www.xkpasswd.net. That’s not a bad start. But, it was a first attempt at solving the problem, and, I was still a Perl padawan back then. Some of my early design decisions resulted in a less than ideal API making the library a lot less developer-friendly than it could have been, and I’ve learned a lot about Perl, and Perl best practices since 2011!

I’ve spent the past half year or so re-implementing the same basic idea from scratch. In terms of functionality very little has changed, there are a few additions, but the big change is in the API. Basically, the old API was a mess – you needed one config hashref to instantiate the object, then a different config hashref to call the password generation function. Nonsense! That’s not intuitive, not obvious, and not efficient! The new API allows you to achieve the same result with less code, and the code you will have will be easier to read and understand.

You’ll find the project page for the new library at the link below – this page provides links for downloading the code, and links to the module’s very detailed documentation.

XKPasswd 2 Project Page (http://bartb.ie/xkpasswd)

Read more

Tagged with:

Big Changes on this Site

Filed Under Computers & Tech, My Projects on August 9, 2014 | 1 Comment

This site started life in the early 2000s as a pure blog powered by the Serendipity blogging engine and hosted on free shared hosting provided by MiNDS>, the IT society of Maynooth University, where I was a researcher in the Computer Science department at the time. The first big change came in the summer of 2006 when I moved the blog from MiNDS> to this domain. As well as moving the blog, I also moved my personal website, though the two remained separate entities which I had to mange separately. While moving the blog I took the opportunity to change blogging engines from Serendipity to WordPress. This was an early version of WordPress, so its evolution from blogging engine to content management system (or CMS) still had a long way to go (arguably it still does). As WordPress’s pages feature evolved, I eventually did away with the standalone site, adding just a handful of pages into WordPress. At that point WordPress became my entire website. It was a viable solution because I really just needed a few simple ‘about the stuff I do’ pages, and the blog.

This month, while preparing for the release of the new version of my XKPasswd open source library, I realised that I needed more from this site. While the blog is still important, and will continue to contain most of the information hosted on the site, it won’t be the view though which most of that information will be accessed. A reverse-chronological list of all posts on all topics is not actually an optimal way of presenting content! This site serves as the anchor of my online presence simple because this is the URL I give out when ever I’m asked where people can find me online. I sometimes wonder if podcast listeners aren’t starting to think that Busschots is just my middle name, and that from bartb.ie is actually my surname! This site has not been a particularly good home page, not because there isn’t useful content, but because it’s been ineffectively presented.

Read more

Tagged with:

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:

Inspired by a recent episode of The Mac Cast I decided to see if I could come up with a simple way of getting a word count of a PDF on OS X using only tools that come standard with the OS.

Because of OS X’s Unix underpinnings, all Macs have access to the Unix wc command which calculates word counts on given input. OS X also has a handy built in Terminal command to access the contents of the clipboard (pbpaste). This leads to an obvious simple manual solution:

  1. Open the PDF in Preview
  2. Select All Text
  3. Copy to clipboard
  4. Run the Terminal command: pbpaste | wc -w

This is a bit cumbersome though, so I went on to create a simple OS X Service to calculate the word count of any selectable text in any app (the fact that this is even possible, let alone easy, is why I love OS X).

For those of you just looking for a copy of the Service, you can download it here:

Download

To install the service simply extract the automator file from the ZIP archive and copy it into either the Library/Services folder in your home directory, or the system-wide service folder /Library/Services.

Once the Service is installed you can use it in almost any OS X app (specifically in any app written using the standard Cocoa libraries) by selecting some text, right-clicking on it, and selecting the Word Count service:

Right Click Selected Text to Invoke the Service

When done the results will look something like this:

Sample Output

Those of you who want to see how easy this Service was to write, read on and I’ll walk you through it.

Read more

Tagged with:

Thanks Tim

Filed Under My Projects, Computers & Tech on May 18, 2013 | 5 Comments

Tim VerpoortenThis is not going to be an easy post to write, and I really hope I do it justice.

The Apple/Mac community lost one of it’s finest podcasters today. Tim Verpoorten wasn’t the first Apple/Mac podcaster, but he was one of the very earliest generation. I think it would be fair to call him a father figure to many of us who followed. I know he was one of the podcasters who inspired me to pick up the microphone myself, and I doubt I’m alone in that.

Tim had been unwell for some time, and hung up his microphone to concentrate on his health a while ago, but we all hoped it would just be a temporary hiatus. I don’t think any of us in the community wanted to believe we’d heard the last of Tim’s distinctive and friendly voice.

Every good Apple/Mac podcast brings something unique to the table, and Tim’s Mac Review Cast brought fantastic reviews week after week after week for years and years. Tim had a knack for finding great apps, particularly free ones, and he was able to find and review them at a truly impressive rate. Most people can mange either quantity or quality, but Tim could do both at the same time. Although he reviewed many many apps, you could always tell when an app really appealed to him. Those apps were almost never large apps with lots of features, but small apps that did just one thing, but did it really well. It’s fair to say Tim had a bit of a thing for menubar apps.

Because I learned about so many great apps on the Mac Review Cast, I regularly look up at my menu bar, or into my dock, and think of Tim. One app in particular that I’ll always associate with him is the light-weight Mac-like text editor Smultron. I’d almost given up on finding an editor like this for the Mac, when I heard Tim review Smultron, and gave it a go. It was love at first sight, and that cute red strawberry icon will always bring back fond memories of Tim.

Tim was one of the founders of the Mac Round Table Podcast (MRT), and it was through that podcast that I was fortunate enough to get to ‘work’ (play more like) with Tim. One of the great things about the MRT is how different all the contributors are, and how that opens up some great conversations. We often agreed on things, but when it comes to temperament, I think myself and Tim were polar opposites – I’m know for being the cranky Irishman (sorta) who’s prone to impassioned (and hopefully entertaining) rants, while Tim was always as cool as a cucumber – I can’t remember him ever getting flapped, and I can’t remember him ever having a bad word to say about anyone. I think it’s much easier to go on a rant than it is to remain calm and collected, and I greatly admired Tim’s coolness.

I never met Tim in the real world, yet I feel I’ve lost a friend. The Mac community has certainly lost one of it’s finest ambassadors, but my thoughts are with the Verpoorten family tonight – their loss is so much greater than ours.

The photo that accompanies this post is a crop from this image by Allison Sheridan.

Tagged with:

« go backkeep looking »