Category “Open Source”

Protopass. Simple password strength checker for Prototype

Wednesday, 10 February, 2010

Protopass is a simple password strength checker for the prototype library.

It is distributable under the terms of an MIT-style license.

Example protopass with default settings

Usage

Having the form

<form style="width: 240px;" action="#" method="post"><label for="password">Password</label>
<input id="password" name="password" size="30" type="password" />
</form>

call the Protopass constructor with the id of the password input field

new Protopass('password');

You can override these default options

// Text messages
messages: ["Unsafe password word!", "Too short", "Very weak", "Weak", "Medium", "Strong", "Very strong"],

// Colors for each score
colors: ["#f00", "#999", "#f00", "#c06", "#f60", "#3c0", "#2c0"],

// Common words
common: ["password", "123456", "123", "1234", "mypass", "pass", "letmein", "qwerty", "monkey", "asdfgh", "zxcvbn", "pass", 'contraseña'],
minchar: 6

by passing your defaults as the second parameter:

new Protopass('password', {
    common: ['01234'],
    messages: ["Contraseña insegura", "Muy corta", "Muy débil", "Débil", "Mediana", "Fuerte", "Muy fuerte"]
});

Download the code with examples or fork the source on github. MIT License.

Protopass was inspired by the Password Strength Field jQuery plugin by Tane Piper.

You might want to check my other open source projects

The right time for Open Sourcing

Tuesday, 9 February, 2010

It’s been four years since I opened bermi.org and yesterday I updated the design and the content.

Those who know me personally know how much I enjoy talking about technology and web development. They also know I’m not really active on twitter and the likes. I’m active coding new stuff that normally remains in private repositories and which is used by just a few projects.

Although I’m not much into blogging my friend Demian from Seagull Systems convinced me to write about my technology findings and Open Source projects, his words “you should blog about this stuff” always came back to my mind as soon as I was into something cool that was about to end up in the anonymous repository.

Being a perfectionist it has been hard for me to start blogging as my english is far from being perfect. I also happened to have difficulties adhering to the release quickly, release often motto. This was also the case with Akelos, which started back in 2004 but was not released until 2006 – missing the attention window for new frameworks in the PHP community. Not having a blog also helped on keeping these projects out of the radar.

There have been many circumstances that lead me to start blogging even though most people has their RSS pipe and attention span completely saturated. Some of them are:

Now it’s very easy to release and collaborate in open source projects using GitHub

In September 2009 I started moving from Subversion to Git. It was not as painful as I though it would be. It just took me one weekend and some advise from people I messed up forking their projects (thanks to Alan Pinstein) to realize how Git could change the way I publish and share code.

Although github is mostly popular among Rails developers, the PHP community is plenty of interesting projects that will make github the natural destination for hosting PHP projects.

For instance, pearhub – which uses Fabien’s Pirum will make it really easy to release and install projects using the pear installer. By simply pulling your tags out of github, pearhub will publish your new version into their channel. Could it be more simple?

Contributions

Using git and github everyone can be a committer, removing the politics involved in open source projects around core committers. You can just fork, change, test and notify the team about your changes. If your code is good it will be merged quickly. Merging is really simple when using a tool like git.

So What? A blog on Source Code distribution?

Not about code distribution itself but about the code that I’ll start distributing and releasing.

So far Akelos has been a monolithic block until it’s version 1.0. If you liked how Akelos did something you had to use the whole Akelos stack. Being a convention based framework, that’s a huge commitment for a developer.

Since September 2009 I’m working on decoupling the different frameworks built into Akelos. Akelos is a huge project with many interesting components that are not so common in the PHP scene. The result of this refactoring will be Akelos 2 a faster and better version of Akelos compatible with PHP5.3.

The code has already been published on github and in the months to come I’ll try to release on this blog one by one the parts that make sense to decouple.

I’ll be sharing new project announcements via twitter but you can also subscribe to my blog RSS feed.