<< Previous | Home

My thoughts after 10 years of Java programming

A couple of months ago (June, to be precise) was my 10th year anniversary of doing Java programming. In that time, I've worked with several technologies, seen a couple of interesting projects and worked for different companies in different sectors, both as a consultant and as an employee. I thought I should share a couple of thoughts I've had after all these years.

First of all, it's amazing how much Java has advanced in that time. I think Java is probably one of the few languages who actually has evolved without becoming a completely different language, while still maintaining backwards compatibility. This is why I love Java. I get to learn new stuff every day (after 10 years, I'm still learning) and yet I can rummage among my old backups, open up a very old project and it will still run unchanged. Sure, libraries come and libraries go, but the core is still there, ready for your programs.

Working in different industries has also been interesting for me. When you're in the IT sector, you usually try to do more bleeding-edge stuff, look after the new, not yet released technology that you think it will change the world. Contrast this with working in the retail sector, where the priorities are to keep the business running, which usually means that changes are more slow to come, and stability is a very important thing. If your program crashes in the IT sector, you just release it as "beta". If your program crashes in the retail sector, your company can lose millions. Yet in both sectors (and others I've worked on, like banking and such) Java is used daily. Millions upon millions of transactions per second are managed by Java code, while the next generation electronic gadget is being tested against the latest Java ME standards. I think very few languages are as pervasive as Java.

Would I still be coding Java after another 10 years? I don't see why not. I really enjoy doing it, and I've been fortunate so far in that I haven't had to "move on" to a different position in order to advance myself professionally. I also think Java will continue to evolve for a long time, and I'll keep learning new stuff after another 10 years (at least).
Categories : Java

Add author icons to your weblog comments

Good news, everyone! No, Futurama isn't on the air, yet. But soon. Anyway, I'm still here, albeit a little busy. However, in one of those few late night things I do, I was able to finish up a little project. If you didn't know, there's a site that stores your icons and lets weblogs put icons on the comments, based on the author's email. Gravatar.com provides your site with icons for all the people who comment on your weblog. This works by locally (on your site) generating an MD5 hash of the comment author's email, and then creating an img tag with a source URL that points to gravatar.com and uses the hash to identify the author, and if the author has previously registered that email with gravatar, it will give back an 80x80 picture that was previously loaded by the author. The MD5 hash avoids the need for someone's email address to leave your site, which I think it's good.

I found this concept very interesting, and when I looked at the implementation page, I found out there's very few java support, other than some code on how to create the MD5 and I realized this was a good opportunity to create a taglib. So here it is. jAvatar is a tag library that lets you include a gravatar icon for each of the comments on your weblog. To use it, you just need to add the javatar.jar to your webapp, and the taglib to your comment page. Here's an example on how you can do it on your comments JSP page:

<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@taglib uri="http://javageek.org/files/taglib/javatar" prefix="javatar"%>
<%
String email = "some_email@somesite.com";
%>

<html>
  <head><title>My JSP 'index.jsp' starting page</title></head>
 
  <body>
    This is a gravatar:
    <javatar:image mail="<%= email %>" imgSize="100" styleClass="gravatar" rating="R" defaultImgUrl="http://mysite.com/img/defIcon.gif" borderColor="F0F"/>
  </body>
</html>

Of course, the email should be the comment author's email, and the tag should be put in whatever loop you have for showing your comments. I hope you like it.
Categories : Web

Fight for your Freedom

I was looking at the new Windows Live Messenger application that Microsoft released to replace the MSN Messenger. One of the things that I found really odd is that on of the terms on the  EULA (End User License Agreement) states:
2.    HOW WE MAY MODIFY THIS CONTRACT.

We may change this contract at any time.  You must review this contract on a regular basis.  You can find the most recent version of the contract at 'http://messenger.msn.com/Help/Terms.aspx'.  The changed contract is in effect right away.  If you do not agree to changes in the contract, then you must stop using the Service.  If you do not stop using the Service, then your use of the Service will continue under the changed contract.
So, once you accept the first version of the EULA, they are free to change it anytime and it is our job to check for any changes? Not only that, if we fail to check the contract the day it was changed, we automatically agree to the new terms? Is this even legal?

It is incredible how more and more corporations are trying to control everything you do on a computer, and care more about profits and revenues than actually providing a useful service to its consumers. And  the worse part is that I read this term just after reading the Wall Street Journal article " Zen and the Art of Classified Advertising".

It makes me wonder about the ongoing battle that has been going on between big corporations (Microsoft, music labels, movie studios) and open source advocates for the control of a consumer PC.

Big corporations want to control everything you do on your computer (examples of this: DRM, CSS, phone-home windows update, etc) so that you really don't have control over what you legally own. By trying to modify the law,  they are setting the stages so that if they find a new way to increase revenue, they can just change their licensing terms, or access your computer and change how software works. Imagine a cable bill that comes with an extra hundred dollars, and when you ask the cable company why the extra charge, they tell you "Oh, we changed the terms so now every time you change channels, an extra dollar is added to your account. If you didn't agree with these terms, you should've terminated your contract the day we changed the terms. It was your responsibility to keep track of these changes, you know. It's the law".

Open Source Software, even better than being free (or at reasonable costs), what really gives you is Freedom. Freedom to be the true owner of your computer and your (legally acquired) media. Freedom to do your daily tasks, listen to your music, watch your movies, interact with other people, etc. without a third party interest on what you are doing. By encouraging open standards that trascend companies or organizations, OSS really cares about its consumers, not making a profit everytime the format is changed. OSS gives you Freedom to have privacy and security over your information and your (perfectly normal) habits.
Tags :
Categories : Rants, General