eBay Context Advertising

You’ve probably seen eBay‘s context-sensitive advertising on Google: you search for, say, “children’s toys”, and one of the Google ads on the right-hand side of the page tells you how you can buy and sell children’s toys on eBay. I’ve always thought that this system was probably just waiting to be abused, so I had a go at Googling for some animals (real and fictional), and picking up the eBay ads:

Buying animals on eBay

Yes, this is a collage of genuine advertisements. Didn’t know you could buy kittens on eBay, or “bargain monkeys”, let alone Griffons, which are mythological.

Let’s see what else I can get. What happens if you search for “eBay”:

eBay, now on Lycos

Interesting that one of the ads that comes up if you search for ‘eBay’ is one for Lycos… what?

I wonder what I can get hold of from eBay in order to commit fraud and cause destruction, in order to further my plans for world domination…

Fake ID, passports, and weapons on eBay

Wow! eBay’s a proper little terrorist toolkit, and I never knew it. I know where I’ll be getting my “new & used ID cards” from, not to mention taking advantage of “great deals on armaments!”

Perhaps eBay needs to make these ads a little smarter.

E-Mail Server Configuration For Dummies

Well; I feel like a wally.

SmartData‘s taking on a new client for a content-managed web site, web and e-mail hosting. In anticipation of the domain transfer going through without a hitch, I reconfigured our web and e-mail servers to already be ready to accept connections to their “new” web site and for e-mails to come through. This is a wise move, because not all of the computers on the internet appreciate moving domains at the same time, and so for a day or so, e-mails will be going to both the old e-mail server and the new one: the new one needs to be ready to catch these before the first computers start sending e-mail to it.

Unfortunatley, I underestimated the intelligence of the configuration tools and the anti-spam mechanisms of our e-mail server software.

So, I send an e-mail to our client, who we’ll call bob@our-new-client.com, from my @smartdata.co.uk address. It goes out through our mail server. This is where it all goes wrong. Normally what our mail server would do would be to look up where on the internet our-new-client.com’s e-mail is kept, connect to there, and deliver it, but our mail server is a little bit lazier than that. It thought to itself, “Hey, I am the e-mail server for our-new-client.com: I know this, because I’ve been configured to accept mail for them,” and so it happily filed all my mail to bob@our-new-client.com… on their new mail server.

And then the news came through that there were complications in the domain name transfer, and it would be a few more days before they could easily pick up said mail. So, I’ve happily e-mailed them a request for their deposit on their hosting package with us, and they’re wondering why we haven’t asked for it yet, so they e-mail us. Here’s what happens:

Their e-mail server contacts our e-mail server and says “I am our-new-client.com, and I have an e-mail for dans-real-address-goes-here@smartdata.co.uk.”
And our mail server thinks “Hang on, this server is pretending to be our-new-client.com, but I know that I am responsible for our-new-client.com’s e-mail. This must be a filthy spammer trick.”
But our mail server was configured by me, so it’s a little devious. It responds (to the real our-new-client.com mail server): “Okay, I believe you, give the the e-mail.” (so those filthy spammers have no idea whether their mail got through or not) Then it shreds the e-mail and buries it in virtual concrete.

And so, for the latter half of this week, neither our newest client or us have been able to e-mail one another, and it’s only today that I’ve noticed.

Bugger.

This Weekend’s Events

Just so those of you in Aber know, here’s some of this weekend’s highlights:

  • Geek Night tonight is cancelled, as JTA and I are building his new PC (possibly with the help of Paul and certainly while being hand-fed peeled grapes by Ruth).
  • A number of us are discussing seeing the 2:30pm matinee showing of Wallace & Gromit in The Curse Of The Were-Rabbit at the Commodore on Saturday, thereby still having time for our usual film programme in the evening. Want in?
  • Troma Night tomorrow is on as usual. Hopefully we’ll be finally having the long-promised “comic book night”. We shall see.
  • Claire is away for the weekend, helping out the Freshers at on the computer science activity weekends as they throw themselves off telegraph poles and otherwise get very muddy. This means you won’t be able to get in contact with her. This means you, Claire’s Dad.

Dan’s Dingbats Challenge III – Results

Thanks to everybody who played Dan’s Dingbats Challenge III; it was great to see some of your answers. Almost everybody did really well on points this time around, but many were let down by their times.

Here’s the final scoreboard and answers:

Position Player Time Taken Right Answers Total Time
1 Faye (Aber)
Very quick; every one right…
3mins, 44secs 14 3mins, 44secs
2 Count Gonzo van der Winklestein Jones 2mins, 45secs 12 4mins, 25secs
3 Binky
The fastest time to answer all the questions, but lost marks for wrong answers.
2mins, 28secs 10.5 5mins, 23secs
4 Claire 4mins, 5secs 12 5mins, 45secs
5 A Bowl Of Candy 3mins, 23secs 11 5mins, 53secs
6 Mister JTA 4mins, 14secs 12 5mins, 54secs
7 RockMonkey 5mins, 13secs 13 6mins, 3secs
8 Statto 4mins, 10secs 11.5 6mins, 15secs
9 Ruth 4mins, 43secs 12 6mins, 23secs
10 Pacifist 4mins, 11secs 11 6mins, 41secs
11 Matt In The Hat 5mins, 19secs 10 8mins, 39secs
12 Leu 5mins, 58secs 10.5 8mins, 53secs
13 Raz 6mins, 15secs 10.5 9mins, 10secs
14 Itsme (Gaz @ SmartData) 8mins, 23secs 12 10mins, 3secs
15 Chloe 7mins, 31secs 9 11mins, 41 secs
16 Sarah
Only answered one question; as a result, came last!
1mins, 18secs 1 12mins, 8secs

Apologies to “bleh” from 82.144.227.98; your answers arrived just too late to participate, but for your reference, you took 5mins, 14secs and got 13 right (give or take some interesting phrasing), for a total score of 6mins, 4secs.

Here are the answers. Click on a dingbat for a full-size version:
Charity begins at home
Charity begins at home
A nice simple one to begine with – the word “charity”, beginning inside a symbolic “home”. I also accepted “in the home”, “starts”, and any other derivitive of this basic phrase.

Fractional distillation
Fractional distillation
Yes, I know that this was ludicrously difficult, but a good number of people managed to get it. Incorrect answers included “distillation quarter”, “a quart of alcohol”, “Hooray! Distillation = Whisky!” (thanks, JTA), and “I have no idea”.

Back to basics
Back to basics
Another simple one: at least I thought so – the word “basic”, twice (“two basics”), written backwards (hence “back two/to basics”). Nonetheless, wrong answers included “basic backeards [sic] twice” and “two basic backwards”.

Actions speak louder than words
Actions speak louder than words
Several “actions” saying “blah” louder than their wordy friends. One wrong guess was “all talk and no action”: not sure where that one came from…

Every dog has it's day
Every dog has it’s day
Several “dogs”, each with a “day”. What more do you want? I accepted “a dog will have it’s day” (basically the same thing), and gave half-marks for “give a dog it’s day” (there’s no “giving” involved, I’m afraid). I also accepted Paul’s “I was going to say “Dog Day Afternoon” but I don’t think so. Every Dog Has His Day?” because he concluded the right answer in the end and he was very sweet to lose several seconds of his time writing me an essay about how he reached that decision.

Definately wrong answers included “dog days”, “dog day afternoon” (what?), “until dog days end” (huh?), “ground-dog day” (umm?), and JTA’s deluded “Hm. Something about the ‘Dog days’ at the arse end of August, I suspect. Er. Which means Sirius, but I can’t get it…”

Like father, like son
Like father, like son
The word “like” appears in the place of “father” and his son in this stylised family tree, and most players understood the connection. Wrong answers included the wonderful “your mum” and the great guess “I don’t like my mother (well? It’s true!)”

Look on the bright side
Look on the bright side
The word “look” appears on the bright (or light) side of this gradient. Most folks seemed to understand, but some guessed “look lighter on the other side” or even “the right look” (what???).

Love is blind
Love is blind
The word “love” is depicted here with a guide dog and cane. “Blind love” was also an acceptable answer. Half-marks were earned for “Love is like the blind leading the blind”, but I’m afraid I can’t give any points for “guide dog of love” (wasn’t that a song by Dire Straits)?

All that glitters is not gold
All that glitters is not gold
Decpicted are a bunch of metals, all of which are glittering, except for gold, which is not: hence, “all that glitters is not gold”. It’s not quite what I was looking for, but full marks go for “not everything that glitters is gold”, which still embodies the meaning of the phrase. However, no points for “black gold” or for “Something about gold being stronger or bolder or something than something. (thanks Chloe)”

Divide and rule
Divide and rule
It’s a divide symbol, a plus (“and”) symbol, and a rule(r). “Rule and divide”, despite turing the phrase on it’s head, was also acceptable. “Divide and measure” got half a mark, because it was clear that the player who wrote it knew where they were coming from but just hadn’t heard of the phrase before. However, Paul’s “Divide Plus Ruler? What?” doesn’t score on this question.

A picture is worth a thousand words
A picture is worth a thousand words
Well, a lot of words, anyway. No prizes for “weight of words”, though.

(It) takes two to tango
(It) takes two to tango
Probably ought to explain this one: the word “take” is repeated multiple times (“takes”); followed by the number 2 (“two”), followed by the word “tango” twice (“two/to tango”). Anything close got the mark, but “three takes to tango” is wrong and “right to tango oh fuck it” is way out.

All is fair in love and war
All is fair in love and war
Easy enough – the word “fair” is repeated throughout the words “love” and “war”. The only person to get this wrong wrote “nothing is fain in love and war”, which I don’t think is even close to accurate.

Blood is thicker than water
Blood is thicker than water
Easy: the word “blood” is written in a thicker typeface. Everybody got this one.

Well there you have it. Keep an eye out for Dan’s Dingbats Challenge IV!

× × × × × × × × × × × × × ×

Dan’s Dingbats Challenge III

It’s back! Dan’s Dingbat Challenge III!

If you’ve not played Dan’s Dingbat Challenge before, you’d better go back and look at the first and second ones, and Andy’s one. Or just go look at the answers to my first and second ones. Or just give it a go.

I’ve made a few changes since last time:

  • There’s a nifty little JavaScript to automatically put your cursor into the box you have to type into, to save you having to click in it. You should now be able to play the whole game without touching the mouse.
  • I’m using incremental graphics, so even if you’re on a slow connection you should be able to make out (mostly) what the picture is, even before it’s loaded.
  • The penalty for wrong answers and skipped questions has been increased to 50 seconds, so it’s really worth your while to look at every one for a few seconds before giving up. As usual, there’ll be “half-marks” available for very close-but-not-quite-right answers.
Play “Dan’s Dingbat Challenge III”!

3 Brazilian Soldiers

Donald Rumsfeld was giving the president his daily briefing.

He concluded by saying: “Yesterday, 3 Brazilian soldiers were killed.”

“OH NO!” the President yells. “That’s terrible….just terrible!”

His staff watches as he buries his head in his hands and saying, “This is bad; bad for the coalition.”

His staff sits stunned at this display since he had never shown much interest when other reports came in of American casualties.

Finally, the President looks up and asks to no one in particular, “So exactly how many is a brazillian?”

The Way Lunch Should Be

There’s a right way to go for lunch during your break at work, and, if you’re in Aberystwyth, this is it.

Starter
I started in Scholars, where Matt (in the Hat) is spending the entire day as a birthday celebration. I treated Matt to a pint of Guinness, and had a half myself, thereby giving myself probably a full lunch’s worth of calories. But never mind. Matt was trying to teach his friend Dave to play cribbage, with moderate success dulled only by the alcohol both had consumed. Matt’ll be in Scholars until they close, I don’t doubt, so if you haven’t wished him a happy birthday yet, that’s where you’ll find him.

Main Course
Morgan's ButchersI’ve recently discovered the sandwiches of Morgan’s, the butchers opposite Barclays on Great Darkgate Street. You go in there and mutter “beef” to the chap, who then slices a generous bun and fills it with roast beef, a Yorkshire pudding, fried onions, and thick gravy. It’s a roast beef dinner… in a sandwich! Genius! Apart from the obvious mess it makes to eat it, it’s fantastic.

Dessert
And to finish: back to The Hot Bread Shop on the corner of Cambrian Place and Chalybeate Street for a slice of orange cake. And now I’m very full. Marvellous.

Abbey National’s Rebranding

Is is just me who sees Abbey National‘s new logo – the result, inevitabley, of thousands of pounds worth of rebranding as part of their “new appeal”, as looking like some kind of symbolic steaming turd?

Abbey National's new "baked bean in a cape" logo.

Perhaps it’s just me, but when I first saw it in Aber high street the other day, that’s the first thing I thought of.

×

Writing A Calendar App In Rails Vs. PHP

Some time ago, I wrote a web-based calendar application in PHP, one of my favourite programming languages. This tool would produce a HTML tabular calendar for a four week period, Monday to Sunday, in which the current date (or a user-specified date) fell in the second week (so you’re looking at this week, last week, and two weeks in the future). The user-specified date, for various reasons, would be provided as the number of seconds since the epoch (1970). In addition, the user must be able to flick forwards and backwards through the calendar, “shifting” by one or four weeks each time.

Part of this algorithm, of course, was responsible for finding the timestamp (seconds since the epoch) of the beginning of “a week last Monday”, GMT. It went something like this (pseudocode):

1. Get a handle on the beginning of "today" with [specified time] modulus [number of seconds in day]
2. Go back in time a week by deducting [number of seconds in day] multiplied by [number of days in week] (you can see I'm a real programmer, because I set "number of days in week" as a constant, in case it ever gets changed)
3. Find the previous Monday by determining what day of the week this date is on (clever functions in PHP do this for me), then take [number of seconds in day] multiplied by [number of days after Monday we are] from this to get "a week last Monday"
4. Jump forwards or backwards a number of weeks specified by the user, if necessary. Easy.
5. Of course, this isn't perfect, because this "shift backwards a week and a few days" might have put us in to "last month", in which case the calendar needs to know to deduct one month and add [number of days in last month]
6. And if we just went "back in time" beyond January, we also need to deduct a year and add 11 months. Joy.

So; not the nicest bit of code in the world.

I’ve recently been learning to program in Ruby On Rails. Ruby is a comparatively young language which has become quite popular in Japan but has only had reasonable amounts of Westernised documentation for the last four years or so. I started looking into it early this year after reading an article that compared it to Python. Rails is a web application development framework that sits on top of Ruby and promises to be “quick and structured”, becoming the “best of both worlds” between web engineering in PHP (quick and sloppy) and in Java (slow and structured). Ruby is a properly object-oriented language – even your literals are objects – and Rails takes full advantage of this.

For example, here’s my interpretation in Rails of the same bit of code as above:

@week_last_monday = 7.days.ago.gmtime.monday + params[:weeks].to_i.weeks

An explanation:

  • @week_last_monday is just a variable in which I’m keeping the result of my operation.
  • 7.days might fool you. Yes, what I’m doing there is instantiating an Integer (7, actually a Fixint, but who cares), then calling the “days” function on it, which returns me an instance of Time which represents 7 days of time.
  • Calling the ago method on my Time object, which returns me another Time object, this time one which is equal to Time.now (the time right now) minus the amount of Time I already had (7 days). Basically, I now have a handle on “7 days ago”.
  • The only thing PHP had up on me here is that it’s gmdate() function had ensured I already had my date/time in GMT; here, I have to explicitly call gmtime to do the same thing.
  • And then I simply call monday on my resulting Time object to get a handle on the beginning of the previous Monday. That simple. 24 characters of fun.
  • + params[:weeks].to_i.weeks simply increments (or decrements) the Time I have by a number of weeks specified by the user (params[:weeks] gets the number of weeks specified, to_i converts it to an integer, and weeks, like days, creates a Time object from this. In Ruby, object definitions can even override operators like +, -, <, >, etc., as if they were methods (because they are), and so the author of the Time class made it simple to perform arithmetic upon times and dates.

This was the very point at which I feel in love with Ruby on Rails.

The Flat Is Tidy

Thanks to JTA for his help. Huge thanks to Matt (temporarily minus his hat) for his help: feed the guy oatcakes and rum and he’ll mop your floor! Winnage!

This is, of course, a result of the anticipated sale of the building we live in. The owners of MG’s cafe, below us, and – in fact – the whole building, are selling up and leaving. I’m not sure if this is what they’d planned all along – to buy the building, renovate the café, and sell it at a profit – but it’s at least a little bit inconvenient for those of us who live there and don’t know if and when we’ll have new landlords and whether or not they’ll want tenants (for instance, one of the prospective buyers when the building last came up for sale would have wanted to turn The Flat into a home for themselves).

But hey; The Flat is clean. Come see.

A Jolly Good Fundraiser

Just got back from three days of fundraising for Aberystwyth Nightline, selling hot dogs, burgers, and fries at a stall at the University “Fresher’s Fair”. That was pretty successful.

In other news, a large padded A4 envelope arrived at The Flat today, addressed to Paul. The stamps, letter header etc. all seem to imply that the letter has been sent from NATO‘s “Public Diplomacy Division.” That’s a little alarming.

Beer and curry tonight, usual crew. Meet at 7pm at Scholars or 8:15pm at Cafe All Spice if you want in.

The Aber Effect

Last night really works as a great example of the ‘Aber Effect’. Claire and I went along to Sundeep‘s housewarming party, where she was feeding curry to her housemates and those of us who came along to welcome her back into Aberystwyth. I’d also promised to help sort her computer out with an internet connection, but I’d forgotten to take the network card I’d agreed to lend her.

Having eaten, as some folks were packing up to leave, I suggested that Claire and I go and pick up the network card from The Flat, then come back and install it into Sundeep’s PC. That’s when we heard about Sundeep’s flatmate, who’d managed to lock himself out of his room. So we went back to The Flat and picked up the network card and also a set of lockpicks and a can of oil, and so when we got back Claire was able to install the network card while I picked the lock of the housemate’s room.

Having succeeded in my lockpicking attempt (after some jiggerypokery with the lockpicks and a filed-down Somerfield saver card [knew those things would come in handy]) and opened the room, the housemate offered Claire and I a pint in Scholars, which we accepted. Leaving Sundeep, we joined him and some of the other housemates in the pub for a congratulatory pint each of Old Speckled Hen.

And that’s where we bumped into Matt (in the hat), Andy K, and a friend of Andy’s who will henceforce me known as MOT. Jokes about having to renew him every year aside, we explained our plan to return to The Flat and decant the wine we’ve been brewing in our wardrobe for the last fortnight, and invited them to come join us when they’d finished their drinks. Then, needing to get a head start on them so as to start processing the wine, we set off.

On the way home, we were greeted by two separate groups of strangers, the first of whom overheard our conversation and with whom we briefly debated “the Aber effect”, and the second of whom wanted to use their camera phone to take a picture of Claire and I (although we’re not quite sure why).

We siphoned the wine into bottles, dissolved some fine sugar into it (the yeast had been somewhat overenthusiastic over the first few days and had made the wine slightly bitter and extremely alcoholic), and corked them, right on time for Matt, Andy, and MOT to arrive. We lounged, and drank wine, and were joined by JTA and Gareth, with whom we watched a few episodes of American Dad and listened to some music while the wine kicked in. Which it did, quite remarkably.

So, from a housewarming in Llanbadarn we met a guy who’s lock I picked for which he bought me a pint at a pub where I met some guys I knew and a guy I didn’t who came back to my flat where we drank homebrew wine with some folks who were at the party to begin with. This is the essence of the Aber Effect. And I love it.

Interview With Hayoa Miyazaki

The Guardian ran an interview with Hayao Miyazaki, director of such films as Princess Mononoke, Spirited Away, and Tonari no Totoro. My favourite bit of the interview:

Miyazaki taps a cigarette from a silver case. The Disney deal suits him, he explains, because he has stuck to his guns. His refusal to grant merchandising rights means that there is no chance of any Nausicaa happy meals or Spirited Away video games. Furthermore, Disney wields no creative control. There is a rumour that when Harvey Weinstein was charged with handling the US release of Princess Mononoke, Miyazaki sent him a samurai sword in the post. Attached to the blade was a stark message: “No cuts.”

The director chortles. “Actually, my producer did that.”

Magic Story

Inspired by Andy‘s PassThePageGame on the RockMonkey wiki – a collaborative storytelling game based on that silly game you used to play at school, I’ve written my own tool:

MagicStory is a collaborative wiki storytelling tool designed to be harder to “run away” with than normal wikifiction. Having read the story, participants can write a suggested “next sentence”, and after three suggestions have been collected a fourth person will be able to choose which one is used. Give it a go!

You’ll need a RockMonkey account, of course, but they’re free and simple to set up.