About Me

My photo
Christian. (That means that I know that Jesus is Lord!) Programmer. Gamer. Weak 3D artist. Geek.

Wednesday, 22 July 2009

Anticipating Windows 7

Yesterday, I pre-ordered a copy of Windows 7.

Now, I am a hardened Mac fan nowadays - and I'm not really a big fan of Windows. However, I do recognize the need for a Windows OS (from the user perspective).

Occasionally, I need to use Microsoft's Visual Studio - because it provides an excellent debugger and is also the IDE we use at work.

I also like to run PC games every once and a while, Valve's Steam service has some great games on there that I've collected over the years - such as Half-Life and Half-Life 2, as well as being able to play (and indeed edit) games such as The Elder Scrolls III: Morrowind.

I have to admit though, there were a couple of things other than that that made me whip out my credit card.

First of all, it seems feedback regarding the release candidate of Windows 7 has been nothing but praise - I haven't read a bad word about Microsoft's new OS.
Secondly, price. Previous efforts from Microsoft have weighed in at over the £100 mark - and that's just too pricey for software in my opinion. Because the EU ruled that Microsoft aren't allowed to include Internet Explorer in their new OS, apparently this has caused Microsoft to run a pre-order campaign that allows users to buy it for half-price at £45.

Finally, this isn't Windows Vista. WV made me want to tear my short, spiky hair out. It was buggy, slow and had a poorly designed user interface. It was expensive and needlessly 'glossly', chewing up valuable CPU and GPU time on effects that couldn't necessarily be disabled.

According to my friends on the forum I visit, (http://www.rllmukforum.com) my concerns have all been answered.

I have to admit, I'm a little excited about the new OS. Even as a child, I was always excited to find out about all the little intricacies of a new operating system. Yes, I was that kid. The one who installed Windows 95 from 25 floppy disks or however many it was..

I was also persuaded by a fellow geek at school to try out IBM's OS/2 Warp - and not knowing what a partition was at the time, consequently blanked my hard drive.

So, last night as a I left work I left the release candidate of Windows 7 downloading (note: A release candidate is literally that - a piece of software that been through the testing process and is now seriously being considered for release..) and I'm looking forward to installing it in a few days. (I think I might need a bigger hard drive..)

Providing the release candidate for public release is a good move from Microsoft in my opinion. It allows me, the consumer, to consider if I actually like Windows 7 enough to warrant a purchase before the product is even released.

I'll have basically two months to make my final decision before W7 is released in early October.

The question I'm now wondering though is, will my poor little Macbook be up to the task? (Another good reason for downloading the release candidate!)

My Macbook specs at time of writing are:
Intel Core 2 Duo 2.2ghz.
4GB ram.
120GB hdd. ( :-( )
Paltry Intel x3100 integrated graphics chip.

It's only really the GPU that lets me down, so I hope that the rest of my, quite frankly, beefy specs, will do fine with W7. But I guess, we'll see.

I'll report back when I know more..

You can download a copy of Windows 7 release candidate here.

Monday, 20 July 2009

The one with the new TV stand (a.k.a 'Why my fiancee rocks.')

People who know me are often a little shocked when they come over to the place I live and see the amount of videogame consoles that I own.

I don't have as many as some of the more ardent games collectors out there - but I definately have a sizeable collection.

A couple of years ago I was given my first proper TV stand by my friend Andrew, and it's served me really, really well until now..

Now that my collection has grown too large to fit on said stand.

Dave, my colleague who lives in the same apartment block as me, gave me a SMS on Saturday to say he was going to IKEA for some shopping, and he kindly asked if I wanted anything..

He and I had been eyeing up some TV stands on the ol' interweb at work and he knew the one I wanted :-)

I'm really happy with my IKEA Lack TV stand - it's huge, comfortable houses all the consoles and even has space left over for some more.

The thing that I want to publicly mention is that my fiancee, Jen (who I am now due to marry in less than 6 weeks!) is awesome.

There aren't many women who'd put up with this kind of thing I reckon - and I also don't think that every woman dreams of having their own videogame collection.

Thanks Jen for putting up with my massive, space consuming hobby. :-)

(Ikea Lack TV stand is £35 from your local Ikea.)

Thursday, 16 July 2009

I didn't know about variadic macros!

It's become quite fashionable of late to cite Wikipedia as the place not to get information from.

At work yesterday I was working with C++/C macros of the standard #define form, you know, like this:

#define MY_FUNCTION myFunction("test parameter")

so that if I use the define MY_FUNCTION in my code, the compiler will swap in 'myFunction("test parameter")' for me.

However, as C++/C programmers out there will know, you can offer default parameter values for a function, so what if my function 'myFunction' has been originally defined like this:

void myFunction(std::string inputString = "test");

Well, that means that the function will have a default input string of test if one hasn't been specified, by calling the function like so:


The issue then is, how do I call myFunction from a defined macro with and without wanting to pass parameters into the macro? I mean, it's easy to define the macro to take a parameter but how do I make the parameter optional? For instance, to add macro parameters do this:

#define MY_FUNCTION(x) myFunction(x)

This way, the parameter 'x' passed into the define will then be automatically passed into the function 'myFunction' as it's first parameter.

But this is the clever part coming up..
If I want to maybe specify an optional parameter I can do it like this:

void myFunction(std::string = "test");
#define MY_FUNCTION(...) myFunction(__VA_ARGS__)

This way, my original C++ function of myFunction receives a single argument of type std::string, which, if it isn't passed in, defaults to being a string of characters as 'test'.
Now, the define will pass on a variable amount of arguments to the function as necessary (so I could pass 4 or 5 arguments if I wanted to, though the function itself would complain because it only accepts one argument.)

This way I can create a macro definition of my function that can accept optional parameters! Apparently this is called a 'variadic macro' and is part of the ISO C99 C standard. I didn't know that and thought it was pretty cool!

You can read more about it here.

The point of this post is mainly for record for myself so I know what this does and how to implement it in future - I don't think any of the other coders in our company knew how to do this, so I thought it was best to document it for future reference.

Geeks out there, I hope that helped.

Tuesday, 14 July 2009

More pictures of Springate HQ

At the weekend Jen rented a large van, that made a Ford Transit look like a mini, so I could move all my stuff in.

It made the flat look quite different to have all my stuff inside it - so these are pictures for my friends and relatives to see how development of Springate HQ is going :-)

(Pictures are taken using my new Sony Ericsson w580i phone - a replacement for my Nokia 6300 which I stupidly dropped in the toilet on Sunday morning before church. Camera is good, isn't it?)

Reply to 'Business, profit and the glory of God'

My friend Andrew recently blogged regarding Wayne Grudem's book 'Business to the Glory of God'.

I haven't read the book but I wanted to comment on what Andrew had to say, my reply was too lengthy (oops!) so I've included it here and linked to it in Andrew's comments section.

I realize I'm a little late to reply to this post, but I'm going to anyway.

The seeming 'tension' between the Evangelical church and the workplace is quite an odd one - and let me flesh out what I mean by tension.

It is right that there is a big push for evangelical Christians to enter into full-time Christian ministry - there is a lack of able, teaching Christian men and women entering this 'field' (for lack of a better term) but I can't help but feel that the big push of this actually undermines the importance of the Christian in the workplace.

Christian ministry is something that requires the 'employee' to both have a desire to work in this field and the support from their local church (meaning their pastors and teachers) to do so. So is it right to so publicly urge people to enter Christian ministry? (I'm thinking at the front of conferences, visiting missionaries etc.)

I've been working at a company in Liverpool for just over 2 years now and it is almost a constant battle between two inner lines of thought - one that says that my work is worthwhile because of the friends I make at work (who I then am trying to introduce the Lord Jesus to) and the influence that I hold in a local business - urging them to avoid illegal practice, reminding them that work is not my reason to live and therefore I am not available to sleep in the office all the time. (Some colleagues until recently hadn't had a day off for 4 months!)

However, the other inner thought is that my work isn't worth while and I find myself considering leaving this work behind to become a missionary or other full time ministry role. Part of me can't help but feel this is a more holy pursuit.

This is when I arrive at my final position that there is no reason why I cannot hold these two things together.

I am a missionary - in my workplace! I also feel that whilst being able to work where I do (admittedly taking part in work that I actually love - not just merely think is acceptable - I have been blessed!) I can still exercise my gifts in the local church and (here comes the best part) then share with my friends at work how that is going.

For example, it has often been a great thing to be able to share with colleagues that I'm preaching at the weekend - they'll sometimes ask what I'm preaching on, what does it mean, how do I know what it means, how does it apply to us in today's world etc. I don't think I'm particularly blessed with 'thinking' friends but that it is merely a matter of sharing our lives with them! In fact, as I wrote this on the train to work, a colleague who I travel to work with asked me what am I writing and consequently what an 'Evangelical' Christian is!

Before working where I do, I worked as a ministry trainee at Christ Church Liverpool (as you know, Andrew) and when I left there to work at my current employment I asked a friend of mine what should I do in future? How long should I work in secular employment? Should I return to full-time Christian ministry at some point?

His answer was that I am capable of earning a lot of money to fund Christian ministry and should therefore do so.

This was initially enough of an answer for me and actually fueled my progression at work to be able to earn more money but as time has progressed I've realised that my time spent with friends is far more valuable to me than the by-product of earning money to fund holier employment.

I want to comment on the subject of profit that Grudem discusses - but I feel I have nothing to add. Apart from what does Grudem mean but it being a help to the person he has had a transaction with?

My first stab at an answer would be that the church should most definately encourage their congregations to take part in business - and indeed in transactions that involve making profit.
The reason I would say so is that it is good to take part in all areas of life and to show an example of how to fairly 'do' business and to not act for dishonest gain.

Of course, not all Christians should take part in business as perhaps their hearts cannot cope - the temptation of dishonest gain may be too much - but we cannot falter as a church at that hurdle and frown upon business and profit, as that is the issue with every worldly pursuit, that we are all sinful, selfish, idolatrous, hard hearted people.