30
Jan

## On Work and Music

Wow, I’ve kind of neglected this haven’t I? Sorry!

I’ve been really busy recently with my project. I’ve been having loads of issues with Seg Faults and Memory Leaks and the like taking up pretty much all my time. I’ll post up a lovely debrief once it’s all over and done with. There’s about 5 weeks til the presentations, by which point everything needs to be working, so it’s time to get into serious panic mode. There’s plenty to do yet, but I’m sure it’ll get there.

Walking home from uni today I had the strange desire to build a web app. I’ve done very little web work in a good while, besides a small flash game which I will be unleashing soon hopefully. I’d quite like to get a good start done on one of the various ideas I have for Imaginary Roots or Slicecake, but just don’t have the time. I’ll have to hope this enthusiasm doesn’t dwindle over the next few weeks!

I’ve been listening to a lot of Jazz Fusion recently, mostly Metro and Greg Howe. Does anyone happen to know any really good Jazz/Jazz Fusion guitar teachers around? I’d love to take some with Greg Howe, but can’t really afford the $75 an hour fee. Still, it would probably be much better than lessons I’d get anywhere else. 14 Nov ## Partial LaTeX Word Count + TextMate Long time no post, sorry! Here’s just a quick one. I’ve been working on some essays and reports for uni in LaTeX, and the criteria for the work is usually that it is within a certain word limit, discounting titles, appendices, references etc. So I thought the easiest way to do this would be to have the main content, the bit that actually counts towards the word limit, in a separate file and include it. I then needed a good way of counting the words in this, and Googling lead me to a solution which converted the rendered PDF into ASCII and counted that, which is fine, but doesn’t work for partial LaTeX documents, i.e. ones without document tags etc. So I came across detex, which works pretty damned well. The only issue I’ve found with it so far is that it doesn’t filter keywords within braces, so for example, with \begin{itemize} it strips the \begin{}, but not the itemize, so this obviously adds to your word count. It’s a minor issue though, and one I’ll happily live with. You can then just pipe the output of that into “wc” to get the word count (and various other bits of info). If you happen to be using TextMate, here’s a nice little command which will do it for you: detex "$TM_DIRECTORY"/"\$TM_FILENAME" | wc -w

I’ve added the “-w” option to just give me the word count, but obviously you can change this to get the other data wc will give you.

Enjoy!

23
Oct

## Guitar Pro

I’ve been using Guitar Pro for quite a while now, a good couple of years, and have had very few issues with it. That is, before last night. I tabbed out a section I’d written for Drongo, and all was good. Because of compatibility/different software issues, when I send things round to the band, I send them in a MIDI file and a Guitar Pro 4 file. Normally this is all well and good, but last night I think it was trying to tell me something about the music I’d written. Firstly, the MIDI only exported the first 35 seconds, up to the heavier section. Secondly, when I exported the GP4, it swung the whole piece! Why the hell did it do that?! Somewhere, in some of the code, there is something which decided what I actually wanted to do was swing the piece of music. I’d love to know how this happened.

22
Oct

## NSFileBrowser

I’ve been working for the last couple of days on a project for my band Drongo Sealion Magic. We use a lot of samples in our music, all of which we store as MP3s on a laptop, and we wanted a simple playing mechanism which was more responsive than something like QT or iTunes. Unfortunately, we didn’t have much luck finding one, so I thought I would write one. More on that later.

One of the things I want to have is a file browser so you can quickly change the samples you’ve got loaded. For some reason though, Cocoa doesn’t appear to have a standard File Browser object. This is something I think is a bit odd. I can understand the reasoning, obviously most applications will make do with the Open/Save dialogues, and those that don’t probably need some form of custom browser anyway. But surely, for consistencie’s sake, they would want developers to present a standard browser so that people would be using the same browser across all their apps? As it stands, I’m having a hard time replicating the look and feel of the standard list browser in Finder. Perhaps someone should write an “NSFileBrowser” style class. Perhaps it should be me…

20
Oct

## Scrabble is Big!

I ran some simulations over the weekend, and I’ve found some interesting statistics I thought I’d share with you.

After 10,000 simulated games, the average number of moves per game was 23, and the average number of choices per move (i.e. the number of moves you could actually make at each move) is around 970. This means that a graph which stored all possible configurations of the board would contain around 970^23 nodes (ignoring repetitions). That’s huge! As a contrast, chess (which is considered pretty damned hard to solve) has on average 57 moves per game (from a quick Google search, this may be inaccurate) and has a branching factor of around 35, making a graph of size 35^57.
What have I gotten myself into?!

13
Oct

## Coincidence Averted?

So the problem appears to be solved. The issue was that on waking from sleep, the laptop would crash. Then, when trying to start it up again, it would not even get as far as the Apple logo screen before failing. The solution to this was to hold the power button until the light flashed and a high picthed noise was heard. I’m not sure what exactly this does, but it made the laptop start up.

After some searching around, I found this article pertaining to sleep modes. I did what it said, and changed my hibernate mode to 0, and now the laptop seems fine. Also, I’ve saved myself a precious 2GB worth of hard drive space, which on only a 70GB drive, is very much worth it! It does mean, however, that I can’t leave it on sleep for long periods of time, since it drains the battery to keep the contents of the RAM happy. I think I can live with that, though.

13
Oct

## Coincidence

Tomorrow, Apple are set to be launching new MacBooks and MacBook Pros.

Today, my MacBook Pro broke.

I think the gods at Apple are trying to tell me something…

12
Oct

## Specification

One deadline out of the way! We had to hand in the specification last Thursday, and so here’s a bit of an update on where I am with the project.

Firstly, the goals of the project. Mainly, this is going to be a reasearch project, and so I will be looking a lot into the existing methodologies in computer based Scrabble agents, and trying to extend them where I can. The goals of the project are going to be to:

• First, define what optimality means for a Scrabble strategy
• Produce an optimal algorithm
• Attempt to find a greedy algorithm which produces comparable results to the current world class agents

After doing this, I will hopefully find the time to attempt to generalise the findings to games of the same classification to Scrabble (imperfect information games), but this is more of a pie-in-the-sky objective.
I used LaTeX to produce the specification report, and I have to say it’s proved invaluable. It makes document production so much easier, I will definitely be using it in the future. I’ve been a bit soft and have started using TeX Shop, which takes a lot of the headache out of it (syntax highlighting, a few useful macros, and pdf production in a handy little button). Give it a go!

Update: I’ve just looked back at this, and it’s amazing how the project evolved from these somewhat optimistic initial objectives. But I suppose the majority of projects have the same form of evolution.

12
Oct

## jPod

I just finished watching the TV series of jPod. I absolutely loved the book, and have read it many times over. The TV show, whilst a bit rocky to begin with, turned out to be FANTASTIC. AND THEN THEY CANCELLED IT. The last episode ends SO abruptly, it hurts. I don’t know if all the cliffhangers were supposed to be answered in the next series, or in some unaired episode, we may never know. And this upsets me. Very, very much. Stupid CBC.

The show itself has left me in the middle of a mental turmoil regarding the rest of my life. Although I’ve got a couple of years of uni left (although, technically less than 40 weeks of lectures – scary) I think I need to start thinking about what I want to actually do when I graduate. This way I can focus my application energies on one things rather than on the four different options I have at the moment. Perhaps I shall share these with you in a later post, once I’ve cleared things in my head a touch.
In other news, the third year project is coming along wonderfully. I shall give you an update tomorrow (hopefully…) when I’ve completed a couple of little tasks.

26
Sep

## iPod Touch First Impressions

Yesterday I received my 8GB iPod Touch – which I was very excited about! I wanted an iPhone (obviously…) but O2 wouldn’t let me upgrade. Since we’re thinking of going into the iPhone App business, I thought I’d get a Touch to tide me over until my contract runs out next year.

So what do I think of it? I find the keyboard difficult to use, but hopefully that will improve as I get more used to the device. Other than that, I love it! Everything works really well, and it’s so damn pretty. So very, very pretty. I’d love to know how the current location functionality works on it (I’m sure it’s out there, I just need to do some research…) but it works very well, getting my location pretty damn accurately, and also quite quickly. My only disappointment is that the Facebook iPhone app seems to be quite limited, but I’m sure that’s something the guys at Facebook will be working on over the next while. Browsing and working in Safari on it is really easy, and pretty quick (though that may just be the network here). Also, multitouch RULES.

So now I’m waiting for my iPhone Developer status to be approved and I can start putting some little apps of my own on there. Exciting times for Griffs!