Saturday, 26 June 2010

The Plain of Wec


So, the other week I wrote me a game in perl. Its a thrilling board-based turn-based strategy game where you must defeat a super-intelligent AI player. You enter co-ordinates to build up things that explode and by building up loads of things you can set up devastating chain reactions.

You can download it from SourceForge here.

As its in perl you might have to install some kind of software to run it on your computer, my operating system is Ubuntu and it comes with perl preinstalled, but on Windows computers try Strawberry perl.

I find the game fiendishly addictive, and I'm forever coming up with new strategies to defeat my computer foe, and then tweaks to the computer's AI to make it even harder.

My record is defeating the computer in 119 turns.

Can you beat that?

Monday, 21 June 2010

Last Night From Glasgow: The Movie

Almost Famous was on TV again last night, I love that film, it brings back memories of when I was a music journalist for The Strathclyde Telegraph the internationally-acclaimed student newspaper. I was there back stage with all the best bands of the era, Idlewild, Soulwax, Toploader, Queen Adreena and the mighty Animal House, poised with a dictaphone and notepad. Whilst it was fun there and then, I don't recall if any of my interviews and writings were ever published.

When it came to writing up my notes I just couldn't come up with anything that I thought people would want to read.

Sure I can write "The Crazy Adventures of when Chris Gilmour met Meg White at a Soledad Brothers gig" but its hardly a compelling piece about either of the bands.

But every time I watch Almost Famous, I feel that urge, that calling to envisage what my movie would be like, what scenes would stand out. Not the mainstream bands of the day as previously mentioned, but those smaller bands that I've followed religiously.

Because all it would be would be a series of scenes strung together, without any story or plot as such, maybe a bit of narration and fourth wall breaks explaining the Pete Frame-like rock family tree links between bands.


GLASGOW INDIE EYESPY: THE MOVIE

01 Int: 13th Note basement, Glasgow
Hector Collectors on stage (drummer from Camera Obscura, bass player from Dananananaykroyd, guitarist from Just Joans)
Adam Smith meets 'Craig' as the first person to come to a show who isn't a school friend or family, Craig downloaded a song from the internet (AudioGalaxy) and thought he'd come down, in effect, their first fan.
video link

02 Int: Cottiers Theatre
Camera Obscura gig, 'Craig' notices people in crowd from Hector Collectors. Also Bowlie internet messageboard people
video link

03 Int: Strathclyde university students Union, Glasgow
Plimptons at the games room bar, Adam and Martin recruit 'Craig' as their manager, all parties are pretty clueless as to what this involves

04 Int: Woodside Social Club, Glasgow
At National Pop Winchester League Club night, Gav from Camera Obscura and The Hector Collectors plays the first Plimptons single, crowd includes Franz Ferdinand's Alex Kapranos who starts tapping his foot, and Belle and Sebastian.

04.1 Int: Craig's bedroom
After spending days hunched over his computer rigging a vote on the BBC website The Plimptons single wins record of the week or something, beating another called Glasvegas who later go on to have a number one album.
video link

05 Int: Starka, Motherwell
Plimptons album launch, They sell lots of copies to friends and family. MJ Hibbett is the support act, Adam introduces him to 'Craig'

06 Int: Cavern, Liverpool
The Cardiff Loves are on stage. 'Craig' has driven down to see them, as Simon Love introduces the band and something about a Peel session, 'Craig' gives them the evils.

07 Int: Nice n Sleazy, Glasgow
'Craig' takes to the stage at the packed acoustic open mic night, straps on the guitar, tries to play one of his own compositions and shits a brick

08 Int: Pleasure Unit, London
Gresham Flyers play the Bowlie Alldayer, 'Craig' has used his well leet internet powers to wrangle himself a slot at the Bowlie internet messageboard's all day gig thing. 'Craig' takes to the stage, launches into one of his own composition, goes down like a turd birthday cake

09 Int: 'Craig's bedroom
Craig hunched over his computer and printer, churning out copies of the Glasgow Indie Eyespy fanzine (Glasgow Indie Eyespy was a celebrity and scenester spotting game, you got points depending on who you'd scene)

10 Ext: Botanic Gardens
Big Belle and Sebastian gig, with people in the crowd playing Glasgow Indie Eye Spy
video link video link

11 Int: Woodside Social Club
Bowlie takes over, people still playing Glasgow Indie Eyespy

12 Int: Students union, Edinburgh
Data Panik on stage, Plimps back stage, Adam introduces Craig to Dave JJoans, who hands over demo tape

13 Ext: Motorway - night
Craig driving,pulls over to listen to JJoans demo

14 Int: Tchai Ovna, Glasgow
JJoans album launch gig, Craig selling caseloads of the album
video link

15 Int: 13th Note
A promoter (JohnDMc) offers Plimps and Craig the Woodside for a night

16 Ext: Glasgow
Putting up posters all over town for Plimptons club night

17 Int: Woodside Social Club
MJ Hibbett on stage, three people in the crowd, 'Craig' stood at door looking sheepish

18 Int: 13th Note basement
The London Loves on stage (Pnos no longer in the band), Plimps, JJoanses and 'Craig' in crowd

19 Int: 'Craig's Bedroom
Montage of Last Night From Glasgow webcasts with various bands playing in 'Craig's bedroom
video link

20 Ext: Glasgow
Craig and bands getting drunk round town during the day

21 Int: Cottiers - night
Band formerly from Last Night From Glasgow now on stage.

22 Int: 'Craig's bedroom - night
Something on computer screen, 'Craig' necking bottle of vodka

23 Ext: motorway - day
'Craig' driving, bottle of vodka by his side
video link

24 Ext: Ditch by motorway - day
'Craig' wakes up in drivers seat, car has drifted off road

25 Ext: Buffalo Bar, London - evening
People queuing up, 'Craig' drives past

27 Int: Buffalo Bar
The London Loves on stage, people in crowd, 'Craig' stood at back, weeping
video link

Its not much of a story, but it has its moments. I dunno whether to include things with girlfriends, that's too personal, but would make some of scenes thread together better. And should I include The Owsley Sunshine? Or would they be superfluous to the story?

Or even, should I just scratch out all the real bands and use made-up ones like Stillwater and Humble Pie?

Sunday, 20 June 2010

Doctor Who's Pandorica

For half the episode I was convinced that the Pandorica was going to turn out to be the Tardis in bootstrap mode. When River Song was trapped in it, and trying to get out at at the same time as the Pandorica was starting to open, it would almost make sense to have her tumble out.

The alliance of Doctor Who's enemies has been done before, many times, for example The Dalek's Master Plan and that crap Children in Need 3D special from 1993. I always think its corny and unrealistic in the great scheme of intergalactic diplomacy, then again, we have The Quartet dealing with Israel in real life so maybe.

Anyhoo, elsewhere on the internet people are moaning about Doctor Who being a monster of the week, magic reset button, doesn't have to make sense kind of program. Is it possible for the produces to buck the trend and change things?

Could The Doctor really spend the next episode and maybe the entire next series and possibly 2,000 years of storytime locked in a box? Maybe He's been rapidly aged a couple of times before, so maybe they could just lock the Pandorica and then open it again in the present day and out he steps without missing a beat.

Could it be setting up the Doctor to do the next series without a Tardis? For years during Pertwee's reign as the Doctor, the Tardis didn't work, it was just part of the set in UNIT's HQ.

Why does the voice saying 'silence must fall' sound like Davros? That doesn't quite make sense, cos he'd be well up for the destruction of the universe, likewise with The Master, that's all they're ever after these days,

Actually that does make me a little sad, each series of the new Doctor Who, seems to end with a plot or a scheme to destroy the earth, the human race, the galaxy, the universe or all of reality itself, its kind of small minded and does away with a rich tapestry of potential story ideas. Like the old two factions of Daleks at war with each other, regardless of the Doctor, whereby Earth was just an incidental theatre. Even the serial/movie of The Dalek Invasion of Earth was about turning the earth into a spaceship and driving across the universe in search of new adventures.

I think its the way the stories in Doctor Who now revolve around the Doctor being the centre of the universe, rather than just him being a small man resolving the problems of the universe a small step at a time.

Even the Dalek's obsession with the Doctor seems a bit irrational considering how big the universe is, couldn't they just avoid him?

So, what happens in next week's episode?

Doctor escapes for the Pandorica when no one's looking using some kind of nutella-based eye-lasers, uses some kind of teleporter made out of custard-creams to swap River Song and the not quite dead yet Milly Pond. She spills custard and fish fingers on the Tardis, causing it to go back to the start of the universe, whereupon it explodes. The Tardis is the big bang. Doctor gets stabbed by a melting plastic Roman Legionnaire, and regenerates to become River Song. The two identical River Songs make out for a while, whilst timey wimey yellow energy anally rapes them like tentacle porn, eventually spunking custard and the two of them merge together like that time at the end of Logopolis when Tom Baker makes out with the mysterious figure in white and became Peter Davison, but this time for confectionery-based reasons they regenerate back into Matt Smith's Doctor.

A naked, but very much alive Rory is pulled out of a pool of melty plastic, and joins the doctor for a very homoerotic next series.

Saturday, 19 June 2010

Hating Ruby on Rails so much

I have nailed Python, and hammered perl, I am the coding ninja!. Its taken me about a fortnight from getting the O'Reilly book to churning out addictive turn-based strategy games and personal finance suites in perl.

I ordered Ruby on Rails for Dummies, and waited patiently. Fate smiled on me and allowed me to have plenty of free time to get my teeth into it and so this morning I set forth on what I hoped would be an exciting new adventure in programming.

No such sodding luck.

Fucking hell, Barry Burd, author of Ruby on Rails for Dummies is a cunt.

I have spent all day wading through the first few chapters installing and trying to install all the various packages and tools and vaguely related stuff to get Ruby on Rails working and its pissing me off so much I might have to rip my wee netbook in half, chuck it in the garden, go to my storage locker get a pick axe, return to my garden and annihilate my netbook.

These are the 'tarded things I have to install
  • Ruby
  • Rails
  • Java
  • RadRails
  • Aptana Studio
  • Git
  • Curl
  • Bash
  • RubyGem
  • MySfuckingQL
  • MySQL cunting cock nipples Administrator
All for whatever damned variety of Ubuntu my netbook is chuffing away at.

Fourteen hours I've been at it. Fourteen hours with just a brief break for Doctor Who.

Every sodding page of the damned book refers me to 'the book's website' which just so happens to be the author's personal website, which looks like it hasn't been updated since '92.

Look, I know that Ruby is a dynamically typed interpreted reflective object-orientated language, but its a cunt to install.

With perl, I was churning out the first beta release of my accounting software by now, and had finally figured out how I could have written a spider to rip the entire Bowlie archive.

But with Ruby on the shit-eating Rails, I am shouting at the screen and hacking at the damned book with a kitchen knife.

You hear me For Dummies publisher John Wiley & Sons, that's it, you've lost yourself a customer, never again am I going to buy any of your books again, its O'Reilly for me from now on!

Tuesday, 15 June 2010

What the fuck am I supposed to do?

I shocked myself at the weekend.

At Ken Chu's birthday drinking and football watching session at a pub in Finsbury, at some point in the afternoon I found myself sat at a table in the middle of a busy drinking hall, strangers bustling all around. The table housed some of Ken's received gifts, pool cues and cards. There was only me and another friend of Ken's left at the table, other folk had wandered off to the beer garden or headed home.

The other chap mentioned that he wished to leave, so it wold just be up to me to guard the table, to save it for the return of the party, but before he headed home he would seek out the folk in the beer garden.

For a few minutes I was alone, guarding treasure, fending off advances. "Is there anyone sitting here?", "sorry... folk in the beer garden... Cigarettes... Will be back soon..." Sympathetic nods followed by suspicious glares.

The other chap returned and said he was leaving, just as another mob of people looking for seats appeared.

"What the fuck am I supposed to do?" I asked, standing and leaning across at him.

One of the crowd saw me and said it was okay, they were friends of Ken, we'd met an hour or so ago.

I seated myself and looked sheeping.

I felt a little sick, the bubbling bile of rage that prompted me to ask "What the fuck am I supposed to do?" it wasn't a pretty thing, I am a dispicable and cowardly person.

There rest of the afternoon and evening passed without incident.

Anyhoo, today I had another "what the fuck am I supposed to do?" Incident. At my temp job a few people are on holiday, others work in several different offices. There were only two of us in this morning, the guy who knows the job and me. He was called up to go out to the other office, leaving just me.

After a few moments of twiddling my thumbs checking there was no paperwork or filing to do, I got up for a wander and discovered to my terror, that not only was I the only person in the office, I was the only person on site.

"What the fuck am I supposed to do?"

I suppressed the bile and the outrage of being left in such a position this time.

And what I did was this:-
*Planned out a strategy game in perl on paper
*Used my digital camera to shoot a short post-apocalyptic horror movie set in a construction depot and portacabin office complex
*Wrote the narative intro for the aforementioned perl game
*Made a stop-motion animation of the stuff on my desk coming alive and taking over

Not quite what I was supposed to do I guess, but kind of productive.
Sent using BlackBerry® from Orange

Monday, 14 June 2010

Taxpayer hours 2010

Yes, I know the government are soon to announce the emergency budget with its inherent tax rises and spending cuts. But to help you rationalise the figures, the millions and billions of pounds, I've done some sums.
  • Median weekly income these days is about £497
  • Tax freedom day was 30th May
  • That's about 41% through the year
Therefore:-
  • One taxpayer hour is £5.10
  • One taxpayer week is £204
  • One taxpayer year is £10,600

So when the government spends £1,000,000, it takes about 94 people working for a year.

Thrilling stuff, I'm sure you agree.

Sunday, 13 June 2010

Personal Finance in Perl: part 2

As mentioned last week, I've decided to exercise my mad leet perl skillz by writing my own personal finance software, and in the absence of feeling free to blog about anything else, I thought I'd share it with you.

It works by carrying out various neat filtery things on a a ledger which you enter all you financial transactions into. This is the bit of code for entering transactions into the ledger.

sub enteringTransactions {
$transaction_date = "01/01/2000";
$transaction_account = "dummy";
$transaction_value = "9999";
$transaction_payee = "dummy";
$transaction_category = "dummy";
$notes = "dummy dummy";
&bar;
print " Entering transactions\n";
&bar;
print "Please enter the date of the transaction dd/mm/yyyy:- ";
chomp($trans_date = );
@transaction_date = split /\//, $trans_date;
$trans_day = $transaction_date[0]*1;
$trans_month = $transaction_date[1]*1;
$trans_year = $transaction_date[2]*1;
$ninday = $trans_day+($trans_month*31)+($trans_year*12*31);
print "Please enter account name (cash, hsbc or credit):- ";
chomp($transaction_account = );
print "Please enter value (xx.xx):- ";
chomp($transaction_value = );
print "Please enter payee:- ";
chomp($transaction_payee = );
print "Please enter category:- ";
chomp($transaction_category = );
print "$trans_day/$trans_month/$trans_year\t$transaction_account\t$transaction_value\t$transaction_payee\t$transaction_category\n";
$entry_time = time;
my $filename = "chriscounts.poo";
open LOG, ">>", $filename or die "Can't open '$filename': $!";
print LOG "$entry_time, $trans_day, $trans_month, $trans_year, $ninday, $transaction_account, $transaction_value, $transaction_category, $transaction_payee, $notes\n";
close LOG;
print "Transaction logged\n"};

The ledger is a file called, rather amusingly, "chriscounts.poo" and the data is stored in as a comma space separated line with the following information:-
  • timestamp of when the data was entered, in milliseconds
  • day of month of transaction
  • month of transaction
  • year of transaction in four digits
  • data in my own proprietary format for the purpose of sorting and doing neat things with
  • transaction account
  • value of transaction
  • category
  • payee
  • notes, although this bit isn't used.
In an ideal world where I knew what I was doing, there would be some kind of encryption routine here as well so if evil miscreants got the ledger file, it would all look like gobbledigook. But that's going to have to come later.

Right, this next subroutine is what I use to load the ledger file into memory as an array of arrays
sub getLedger {
@ledger = ();
my $filename = "chriscounts.poo";
open LEDGER, "<", $filename or die "Can't open '$filename': $!";
while () {
@tmp = split/, /;
push @ledger,[ @tmp ];
}
close LEDGER;
}