movie rental

examples of emails i hate writing

Filed under: Blogroll, zootok — Wrote by Otu on Saturday, August 25th, 2007 @ 9:40 am
Dear X,

We had lots of people registering with bogus emails simply for the
purpose of using our free calls without any intent to ever top up their
balance.

The point of the free calls is to allow people who would like to try
ZooTok to do so and not for scam artists to make calls at our expense.

As a result, we have decided to stop giving away free calls on registration
and instead give them to customers on their first topup. Since we offer
purchases as low as £1, we feel it is a low enough barrier that anyone
with genuine intents wishing to try us won't mind paying £1 to do so.

Unfortunately you signed up just after the new system went live. You
aren't getting any callback as your balance is 0.

Thanks for registering with ZooTok, Do feel free to credit your
account and test the service.

Otu
ZooToker.

the great split debate

Filed under: Blogroll, django, fields, multiemailfield, newforms, python — Wrote by Otu on Wednesday, August 15th, 2007 @ 6:06 am

The django documentation for newforms gives an example of how to extend the forms.Field class here.

A snippet is shown below.

from django import newforms as forms

class MultiEmailField(forms.Field):
    def clean(self, value):
        emails = value.split(',')
        for email in emails:
            if not is_valid_email(email):
                raise forms.ValidationError('%s is not \
a valid e-mail address.' % email)
        if not emails:
            raise forms.ValidationError('Enter at least \
one e-mail address.')
        return emails

What is wrong with this code?

The variable value is always a string (an empy one “” if value is None).
The python#str split operation returns a list of either the substrings which make up the original or it returns a list with the original string in it if not split.

For instance

“boy girl cat”.split(” “) ==> [’boy’, ‘girl’, ‘cat’]

and

“boy girl cat”.split(”,”) ==> [”boy girl cat”]

Of course in the case where our original string is empty, the returned result is [”"].
Now, in python, you can use None, [], {} as the predicate in your if-else clause.

At this point in the code,

        if not emails:
            raise forms.Valid.......

The author of the above code intended to do so, but was thwarted as he is instead testing a predicate which will never be false.

The question that then arises is who is to blame?

The user: For failing to realise the behaviour of the python split function?

or

The language authors: Who should perhaps return as truly empty list [] not [”"] when split is called on an empty string?

zootok

Filed under: Blogroll, africa, calling, calls, card, cheap, china, india, international, zootok — Wrote by Otu on Sunday, August 5th, 2007 @ 3:54 pm

With as little or as much fanfare as would be considered appropriate for the occasion….

I am pleased to announce the launch of a little pet (side, beta) project my friend Yannis and I have spent the last couple of weekends hacking away at. We call it ZooTok - but you don’t have to.

It is a simple service which allows you to make cheap calls from any where you are, to any other place on the planet and in the future, maybe even other planets. Seriously.

Calls can be made

  1. from the web (register/login and enter the number you wish to call, hit dial and answer your phone when it rings)
  2. or

  3. from your mobile (send an SMS (text message for all alien life forms) with the number you wish to dial to +447800000319. You need to be registered first of course).

So why is it different? The entire call only costs 50 pence (about $1). No matter how long you rabbit on for ;-)

No more minute watching. Visit the site and bring your friends.

Exotic Spam

Filed under: french, gmail, google, spam — Wrote by Otu on Sunday, August 5th, 2007 @ 2:27 pm

Bonsoir,

Je sais que c’est avec surprise que vous lisez ce mail. J’ai vraiment besoin de votre assistance dans l’exécution d’une transaction financière de la somme de US$7.500.000. En contrepartie je vous donnerai 17% de la somme totale. Je vous prie de me contacter à mon adresse email pour plus d’explications.

Sincères salutations.
Mlle Adriane Niamké

Is anyone else getting french spam? Why have I only just started getting them.
Why doesn’t gmail understand french? Because in failing to do so, these are going right to my inbox. I guess bayesian filtering doesn’t work if you don’t have the right language to begin with.

“les inondateurs français sont les dicks énormes juste comme l’anglais ceux”

- This is literal of course, my French is at best atrocious. Teach me to say it properly in the comments.

Formation SAGE © il maestro ignoto