Author Archives: Paul

An administrative note

I don’t think anyone actually looks at these but, in the site menu here are a bunch of links to IBM i and Linux utilities that I have knocked together over the years. They are useful to me and may be useful to someone else at some point.

However, my habit of throwing each script into a seperate folder, and a seperate repository on GitHub has let to a bit of a mess of tiny repositories. So I have started thinking about consolidating these in the Towel repository (because it’s a tough universe out there).

So far Photog (a photo renaming utility) and killchar (a utility to strip annoying characters from file names) are in there. Others will follow as and when I find the time.

And then I will need to look at repairing or removing the links and static pages on this site.

flattr this!

Tsuro: The Game of the Path

Tsuro: The Game of the Path

Tsuro: The Game of the Path

This is a recent addition to our collection of board games, and a very good one. What is nice about Tsuro is that the gameplay is as simple, or as complex as the people playing the game.

The board is a 6×6 grid and the players each start with three tiles on which parts of a path are marked. You place a tile, move your stone to the end of the path and draw another tile. Once the path takes you off the board, you are out of the game. The aim, of course, is to be the last player left on the board and the strategy consists of trying to keep your own path going while forcing your opponents out of the game.

It’s a beautifully simple game and one that is very easy to pick up. It’s also a game for which, the more you play, the more complexity emerges. As such, it is one of the very few games that really does work for all ages from 8 (or 7, in out case) to adult.

Each individual game is pretty short – the game takes as long as it takes to place 35 tiles – but its sheer playability makes this a very addictive game. We have played several games already and I can see Tsuro being pulled out and played quite regularly over the next few years.

flattr this!

Quote of the Day: Immigration and health

In a spirit of helpfulness to our politicians, I suggest to them that one way to address the funding gap would be to welcome more migrants to our ageing country. Typically being younger than the indigenous population, they make many fewer demands on the health service. Migrants also contribute quite a lot more in tax than they take out in benefits; extra funds that could be spent on the NHS.

Andrew Rawnsley

flattr this!

Adding variables to ad-hoc SQL queries with REXX

It’s incredible how easily I can be distracted. All I needed was a quick and dirty way of capturing the input into an interface and now I’m writing a blog post.

Everything starts with an issue and, in this case, the issue is with an interface not behaving as expected in production even though everything works as expected in the test environment. My suspicion is that the incoming data is not correctly formatted, causing transactions to not meet the selection criteria. But to confirm this, I need to see exactly what is waiting to be processed when the interface runs.

Since this interface runs after the end of business I want to be able to submit an SQL query to capture the input data into a separate table so that I can see what was processed when I come in tomorrow morning. And, because much of this data is not destined to pass through the interface in question (this is why we have selection criteria) I want to be able to select today’s transactions for whatever the current value of today happens to be.

In a sane world, this would be a simple case of using the current date but in the real world there are still people using eight digit numbers to represent the date. This leads to some unwieldy date calculations in SQL which led me to wondering whether I could capture this in a variable to make things a bit more readable. It turns out I can, but not on the version of the IBM i operating system that I am currently using.

What really caught my eye at the above link however, was this:

but if “ad hoc sql + variables” is the thing you need, you should really try Rexx.

And I thought: “Rexx. That’s something I haven’t used since last century.”

Any excuse to download a couple of manuals is reasonable as far as I’m concerned, so off I went.

And here’s the script (library and table names have been changed):

datenow = DATE('S')
statement = 'insert into MYLIB/INPUTDATA' ,
            'select * from PRODLIB/INPUTDATA where dhdate =' datenow
address 'EXECSQL'
EXECSQL statement

The DATE function returns the current date and the 'S' option handily reformats it into an eight digit number (yyyymmdd). The address 'EXECSQL' statement handily points the subsequent commands to the SQL command environment and then it’s just a case of executing the statements I need to execute.

It all works very nicely indeed.

On a tangential note, I noticed that Rexx is also available in Arch. I may well install this sometime soon just to have a play around with the language.

flattr this!

My new favourite beer: Hercule Stout

Hercule Stout In my younger days my usual beer was stout. Guinness by default but I always preferred Murphy’s when I could find it. While I have retained a preference for darker beers, living in Belgium has led to my current tendency to go for Abbey and Trappist Dubbels. On Saturday, however, I discovered that Belgian stout is a thing.

While stocking up, I saw a crate of Hercule Stout sitting in the drink shop demanding that I pick it up. So pick it up I did and I took it home and (later) opened a bottle. It’s fantastic.

Hercule Stout is dark, creamy, smooth and everything I want from this type of beer. I will certainly be going back for more.

flattr this!

Sunday morning movie: Renegade!

Renegade has lost everything… all he has left is his Renegade underwear. Embarking on a quest to claim back what is rightfully his, he battles through dangerous lands to win back his wife from the evil Dr. Monocle.

Inspired by He-man, Harrison Ford, Paul Newman, 80′s Action figures and the childish desire to run around in your underwear pretending to be a superhero…welcome to the universe of Renegade. The story of a man who loses everything – his wife… erm, his clothes! Michael Cavanaugh & Kevin Van Witt’s short blends B-movie stereotypes, American Pulp Comic imagery and a bucket load of influences into a 4-minute narrative of riotous action.

From Short of the Week via io9.

flattr this!

Living it

Further to my earlier post, Luke makes a good point:

One thing I did notice is I am a lot less likely to be verbal about my beliefs or how I think life should be lived but am a lot more likely to act on those beliefs than I was when I was younger. Infact in the my 20s it was probably the opposite in that I’d have blathered on about what I believed but probably not acted in the corresponding way.

I think there is a lot of truth in this and, inevitably, it takes someone else to cut through my own verbiage. And maybe this is what it means to be middle-aged: being comfortable enough with my life that I am able to invest my time in living my values rather than wasting energy trying to push them onto others.

flattr this!

The world’s heaviest metal

compressorhead logo

No-one is more metal than Compressorhead

Stickboy (drums) was created to exacting specifications. 4 arms, 2 legs, 1 head, no brain. he plays a Pearl 14 piece kit with double kick. stickboy junior, the bastard child of an unknown mother takes control of the hihat shuffle. inception date 2007

Fingers (guitar) joined stickboy in 2009 and brings 78 purpose built fingers, enough to play the entire fret board and pluck.
Bones (bass) is the highest precision bass player in known existence, and the youngest member of the band. inception date 2012.

Stand aside meatbags. Oil is thicker than blood.

Via io9, who have found a whole lot more.

flattr this!