Computing @ 40's

Trying to overcome the obsolescence

Leave a comment

Java float and double primitive types are evil. Don’t use them.

Hi people!

I’m right back here again from holidays and after some weeks without publishing anything I want to resume the work with a short post talking about java primitive types float and double.  Today is an easy post for begginers. No web, no application servers, no JavaServer Faces. A simple lesson about Java SE.

Today I was talking with a colleague at work. He was showing me a Java class, and I noticed that he was using a Double class variable to store some floating point values that were coming from a database. A long time ago I had a bad experience with float and double types when doing a database migration that gave me some hours of headache. I pointed him that he should use BigDecimal instead of that evil things. Fortunately he followed my advice.

I will explain here why I hate float and double primitive types in Java. Why I think they shouldn’t exist. Follow this link and you will learn the reason of my obsession against these “poor innocent” types.

As always I will be very proud to have any comment, any word encouragement, any gift, any million of euros. Every kind of feedback will be greatefully wellcomed.

Cardedeu, September 30th, 2013


Leave a comment

How to create a custom realm in Glassfish

Today I am proud to announce another new entry in this blog. This article is called How to create a custom realm in Glassfish This article is a tutorial where I show how to add security into a Java Web application and doing that creating a custom realm in Glassfish. In this case the audience of this article is people with some grade of experience in Java EE programming, but I tried to explain the things as easy as I can, as always.

There are several reasons that makes me to feel satisfied with it:

  • This new post is the most ambitious one I have published here. It represents the end of a series of articles that I began in order to show how to create a Java application starting from zero. These posts are Oracle Glassfish Server Tools at Eclipse Juno, How to create a Glassfish server available at Eclipse, Creating a simple JSF Web application from the ground and How to setup a JDBC connection in Glassfish. It has been a long path until arriving here but finally the work is done.
  • This days I am celebrating that one year ago I opened this blog and began this little history. As I said in my presentation, this blog is still a try. I don’t consider it still a success. But by now I am doing the way along and I’m still here writing.
  • Also the last weeks I arrived to the 5.000 visits. Really this is much more than I expected one year ago. This makes me to be strong enough to continue. As always I want to give my thanks to Google to put me on the search lists, and also some links from blogs and forums that have given me some visitors. Thanks to all to click here, but I will much more satisfied if you tell me if what I am writing is being useful or not.

Nothing else to say. Enjoy the article (if you understand it).

Cardedeu, July, 8th, 2013.

Leave a comment >

This June of 2013 is being a pretty good time for people interested in Java and Java EE.

Almost at the same time three of the most important technologies I am using nowadays are releasing new major versions:

  • Oracle released Glassfish 4 on June 12th: you can find a short article with the new features in
  • Eclipse is going to launch Eclipse Kepler on June 26th, as always very punctual on their releases. Really i wish that Kepler will make us forget all the troubles that came with Juno release.
  • People developing JBoss are launching the Alpha version of Richfaces 5. With this version I expect that this framework will become mature and will begin to explode the components available in it.

So, three of the pillars of my current work are now publishing important new versions. I expect to include them in our company projects in the next months.

Leave a comment

How to setup a JDBC connection in Glassfish

Today I publish a short article talking about how to set up a JDBC connection in Glassfish. Again, an entry for beginners, but I expect it will be useful for somebody.

As always I will thank any comment you want to do here!


1 Comment

Creating a simple JSF Web application from the ground

Today I publish an article explaining how to create a JSF application starting from zero with Eclipse and Glassfish My aim is to show the process step by step, without using advanced tools, like Maven or project templates coming from JBoss Tools Eclipse plug-in. The reason to do this, is to make people understand how easy can be to create a simple Web application without a lot of knowledge using Java.

The project created here can be the base to create more advanced projects.

This blog has arrived this week to the 4.000 visits, starting from July of 2012. I expect that somebody has been helped by some of the articles here.


Leave a comment

How to create a Glassfish server available at Eclipse

Today is a rainy day here at Cardedeu. There is cold wind outside, and seems that winter wants to beat the spring time to recover its kingdom. So I found that it’s a good day to finish some work I have done in the lasts days. I am preparing an article talking about custom realms in Glassfish, but before I had to do some configuration steps that I show in this post: How to create a Glassfish server available at Eclipse.

This post is dedicated to the memory of my father. This week we have passed the first year after he left. He would like to have seen it.

Leave a comment

Eclipse Juno and it’s poor performance

Hi again.

During the last months some things have happened and unfortunately I couldn’t be concentrated enough to write more articles here. Starting by my computer’s total-crash at summer and a new project that I began at WordPress (a diving blog, called El set mars de Rhye, in catalan), finally I have some time to sit down and write, and I wanted to end this year resuming the work in this blog with just a little one talking about Eclipse Juno and some problems of performance I have experienced with it. To read it just follow this link.

Also I want to comment that during this last month this blog have arrived to 1.100 visits, so I want to thanks to Google to make people to arrive here. But also I would like to know if my visitors have found the few (by now) articles here useful enough or not. Until now I had only one comment 😦 . So please make any comment or criticism and I will thank you the rest of your life.

Finally, we are leaving 2012, a very hard year in many senses. I wish all people in the world to have a nice and happy 2013. This world will continue to be imperfect, but we can help to avoid it with just little steps. No fears, no prepotence, no injustice.

Just sing and smile.

Cardedeu 28/12/2012