Posts Tagged ‘Ruby’

Handy Ruby Gem: andand

I came across a really useful Ruby gem today: andand. In PHP web development, I usually use this idiom when retrieving an object from the database model:

$obj = $model->getObject($id);
if(null !== $obj) {
doSomething($obj);
}

Obviously this is a little cumbersome, since I have to do this every single time I get an object [...]

Haddock: Generate Memorable Passwords in Ruby

Newly released RubyGem Haddock offers to generate easy-to-remember passwords, but how secure are they?
Haddock-generated passwords are of the form {word}{number}{symbol}{word}, and are generated to be at-most as long as a user-specified length. So for example, an 8-character Haddock password might be “amy7@rax”.
For a relatively low-security password, like you might use for your Twitter account, this is [...]