’twas the week before Christmas

.. and all through the house, not a creature was stiring, not even a mouse.

Mainly because we were all passed out from the excessive amount of Christmas dinner consumed. Just sayin.

Ah, Christmas. How I love Christmas. So full of cheer. But its not, its full of people running around, cramming shops trying to buy presents. I hate Christmas. And it doesn't even snow properly anymore! We had some snow, it was pretty pathetic. However, it does mean that you can stuff yourself with food and drink, and go to shindigs with old work collegues you haven't seen in ages. So thats just what I did. Friday night was the time, Dr. Gaywoods house was the location.

First obstacle: his house is 25 minutes away on the train. No problem, I'll walk to the train station, hop on, hop off again. Nooo, of course not. The train was 45 minutes late, leaving me on the platform freezing my ass off. However, once I had arrived, a merry time was had. There was feasting on Indian takeaway, consumption of exotic and weird spirits (but not by me, I only got to sample them, and they did include Skittles Vodka at one time), then some Left 4 Dead 2, then excessive Rock Band and topped off with a fine round of Forza on the most incredible steering wheel controller I have ever played. Tada, some photos (including a very poser-ish, smug looking Dr. Gaywood):

general-14general-17

general-15general-16

general-18general-13

There was also some Kickback action this week, my first appearence this semester. Kickback, the LMS open mic night, is usually full of depressing indie/emo acoustic songs, so Adam and I kicked it up with a performance of Bad Touch.

12870_214250291167_509091167_3050336_3168394_ngeneral-11

Finally, there was Sunday. Sunday OJ and I decided we should go shopping in Iceland. We then saw a selection of Christmas foods, and decided to take it upon ourselves to make a Christmas dinner for the flat. We went all out, roast turkey, potatoes, mixed vegetables, stuffing, those little sausages with bacon rapped around, gravey, and the all important cranberry sauce. Then we turned on the radio, and discovered the internet campaign to make Rage Against the Machines' Killing In The Name was the Christmas Number 1 single, much regoicing, and then we had a mosh in our living room. Excellent.

general-19general-20

general-21general-22

general-23general-24

Did I say how cold it is? Yeah, I'm pretty sure I mentioned that already. Well, it kind of snowed last night. That is, it fell 1cm, then froze solid, making walking impossible. Look how pathetic it is. Also look how emo OJ is. Twat.

general-25general-26

general-27general-30

general-29

And now I must pack and go home for Christmas. Adios.

This week in the gecko-verse

More like a question of what NOT has been happening. Oh so many things, I could never possibly write about them all!

So without further ado, in no particular order, everything thats happened this week.

Importantly, Emyrs here! That is to say, we had the LMS Christmas Dinner, featuring a suprise return of Emyr our previous secretary who was lost to the world of commerical emplyment from our studenty-grips this year. Post-meal we went for guitar hero at Kaffys, and then those amungst us who are able to consume alcohol went to some chav night or another in the union, whilst I was left to walk home in the rain.

12870_199410891167_509091167_2992273_292380_nIMG_0127

IMG_0135IMG_0137

New Shoes

Ah, walking, I knew there was something else I was going to write about. Shoes. Yeah, those things on your feet. I needed some new ones, so I decided to spring (this pun will become obvious by the end of the sentence) for some decent running shoes.

They arrived after 2 days (damn quick service), and gave them a quick run around the block, and I have to say, my god. So comfortable. Insane grip, great bounce, very lightweight, pretty sweet.

IMG_0155

Modding

Oh yes, gecko's back. I've designed the new Battlegrounds menus for class/team selection. Pretty similar to the TF2 menus. I did the whole full screen shizzle. These are the photoshop mockups, but, baring some VGUI2 issues the real versions are almost entierly finished. The class models play a small animation when you mouse over them (bayonet stab, sword swing, native jumps). I've had some feedback that the weapon statistics bars colours look weird, these have been changed to light/dark grays.

bg screens class copybg screens mockup copy

I am *desperate* to show you all my TF2 map. However, until it is more complete, you will have to wait. It's a pretty huge map, a continuous payload in the mountain setting with progressive spawning, but since I had no clear plan for the map when I started I've been building it up bit by bit, but hopefully within a month you can see some ingame screenshots. I'm also working on 2 BG2 maps, but these are no further than the sketching stage.

Stay tuned for more posts soon faithful readers. You can stop reading now. Really. I'm done.

The Early December

So, its getting late in the year, the days are getting dark, the temperature low and the coursework heavy.

If you've not been paying attention, I've been studying an MSc in Computation Chemistry (visualizing molecule bonds, computing reaction chains etc). It sounds pretty hard doesn't it? You're fucking right. Its a total bitch. And I can't really do any of it. And I'm ages behind already as I've missed quite a lot of lectures because of sleeping problems *again*.

How is it compared to my undergrad? Its totaly different. Its a lot more reading around, a bit of a system shock really, my undergrad, whilst a good degree, was too easy. I did hardly any work outside of lectures, revision was minimal, and in my three years I checked out 2 library books. And they were for something else I wanted to read about at the time. Now, I'm checking out books every day, spending hours reading them, frantically googleing, and throwing forumlas at Wolfram Alpha (which has proved invaluable).

On the whole its far more fun though. I am actually learning, and its not far off interesting. Its just, most of my time is spent as depicted below, at 2am.

desk

Amon Amarth

Better late than never. Quality is not as good as usual becuase I had to use my backup lense, not the best time to be experimenting with focus modes really...

St Davids 2

St Davids 2, before I was kindly asked to stop taking photos 'without a permit'. Err, nice try, but I'll be back.

40D 28mm F/1.4 + Lightroom High Contrast B/W.

Tumblr

Follow my tumblr, its much quicker than blogging and its ultimately going to provide more insightful.

http://wtfgecko.tumblr.com

An update

Ok, so I finnaly got fed up of Steve bugging me and I'm writing in here.

 

What a week. Not that I remember a lot of it after tuesdays all night election party.

I arrived some time after 11pm and after some time spent admiring Tristans Marshall amp stack the drinking began.

After the first few states were announced, it was clear Obama was taking a large lead. This was met with much satisfaction, and more drinking! Then came the great news. California, and Washington were announced, which sealed the 270 votes needed, and the TV announced he was to be the next president. Even more drinking, some chearing, and some clapping was heard!

And then McCain gives his concession speach. Lots of chearing! (and boo-ing)

And then (over-used phrase of this entry..) Obama gives a somewhat excallent speach, making various promises (some of them of a pet dog like nature). Lots of clapping and cheering was heard from 29 Salisbury Road.

At this stage my bottle of rum is empty, and I am searching for some more alcohol to consume. Jim and Tristan can be seen in the above now somewhat blury photograph above.

8am and I am finally gone, back home and asleep. It would be 12 more hours before I awaken from my slumber.

 

Other things that have been happening:

Airbourne. I dunno, some mediocore 'look at us we copy AC/DC' band. But I was taking photos! Heres the best of the bunch (EOS 40D, Sigma 30mm f/1.4)

 

So ya.

 

Other news is slim on the ground, my final year project is well under way (post detailing that soon), and planning is equally under way for the trip backpacking the USA next summer.

Peace.

Kaag

Wish I'd taken more photos really..

 

Nice place really, had an apple pancake for lunch at a restaurant built over the edge of the lake.

T -1

I'm off on holiday tomorrow, currently dossing around in lovely Gloucetsershire

Its alright here, if a little quiet. I'm flying out from Bristol airport tomorrow afternoon, heading there in the morning so I can take my time getting through customs (I can see a laptop + camera + lenses + 2 phones being a problem in this day and age).

 

iPhone Jailbreak!

I jailbroke my iPhone last night, using the new PwnageTool, must say, not really much point anymore apart from the activation (now works with my t-mobile contract). Having not had *any* experience with the 1.1.4 software, I can't comment too much, but it is being really slow loading up my iPod playlist (and it's only half of movies). What does really impress me though from a new user point of view is the quality of the video playback. I watched Alfred Hitchcocks North By Northwest on the train journey back here, it was quite a nice experience, and the battery lasted well (took a fair few hours of Super Monkey Ball that evening to drain it down).

 

Anyway, I will be posting more pictures as and when I take them throughout the next week and a half.

Real Simple Test Driven Development in Visual Studio

 

Step 1

Decide the feature you need to implement. In this case I have decided that my DefaultNewsProvider class needs a method for returning a single news item when passed its Id.

 

Step 2

Open your test file that is responsible for testing the DefaultNewsProvider class (in this case it is in my Keima.Website.Data.Test/NewsProviderTests).


Step 3

Write the test with the expected result. I know that in my database their exists a news item with an Id of "tag:keima.co.uk,2008-06-26:Composer 2.0 Launch", therefore I construct a a test that calls the new GetNewsItem method with the Id, then compares the result to check we have been given the correct item back.

 

Step 4

We have hit a problem, this method does not actually exist despite having the test for it. So, bring up the code helper and generate the method stub.

Step 5

Test the code. Go on. Watch it fail.

 

Step 6

Make it pass. In this case its easy, a sort of 'fill in the blanks'. So back to DefaultNewsProvider it is and the implementation is finished off.

 

Step 7

Re-run the test, watch it pass. All is well, the code has been added, a test has been created, and if in the future the method breaks due to other code changes you will know immediatly.

 

List of reasons why test driven development can help you:

 

+ Allows your code to be maintainable, shows the exact point of failure of a program, none of this nasty debugger related stack tracing and breakpointing anymore
+ Forces you to focus upon the expected usage of a function, not the specifics of its implementation. Once you get in to the TDD mindset this allows you to be more concerned with the abstract ideas of how the project should be designed and structured with maintainability in mind as opposed to language specific implementation details (e.g. "I need a function that returns a file handle given a file name or null on an invalid file" rather than "What calls need to be made inside C# to open a file?"
+ At any one time, your code WORKS. Ensuring that code is correctly covered by tests allows you to guarantee that at any one time your project can be built and shipped to a customer. 
Your tests are more accurate (bold assumption I know, but here me out). Designing the code by considering how it will be used, and ensuring that tests are constructed at the beginning is much more preferable to designing tests once a project is finished, where code may be missed, meanings of code blocks forgotten about or motivation does not allow for proper testing.

 

A few other notes
+ Name your tests properly. GetNewsItemReturnsCorrectItem is much more imormative than GetNewsItem, especially in large applications where there can be tens of thousands of tests, it just makes finding the cause easier.
+ You _will_ be writting more code.
+ For each function, class and library you have have a matching Test function, class and library.
+ Try and have three tests for each function, a test that returns the correct result (like show above), a test which tries to break it (an invalid id) and a test which is just plain wrong (passing null in for example).

 

As ever address any personal experiences, observations, suggestions or death threats through the comments.