Thursday, April 09, 2009

New domain !!!

Hi all,

I have changed to the new domain: http://acuriousanimal.orggeo.net. I hope to have some time to move some post to the new site.

Thursday, February 26, 2009

Working with tiles

Today I found this very educative posts at Sergey Malenkov's Blog, and I would like to put a reference to them in my blog:

Design Patterns Explained With Java and Uml2

Design Patterns Explained With Java and Uml2 2008

Friday, February 06, 2009

GTD lightweigh but effective tools

Some time ago I started reading about GTD "philosophy". GTD is easy to follow and effective in your day by day. In my case it helps me a lot at work, improving my organization and the problem resolution. Like other methodologies the difficult isn't in the methodology itself but in ourself, that is, we now what are the "right steps" but forgot to follow them.

Here I point three little tools can help with your day by day (applying GTD):

All three are based on the TiddlyWiki (imagine a HTML page that modifies itself). In the case of 'd3' you have an util calendar to put your reminders.

Tuesday, January 13, 2009

Simply the truth

Here I would like to put a copy of a post read from Navegapolis (Spanish), but contains a link to a video with an speaking of Ken Schwaber.

Si tienes un equipo de ingenieros excelentes, que utilizan excelentes herramientas, trabajan con prácticas de ingeniería correctas, comprenden perfectamente el negocio del cliente, disponen de los recursos que necesitan y no se les interrumpe en su trabajo... Puedes trabajar con scrum: tendrás un incremento de software al final de cada iteración.

De todas formas, scrum también funciona con idiotas. Puedes tener un grupo de idiotas, no hace falta ni que hayan ido a la escuela, ni que sepan de informática o de ingeniería del software. Un grupo que se odien entre ellos, no comprendan el negocio del cliente y trabajen con herramientas traperas... también produciran incrementos periódicos... de mierda.

Está bien, porque sabes lo que tendrás al final de cada iteración.

Monday, January 12, 2009

Amazon WebServices and... sort your params !!!

A couple of weeks ago I start working with Amazon Web Services. Very, very powerful. I just work with a few features like EC2 and S3 but I love it. There are APIs in most language (Java, PHP, ...) to use the Amazon WS.

Anyway, this post is a reminder for all of you that want to implement an API for AWS in some other language (like me and CFML).

Extracted from http://docs.amazonwebservices.com/AWSEC2/2008-08-08/DeveloperGuide/ I copy the sentence that solve my headache:

Sort the query parameters (not URL-encoded) without using case-sensitively.

When you invoke some AWS action the params must be sorted by its name.

Be happy and read the doc.

Saturday, December 13, 2008

Heavyweight + Lightweight

Today seems a good day for many Java developer.
Via Rich Unger's Blog I found the problem with havyweight and lightweight components is solved in Java6u12 and also Java6u12 early access is availably too.
I must test it in the Balloon project, nice to merge WWJ with NetBeans platform.

Tuesday, December 02, 2008

Working with rollbacks in JPA

First examples you could see about JPA shows you how easy is to work with it. Don't misunderstand me, I like JPA, we (the developers) need a standard in the ORM world.
What I mean is when you really start working in a project using JPA discover you must understand fine the standard and the ORM engine implementing it (in my case TopLink).

Previously, in another post I put a couple of links on how to detach entities, here I would like to point to another post, from David Van Couvering's blog, talking about transaction rollbacks.

Wednesday, November 26, 2008

Databases: thinking different

Today I read another great article from Martin Fowler's web page DatabaseThaw.
In these days it seems there is no place to databases philosophy other than relational and the RDBMS titans.
I would like to note one database in "the dark side" commented in the above article, neo4j, a graph oriented database.

Tuesday, November 25, 2008

Detach an entity from JPA persistence context

1 - Previously
Ok, you have designed a great domain model and then translete it to a database or, also much probably, have designed a great database and then generated the corresponding entity classes.

2 - Now
You have some GUI to get user input data. Easy. You create a new domain object (customer, product, bill or whatever else) and persist it through your favourite JPA engine.
Now you have some GUI that lists the available objects in your domain (again customer, product, bill or whatever else. I good idea could be obtain that objects in the way of domain object, I suppose for that reason you create a model, then you can change properties in some of that objects and store (persist) again those changes, so called merge changes.

3 - The question

Here comes the question. How can you detach an object from the persistence context? If you could get a dettached object you could modify its properties, then if the user agrees persist its new state or leave unchaged otherwise.

4 - The solution (or better say 'some of the solutions')
Detach an entity from JPA/EJB3 persistence context

Sunday, November 23, 2008

Where is Java plug-in under Java 6u10?

I think I'm not the first who downloads the last Java6 update 10 release and maybe those I was surprised.
I just download the 64bits Linux version and when trying to configure the Java plugin in Firefox I found (or better say) I didn't find the plugin file.
Looking a bit I found this post. It seems the 64 bits plugin version is still in development :(

Sunday, November 02, 2008

Ubuntu scream !!!

Probably I should be worried about my mental health if I make a Roschard's test, but the first time a see the new Ubutu Intrepid background I saw:





an sreaming skull !!!

Sunday, September 28, 2008

HTML&Applet reminder

It was painful but necessary to explain this history. Someone can think I'm a newbie and maybe he/she is right.

Many people has knowledge about HTML but ,like me, not everydoby is updated about what tags are in use and what are deprecated.

I started working in a simple HTML using DreamWeaver like this:





As you can see, the basic template includes a DTD line specifying XHTML1.0.

My problem comes when I tried to add an APPLET to the page. I spent near an hour comparing my code with other pages: maybe my applet 'codebase' is wrong? maybe the libraries needed by the applet has a wrong path? ...

Finally I found the problem. Here is a copy&paste extracted from w3schools
:
The applet element was deprecated in HTML 4.01.
The applet element is not supported in XHTML 1.0 Strict DTD.

Friday, September 26, 2008

Swing Application Framework & Beans Binding

This is a short post related to two Java project that can be very useful.

Swing Application Framework (https://appframework.dev.java.net) is a small set of Java classes that simplify building desktop applications. I recommned it because it can be viewed as a set of good practices programming with Java. Also take a look at this article.

On the other hand, lately working with NetBeans I make use fo BeansBinding. It could be a bit confusing at the begining but to work with tables and bind values to DB tables, Lists or other objects, is very poweful

Saturday, August 09, 2008

Visual words definition

Today I know the existence of this amazing page: Visuwords.
I think it is one of the most original things I can see in many time.

Thursday, August 07, 2008

Using JAXB to generate KML Java classes

Some days ago I write a post about using JAXB with the KML's XSD file.
Due to a comment I would like to write more explicitly how I generated the Java files.

First of all, what you need is the XSD files which defines the KML syntax (http://schemas.opengis.net/kml).
Also, you need the xjc utility, included in the JDK6 (or download the JAXB project files).

Uncompress the XSD zip file and go into the uncompressed folder. Execute:
xjc -xmlschema -verbose -extension ogckml22.xsd
and get an error similar to this:

[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1058 of file:kml_files/ogckml22.xsd

[ERROR] (Related to above error) This is the other declaration.
line 255 of file:kml_files/ogckml22.xsd

[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 350 of file:kml_files/ogckml22.xsd

[ERROR] (Related to above error) This is the other declaration.
line 261 of file:kml_files/ogckml22.xsd


The problem is there are two scale elements defined, one like 'scale' and the other with upper case 'Scale'. And the same for the snippet element.
By default, JAXB uses case insensitive which will produce duplicated class names.

To resolve this there are some solutions. One is to customize the JAXB specifying the class name to be generated for some elements. The later is a workaround (that I used) that consist to change the name for one of the duplicated elements.
In line 255 change:




by




and in line 1391 chage:



by




The same for the snippet element.

Now you can re-execute the xjc command and a set of Java classes will be generated. The only difference is the change in the scale element which produces a different class name.

Sunday, July 27, 2008

Eastwood Charts

Today, via Dave Gilbert's blog, I know the existence of Eastwood Charts.

If you know about Google Chart API, Eastwood are the same thing but based in the powerful JFreeChart library. Here is a comparison.



The interesting part of Eastwood is it can be used as a servlet installed on your own server and thus you don't need to send your data to Google.

Remove too much files...

Sometimes (in Linux) if you try to delete all files in a directory (that contains a lot files) you get an:

> rm -rf * 
Argument list too long

Via DZone I found this tip to avoid this problem. Basically it used find command to get the list of interested files and remove it one by one.

Friday, July 18, 2008

JAXB for KML

Yesterday, I take a look at KML 2.2 specification.
To avoid create a million of classes to parse XML (KML) documents I put on my hands JAXB. After a while to resolve a duplicate element name (due to case insensitive in JAXB), finally I get a bunch of classes representing the KML element types.

After a couple of little test it seems is all right and now I need to spend some time (that I haven't) to integrate KML2.2 support into Balloon ;)

Thursday, July 17, 2008

Design Patterns

Today I would like to point to this post Design Patterns - Command Pattern.
Via DZone I can see David Cumps is written a series of post about design patterns.
Very interesting for all programmers.