I have done both. I have used a Chromebook to code on a linode vm and I have installed Ubuntu on the same Chromebook to develop locally.
For my purposes they both work very well. The reason I switched to Ubuntu on the Chromebook was that an easy to use installer was available. Now that I can do development on the machine locally I can use it on the train, where previously the 3G connection wasn't reliable enough. I love it.
However, it should be noted that I used vim for both setups. Although I haven't tried, I don't write Java in my spare time, I think that using Eclipse or Netbeans would be disappointing on the Chromebook. But if your tools are simple you can get a great deal of joy from these laptops.
I have really never enjoyed a computer as much as I enjoy my Chromebook. Alas, right now I am typing this from my monster VAIO laptop, because my wife took the Chromebook on holiday.
Doesn't that make more sense.