Sunday, 22 April 2012

Play! 1 & 2 command tip

If you love the Play! Framework, you might be like me and have both version 1.x and 2.x installed.

Version 1.x, in my case 1.2.4, is a well established feature rich stable version. 
Version 2.x, in my case 2.0, is a new radically different version, that is still in its infancy but released. 

You might have both installed as you have older projects using 1.x and new in development projects using 2.x, or similar.

With both version the norm is to install them and expose the main executable as "play". So how do you differentiate between which version to use for which project?

OK, it is no rocket science but here is a quick tip on how I do it:

I have Play! 1.x installed in

I have Play! 2.x installed in /usr/local/lib/play-2.0

You can add either play folders to the your PATH, e.g. in /etc/environment: 


But I simple add them to my .bash_aliases file:

alias play1="/usr/local/lib/play1/play"
alias play2="/usr/local/lib/play2/play"

On top of that I symlink this:

$: cd /usr/local/lib;
$: sudo ln -s play-1.2.4 play1;
$: sudo ln -s play-2.0 play2

With this setup I have to make a conscious decision whether to run Play! 1 or 2, and can switch between the two very easily.

$: play1 help;
$: play2 help

Avoiding cyber squatting failure

A year or two ago I misspelled a domain name of very popular site used by many developers. It came up as "Not Found" so I realised as the site at the time was still quite niche (not any more) cyber-squatters had not cottoned on to it yet.

So I registered a couple of similar domain names with a misspelled vowel. This was mainly as I thought it was quite funny at the time, but also I did not want real professional & cynical cyber-squatters to register them either.

Of course I did not know quite what to do with them so I put them as Google parked domains (AdSense for Domains) and forwarded all emails automatically to the proper domain. If ever contacted by the proper site I would just let them have the domain(s).

End of AdSense for Domains

This Spring Google closed their AdSense backed parked domain offering. And I needed to reflect what to do with the domain names and what options I have.

I do not really want to keep paying for their registration, the ads on them brought in less than £20 every year so not likely to challenge my ethical backbone either.

When some of the domain names expired this Spring, and I was initially just going to let them expire, but then from experience I know domain cyber-squatters will be scanning for expired domain names and pick them up. And they will use them far more cynically and unlikely to ever hand them over for proper usage. So I extended my registrations with those domain names.

Domain parking bad taste

In the end I moved the domains from AdSense For Domains to another Domain Parker.

But this has left a really bad taste in my mouth. I am not really any better than a cyber-squatter. I am profiting from misspellings, although less than the registration costs... The content on the parked domains are really of no assistance to the people trying to reach the proper site. So I cannot leave it as it is.

"Nice" Anti Cyber Squatting 

The best solution would be if there was a friendly not-for-profit community back anti-cyber-squatter service. Offering useful content/redirection. A sort of defensive registrations the community can do on behalf of proper sites. Naturally the proper sites should really register these names themselves, but some cant or wont. But to avoid squatters taking advantage a free service like this would be handy. Of course we/I would still have to pick up the registration cost.

Landing page

But instead I think I might put up a brief comical landing page with a big button to go to the proper site. (However until I actually get round to create that, the domains are still listed with the domain parker.... )