Tuesday, 1 July 2014

Créer un projet maven, importer dans eclipse et lancer les tests

Commencer par installer Maven 3.2.2
Configurer le PATH si vous êtes sous windows.

Créer un nouveau projet Maven:
    mvn archetype:generate -DgroupId=projet1 -DartifactId=projet1  -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Générer les fichier necessaire à un import dans Eclipse (.project)
    mvn eclipse:eclipse

Lancer les tests uniquement (sans passer par les phase de compilation, packaging ...)
    mvn surefire:test

Wednesday, 14 May 2014

You use ClearCase let's learn Git and vice-versa

I found a great presentation on the differences between CC and Git:
https://www.open.collab.net/media/pdfs/ClearCase-and-the-journey-to-Git.pdf

Tuesday, 22 April 2014

Comment créer un processus de delivry

«  La recette est simple. Il faut analyser les projets performants et identifier les facteurs déterminants. Isoler et tester ces pratiques puis les « pousser à l’extrême » et faire le bilan. Enfin les généraliser en communiquant sur leurs avantages et en les déployant. »
 Kent Beck (source: http://fr.wikipedia.org/wiki/Kent_Beck)

Monday, 14 April 2014

Thursday, 27 February 2014

Eclipse Install new software fails



If you try to add new features from an update site and you get the following strange error:

Cannot complete the install because one or more required items could not be found.
  Software currently installed: Shared profile 1.0.0.1385682248052 (SharedProfile_SDKProfile 1.0.0.1385682248052)
  Missing requirement: Shared profile 1.0.0.1385682248052 (SharedProfile_SDKProfile 1.0.0.1385682248052) requires 'toolingwin32.win32.x86org.eclipse.equinox.p2.reconciler.dropins [3.6.2.M20110210-1200]' but it could not be found


Restart you eclipse as administrator and you problem will be solved.
It fails since you don't have write access to the folder where your eclipse is installed.

Monday, 17 February 2014

Git: creating and importing patches

A useful command when you need to contribute to open source projects:
1. Create a patch from your last commit (-n for the n latest commits). The following command will create a <myKillerPatch>.patch file in the current directory
   git format-patch -1
2.  Test the patch
   git apply --check <myKillerPatch>.patch
3. Finalyy import it
   git am <myKillerPatch>.patch

Tuesday, 26 March 2013

TDD ? why ?

I have met some developpers that are still relectant to work within a TDD approach. So my guess is that they don't see exactly what are the clear benefits from using this approach. So here are the most powerful to my mind:
When using a TDD approach (by the way TDD means Test First and refactoring)

1.You have a clear and formal specification of what you have designed and implemented. Not only a piece of comments, that by the way will pe deprecated after a while. This is really useful for maintenance (bug fixes, regression, evolution)
2.You have a MAXIMUM code coverage and NO DEAD CODE
3. You have methods in your test that express your test intentions and not a test method per method in the class under test.

The process:
    0. Create a todo list from a specification
    1. Create a test case automatically with the IDE
    2. Add 1 new test from the todo list
    3. This test shouldn't compile. Add the minimum code to compile.
    4. execute and get the red bar (Junit Eclipse plugin)
    5. Add minimal code to pass the test (the green bar)
    6. Refactor
    7. goto2

Some resources on how TDD helps in reducing the software development costs:
- http://codebetter.com/darrellnorton/2003/12/03/what-is-the-zero-defects-mindset/