Skip to main content

Posts

How your XML parser can detect encoding?

I've just fined a tiny article which describe how XML parsers detect document encoding. I hope you already know this but it always good to read it again. In a few words, parsers use the first document characters which are the same in all xml document and try different ways to read them and evaluate encoding.
http://www.xfront.com/specifying-encoding/index.html


Maven best practices

Today, my friend Marco sent me a great blog entry on Maven best practices. In a few words, it says :

Automate Snapshot Deployment by integrating your project in a CI system (like Hudson)Isolate Local Repositories using use -Dmaven.repo.local=xxxx option to define the unique local repositories for each build.Regularly Purge Local Repositories (mvn dependency:purge-local-repository)Enable Batch Mode with the -B option to reduce log sizeEnable Full Stack Traces (-e) when there's a build errorPrint Test Failures to Standard Output (in your settings.xml : true)Always check for Snapshots (-U option); useful when your project is split in modules and libraries. This ensures you always have the last dependency library release on your project.

Click here to see the full post : http://blogs.sonatype.com/people/2009/01/maven-continuous-integration-best-practices/

Thanks Marco!

Making Eclipse look better on Ubuntu

I started today to find the simplest way to make my Eclipse look better on Ubuntu. I've got a laptop (so, I'm used to work with an LCD screen). Here is my solution :

Step 1 : install the ttf-liberation package
Step 2 : open your system->preferences->apparence menu. Go to the font tab and change fonts like that :

Application/Document/Desktop font: Liberation Sans, size 9
Window title font: Liberation Sans Bold, size 10
Fixed with font: Liberation Mono, 10

Select the LCD screen optimization features (including in the User Details options).

That's all!

Let's talk about design patterns

Do you know the difference between Adapter and Decorator patterns?

These two patterns are made to wrap objects. Humm... Same goals? Not exactly. On the first hand, the Adapter pattern is used to transform your class interface contract to another one. In the real world, you use it to "adapt" your code to an external piece of code you need.

In the other hand, with the decorator pattern, your class keeps its interface contract. You just wrap your code to bring some new features. For example, you decorate a class to integrate a counter on method calls and perform a performance test.

IntelliJ shortcuts vs Eclipse shortcuts

Recently, I started to work with IntelliJ. But, honestly, after several years with Eclipse, it's hard to be effective because of key shortcuts which are different between the two IDEs. A little request on Google and I found this (great!) :

DescriptionEclipse shortcutIntelliJ ShortcutNavigate a Java TypeCTRL + ALT + TCTRL + NNavigate a ResourceCTRL + ALT + RCTRL + SHIFT +NLast Modified SourceALT + Left arrowCTRL + ALT + left arrowDebugF11Shift + F9Open DeclarationF3CTRL + SHIFT + BOpen HierarchyF4CTRL + HOrganize ImportsCRTL + SHIFT + OCTRL + ALT + OFindCTRL + FCTRL + FFind Again/ previousF3 / SHIFT + F3F3 / SHIFT + F3Step IntoF5F7Step OverF6F8Step OutF7Shift + F8ResumeF8F9To find impl of an abstract Method?Ctrl + Alt + BTo find usageCTRL + SHIFT + GAlt + F7

Let's SCRUM

Yes, it's time to start a new project. A classic fact is that user specifications are not yet completely defined. Humm, but I need to start the project. The only solution will be to be agile. So, let's SCRUM. It's the first time for me. I read some docs from the past but I never really tried it. Thus, I spent this evening reading charts, blogs, etc... I also found a good french video preformed by a SCRUM senior (having 4,000 hours flying on agile projects) :


Planification et gestion de projet informatique : SCRUM
par intellicore

Google App Engine will support Java

Excellent news! There was an empty place on the web : it was barely impossible to find free hosting for java applications. The main reason is certainly due to the runtime heavyweight. For example, a java apps consume a lot of cpu and i/o charges on JVM startup. Another reason is the total cost ownership of java servers. Let me try a little comparison : if a PHP engine is like a old car (not really powerful but strong for many usages and maintenance free), a Java engine is like a Ferrari : really performant but really horrible to manage, to tune, to maintain, etc... Now imagine that you're at the head of a low cost rental company. What should you prefer : offering PHP cheap engine or Ferrari ones? You see what I mean... But, in the other hand, what's a frustration for millions of java developers like me! I was forced to program in PHP for my webapps. (and I'm really not a PHP killer). Hopefully, graceful to Google, you will be able to have online apps using Google App En…

Database design

Database design is often made by programmers. This is common mistake . Only a few developers know internal db structure and mechanisms. Let's doing a tiny test :
1) Describe me what's an hash table?
2) Give two link of indexes and when it should be used?
3) What about isolation transaction levels?
OK, OK, I stop here.

Although db design should be done by specialists, it's never to late to improve our knowledges. Thanks to my friend Marco, I put here a link to a website which published db models. From know, before designing your model, don't forget to check if a similar one already exists.

http://www.databaseanswers.org/

Feeling sad with Eclipse on Linux

Humm, something is broken : my trust in Eclipse quality.

I recently installed an Ubuntu 7.10 on my laptop. Then I added Eclipse 3.3 with Sun Java 6. After several days (weeks...), it tastes unstable. Not Ubuntu! (Of course)... but Eclipse. Here is a list of problems I encountered :
problem with VCS (when comparing files with a repository for example)problem with auto-imports (so I have to use "Reorganize imports" insteadproblem with Java and Debug perspectives that change views positions by itselfsomething, Eclipse goes slowly during a few seconds (???)and... the ugly big fonts they use that make my 17 inches screen looking like a 15 inches one.So, I hope Eclipse 3.4 will fix that (or I will go back to the Win32 version. Hopefully VMWare exists)

13949712720901ForOSX (we want Java 6 on MacOS X)

Last week, Apple publishede a new release of its famous MacOS. But... why?.... don't uderstand... where is Java 6? It seems to be an Apple decision not to include Java on its new platform. By the way, Henry Story invited all blogger to put an entry in their blog to protest against this situation.

So : 13949712720901ForOSX

http://blogs.sun.com/bblfish/entry/vote_for_java6_on_leopard
http://www.javalobby.org/java/forums/t103042.html