StepMania Heaven

StepMania Heaven
I'm a fan of StepMania, a free and open source dance game in the style of Dance Dance Revolution. For years I'd played with the soft plastic mats that tend to come with these games for home console systems. These are great for the starting player, and easily fold up for storage, but as one's dance moves become more dynamic and energetic, they rapidly start to crumple, crease, and slide.

For years, I'd dreamed about having a rigid dance platform. Last year, at Linux.conf.au, I was lucky enough to take home a plywood and cork tile homebrew creation, courtesy of Tamara Olliver, who constructed it as part of a talk at the conference. The mat worked pretty well, and I even added some retro buttons, but I had problems with it mis-firing. The mesh connectors would fray with heavy use, and then tend to stick together. I still had dreams of a metal dance mat, but the cost of shipping to Australia put these way out of the price range I was willing to spend on one.

Well, a couple of weeks ago, I found an eBay supplier who was selling metal dance mats in Australia, with a delivered cost of $150 after some creative investigation and use of the "best offer" button. The mats looked like they were clones of TX-1000 series. Having not seen an offer like this for years, I purchased two.

Now, the TX-1000 is the cheapest, nastiest metal dance mat one can find, and I knew this, but they still beat any soft mat one cares to play with. The original ones used tiles that would "float" on a bed of foam, with the corners removed and a heavy-duty bolt in each position, to ensure each pad couldn't move away from where it was supposed to be. This is similar to many arcade setups, and works pretty well. That meant that while all the components in these pads are cheap, but at least the engineering principle was sound. One could expect the tiles to last a couple of months before they needed to be replaced.

Of course, what I got was a cheap-and-nasty version of an already cheap-and-nasty pad. Rather than each pad having four bolts (a total of 24 in total), there are only four bolts on the entire board. Rather than the tiles "floating" on foam, they still have the foam underneath, but each tile is now supported on three edges by the side of the dance platform, and internal supports. The pads tiles now flex to make contact with the underlying sensor.

At first, this doesn't sound too bad, until I tell you that the tiles are acrylic, which is not an impact resistant material. Because the tiles are now flexing, their lifespan goes from months down to days.

So, I now own two awesome metal dance mats, each one with a number of not-so-awesome broken tiles. This isn't as big a deal as one may think, the tiles have a rubber underlay that holds them together, so the dance mat still continues to work more-or-less as before. However the nice 'foot-feel' is impaired, and with enough damage, they tiles may actually become unusable.

I'm not too upset about this. For $150 a mat, I didn't expect a first-class dancing platform, and the mats are extremely easy to service; the tiles are easily removed and replaced, and the electronics are simple to get to. So, I'm looking to replace each tile with polycarbonate, also known as bulletproof glass. There are some fun acrylic vs polycarbonate videos that demonstrate the difference in impact resistance, and I'm pretty sure that polycarb will be tough enough for what I need.

I've found a supplier, but unfortunately polycarb seems to come in a standard engineering size of 1.2 x 2.4m, which is about three times what I need. If I had six dance mats, or could just pay for the materials I need, then each tile comes to about $6 each, including professional cutting, which I think is a great deal. I'm calling around to see if I can find a supplier who's got an off-cut, or maybe a salvage yard that has some odds and ends.

To complete my StepMania setup, yesterday was spent modding furniture. Our lounge-room AV cabinet would fit our old CRT television, but not the new Plasma TV that Jacinta won at the Open Source Developers Conference last year, and as such the new TV has mostly been sitting in storage. After some discussions on the best way to succeed, and with the help of a new electric jig-saw, the TV cavity in the cabinet was enlarged, the ends painted, and the new TV fitted. Jacinta did all the hard cutting, since she actually has wood-working experience, and I don't.

The new set-up is so much nicer than previously. The TV takes inputs from just about anything, and forwards its audio to the stereo, so there's much less futzing around with splitter boxes. It also takes an analogue VGA input, and while my laptop's analogue VGA doesn't seem to want to talk to anything else, it loves talking to the TV. As such, the laptop has been spending a lot of time connected, with StepMania being played, or media being watched.

My only problem is that I feel sad when disconnecting the laptop. My lounge-room changes from a totally awesome StepMania and gaming heaven into just a lounge-room, with just a TV. I think now is the time to finally put together a dedicated MythTV box. My plan is to convince Jacinta that she wants a new laptop, since her old laptop is showing signs of stress on the internal VGA cabling, it's the prime candidate for being re-purposed.

So, if you happen to be in Melbourne, and have a source of 2-3mm polycarbonate, or feel like showing me your awesome dance moves, now's a good time to visit. ;)

(read more...)

autodie 1.999_01 (beta) released

autodie 1.999_01 (beta) released
Today I decided to hack code while sitting under a tree, along the beautiful banks of the Merri Creek. I promised myself that I'd make a dev release of autodie before I finished for the day. Since I had forgotten to bring a cushion, autodie 1.999_01 will be remembered as my first release made due to me having an overly sore butt.

The new version of autodie is a dev release, which in any other language means "beta". It won't get installed by default with the CPAN installer, but you can download it manually and play with it. The hinting interface is there, and while it may have a few rough corners, it's pretty much all working.

To release autodie 2.0, I need to walk through the source and tidy up a number of TODOs (there are lots of these), check the documentation is correct (the hinting interface has changed a little since the docs were written), and add a few more test cases. Patches are welcome for any of these, and best made via github (fork the repo and check out the hints branch), although any form of patch is welcome.

(read more...)

Perl for Geoscience

Perl for Geoscience
Traditionally our Perl courses have been targeted at people who work with computers as a job. Developers, software QA, sysadmins, database admins (DBAs), and the like. However, recently I've noticed a sharp increase in course bookings from people who don't have computers as their primary job. In particular, we've been seeing a lot of bookings from people who work in geoscience, and hydrology in particular. These bookings aren't just from within Australia, I'm seeing international interest as well.

It seems that Perl has gained a reputation as being a good cross-platform language for when you have a big hunk of data in one format, and you need to get that data into another format. Geoscience folks deal with lots of data, and they seem to be perpetually massaging it (often by hand, or in a spreadsheet) to get it into the format they need.

Perl is certainly well-suited for this task, and people learning Perl for the purposes of data transformation have been a mainstay on our courses since we first started running them. However I've found our new wave of interest particularly challenging to teach. They don't have any programming backgrounds, so I can't draw analogies to other languages, or even assume they'd know why subroutines are a good idea. They may have never used a command-line before, so the concept of providing command-line arguments is completely foreign. Even the way they think about data is different; for many students in my last class, the idea of hierarchical data (such as a tree) was a completely new concept; in their world, data had always been tabular in nature.

I'm thrilled that I'm able to teach people new skills, and I'm sure some of the students from my classes will be going back to their workplaces and replacing some of their colleagues with very small Perl scripts. However I'm deeply worried that their understanding will be too incomplete. I teach a very modern Perl course, with a lot of focus on best practices, maintainability, validation, and theory. While I know some of my students can grasp this a little, others are still struggling with consistent indentation, and can't grok the long-term concepts at all. I fear they'll under-use the CPAN, reinvent the wheel, copy-and-paste from bad examples, fail to use revision control, fail to document their code, pile on technical debt, and do all the other things that inexperienced programmers do.

I don't know what to do about this. For this group of people, I think I'd get great feedback (and more bookings and money!) if I taught a class that focused on short-cuts and quick'n'dirty programming, since my students can grasp those short-term gains; they can't as easily grasp the long-term ones of maintainability, testing, source control, and correctness. One could argue those long-term goals aren't important for my new clients, since they're writing code for "once-off" tasks, but as most of us know, there's an awful lot of once-off code that's still being used decades after it was written. I feel the concepts of code quality and maintainability are more important for inexperienced programmers than anyone else, since they're the ones most likely to make these mistakes. I'd rather not teach at all than teach bad practices.

I think we'll probably extend our most popular course to five days, and slow down the material; I've got enough cool bonus material to fill an extra day if we have a class of more computer-oriented students. I've also found myself dropping entirely some of the more foreign concepts like pipes, buffering, file locking, and running external commands; students can look these up if they ever need them.

What I really wish I could do is sit down with my new classes for a week and teach them basic programming and computer science concepts, preferably without computers getting involved at all.

(read more...)

The social life of a Perl trainer

The social life of a Perl trainer
I'm blogging every week about Perl, not least due to the presence of a competition that encourages me to do so. However this week I'm not dealing with technical matters, I'm dealing with personal and social ones.

There's a common perception that I have a massively social job. I travel around the world and teach people Perl. I speak at many conferences each year. I attend a multitude of user-groups. Sometimes I do consulting, and when I do, the things I'm fixing are often people related: internal education, politics, and culture. In any given year I meet work closely with hundreds of new people. People are my life and my job.

Despite that, sometimes it feels very lonely.

The problem isn't with the quantity of people I meet, but the quality of my relationships with them. When I meet course attendees we spend a lot of time together, but it's one-to-many time. At conferences I have more quality social time, but it's only for a couple of days, and my talk preparations often get in the way. Often there are so many people at conferences I want to meet or catch up with that I only spend at most a few hours with each person, regardless of how much I like them.

Due to my lifestyle, I meet many wonderful people who I would love to spend more time with. The problem is that so many of them live in other cities, or other countries, or have travelling or lifestyle schedules similar to me. In fact, my travel schedule can really screw things up. Last night there was a gathering of four of my most favourite people in the whole world, and in my home town. I wasn't there, because I was on an yet another airplane.

Back when I had a "real job", or even when I did regular consulting, I didn't have these problems. I'd see the same people each week at work. I'd go to the same places for lunch. There'd be regular social activities that I could attend, because I wasn't changing city every week. While having a regular job may not help with the breadth of friendships, it certainly helps with the depth of them.

I've been teaching and living this lifestyle for many years, so why am I noticing this just now? Well, it's partially because I'm so busy right now. The global financial crisis has kicked our business into overdrive. A combination of hiring-freezes, and the need to do more with less, has caused Perl courses and consulting to be very popular. Sometimes I joke about being in a different city every week, but recently it's been the norm.

However the big wake-up was that how I've been associating with my students has changed. Years ago they were learning Perl because it was cool, and fun, and because doing things in Perl was so much easier than doing things in almost any other language. Those students were were bright, eager to learn, and full of questions. That almost always meant that I got along extremely well with them socially, as well as academically. These days we still get those students, but many people are on our courses because programming is their job, not their passion. They don't always self-identify as geeks, and I find that I have an awkward time relating to them socially.

Having good students is one of the most rewarding parts of being a teacher, and is what got me hooked on teaching before I even graduated from University. I'm unlikely to give up the teaching any time soon; I enjoy the travel, the freedom, and it's certainly hard to argue with the money, but I do find that ephemeral socialisation is really starting to tick me off. Sometimes I wonder if I should actually go back and teach at University, purely for the social highs associated with doing so.

(read more...)

autodie status update

autodie status update
I just looked through my blog history, and discovered the last release of autodie, I've blogged about was version 1.99! Since then, there's been nine releases! For those of you new to my blog, autodie is a lexical pragma that allows Perl's built-ins to throw exceptions on failure, which can take your error-handling from cumbersome to simple.

There's been a lot of changes in those nine releases, and the Changes file documents all the significant ones. There are nicer error messages, better coverage of Perl's core functions, fewer rough edges, and lots more tests. If you're not one to go reading Changes files, I can assure you that upgrading to 1.999 is pleasant and surprise-free.

I've had a few people tease me about the silly version number, 1.999 threatens to have 1.9991 as a next release, but this will not happen. The next version of autodie will be 2.000, and this actually represents a significant change. There's no backwardly incompatible changes, but there is a new feature which greatly extends autodie's ability to detect failures in non-core subroutines.

Presently, one can write:

(read more...)

Bitcoin QR code This site is ad-free, and all text, style, and code may be re-used under a Creative Commons Attribution 3.0 license. If like what I do, please consider supporting me on Patreon, or donating via Bitcoin (1P9iGHMiQwRrnZuA6USp5PNSuJrEcH411f).