Free book: “Linux Device Drivers”
June 27, 2006 | In Uncategorized | No CommentsO’Reilly, everybody’s favorite publisher, have released some of its books under the Creative Commons license. The most important book, in my opinion, is Linux Device Drivers, 3rd Edition by Jonathan Corbet, Alessandro Rubini and Greg Kroah-Hartman.
Everything that encourage more programmers to do “close to the metal” device driver programming is a good thing. Linux needs support for more hardware. I’m a Java guy and I don’t think I’ll ever have the time and energy to learn kernel programming. But I am truly grateful to the heroes that do.
Recruiting in Colombo
June 26, 2006 | In Agile, Java | No CommentsThe company in Sri Lanka where I work are in the process of recruiting new developers. They used our flow/wizard/form builder (the old and boring version) to build a wizard to gather information about the applicants. Click on “apply online”.
If you are a Java or web developer, living in Sri Lanka, you should really consider working for Mazarin.
Moving to Maven, part one
June 15, 2006 | In Java | No CommentsI need to get control over the dependencies. In our main project we have a plug-in architecture and every plug-in project will deliver jar files. Different versions work with different versions of the runtime. Then we have all the external dependencies. Well, you get the picture.
So I’m looking at Maven for help. I have downloaded and read Better Builds with Maven, but I am very new to Maven. I’m greatful for any help.
One of my projects was once an Appfuse project but it has changed a lot. We don’t use any of the DAO layer (we thought we would that’s why we started using Appfuse) and most of the code is in the service tree, with a small set of controllers in src/webapp.
In the service part we have two easily identifiable parts: model and runtime. There are also some code that is used in model, runtime and webapp. So it seems that the following structure would be good for Maven:
ProjectName (pom) common (jar) model (jar) runtime (jar) webapp (war)
Ok, time to create the structure:
mvn archetype:create -DgroupId=se.altcom.project -DartifactId=ProjectName cd ProjectName mvn archetype:create -DgroupId=se.altcom.project -DartifactId=common mvn archetype:create -DgroupId=se.altcom.project -DartifactId=model mvn archetype:create -DgroupId=se.altcom.project -DartifactId=runtime mvn archetype:create -DgroupId=se.altcom.project -DartifactId=webapp
I have a shell script copying things where I want them. We can’t stop development until the move is complete so I need a way to get the latest stuff over.
The first problem I ran into is how you use this in Eclipse. The root project isn’t a Java project, at least not if you use mvn eclipse:eclipse. It has no source code - just a pom.xml. The four sub directories contains four different Java projects, each with a .project and .classpath. I have to use them as separate Java projects in Eclipse. But what do I do with the base project? I need version control for that too (the base POM needs to be edited).
I wish Eclipse supported Maven modules (projects in projects, with inheritance, basically). Then there would be less clutter in the project list in Eclipse.
So I checked it into CVS as one module. Now, how do other people in my organization use this? They can’t check out and use ProjectName since it isn’t a Java project, but it contains four Java projects.
Since it will be checked out into the workspace (can Eclipse checkout to another directory?), they can’t import the four Java projects. I want to use Eclipse version control, otherwise I could have done the cvs stuff outside of Eclipse and then imported the projects.
This is my best solution so far:
- Check out ProjectName
- Move the project direcory outside of the Workspace
- Delete the project from Eclipse
- Import the ProjectName project to Eclipse
- Import the other projects to Eclipse
It’s to much work! I want people to just checkout and start working. Am I missing something? If I can’t find another way I will go with a flat structure, giving up on modules.
Resource Injection isn’t DI?
June 13, 2006 | In Java | 2 CommentsI’m reading about Java EE 5 and the new Resource Injections in an article at java.sun.com.
Maybe I have missed something but I don’t really like this kind om dependency management. If I want to use my POJO (we want POJO:s, don’t we?) outside of any container, perhaps in a unit test or in a small command line application, can I easily wire up the dependencies then? With Spring style setter injection or with constructor injection that is no match.
And the managed JSF beans looks even harder to use outside of the JSF scope with its @PostConstruct and @PreDestroy annotations. I want clean POJO:s without any classes or interfaces to extend, import or implement, other then those in my domain model. In the article they don’t show the import statements. What’s in there?
Using OpenOffice from Java in Mac OS X?
June 11, 2006 | In Java | 1 CommentI want to do some work with the Java API for OpenOffice.org. I have NeoOffice installed (the alfa release for Intel) on my MacBook Pro.
When I go to openoffice.org I can only find SDK:s for Linux, Windows and Solaris, but not for OS X. I guess the API uses JNI to talk to OOo? Or is there a Java based API somewhere that I can use?
Otherwise I guess I have to do it on a Linux box.
The iAnt Colony in my MBP
June 10, 2006 | In Uncategorized | 4 CommentsI live in Sri Lanka and the ants here are far more aggressive, compared to Sweden (that also goes for some people, it seems…).
If we leave food on the table or forget to meticulously seal the Ziplock Bags we instantly have hundreds of ants carrying the food away.
We should probably use more pest control stuff (we do use some), but we have children living here, crawling on the floor so it doesn’t feel that good to use toxic stuff.
I left my MacBook Pro on the dining table over night. When i picked it up the next day I saw a lot of ants crawling around under the MagSafe connector. I just figured someone left some crumbs there during the meal. I brought the laptop to my bed to watch a DVD. When I opened the screen there was around two hundred ants running around over the keyboard and screen. I had to run out in the hallway and brush them away.

Then as soon as I left the computer for a minute there where immediately ten to twenty ants there. If left alone they got together on a spot, climbing on each other.
Ok, any entomologists out there? Why did the ants like my MacBook Pro? Some nice smelling chemicals in a new Mac (I know I love the smell!)? Do they like running around on the metal containing some electricity?
And more important: have they started a colony inside? Will I have a constant flow of ants as soon as the eggs have turned into new little ants?
Was Mugshot something Fleury had cooking?
June 1, 2006 | In Java | No Comments[marvi@laudes ] HEAD http://mugshot.org 200 OK Server: Apache/2.0.52 (Red Hat) [...] X-Powered-By: Servlet 2.4; JBoss-4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042324)/Tomcat-5.5
Redhats new social networking site seems to run on JBoss. The two companies are in the process of merging. Why did Redhat choose JBoss as the application server? That decision had to been taken months ago, before the merge was negotiated. Before the JBoss deal, Redhat was betting on the JOnAS Application Server. Ok, Java EE is portable, but could they really port it this fast from JOnAS to JBoss?
Was Mugshot in fact a secret JBoss project and now given to and hosted by Redhat?
Are there any details available on the architecture? Seam? EJB3? JSF?