Friday, June 13, 2014

Cloud9 and Ceylon

Cloud9

I recently stumbled across a really impressive online full fledged coding IDE called Cloud9. By signing up for a free account you get as many public workspaces as you want, plus, a quite complete Linux environment including a really outstanding terminal. This is all made in javascript and HTML5, so this is 100% portable. A recent browser is all you need.

Cloud9 proposes workspace templates, which includes node.js, ruby on rails, php, pyhon and some others. Me being on the Java side, I initially thought it was missing this behemoth, but found out that the JDK comes pre-installed, along with a few tools like Ant.

I find there is no better environment for prototyping some stuff. Nothing to install.

I might write a complete article on Cloud9 in the near future.

Ceylon

I'm a big fan of Gavin King, all the way since the beginning of Hibernate a long time ago. I was quite curious when I heard he was on a special project at Red Hat which was about creating a new language for the JVM. Now that version 1.0.0 is out, it's time to put our hands dirty and check this out. 

Installing Ceylon on Cloud9


From here I assume you already have your Cloud9 account and you created a custom workspace.

Prerequisites for Ceylon are a JDK plus Ant, and they come preinstalled in Cloud9. So lets download the package and install it at convenient place (don't forget to add Ceylon binaries to the $PATH variable in ~/.bashrc):

We now have a working Ceylon installation.

Creating the Hello World project



Executing the project

First execution will provoke the following exception:
This is a common error on Cloud9 when installing/running custom binaries. Access controls restrict write operations in core folders.
We need to override where the cache folder will reside:
A new execution will give us a new error:
It appears that commenting out the documentation lines in run.ceylon fixes the problem.

Next steps

This is just the beginning. Full Ceylon applications can probably be build this way. By natively linking to GitHub, Cloud9 makes a wonderful environment to prototype and test ideas.

Friday, February 4, 2011

A line of code is one too many

courtesy of www.dilbert.com


Over-engineering the obvious

One line of code is one too many.

This quote, which I should trademark if I was a little more "entrepreneur", just summarize a situation we keep coming in while leading design sessions, code reviews, etc. How often people comes up with complex solutions to simple problems. We, developers, thrive on complexity. We think the best solution is by definition the most complex one. Or, we find a solution to a problem, which itself provokes another problem, and a solution, and a problem, and on and on. It's hard to just tell everyone "Hey, forget about it. WHAT led us in that direction in the first place ?!?!?!". But, let's face it. We are not working to have fun. And designing complex algorithms and frameworks IS fun.

So in honor of these situations, I came up with this quote: A line of code is one too many.

Ultimately this just says that when you write a line of code, you better have a reason to put it there. A reason you can easily debate with any people reviewing your code. Any line should be left off if it doesn't fill a present need. Any line fulfilling a future need, even probable, should be removed right away. Keep in mind that the future, in terms of software development, is really hard to predict.

Saturday, January 15, 2011

IDE or Inert Drowsy Environment


courtesy of http://www.dilbert.com/


There was a time when you had to choose between Emacs and VI. In every development team there was a battle. Who would push the CTRL-X CTRL-something faster? Who would knock that ESC key like there was no tomorrow? But something happened at that time. IDEs, already popular in the Microsoft world, took over...

What we gained in speed, we lost in skills.

Today you can spot who was there at the time, and who is what I call an IDE slave. Java developers were considered better developers for that reason. They had to know the library by heart. They had to scan countless javadocs to achieve what they had to do.

Its sad that you don't meet a lot of genuine developers these days. Weird thing is that pretty much everyone consider themselves senior...

So do yourself a favor: next time you learn a new language, forget that IDE for a few weeks. Yes, you will be slow, but you will learn so darn fast that it will look like a great investment.