Monday, December 1, 2008

PMP... my new challenge

My new challenge is to become a PMP certified. I and my colleagues are studying to achieve this certification that will be important for our institution and for us. We have only 2 months to get ready for the test, and I believe that I am one of the guys that have less experience than the others. That's the reason why this is a big challenge for me.
For the ones that are trying to get the certification, I suggest to you to read the PMBOK and the Rita's book at least three times each. And try to solve as many questions as you can. Doing this you'll be able to pass, and I am very sure that I am going to achieve this new goal on my professional life.

Monday, April 28, 2008

JME is now part of my professional life too..

Well, now I can say that I have a little experience using JME - Java Micro Edition platform.

I started to work in a project that develops some games for mobile/cell phones using Java.

It is interesting that I needed to learn a new way of programming, trying to forget many on how to program for JEE.

This happens because most of the time you have a size limit for the application, so you can't put the largest pictures and

a big amount of Java classes into you JAR file.(Java archive)

Of course that I am not the expert on JME, but my experience related to Development and Java helped me to learn fast about this

technology, and maybe I can get the JME certification from Sun Microsystems.

I started to develop using a framework from a very big company, but that has the same structure of the pure JME.

As I have too many things to learn about other IT subjects, I will try to sleep less and study more and try to post some real thing to improve our knowledge.

Calypso.. not the Brazilian music band..

Now in Brazil is raining a lot, but the sun is beginning to shine again.
In my profession we have to think fast and always be prepared for changes.
We always have too much information to gather and learn, and if you are not prepared, then you can get lost if you try to study everything at the same time.
The enterprise that I work for is trying to make some business in the financial sector. Because of this, me and some other guys are studying a little bit about financial markets and trying to learn a huge and complete financial framework called Calypso.
Calypso was developed by an IT company also called Calypso(http://www.calypso.com/). Here in Brazil we have a music band called Calypso, so some of the guys make some jokes, asking if we are learning to dance the music style of that band.
My brother is working with this framework in Utrecht. He was the first that we sent to Europe to work for one of our new customers. We expect to send more people, including me, so let's study!
Thank God Calypso was developed using Java so I don't need to be worried about the coding part. The good thing about Calypso is that you can extend its functionalities and implement others new.

Well, this post is only for you to know that Calypso exists. I don't pretend to write anything about Calypso here again, unless someone asked me.

Have a nice day, and study a lot, because the world needs intelligent people.

Thursday, March 27, 2008

Calling Ruby script from Java code using javax.script package and JRuby

Thi is my first post, so it will be very simple.

I am facing a new work challenge where I was promoted to be a technical leader of a development team. The project has begun, but we are just developing some POCs to call some Ruby scripts from a Java code and use the results to perform some functionalities.
My knowledge about Ruby is nothing, but I am studying, and as I did not start to develop some code using Java 6, I decided to implement something using the javax.script classes to see if it really works (just kidding).
Why do I use JRuby? I am using JRuby because I wanted to receive a Java collection from the Ruby script and I wanted to call a method that receives parameters, so I did as you can see in the code below.

I created a method, in this case, in a Servlet that uses the ScriptEngineManager to call a method (def) in the test.rb script. The class path must contains the Ruby script path to find the script and execute the "getTreeSet" method (def).

Follows the Ruby script using JRuby:

def getTreeSet(name)
require 'java'
include_class 'java.util.TreeSet'
set = TreeSet.new
set.add "name"
return set
end

And now the Java code:

protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

TreeSet set = null;

ScriptEngineManager scriptEngineManager = new ScriptEngineManager();
ScriptEngine scriptEngine = scriptEngineManager.getEngineByExtension("rb");
InputStream is = ClassLoader.getSystemResourceAsStream("teste.rb");
Reader reader = new InputStreamReader(is);
try {
scriptEngine.eval(reader);
Invocable invocableEngine = (Invocable)scriptEngine;
if (invocableEngine != null) {
set = (TreeSet)invocableEngine.invokeFunction("
getTreeSet", "Calling Ruby using javax.script is cool!");
}

request.setAttribute("result", set );

RequestDispatcher view = request.getRequestDispatcher("/result.jsp");
view.forward(request, response);

} catch (ScriptException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
}

That's it. Unfortunately I didn't know if I can use Java 6 yet in the project development. :-(

Want to know more about Java and Ruby? Access: Sun Ruby Developer Center