Ant “Could not find the main class. Program will exit”

Last week I was struggling with Ant because I changed my Eclipse installation path and I couldn’t run my build.xml anymore. The solution for this problem I’ve found out here.

Tags:

Microsoft on net nasties

Funny news from AustralianIT. Even Steve Ballmer couldn’t rid a Windows infected machine from virus, spyware, worms et cetera. Is there any possibility to rely on Microsoft’s security yet?

Tags:

Explorer Destroyer

If you want people switching from IE to Firefox, take a look at this
tool. You can even earn money from Google for each person you switch! Firefox users, join up for this battle :-)!


Tags:

Association or Aggregation?

I’ve been discussing with my co-workers when we have to use Aggregation or Association in UML models. Martin Fowler in UML Distilled, 3rd Edition says aggregation is the part-of relationship. It’s like saying that a car has an engine and 4 wheels as its parts. But aggregation was included in UML to differentiate from association, because in pre-UML days people didn’t knowhow to differentiate them. But aggregation, as Fowler says, is meaningless. Jim Rumbaugh says “Think of aggregation as a modeling placebo”. Association is a way to notate a property in our classes, but you don’t manage the life cycle of the associated property, as the aggregation relationship do. The solid line between the classes define the way one instance of the associating class can execute methods (operations realizations) of the associated object. So, why to use aggregation?

Tags:

Blu-ray – The next-generation optical disc format

Have you ever thought about recording HD (high definition video) with a format which can hold up can hold up to 25GB on a single-layer disc? Yeap, this can be achieved with Blu-ray, the next-generation optical disc format jointly developed by the Blu-ray Disc Association (BDA). There are some nice photos from Blu-ray players, recorders and media too.

Early abort idiom

Take a look at those Java code snippets:

public void insert(Order order)
   if(order != null) {
      // insert code here
   }
}

public void insert(Order order)
   if(order == null) {
      return;
   }
   // insert code here
}

The second code scratch is said to increase the Thomas McCabe’s cyclomatic complexity. The cyclomatic complexity is a model metric instead of implementation metric, as you may think. An example about implementation metric is LOC (Lines of Code). When I was in college, I learned the McCabe’s metric measures the number of control flow statements and return statements of your code, but it doesn’nt count the normal return statement of your methods. So, the McCabe metric is two for the first code and two for the second. McCabe says that the computation complexity rises with the increase of the execution routes. Cedric has an interesting opinion about this subject. Particularly, I think when you try to use the first insert(Order order), you end up having some nested if’s, your code tends to be a little messy. The second one focus on the basic flow of your method, that is, the normal bahavior its expected to have. In my daily basis, sometimes I apply the first one, sometimes the second one. And you? Do you think in cyclomatic complexity when you are coding?

Tags:

Sun is gonna open source Java?

I’ve came across Vnunet to a interesting news that Jonathan Schwartz, Sun’s new CEO, said that Sun will release the source code of Java. One point of view is that this announcement would attract more developers to Java technology although this could lead to a lot of Java development communities, the same that occurs to the Linux OS distributions. On the other hand, this can be very interesting to developers who always wanted to explore the Sun’s JVM code.

Tags:

Introducing myself

Hi! This is my first post on my blog. I’m a software developer and I’m here to share discussions on software development in general. I was graduated in Computer Science at PUC and nowadays I’m working as a Java software developer and doing a post graduation course on Software Engeneering at ITA, in Sao Paulo, Brazil. This blog is intended to promote some software thoughts and discussions. So, share with me your feelings with the software world!

Tags: