movie rental

attention deficit

Filed under: Blogroll, browsers, tabs, twitter — Wrote by Otu on Monday, October 8th, 2007 @ 2:00 pm

One of my favorite ‘tweets’ - http://twitter.com/philcrissman/statuses/320937682

“does habitually having 50+ tabs open in Firefox mean I have: ADD, high information consumption, or a severe procrastination disorder…?”
-Phil Crissman

I have 3 browsers (Safari, Camino and Firefox) always open with multiple wondows and multiple tabs open on each of them. Every time my session crashes - I weep!

twitter wish

Filed under: twitter, web, wishlist — Wrote by Otu on Friday, September 28th, 2007 @ 7:03 am

WHAT?
I ‘d like to be able to update my favourite tweets(sic) on the go.

WHY ?
I use twitter primarily on my mobile phone. So when my friends say funny or insightful things, I tend to store it up until my inbox gets really really full and prevents more tweets from arriving. This is of course very bad. I am an addict, and it’s called a fix for a reason.
While I can save my favourites on twitter.com, this feature is currently unavailable on the go.

HOW
add fav to the list of shortcodes twitter understand. like help, get, whois, on, off, follow, nudge, d

usage: fav $username

this should mean - add this user’s latest post to my favourites.

enjoy the minute

Filed under: Blogroll, techcrunch, techcrunch20, techcrunch40, woome — Wrote by Otu on Tuesday, September 18th, 2007 @ 4:08 pm

Yes, WooMe is finally go.

We officially and successfully launched before the audience and panelists at TechCrunch40 Sept 16-17th, 2007 in San Francisco.

We are currently signing up beta users, so head over to the site and leave your email to be sent an invite.

Filed under: Blogroll — Wrote by Otu on Friday, September 14th, 2007 @ 1:12 am

Pangea Day, Tell your story.

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.

django newforms, passwordfield

Filed under: Blogroll — Wrote by Otu on Saturday, July 21st, 2007 @ 7:10 am

From Django 0.96, the forms have been rewritten - currently called newforms and imported as


from django import newforms as forms

newforms is a great deal better than the oldforms with all the ‘manipulation’ and a million other unholy things in it.

The problem right now however is that there is very little documentation on using the newforms library - what exists just covers the basic and as such people are having to resort to reading the code or unittests to find out how to do things.

I ‘v just spent almost an hour trying to create a password field which should logically be an extension of newforms.CharField before I found a solution. In the newforms.widgets module.

This is in case I ever forget before the full documentation comes out or in case anyone else needs to do something similar:

from django.newforms import widgets
# Forms
class RegisterForm(forms.Form):
    email = forms.EmailField()
    phnumber = forms.CharField(label='Phone Number')
    passwd1 = forms.CharField(label='Password', \
                            widget=widgets.PasswordInput())
    passwd2 = forms.CharField(label='Password Again', \
                            widget=widgets.PasswordInput())
# end RegisterForm

I feel supported

Filed under: Blogroll, dreamhost, hosting, linux, londongeek, support — Wrote by Otu on Thursday, July 12th, 2007 @ 4:58 am

I received an email from Dreamhost last night about what they thought were dubious activities on my shell account.

I logged in from a UK IP address and a mere minutes later, I logged in from a US IP address.

They immediately moved my .ssh folder to dot_ssh_disabled_by_dh and deleted all the crons I had installed. In the email was attached a copy of my crons, my new password and the email address of a real person to talk to.

Of course it wasn’t at all anything sinister - I was logged into a box stateside, needed to find script I had written almost a year ago and so ssh-ed to said account. I have logged into my account from other countries while traveling but never from the US - this triggered their monitoring system, I suspect they then keep a log of all countries I have visited from and no longer raise warnings from these.

A cursory glance at my history files, showed nothing out of the ordinary - I also checked my authorized_keys file before replacing my .ssh folder and peeked in at the processes running to make absolutely certain. I suspect there’s more that I could have done and that’s what the comments section is for ;-)

Just for good measure, I requested a list of the IP addresses which have connected to my accounts in the last week and Mike from Dreamhost sent the below list back - it’s been trimmed for brevity.


1182960547 o2 GB 86.129.82.65 3ce52ef567bd5dca3a402d863dc14966
1182960547 o2 GB 86.129.82.65 3ce52ef567bd5dca3a402d863dc14966
1183519178 o2 US 208.97.184.215 583677e4675e68f885c58f93c08caa00
1183519178 o2 US 208.97.184.215 583677e4675e68f885c58f93c08caa00
1183519191 o2 GB 86.129.82.65 9fc63a607f18cd3b97c1e15060c5aeeb
1183519191 o2 GB 86.129.82.65 9fc63a607f18cd3b97c1e15060c5aeeb
1183520357 o2 US 208.97.184.215 cbd71d00be60dbff34315939f2eebef0
1183520357 o2 US 208.97.184.215 cbd71d00be60dbff34315939f2eebef0
1183520745 o2 GB 86.129.82.65 10fcfa719b4fc1aef734a7aac3903c60
1183983151 o2 GB 90.193.90.47 7ab6b13fc20332d496316d19a75c0cd7
1183983151 o2 GB 90.193.90.47 7ab6b13fc20332d496316d19a75c0cd7
1184240826 o2 GB 86.129.75.30 ab907df7b86beed9503bd945923fecac
1184240826 o2 GB 86.129.75.30 ab907df7b86beed9503bd945923feca

I keep a running tab of my laptop’s internet facing addresses* and ticked off the GB addresses. And indeed the US IP was the account I ‘d been connected to.

While it continues to bother me that they don’t support django out of the box and don’t plan to provide a database which supports transactions - by which I specifically mean postgres, the amount of detail they put into supporting the services they do provide is commendable.

Thanks Dreamhost - My heroes for the day.


*it is auto-generated when I log onto a network and set in an email to me - at the time I hoped it’d come in handy if my laptop was stolen

Formation SAGE © il maestro ignoto