Whilst attempting to enrich my knowledge about Agile methodologies and Scrum in specific I found the site Learning Scrum. This site turned out to be a jewel and it contained a video of a Google Tech Talk by one of the Godfathers of Scrum, Ken Schwaber.
In this talk he explains the history and purpose of scrum as well as what usually happens when developers get into time shortage. On of my favourite quotes from the video is:
By cutting quality we can produce more crap.
How true…
Below is the embedded video as first seen through http://learningscrum.com/20080315/scrum-et-al-video/
If you like to know more, view this video. It is one well spend hour of your life!
E-mail addresses are bitches!
There, now that is said I can tell why.
Should you ever have time on your hands you should read RFC 2822, it provides an interesting (though somewhat dull) background into e-mail messaging. Alas one can also see why it is so hard to validate an e-mail address, it is an extremely flexible format which is quite hard to check.
Fortunately I found a little gem on http://www.regular-expressions.info/email.html which is all about parsing E-mail addresses with regular expressions. For your (and my own) leasure I have prepared a snippet which you can copy paste right into your code.
One small note: this regexp is not fast! It is designed for accuracy, thus I’d advise so I would recommend to on a high traffic site to use the adaptations proposed on the website above.
$regexp = "/^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/"; var_dump(preg_match($regexp, 'mike.vanriel@naenius.com'));
Have fun!
There are those things you encounter again and again and again. Generating passwords is one of those. My experience is that whenever an application needs to be created which deals with user account creation, it is best to let my application create a password for the user.
Why? Simply, I am lazy.
Good developers and users alike are and should be thus lazy that they should not want to think of a new password. All they need is to just generate one with a click and jot it down somewhere!
I have now encountered three or four separate applications which dealt with user creation and every time I have turned to Google and find a method for generating passwords which I subsequently adapt for my own specific application.
To help myself and perhaps you (who probably came from the Google website as well) I have posted (one of) my password generating method(s). The code which I have used here is originally from someone else but I forgot to mention this in my source file. If you recognize this code as your own please comment it so I can give recognition where due. Thought I must comment that I have changed it quite a bit..
/** * This method generates a random character value between the 33(!) and 126(~) * @return int */ function getRandomNum() { $rndNum = rand(0,100) *10; // between 0 - 1000 $rndNum = ($rndNum % 94) + 33; // rndNum from 33 - 127 return $rndNum; } /** * Check if a character value is a special / punctuation character, if so returns true * @param int $num * @return boolean */ function checkPunc($num) { if ((($num >=33) && ($num <=47)) || (($num >=58) && ($num <=64)) || (($num >=91) && ($num <=96)) || (($num >=123) && ($num <=126))) { return true; } return false; } /** * Generates a new password, if the length parameter equals false then * a random length is chosen between 5 and 15 characters long. * @param int|boolean $length * @param boolean $noPunctuation * @return string */ function generatePassword($length = 8, $noPunctuation = true) { $password = ''; if ($length === false) { $length = rand(5,15); } for ($i=0; $i < $length; $i++) { $numI = getRandomNum(); while ($noPunctuation && checkPunc($numI)) { $numI = getRandomNum(); } $password .= chr($numI); } return $password; }
Update 11-01-2009:
As it seems I had to implement a password generator in javascript today.
So I Googled one and found it on http://psacake.com/web/ei.asp. This version funnily looks the same as the PHP version posted above, perhaps they share the same roots?
Anyhow, here it is:
function generatePassword(length, punction, randomLength) { if (parseInt(navigator.appVersion) < = 3) { alert("Sorry this only works in 4.0 browsers"); return true; } if (!length) length = 8; var password = ""; if (randomLength) { length = Math.random(); length = parseInt(length * 100); length = (length % 7) + 6 } for (i=0; i < length; i++) { numI = getRandomNum(); if (!punction) { while (checkPunc(numI)) { numI = getRandomNum(); } } password = password + String.fromCharCode(numI); } return password; } function getRandomNum() { // rndNum from 0 - 1000 rndNum = parseInt(Math.random() * 1000); // rndNum from 33 - 127 rndNum = (rndNum % 94) + 33; return rndNum; } function checkPunc(num) { if (((num >=33) && (num < = 47)) || ((num >=58) && (num < = 64)) || ((num >=91) && (num < = 96)) || ((num >=123) && (num < = 126))) { return true; } return false; }
I have neglected some of my contacts and social places. Although I would like to blaim my busy life for it, it is also a matter of just not making time for it.
So to entertain myself and others, I can share that one of the things I am working on is a redesign of my ‘brand’ and website.
The logo was renewed during the last redesign and I will continue to use that. The things that needed improvement (IMHO) was that the colors could be lighter, causing a less depressing feeling and an additional reason was that I was in the mood for some graphical tinkering.
An additional benefit is that I am taking into account the twitter posts on my blog and make them less visible. Thus making actual posts more visible and dominant.
Unfortunately I have much to do and far too little time to get anything done (or so it seems these days). So all I can say is that it is underway but when it will exactly launch.. I do not know yet..
What I want is not what I can get at my old host. Thus in order to do get what I want I have decided to move my domains to a new webhost.
I have requested the move to be done monday the 22nd of december at 22.00 hours. I still need to get confirmation but am quite sure all will go ok.
During the move a notice will be placed informing you about the maintenance. This site will be unreachable in the meanwhile.
Now, let’s pray all goes well
I have done it, on the 29th of November I finally activated Akismet and begun cleaning up spam which was still remaining on my blog.
Today, I took the time and the liberty to remove the last spam comments AND write a new (perhaps for some quite uninteresting) blog post. When I started my blog I did not expect to be carpet bombed by this much spam but alas, even I had to undergo this torment. Due to the fact I found myself not interesting enough (yet?) to be spammed did I not bother to activate Akismet and forgot about it.
When spam issues arrived I tried several non-interesting and absolutely useless options until MissYeh reminded me off Akismet. I still owe her..
Should anyone be reading this who is thinking about starting his own (Wordpress) blog: install Akismet from day 1. It will save you a lot of headache and it will in the end save you a lot of time fixing your blog.
Again a big warm thanks to MissYeh for helping me remember Akismet and thank you to the creators of Akismet for doing such a fine job.
Until next time!
For some reason I seem to have become popular with the spam bots. Not quite the crowd I was hoping for
It is not possible for me to keep deleting all spam until I have time to implement anti-spam measures. It is on my to-do list but other (more pressing) matters have priority. Should you have any good suggestions about anti-spam measures on Wordpress, let me know!
So.. This blog ain’t dead or unmoderated, just temporarily overrun
I have had a spam run in the last couple of days and was forced to delete a couple of hundred spam messages.
Despite the fact that I was reviewing every message if it was a valid comment or not (I unfortunately do not get many at the moment) it seems that I have overlooked about 90% of the real comments.
FAIL!
I have now placed a small unobtrusive barrier which might temporarily slow the amount of spam and I must look into the spam issue. It is driving me bonkers..
I sympathize with every other blogger who ever had to deal with this..
The PHPWomen contest has closed. As I had said earlier I have also participated in the contest. I restrained from posting the articles on my blog because it feels unfair to the community at PHPWomen.
In hindsight it would have been convenient if I posted a new blog item whenever I posted a new article. But as with most good ideas, it came too late.
To compensate I will post the titles of the articles that I have written here with a deep link to the content, it is only fair that people actually visit the place where the contest was held IMHO.
So, without further delay, here they come:
I hope you enjoy the read and if you are there, say hello or share your wisdom on the forums!
There are times when I do not touch a computer, it happens. I like to tabletop roleplay for example and I ‘own’ a dog called Fenna who loves to be active. At these sort of times one might be tempted to say that I temporarily get a life.
My wife suggested today to visit a little beachside at the IJsselmeer, which is a lake in the Netherlands, to allow Fenna to swim for a while. I thought this to be a good idea, given the heat and all, and off we went.
We took two tennis balls with us to throw in the water (for some reason this is the only time balls are of any interest to Fenna?), which resulted in the utter abuse and molestation of one of those poor little balls. As is demonstrated by this picture.
We took this picture after Fenna had a very good time with the ball and she is currently still far too bouncy and happy happy joy joy.
We had pity on the other ball and kept it from her, perhaps next time it will fall victim to what seems a nice and friendly dog