Archive for November, 2006

I can be a C-numptie

Wednesday, November 22nd, 2006

This might not be earth-shatteringly new to those who have seen my code before, but I was a little surprised. 🙂

A C program that I wrote a little while ago (and has previously worked fine on Windows, Linux, Solaris and HP) failed horribly on AIX. A little digging showed that I had written:

char* thisIsSupposedToBeAString[256];

I guess that at the time I wrote it (presumably early in the morning, and caffeine-fuelled) I had a string (char thisIsSupposedToBeAString[256];) and wanted a pointer to it, so went back and stuck a * on it without thinking.


Maintaining two blogs is difficult

Tuesday, November 21st, 2006

I started an internal blog on the work intranet a couple of weeks ago. Two weeks later, I’ve finally got round to writing a second post. I’m not sure why I’ve found it harder to keep up a second blog – I guess part of it is that it’s harder to access the intranet one from home, and I can’t post from my phone. I’m going to try and write another post soon, though.

If you have access to the IBM intranet, take a look! (Better yet, help me out by answering the question there! ;-))


Tuesday, November 21st, 2006

I’ve pre-ordered my Nintendo Wii through this morning. Fingers crossed, it should wing it’s way to me on launch day, 8th December. I can’t wait. 🙂

I’ve read a lot of comparisons about opinions about the ‘next-gen’ consoles, PS-3, XBox 360 and Wii, in the last week or so. But for me it was an easy choice.

I don’t play games that much nowadays. As a former PlayStation and PS-2 owner, it kinda feels like Sony given up on me. As games get more expensive (and the consoles – how much will the PS-3 be?!), more complicated, harder… it’s like they’re not for me anymore. I’m not able to invest the amount of time needed to learn some of the big new games (or the amount of money to buy them!), and so I’ve been left behind.

And this is where Nintendo feels different. They are welcoming the ‘casual gamer’. I know that a part of marketing is getting consumers to feel a kinship with a brand or product, and to produce a message that resonates with them. And – for me at least – Nintendo have done it, in a way that Microsoft and Sony haven’t.

The differences between men and women

Monday, November 20th, 2006

We had a guest speaker at our Samaritans AGM tonight – Joe Ferns from General Office – who talked about suicide and depression in men. I’ve heard the statistic many times before that young men are more likely to die by suicide. I wasn’t aware that (although the overall number of suicides is slowly decreasing) the gap between number of suicides in men and women is widening – and has been for several decades. Joe gave an interesting perspective on some of the reasons behind this.


winter has arrived

Sunday, November 19th, 2006

I took Grace for a walk this morning, so that my wife could have a lie in. Was fun, but wow it’s cold!

grace in Itchen Valley Country Park

Using Scheduled Tasks and batch files to do automatic backups

Friday, November 17th, 2006

As I’ve started storing all of my project work and GTD notes in my Wiki program, I thought it might be a good idea to take regular backups of the text files it uses for data. And being a geek, I thought I’d automate it. 🙂

REM this makes the batch file less noisy - dont 
REM  output commands to screen

REM limit scope for environment variables created here REM to within this batch file only SETLOCAL
REM make a note of where the current directory is REM so we can go back there afterwards REM (useful when running this batch file manually) set DIR_TO_RESTORE=%CD%
REM run the 'date /t' command REM this outputs in the format: REM 19/11/2006 REM (probably different for people with non-UK regional REM settings)
REM Using for to look at bits of date individually... REM FOR /F ["options"] %variable IN ('command1') DO command REM options - REM tokens - identify which bits of the date output I want REM (3 tokens - day month year), REM delimiters - how they are separated ('/') REM (users with non-UK regional settings might REM need to change this - e.g. for '-') REM command - REM 1) date /t - show date without prompting to change it REM 2) set - set environment variables to store each token FOR /f "tokens=1-3 delims=/ " %%G IN ('date /t') DO ( REM set environment variables to store individual date values REM (assumes date/month/year - users with non-UK regional REM settings might want to switch date and month) set dd=%%G set mm=%%H set yy=%%I)
REM this gives us a numeric date - in the format yyyyMMdd REM which is useful in filenames for sorting set TODAY=%yy%%mm%%dd%
REM go to first directory containing something to backup REM tar it up, and move it to a backups directory cd "C:\\Documents And Settings\\Administrator\\My Documents\\bLADE My Documents\\" "C:\\cygwin\\bin\\tar.exe" -cvf %TODAY%_gtd.tar WM_Wiki_Pages move %TODAY%_gtd.tar "..\\My Personal\\WMWiki Backups\\."
REM repeat as required cd "C:\\Documents and Settings\\Administrator\\My Documents\\My Personal\\" "C:\\cygwin\\bin\\tar.exe" -cvf %TODAY%_ref.tar "My WM Wikis" move %TODAY%_ref.tar "..\\My Personal\\WMWiki Backups\\."
REM finished! go back to where we started cd %DIR_TO_RESTORE%
REM end scope for environment variables ENDLOCAL


Young people make a massive contribution to society

Thursday, November 16th, 2006

This isn’t really something new that I learned today, but tonight did reinforce it for me so I thought it was worth mentioning.

Tonight was the Solent Youth Action Annual Awards Evening – our chance to reward the efforts of the volunteers that we support. In it, we try to recognise as many individuals as possible, while reflecting on the wide variety of activity that takes place over the year. And it was inspiring to see.

The evening was a mixture of entertainment, awards presentations and guest speeches. The entertainments were all demonstrations of some of the volunteering that young people have been doing, and I hope that we challenged a few preconceptions about ‘what is volunteering’ with these. For example, with the rock band of students from Mountbatten School. On the face of it, some might not see being in a band as volunteering, but musicians who play fundraising gigs to raise money for charity, provide free entertainment at charity and community events, and teach some of their skills to younger kids, are making a positive contribution to their community. This is volunteering.


What IET members do in the evenings

Wednesday, November 15th, 2006

Delegates from the Institution of Engineering and Technology visited IBM Hursley this evening for an event billed as an opportunity to see some of our latest software development work.

They got to see presentations and demonstrations of six recent Hursley projects – one of these was my pitch about the Extreme Blue project that I worked on last summer.

I’ve not been a member of one of these professional bodies before, so it was fun to see what the event was like. The attendees were an interesting mix – some were retirees wanting to keep up to date with the latest news, some were professionals from other businesses looking to network and learn about what else is going on, and some were university students at the start of their careers. Some came in suits, some were in jeans and a sweatshirt. Some were young, some were old. The one thing that they had in common was a curiosity and an interest in technology.

It was a lot of fun – I enjoy the chance to do presentations like this, and they asked a lot of thought-provoking questions. I don’t get to do this sort of stuff at work nearly as often as I’d like!