Red Dwarf Returns..

January 22, 2011

So.. BoredOfJam sends me this link… and I felt the need to write some guidance for the writers.. who will hopefully be Rob Grant and Doug Naylor, but probably won’t…

  • Put it back on the Red Dwarf – pre Kryten, pre Kochanski-from- another-dimension, pre crew-resurrected-by-a-bunch-of-nanobots.
  • Lister is a slob. He doesn’t care. He’s only on Red Dwarf because of a Monopoly-based pub crawl that went wrong. He’s not a space adventurer. He just wants to get home.
  • Rimmer is a hologram of a dead person. HE CAN’T TOUCH ANYTHING. He is also NOT Brittas. He’s not a fan of Hammond Organ music, or a collector of pictures of 20th century telegraph poles. He just happened to be Lister’s immediate superior and was brought back to keep Lister sane. He just wants to be NOT DEAD.
  • Cat is A CAT. He sleeps, eats, sprays things, and doesn’t want to do any work (he’s got a note from his mummy, after all). He just wants to sleep, eat, look good and have sex with something.
  • Bring back Holly. Norman Lovett’s incarnation, naturally. And remember that he has been alone for 3,000,000 years and has gone a bit strange.
  • The creators realised, after just two series, that they had written themselves into a hole because they had a cast of four that couldn’t be bothered, or just simply couldn’t, do anything. So.. stop turning them into people that can, or can.
  • No “aliens”. Red Dwarf was unique because EVERYTHING they stumbled upon was somehow related to the crew, the ship, or Earth. “There are no aliens – just you, me, the cat, and a lot of floating smegging rocks.”
  • Red Dwarf is about people that don’t get on, forced to live together. With that in mind, and taking into account the above, if you’ve run out of ideas.. STOP.

Of course I don’t expect them to listen to me. I fully expect a strained rehashing of old ideas and lots of special effects. But I thought I should at least try.

You know, I think I’ll watch series 1 and 2 to remind myself of just how good they were. Perhaps the writers should do the same…


Conditional Breakpoints – A Cautionary Tale

October 15, 2010

You know the scene – you have a loop that iterates through loads of records but something strange happens when  Widget.Property = “Banana” or somesuch. “What the devil is going on?” you mutter to yourself, and you set a conditional breakpoint on an appropriate line to see what is happening when the property is set in this way.

Breakpoint set, condition set, and off you go.

However, now, something really strange starts. Object properties are changing when you least expect it and you start to doubt the very fabric of the universe (or at least the .NET Framework runtime). Widget.Property equalled “Apple” a minute ago, and now it equals “Banana” for no apparent reason and you really can’t get your head around it. A PC reboot, and a quick Google-ing doesn’t help. Your mind wanders further.. maybe a virus? A problem with the PC’s memory? Surely not. Everything else seems to be fine.

In desperation you remove the breakpoint and.. lo and behold.. the problem goes away. Or, at least, the original problem comes back. What the hell?

The problem lies in the condition on the conditional breakpoint. I had set my condition to Widget.Property = “Banana” -  note that I had accidentally used one “=” , not two. The upshot of this is quite logical once you sit back and think about it – just prior to the line with the breakpoint on it being executed, the condition is executed and the boolean result determined. If the boolean result is true, the breakpoint stops execution, if not, it continues.

So rather than checking if Widget.Property equalled “Banana” I was in fact setting Widget.Property to “Banana” on every iteration round the loop.. and this is why I couldn’t work out what the hell was going on.

And note that this condition is executed when the line with the breakpoint on it gets the “focus”. So you haven’t even stepped past the point where the breakpoint is set when the weird things happen. I wasted an hour on this today…

An example, below:

class Program
{
static void Main(string[] args)
{

List<Person> people = new List<Person>();
people.Add(new Person(“Mr A”, 36));
people.Add(new Person(“Mr B”, 37));
people.Add(new Person(“Mr C”, 38));
people.Add(new Person(“Mr D”, 39));

for (int i = 0; i < people.Count; i++)
{
Person iPerson = people[i];
Console.WriteLine(iPerson); //  <– Put cond. breakpoint here
}
Console.ReadLine();

}
}

public class Person
{
public string Name { get; set; }
public int Age { get; set; }

public Person(string name, int age)
{
this.Name = name;
this.Age = age;
}

public override string ToString()
{
return string.Format(“{0} ({1})”, this.Name, this.Age);
}
}

Run the program and you get a list of people and ages.
Now set a breakpoint on the line indicated, and set it to break when  iPerson.Name = “Mr B” (with 1 “=” sign)

Run the program again and note that, first of all the breakpoint is never trigged, and second of all you just get a list of Mr.B’s but all with different ages.

So.. beware this one, fellow developers. It may just catch you out one day…


This man has too much time..

April 23, 2010


.. not to mention too much blue sticky tape.


Nuts – New and Improved

April 21, 2010

Never understood the phrase “new and improved”. If it’s “new” this implies it hasn’t existed before, so how can it be “improved”? And if it’s “improved” this implies it has been around for a while, so how can it be “new”… anyway…

I’ve made some improvements to my chilli nuts recipe :

New and Improved Ingredients
200g salted peanuts
4g Tabasco sauce
3g paprika
3g hot chilli powder
1g garlic granules
3g onion salt
8g sugar
2tbsp groundnut oil

New and Improved Method
Warm the oil in a pan, add the peanuts. Add chilli powder, paprika and Tabasco. Mix well. Keep stirring until the peanuts are warm and covered with the chilli mixture. Sieve peanuts to get rid of excess oil and chilli mixture, then pour peanuts onto a plate covered with kitchen roll, and press more kitchen roll on top.
Now, put the onion salt and garlic granules in a bowl. Press the peanuts a bit more with the kitchen roll and then add the peanuts to the bowl. Stir well so the nuts are all coated with the mixture, then put them in the fridge. Once cooled, stir in the sugar.


Nuts

April 11, 2010

So.. BoredOfJam bought me some of these - Fire Dancer Jalapeno Peanuts. Oh, and they are tasty. Problem is they were only stocked by Lakeland and they were only stocked for Christmas. Now, here we are in April, and you can’t get them in the UK at all.

So.. I thought I’d have a go and making my own. And, despite using roughly the same ingredients, I ended up making peanuts that don’t taste anything like the Fire Dancer nuts, but I like them so I thought I’d share the recipe:

Ingredients
200g salted peanuts
5g hot chilli powder
3g paprika
4g Tabasco sauce
1g garlic granules
3g onion salt
6g caster sugar
3g granulated sugar (optional)
some groundnut oil (I didn’t measure it but it was around a couple of tablespoons)

Method

Put the oil in a pan on a moderate heat. Add chilli powder, paprika and Tabasco. Mix well. Add peanuts and keep stirring until they are warm and covered with the chilli mixture. Pour peanuts onto a plate covered with kitchen roll, and press more kitchen roll on top to soak up the oil.
Now, put the caster sugar, onion salt and garlic in a bowl. Press the peanuts a bit more with the kitchen roll and then add the peanuts to the bowl.
Stir well so the nuts are all coated with the mixture, then put them in the fridge. Once cooled, optionally stir in the granulated sugar.

Hope you enjoy them. This is recipe attempt number six. Feedback welcome.


There is only one level

March 24, 2010

http://www.onemorelevel.com/game/there_is_only_one_level


Positive Feedback

March 24, 2010

Seems that I have inadvertently installed an update to my Wii Sports Resort that means I get games advice and guidance from a three year old whilst playing. Some examples:

Bowling  - “How can you miss just one pin?”
Golf – “You’re meant to get the ball in the hole, Dad.”
Archery – “You didn’t hit the target, did you?”
Speed Sword Slicing – “You’re meant to follow the arrow.”
Table Tennis – “You missed the table, Dad”

Nothing like a bit of positive feedback.


Follow

Get every new post delivered to your Inbox.