Why is it that despite spending a vast amount of time doing it, when I come to write a CV it is very difficult to make it sound as it Dramsoc isn’t a total masturbatory indulgence? How does:
“Good head for heights; standing in the rain at 4am doesn’t phase me.”
even remotely begin to woo a software engineering recruiter?
Dramsoc vs the CV
May 5th, 2007Sunday: 12pm
April 22nd, 2007Procrastination is like masturbation: its great fun until you realise you’ve fucked yourself.
Pens of choice
April 18th, 2007During revision time, one must be equipped with the very best in terms of writing imlpemi. Remember: it’s not what you write, its with what you write it! I have today spent some considerable time in the union walkway shop researching the very best in modern writing equipment. I present a few pens which have made a difference to my life, in the hope that this will inspire the reader to buy outside their normal “safe zone“.
First off, the classic Parker cartridge fountain pen (blue). Made in the UK this attractive model comes in blue, red and black bases, and takes the ubiquitous parker ink cartridge. Offering smooth, even writing and non-calligraphic lines this is sure to be the mainstay of any concerted revision effort. Having owned mine since I was born I can say that without it much of the exams I have revised for would have suffered.

Next in the line-up is the Pilot VBall Grip. With its superb, refined penmanship and a low cost of £1.99 (Union walkway shop) I couldn’t resist adding one to my collection. Personally opting for the red I cannot honestly say I have ever encountered a line more suitable for highlighting equations not found in the formulae book. The lubricated ball and rubber grip provide a writing experience that leaves one screaming out: “Margaret, can you get me another Pilot VBall Grip in blue please, such that I can write in blue, also.“.

Next is the 0.9mm Pentel P209. This propelling lead pencil was initially made popular by architects and designers in the 80s, but has come on from there to be the pencil of choice for anyone serious about block diagrams and parallel lines. With a good solid infrastructure and a corrugated grip it is unlikely to let you down. Accidentally stolen from Tom Brodrick last week, already this isn’t a pencil I would leave home without – it really is a thorough ravishment each and every time it is employed.

If Tom realises I’ve got his pen and asks for it back, I shall be safe in the knowledge that in my bag is the BiC Matic 0.5mm #2. A considerable upgrade from the acutely miserable world of the #1, which suffered from frequent malfunctions of the main lead riser-gripper – often leading to a stalling of the mechanism.
French, the BiC is very much an entry-level unit for those looking for a gentle introduction into the world of the propelling pencil. The BiC Matic is sold in packs of three (£2.99 from Ryman). Like the Pentel, this attractive yet inexpensive model contains an in-built (although woefully ineffective) hydrocarbon polymer eraser which can be replaced by the user. For more substantial errors, however I would suggest the Ryman Rubber (£0.79). It particularly lends itself to drawing sine and cos waves, but it is also adept at drawing diagrams of communication systems.

Summary
These are just a few of the high-quality pens available from most competent stationers. Anybody with a desire to do so can easily spend a good hour refining their choices until they achieve the perfect combo for any task.
For 2nd Year Electrical Engineers
April 17th, 2007Dearest colleagues,
(Further to Pietro’s blog post)
I do hope you are getting on well with your C++ assignment, which from the sounds of it is going down like a lubed anvil. Couple of things id like to get off my chest, if I may be so bold.
1. Hash Maps
A hash map is none of the following:
- A linked list
- A “big” array
- A binary tree
- A balanced tree
- A “happy” atlas
If we store our records in a linked list, we can access them by scanning along and comparing the key until we find the right one. If the list is unsorted and of an unknown length this will take at worse N comparisons (and increments) where N is the length of the list. If the list is sorted and of a known length then it will take Log(N) comparisons (binary cut), but to get to each node one must still traverse the list in that direction, so it in fact takes (I believe… john?) xLog(x) (i.e the order of the integral of log(x)). So sorting a linked list and binary chopping is therefore futile unless you can access elements without scanning. Don’t iterate over list.at(i)!
Enter: the hash map. Let us say we are storing students with a cid and a name. The key will be the id. We know that these are evenly distributed between odd/even so we could construct two linked lists, one with the evens and one the odds. This would cut the average search time in half. Thus the hash function (which decides which list to enter) would be cid%2. Obviously this generalises quite nicely, so if we have 10,000,000 students we could have 100 lists from our table and use cid%100 as the hash function.
However, when running on a computer that has even a marginally faster clock rate than a wall clock, there is no fucking difference – just search the damn list and get on with something more useful.
Here is the only code you need to look for records:
class Record {
int cid;
string name;
};
class Node {
Record* record;
Node* next;
};
class JamesList
{
Node *head;
string lookupNameByCid(int cid) {
Node* runner = head;
while (head != null) {
if (runner->record->cid == cid) return runner->record->name;
runner = runner->next;
}
return null;
}
};
I thank you.
2. Simulating Circuits
Here is a circuit:
(circuit)
The aim is simulate its behaviour using an event queue. There are two different types of entities here, nodes (blob) and gates. Both share common functionality, they have an output value (Vo) and a set (see above) of outward connections. This makes traversing the network in the same direction as the input changes propagate easy.
So:
class Device {
int Vo;
int delay;
JamesList drivenDevices;
};
class Node : public Device {};
class Gate : public Device {};
Good. Some good stuff there. So when the user presses the button for node a to change its voltage to 1, we create an event in the event queue (an ordered list of some kind). Then start the simulation by making the first event happen. The output of a device only changes when the event is actually executed, not when we realise that a change must happen. The time difference between these is the propagation delay of the device (for a node this = 0).
I think the event execution should go something like this:
void simulate(int until)
{
EventListNode *runner;
runner = events->head;
/* FOR EACH EVENT */
for (int i=0; i
{
//Check we arent about to overstep the mark
if (runner->event->time > until && until > 0)
{
break;
}
//This event's node
Device *changedDevice;
changedDevice = runner->event->node;
//Actually change the output voltage
changedDevice->setVo(runner->event->Vnew);
//The gate immediately to the right of this node
Set *affectedGates;
affectedGates = changedDevice->drivenDevices;
if (affectedGates != NULL)
{
set
itr = affectedGates->begin();
Device *thisDevice; //Gate for which to update output
//Foreach Device which this Device affects, recalculate its output
int vnew;
while( itr != affectedGates->end() )
{
thisDevice = ((*itr)->device);
vnew = thisDevice->Vnew;
//If the voltage has changed make an event
if (thisDevice->Vo != vnew)
{
events->addEvent(thisDevice,
thisDevice->Vo,
vnew,
runner->event->time + thisDevice->delay);
}
itr++;
}
}
runner = runner->next;
}
//We're done, so delete the events.
events->clear();
}
I do hope that makes some sense, since I have personally given up caring.
Its also important that the ordered event list puts new events with the same time as existing events after the current ones, else they will be missed.
Love and cuddles,
James
:: james at jgubby.com
Somebody stole my phone again!
April 6th, 2007some subhuman scum has stolen my phone from my person while i was walking; some thoughts.
how so ever dare you steal my phone you night-felcher of the soul, you vile incumbent crab, you poo munching pavement beast, a fool go with thy soul; whither it goes! you minge clipping fat scab human excrement faced disease that must be cut away, you racoon-rimming grotesque ceiling felcher with a rectangular monkey who deserves to rot so slowly he isn’t initially aware of the problem – show your sheep-biting face, and be hanged an hour! the most infectious pestilence upon thee!
Yours sincerely,
James
In light of this, if you are in possession of my phone and would now like to revoke your theft, please contact me:
:: james at jgubby.com
Chocolate oranges are available from Rawlinsons
March 31st, 2007Police have been called to a scene in Hove after reports that an exceptionally ugly dog has been creating a disturbance. The dog (whom we will call Jade) has allegedly been making lewd sexual remarks to attractive middle-aged women and later confounded the situation by trying to light (and smoke) a cigarette in a public bar.
“We aren’t yet sure to what extent out usual powers can be used, and whether it is appropriate or funny to arrest an exceptionally ugly dog” said Chief Constable X(ø) who was first on the scene (although he denies he stayed there all evening).
“This isn’t the first time we have had a problem of this kind.” added Chief Constable X(ø). “Last year we were called out to respond to an exceptionally snide cat who was allegedly terrorising children on swings by giving them rubbish easter eggs. And my colleague had to respond to a piece of human shit that mutated whilst listening to Russell Brand talk into something that strongly upheld it was a fish.”
Hove police have issued a statement in which they remind all residents of the need not to shoot themselves in the face, and would like to suggest all residents be wary of exceptionally ugly dogs. If any are spotted they should telephone Channel Four – who have expressed plenty of interest in this field in the past.
Rantankerous
March 26th, 2007I have been recently described as a “rantankerous old man” by a friend. I think he meant cantankerous but I think the word rantankerous is much better. This dictionary claims it isnt a word, so I hereby propose it as the concatenation of ranting and contankerous, multiplied by the third derivative of rancorous.
ran•tan•ker•ous
–adjective [ran-tang-ker-uhs] /ˈrænˈtæŋkərəs/
- disagreeable to deal with; contentious; peevish: a rantankerous, argumentative old man.
- moans constantly about stupid things that dont actually matter and will obviously never happen
- Bitter, long-lasting resentment; deep-seated ill will.
- refers only to those over 50, or simply those who believe they are
- uses phrases like “big brother”, “civil liberties”, “anti-toff movement”, “champagne socialism” and “the nanny state”.
- having a difficult and contrary disposition; “a rantankerous and venomous-tongued old lady”
- when irritated barks: “you simply don’t understand what they are hiding from you” as if that will win the argument
Failed searches
March 25th, 2007After reviewing my webserver’s logs, I would like to extend my apologies to all those who ended up on this site after searching for the following queries and found nothing that satisfied them:
- Phil as OR James Dicken Transsexual
- Bestiality OR Monogomisitic pig farming AND rattlesnake abuse OR Little hairy men
- Panda pops fuel social debate OR brainwashed panther vigour OR mrat! yes please, that’s the (int *argc) AND grove dictionaries for dogs OR everybody else’s fishwives OR jgubby.com is awful
The week of iterative programming
March 19th, 2007With the release of Windows Vista recently, I would like to declare this the week of iterative programming.

Fig.1 : Infinite monkeys programming in C++ for infinite time
Arcadia
March 15th, 2007Dramsoc’s production of Arcadia is playing this week, from Wednesday to Saturday in the Union Concert Hall (Level 2). Reviews have been extremely positive, with most people I’ve spoken to saying its one of the best productions Dramsoc have done in a long time.
Tickets are available online at https://www.imperialcollegeunion.org/drama-81/category.html



