vendredi 5 août 2011

Veille technologique semaine 31

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • la migration de FaceBook avec 30PB (30 Peta Byte) à déplacer.
  • Quelques articles sur le JDK 7 : les nouveautés, les bugs, et les autres langages : JRuby et JDK 7.
  • Un article sur OpenCL : comment utiliser la puissance des processeurs graphiques pour faire du calcul.
  • JUnit et les règles : dans la version 4.7.
  • Les performances des verrou et des synchronizations.
Bonne lecture.


Migration 30 Petabytes sur Hadoop pour Facebook
Dans les architectures distribuées de stockage de données, une nouvelle fait le buzz cette semaine. Quand Facebook décide de déplacer ses datacenters, évidement, il y a de l'octet qui se promène. Victime de son trafic, l'ancien datacenter prévu initialement pour 10 PB a atteint dernièrement les 30 PB (avec pas moins de 10 PB généré en une seule année), soit quelques 30 000 000 Go!
Hadoop est le célèbre framework d'Apache pour la gestion de filesystem distribué. Il est utilisé par Facebook pour la gestion interne d'analyse ainsi que les produits additionnels (comme Facebook Ad Network), avec Hive pour la gestion d'un datawarehouse.
 
Voilà un potentiel sujet pour un prochain challenge USI: comment déplacer 30 PB de filesystem avec une contrainte d'exploitation du système en 24/7, et quelques millions d'utilisateurs de connectés ? (avis aux amateurs de défis !)
Côté infrastructure, 1200 serveurs 8-coeurs ainsi que 800 serveurs 16-coeurs avec chacun 12 To de disque et 32 Go de RAM.
Pour répondre à cette problématiques, les ingénieurs optent pour la solution du basculement total de l'ancien cluster vers le nouveau. Transporter un tel volume de données n'est pas instantané. L'équipe a du développer un système de réplication des changements en continue de l'ancien cluster vers le nouveau, tant que le basculement n'était pas effectué.
 
L'ajout d'un plugin sur Hive permet d'écrire tous ses changements sources dans un fichier d'audit. Le système de réplication est branché sur ce fichier et reproduit en continu les changements sur le nouveau noeud. Ce système n'est pas sans rappelé le mécanisme Change Data Capture d'Oracle !
Ensuite, l'équipe s'enferme dans une war-room, tire à la courte-paille quel ops devra lancer la commande fatidique, et stoppe l'ancien cluster. Je vous laisse imaginer la petite émotion lorsque le bouton Enter du clavier est pressée. Une fois le tour de magie effectué, et le sanity check passé, un changement de DNS ensuite permettra de rentre le système stable, et le stress des équipes redescendre face à la réussite d'un projet aussi colossal !
Ceci est par ailleurs une excellente publicité faite à Hadoop et Hive pour l'intégration dans le monde de l'entreprise.
A titre de comparaison, le nouvel accélérateur à particules du CERN, le LHC bat des records de collisions. Ses chiffres pourtant prodigieux n'arrivent que difficilement à la hauteur des volumétries de Facebook. Avec plus de 10 000 milliard de collision par an, et plus 1 Mo de données par collision, on atteint la barre des 10 Po par an. Cependant, on ne mesure pas l'octet à la valeur qu'il peut représenter.

Java 7
Ca y est, après une longue attente, Java 7 est sorti la semaine passée, le 28 juillet pour être exact. C'est sous la forme d'OpenJDK, le pendant open-source de l'ancien JDK fermé de Sun qui était jusqu'aux versions 6 l'implémentation de référence, que s'effectue cette sortie.
Nous vous avons tenu au courant assez régulièrement de l'avancement des travaux donc nous ne reviendrons pas en long, large et travers sur tout ce qu'apporte cette version et sur sa gestation
pas toujours facile. Alors bien sûr, certains regretteront l'absence des expressions lambda et du projet Jigsaw (modularité) reportés à Java 8, mais ne boudons pas notre plaisir et profitons:
  • du fork/join
  • la fermeture automatique des ressources auto-closables
  • du support des Strings dans les switch
  • du support du symbole underscore '_' dans les nombres comme séparateur, pour une meilleure lisibilité
  • du multi-catch d'exceptions
  • de l'opérateur diamant apportant une meilleure inférence de type sur la création d'instances génériques
  • de Nio 2 (que nous vous avons récemment présenté) et de ses améliorations sur les E/S: l'ajout des Path du service Watchable ainsi que le support des symlinks pour le filesystem, mais aussi de nombreux apports sur les E/S asynchrones et les sockets non bloquants.
  • invokedynamic, qui devrait accélérer les langages dynamiques qui l'utiliseront
Premiers couacs
Mais comme toute nouveauté, cette nouvelle version du JDK apporte aussi son lot de douleurs. Apache l'a compris avec un bug sur les projets d'indexation et de recherche Lucene et Solr. Après mise à jour vers le JDK 7, des indexes se sont corrompus et des JVM sont tombées par dizaines avec l'erreur la plus connue des étudiants qui commence en langage C: SIGSEGV ou Segmentation Fault !
Les erreurs se portent sur une partie identifiée du projet, l'algorithme Porter Stemming pour l'optimisation de son moteur de recherche dans la langue de Shakespeare. La réponse apportée par l'équipe d'Apache ne s'est pas fait attendre. Après un premier problème d'optimisation des boucles, des effets de bords des nouvelles locales dans le JDK ou encore avec DataInput.readVInt(). Le premier fix est d'utiliser le paramètre de VM *XX:-UseLoopPredicate.*
Pour Solr, le problème venait principalement du fait que la bonne exécution des tests était dépendantes de l'ordre dans lequel ils étaient écrits. Comme quoi, les principes de réalisations des tests unitaires ne sont pas vains !
Il n'en faut pas moins pour que la blogosphère ne s'enflamme en quelques temps, dans des invectives contre JDK 7 et Apache, à tort. En effet, le problème vient plus d'un bug d'implémentation de HotSpot plutôt que des JSR en elle-mêmes. Le conseil est donc d'utiliser le workaround pour les projets Solr et Lucene, et d'attendre le bug fix d'Oracle. Oracle tente de rassurer les foules par ce billet: les corrections de bug des JVM sont en cours.


Adam Messinger Talks to InfoQ About Java 7 and 8
Following on from last week's release of Java 7, InfoQ spoke to Adam Messinger, Vice President of Development in the Fusion Middleware group at Oracle, to get more information about the release and Oracle's plan for Java 8.


Java Programming Language Enhancements
Enhancements in JDK 7


Java7 Hotspot Loop Bug Details
After Java7's GA release last week, an issue was discovered with one of the optimisations enabled by default with the new JIT. Although originally identified by a use-case in the Lucene search indexer, the problem may be more widespread in other codebases as well.
 
This prompted a number of alarmist articles, such as "Don't use Java 7 for anything" which implied that all loops were problematic. In fact, although there is a valid bug (in which loops may be incorrectly unrolled or cause SIGSEGV crashes), this optimisation bug has been present since Java 6 if either the -XX:+OptimizeStringConcat or -XX:+AggressiveOpts optimisations are enabled.
 
In fact, the problem only occurs with specific loops (those which uses conditions which may be mutated by the loop body), as noted in the fix. The problem doesn't occur when running in -Xint (in interpreted mode) but does occur when -server mode, which most server-side applications are likely to use.


JRuby and Java 7: What to Expect
Java 7 has landed, with a modest set of new features and a few major improvements as well. What can you expect from JRuby running on Java 7?
What's In Java 7 The biggest changes in Java 7 are not related to the Java language at all. Sure, there's the "project coin" enhancements to the Java language, which add some exception-handling shortcuts, new literals for numbers, arrays, hashes, the oftrequested "strings in switch" support, and a few other things. But they're modest incremental changes; the real revolution is at the JVM and JDK level.

Invokedynamic
The most important change in Java 7 is the incorporation of a new bytecode -- invokedynamic -- and an API for building chains of "method handles" to back that bytecode up.


GPU Computing with OpenCL
In the past, processor vendors have increased performance by increasing CPU clock rates, but an upper limit is being reached due to factors such as the settling time of CPU circuitry and the dissipation of waste heat. Performance can still be improved by adding additional processors — dual and quad core machines are now becoming commonplace, but adding more than a handful of cores is cost-prohibitive on commodity hardware.

Additional processing power can be achieved by utilizing the GPU of video cards that allow general purpose computing. As far back as 2001, consumer-grade graphics cards from NVidia allowed part of the rendering pipeline to be customized via user-written code, and since then GPUs have advanced to where more general computation is possible. GPU computing is now used in areas such as science, engineering, cryptography, and computer graphics.

As a GPU is designed to execute the same operations on each item of work (such as a pixel of an image, or an element of an array), it can be conceptualized as a large SPMD (Single Program, Multiple Data) processor array supporting data-parallel applications. Applications most suited to this programming model are ones where there is little dependency between the data items in the computation, such as vector addition or image processing. Computations that are task, rather than data, driven, may not benefit as much.


New Feature of JUnit: Rules
I am always surprised how many unknown feature hide in a supposedly simple library. Todays example is JUnit. When inspecting the newest version (4.7) I noted an annotation I hadn't noticed before: @Rule. WTF? I am looking at a testing framework and not at a rules engine, am I? So naturally I tried to find out what it is good for, and since not to much documentation is available my little research resulted in this blog post. Enjoy.


Rules in JUnit 4.9
One of the most useful innovations in the JUnit realm have been Rules. I wrote about Rules here [4]. And I wrote about use cases for JUnit Rules here [5]. Rules are great. And with JUnit  4.9 they get even better.
You can think of Rules as a way to encapsulate setup and teardown of a test in one class instead of two methods. But Rules are also a way to modify the way to execute your tests.
You can run tests a dozen time instead of once. Or in twenty different threads. Interestingly there were only Rules for single tests. So if you want to stick with the comparison with setup and teardown, aka @Before and @After there wasn't a @BeforeClass and @AfterClass equivalent in Rules.


Synchronized vs Lock performance
There are a number of articles on whether synchronized or Locks are faster. There appear to be opinions in favour of either option. In this article I attempt to show how you can achieve different views depending on how you benchmark the two approaches. I have included AtomicInteger to see how a volatile field compares.

vendredi 29 juillet 2011

Veille technologique semaine 30

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • Sortie du JDK 7, comme prévu, le 28 juillet 2011 : articles sur le contenu avec les détails de la documentation.
  • Un article sur le pattern "Disruptor".
  • OSGi et la gestion des modules partagés.
  • Java et la réflexivité des génériques.
  • La définition des classes non mutables
  • La déclaration des variables : la forme dépends du langage de programmation.
  • La taille des objets en Java.
  • La taille des tableaux en Java.

Bonne lecture.


Java SE 7 Released: First Major Update Since December 2006
Java 7 is generally available from today, the first release of the Java platform since Oracle's acquisition of Sun. The release includes a number of small but welcome changes to the language, incorporates a new file API and the Fork/Join Framework, and improves dynamic language support on the JVM.

For Java 7 language changes have been managed as part of Project Coin (JSR 334), a successor to JSR 201, designed to enhance the Java language with an assortment of small changes to improve productivity. Of particular note is the introduction of "try-with-resources". This is analogous to C#'s using statement but based on a form of the try statement. As a result, whilst the using statement only takes a single resource, try-with-resources is able to handle multiple resources within the scope of a given block. Two changes have been made to exception handling. First, multiple exception types can be named as being handled by a single catch block. The grammar of a catch clause of a try statement is extended to allow a series of exception types, separated by the "OR" operator symbol, "|", to be used in the declaration of the exception parameter. Second, if an exception parameter is not modified and if it is rethrown inside the catch block, you don't now have to add the exception to the method signature.


Java SE 7 Downloads
This release includes new features such as small language changes for improved developer productivity, a new Filesystem API, support for asynchronous I/O, a new fork/join framework for multicore performance, improved support for dynamic and script languages, updates to security, internationalization and web standards and much more.


Java Platform Standard Edition 7 Documentation
Oracle has two products that implement Java Platform Standard Edition (Java SE) 7: Java SE Development Kit (JDK) 7 and Java SE Runtime Environment (JRE) 7.
JDK 7 is a superset of JRE 7, and contains everything that is in JRE 7, plus tools such as the compilers and debuggers necessary for developing applets and applications. JRE 7 provides the libraries, the Java Virtual Machine (JVM), and other components to run applets and applications written in the Java programming language.

What's New in Documentation
Documentation is regularly updated to provide developers with in-depth information about new features in the Java platform.


Java as a platform and a language
Welcome to Java 7. Things around here are a little different than you may be used to. This is a really good thing—we have a lot to explore now that the dust has settled and Java 7 has been unleashed. By the time we finish our journey, you'll have taken your first steps into a larger world—a world of new features, of software craftsmanship, and other languages on the JVM.
 
We're going to warm you up with a gentle introduction to Java 7, but one that still acquaints you with its powerful features. We'll showcase Project Coin, a collection of small yet effective new features. You'll learn new syntax, such as an improved way of handling exceptions (multi-catch). You'll also learn about Automatic Resource Management and how it helps you to avoid bugs in the code that deals with files or other resources. By the end of this paper, you'll be writing Java in a new way and you'll be fully primed and ready for bigger topics.
Let's get going! We'll first dive into a critically important duality that lies at the heart of modern Java. This is a point that we'll come back to again throughout the book, so it's an absolutely essential one to grasp.


Dissecting the Disruptor: Why it's so fast (part one) - Locks Are Bad
Martin Fowler has written a really good article describing not only the Disruptor, but also how it fits into the architecture at LMAX. This gives some of the context that has been missing so far, but the most frequently asked question is still "What is the Disruptor?". I'm working up to answering that. I'm currently on question number two: "Why is it so fast?". These questions do go hand in hand, however, because I can't talk about why it's fast without saying what it does, and I can't talk about what it is without saying why it is that way. So I'm trapped in a circular dependency. A circular dependency of blogging.


OSGi: Because Sharing Shouldn't Be Painful
At the dawn of Windows, applications were statically linked and life was simple; applications carried their own dependencies so there was never confusion. However, this simplicity had its costs.


Java Reflection: Generics
I have often read in articles and forums that all Java Generics information is erased at compile time so that you cannot access any of that information at runtime. This is not entirely true though. It is possible to access generics information at runtime in a handful of cases. These cases actually cover several of our needs for Java Generics information. This text explains these cases.

Here is a list of the topics covered in this text:
1. The Generics Reflection Rule of Thumb
2. Generic Field Types
3. Generic Method Return Type
4. Generic Method Parameter Types



Defining immutable classes
To make a Java class immutable, you must:
  • Make all fields final.
When you define fields as final in Java, you must either initialize them at declaration time or in the constructor. Don't panic if your IDE complains that you don't initialize them at the declaration site. It'll realize that you've come back to your senses when you write the appropriate code in the constructor.
  • Make the class final so that it cannot be overridden.
If the class can be overridden, its methods' behaviors can be overridden as well, so your safest bet is to disallow subclassing. Notice that this is the strategy used by Java's String class.
  • Do not provide a no-argument constructor.
If you have an immutable object, you must set whatever state it will contain in the constructor. If you have no state to set, why do you have an object? Static methods on a stateless class would work just as well. Thus, you should never have a no-argument constructor for an immutable class. If you're using a framework that requires this for some reason, see if you can satisfy it by providing a private no-argument constructor (which is visible via reflection).
Notice that the lack of a no-argument constructor violates the JavaBeans standard, which insists on a default constructor. But JavaBeans cannot be immutable anyway, because of the way the setXXX methods work.
  • Provide at least one constructor.
If you haven't provided a no-argument one, this is your last chance to add some state to the object!
  • Do not provide any mutating methods other than the constructor.
Not only must you avoid typical JavaBeans-inspired setXXX methods, but you must also be careful not to return mutable object references. The fact that the object reference is final doesn't mean that you can't change what it points to. Thus, you need to make sure you defensively copy any object references you return from getXXX methods.


Reversed type declarations
I can't write about Kotlin without first talking about the folly of "reversed" type declarations. Sadly this disease has afflicted Scala, Gosu and now Kotlin (but perhaps its not yet too late for Kotlin ;-).


Java: Getting the size of an Object
Java was designed with the principle that you shouldn't need to know the size of an object. There are times when you really would like to know and want to avoid the guess work. Measuring how much memory an object uses


Java: How much memory do different arrays consume
Arrays can be large and consume a significant amount of memory. It can me worth choosing the most memory efficient array/collection. Comparing array sizes.

vendredi 22 juillet 2011

Veille technologique semaine 29

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • Un bilan six semaine après le jour de l'IPV6 : avez-vous vérifié votre connectivité IPV6 ?
  • Le JDK 7 est toujours prévu pour fin juillet 2011 : quelques vidéos de présentations sur le web.
  • Un article sur le code mal conçus et mal écrit : c'est un problème de qualité non fonctionnel qui se traduit par une bombe à retardement. Il faut être très vigilant sur la qualité de conception, pour éviter une dégénérescence de l'application.
  • Un article d'Oracle au sujet de la programmation concurrente (multi-thread) et du fork / join du JDK 7.
  • Un nouvel article (en français) sur les principes SOLID : Single responsibility principle, Open close principle,  Liskov principle, Interface segregation principle, Dependency inversion principle.
  • Une synthèse du principe d'injection de dépendance.
  • La modularité avec OSGi : l'injection de dépendance avec et sans OSGi.
  • Le primitifs Java sont plus performants que les wrappeurs correspondants : réfléchir à deux fois avant d'avoir des problèmes de performances.
  • Les dépendances cycliques dans un logiciel sont interdites : comment les supprimer.
  • Le JDK 5 et le toString() des tableaux.
Bonne lecture.


Six weeks after World IPv6 Day, what have we learned?
Last month's World IPv6 Day created some excitement about IPv6. Once it was over, however, everyone went back to work—which for most people doesn't include anything IPv6-related.
The idea behind World IPv6 Day on the 8th of June was to flush out broken IPv6 setups by simultaneously turning on IPv6 across a large number of Web properties —including the four largest in the world. Few, if any, problems were reported, so in that sense WIPv6D was a resounding success. Apparently, it's possible to add IPv6 addresses to large Web destinations without significant adverse effects.


Java SE7 To Arrive At End Of July
On Monday, The Java Community Process completed voting on the final approval ballots for Java SE7, and all JSRs were given the green light.

This completes the JCP's work on Java 7, but there's a few more steps to finishing the product, according to Mark Reinhold, the Chief Architect of Oracle's Java Platform Group:

At this point all of the work required to define the abstract Java SE 7 Platform in the JCP is done but the actual product, JDK 7, is not quite finished.

Here at Oracle we're busy wrapping up final testing of the release candidate, build 147. If all goes well then that will be declared the GA build on 28 July per the schedule posted in January. Oracle's commercial binaries, based almost entirely on OpenJDK code, will be published that day; implementations from other vendors will follow.



JAVA 7 TECHNICAL BREAKOUTS

EVENT HOSTS
See the replays for all technical breakouts below:
• Making Heads and Tails of Project Coin, Small Language Changes in JDK 7 (Presentation/PDF)
• Divide and Conquer Parallelism with the Fork/Join Framework (Presentation/PDF)
• The New File System API in JDK 7 (Presentation/PDF)
• A Renaissance VM: One Platform, Many Languages(Presentation/PDF)
• Meet the Experts: Q&A and Panel Discussion




Watch the Java 7 Celebration Webcast
Oracle is committed to Java: the technology, the community, the Java Community Process (JCP), and the entire ecosystem focused on moving Java forward.
Watch this Webcast to find out more about the features of Java 7, hear from technologists at companies that use Java technology, and learn through a series of technical presentations and a panel discussion.

http://www.oracle.com/us/corporate/events/java7/index.html


Bad Code: The Invisible Threat
One of the first things said by the non-believers of the software craftsmanship movement was that good and clean code is not enough to guarantee the success of a project. And yes, they are absolutely right. There are innumerable reasons which would make a project to fail ranging from business strategy to competitors, project management, cost, time to
market, partnerships, technical limitations, integrations, etc. Due to the amount of important things a software project may have, organizations tend not to pay to much attention to things that are considered less important, like the quality of the software being developed. It is believed that with a good management team, deep hierarchies, micro management, strict process and a large amount of good documentation, the project will succeed.

How do the new fork/join tasks provided by Java SE 7 make it easier to write parallel programs?

Multicore processors are now widespread across server, desktop, and laptop hardware. They are also making their way into smaller devices, such as smartphones and tablets. They open new possibilities for concurrent programming because the threads of a process can be executed on several cores in parallel. One important technique for achieving
maximal performance in applications is the ability to split intensive tasks into chunks that can be performed in parallel to maximize the use of computational power. Dealing with concurrent (parallel) programming has traditionally been difficult, because you have to deal with thread synchronization and the pitfalls of shared data. Interest in language-level support for concurrent programming on the Java platform is strong, as proven by the efforts in the Groovy (GPars), Scala, and Clojure communities. These communities all try to provide comprehensive programming models and efficient implementations that mask the pain points associated with multithreaded and distributed applications. The Java language itself should not be considered inferior in this regard. Java Platform, Standard Edition (Java SE) 5 and then Java SE 6 introduced a set of packages providing powerful concurrency building blocks. Java SE 7 further enhanced them by adding support for parallelism.


Les principes SOLID
A l'heure où de nombreux débats font rages sur l'éventuel successeur du langage Java, le XKE (Xebia Knowledge Exchange) de Mars a été l'occasion de faire un retour sur les fondamentaux de la conception Orienté Objet.
Faisons un petit sondage dans la communauté : quels arguments avanceriez-vous en faveur du langage Java ?
Parmi les principaux arguments, il est fort à parier que les réponses seront en majorité les applets (heu… non plus maintenant… mais souvenez vous dans les années 90), la JVM, le crossplatform, le monde Open Source et la Communauté, les nombreux frameworks, la simplicité d'écriture et la gestion de la mémoire, les IDEs, etc.


A beginners guide to Dependency Injection
This article presents a high level overview of Dependency Injection (DI). It aims to present the overall  concept of Dependency Injection to the junior developer within the context of how it could be used in a  variety of DI containers.

Dependency Injection (DI) or Inversion of Control (IOC) ?


OSGi: A Proven Approach for Developing Modular Applications
OSGi is about how to create a useful application by installing a set of (preferably reusable) modules in a framework. Basically, we set out in 1998 to solve the component programming model; amazingly I think we largely succeeded looking at the many successful OSGi projects. Mission accomplished?
comment on this article Not really, looking at the often heated debate around OSGi in the Enterprise world: Spring, Jigsaw, etc.
Many love it, some seem to hate it with a vengeance (Come on guys, get a life, this is only technology). My explanation is that OSGi violates some Enterprise developers' basic expectations that it should just be a library on your class path, providing some useful and convenient functions but otherwise staying out of the way.


Low GC in Java: Use primitives instead of wrappers
There are two good reason to use primitives instead of wrappers where possible. Clarity. By using a primitive, you are making it clear that a null value is not appropriate.
Performance. Using primitives is often much faster. Clarity is often more important than performance, and is the best reason to use them. However, this article discussed the performance implications of using wrappers.


Breaking Dependency Cycles
If you look into rules for good software design you!ll probably come around the notion that dependency circles are bad. From my interview experience I!d say that many of the more experienced developers know that rule. And almost everybody agrees to that rule when asked. (Of course that might be due to the way I phrase the question. Some people say I can be pretty … convincing).


Stringifying Java Arrays
J2SE 5 provided significant new language features that made Java significantly
easier to use and more expressive than it had ever been. Although "big" new J2SE 5  features such as enums, generics, and annotations, there was a plethora of new APIs and methods that have made our lives easier ever since. In this post, I briefly look at two of my favorites when dealing with Java arrays:
the Arrays.toString(Object[]) method and the Arrays.deepToString(Object[]) method.

vendredi 8 juillet 2011

Veille technologique semaine 27 et 28

Pour le bulletin de la semaine 27 et 28, je vous propose les sujets suivants :
  • Le site Twitter qui passe du langage Ruby au langage Java, pour des raisons de performance mais aussi de maintenance plus productive avec un langage à typage fort : Java par rapport à un langage à typage faible : Ruby.
  • Deux articles au sujet des expressions lambda ou closures : explication et historique.
  • La version 3.7 d'eclipse qui vient de sortir inclus un composeur visuel pour les IHM en Swing, SWT (Standard Widget Toolkit) ou GWT (Google Web Toolkit) : WindowBuilder.
  • Le compte rendu du club Java de PARIS pour la soirée sur le cloud : résumé.
  • Un article sur la machine virtuelle IKVM qui est capable de faire tourner du byte code Java sur la machine virtuelle DotNet. Il est possible d'utiliser le framework DotNet avec du code source Java.
  • Cinq articles qui résume la modélisation UML pour les développeurs Java.
  • Un exemple de code Hello World en Java et en Ruby
  • Un article sur Java qui explique pourquoi il est interdit de faire un return ou de lancer une exception dans un bloc finally.

Bonne lecture

Twitter Shifting More Code to JVM, Citing Performance and Encapsulation As Primary Drivers
While it almost certainly remains the largest Ruby on Rails based site in the world, Twitter has gradually been moving more and more of its stack to the JVM. The change is partially motivated by oft-cited advantages of the JVM, such as performance and scalability, but is also driven by a desire for better encapsulation of individual services, and other architectural concerns.


Closures for Java "BGGA" project
  • BGGA closures specification: Closures for the Java Programming Language (v0.5)
  • Doug Lea's jsr166y fork-join concurrency framework: without function types and with function types. Get the code here.
  • Latest openjdk prototype: http://www.javac.info/closures.tar.gz (updated 2008-08-11)
  • Neal's talk about BGGA closures with Q&A
  • Differences between the openjdk prototype and the spec (v0.5)
  • Open issue list: Closures: Open Issues (v0.5)
  • Homepage for the openjdk closures project
  • A library for functional programming.
  • A definition of closures
  • comment on extension methods


A Definition of Closures
There has been some confusion over our proposal to add closures to the Java Programming Language. After all, doesn't Java already have closures in the form of anonymous inner classes? What is the point of adding something to the language that it already has? To some there appears to be a lot in the proposal that has nothing to do with closures, including the control invocation syntax, null as a type, Unreachable, throws type parameters, function interface types, and "nonlocal" returns. In my Javapolis talk I tried to give an explanation for why these features are in the proposal from the practical point of view of what kinds of things would be possible that were not formerly possible. But that begs the question: why do we call it "Closures" for Java? In this blog post I'll try to show how the definition of closures relates to the features of the proposal, and identify which features of the proposal do (and which do not) result from the definition.



WindowBuilder Pro Quick Start



Paris JUG "Cloud"
Voici la retranscription de la soirée du Paris JUG du 5 juillet, dédiée au Cloud.
A l'origine, seul Patrick Chanezon devait intervenir, mais toute la clique du cloud à
la Française ayant été prévenue de la soirée, ce sont finalement 6 speakers qui se
sont partagés la scène - même si les derniers ont dû parler très vite compte tenu du planning particulièrement serré !
Cloud par-ci, cloud par-là, tant et si bien qu'en sortant il pleuvait... Les aléas de la
météo font parfois écho à ceux de la technique.



IKVM Introduction
IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. It includes the following components:
  • A Java Virtual Machine implemented in .NET
  • A .NET implementation of the Java class libraries
  • Tools that enable Java and .NET interoperability


UML for the Software Developer, Part 1: Building Classes
Whatever language you code in, however you feel about documentation, and whichever process you ascribe to—you will need to model. Whether those models are in a formal charter, reference document, part of a diagram, or on the back of a napkin, you as a software developer will end up using models or modeling yourself.

Why do we need to model software? After all, aren't the acts of coding and refactoring of that code enough? That depends on what is meant by enough! You could code up some software, hand it in, and go through a constant refactoring process with the client. This is how most software is developed today. However, times are changing. A decade ago, a game would have been developed by a single developer in the basement. Graphics were primitive and it was enough to produce a few sprites, some cute screens, and an occasional story line.


UML for the Software Developer, Part 2: Mastering Associations
Associations are a key part of the UML lexicon. Use them to define the ways in which your application's classes communicate. In this article you'll see that adding a database introduces design patterns for the first time using the façade pattern.
by Mark Goetsch lasses are only the first step to understanding UML. In my last article I discussed classes in UML and how they are coded using C#. In this article I will tie-up a few loose ends by describing how classes are arrived at and then march into how they relate to each other in UML using associations.


UML for the Software Developer, Part 3: Aggregating
Part 3 of this series on UML tackles aggregation, which is a special form of association.
Part 2 showed you how associations related one class to another, but this article shows that associations are not strong enough when you need to specify ownership.

In Part 2 we looked at associations, which are nothing more than references, but they can be directional and represent multiplicity. If we were restricted to our ability to generate code using UML this would be sufficient. If we
are offering guidance on how the application should be built, as well as auto-generated code, we need something more.
To continue with examples from the previous articles, your friends at Rich Men, Inc want to start tracking what stocks they buy for their clients. Ideally they would somehow offer some aggregated values for all of the stocks that a client has in order to boost their value to the client.


UML for the Software Developer, Part 4: Deployment Diagrams
Deployment diagrams act as the link and reference point between how the system is built and where it is displayed. Learn how capacity planning, n-tier development, and coordination of tasks between different teams can all benefit from these diagrams.
So far, you and I have journeyed through the realm of class diagrams. Classes are a good start for understanding how an application is hooked together, and while they describe the static relationships between the objects in the system, classes are just an abstraction of the software itself. What happens after the classes are
built? The answer is, of course, that they need to be deployed. But where? How do I model deployments? The answer is a new diagram type—the deployment diagram.
Deployment diagrams are one of the least understood—and most important-diagrams in the UML pantheon. Many developers don't even know what they are, yet consider themselves experts in UML. The purpose of a deployment
diagram is to model the execution environment for a project. They can also be used to describe the enterprise environment, but this is more the enterprise architect's domain.


UML for the Software Developer, Part 5: Component Diagrams
Their ability to show interdependencies between applications' components make
component diagrams invaluable. They can however be surprisingly complex. Find out how to use the right architectural patterns within your component diagrams to make them manageable.
According to Clemens Szyperski (author of "Component Software—Beyond Object-Oriented Programming,"), software components are binary units of independent production, acquisition, and deployment that interact to form
a functioning system. He continues to add that a software component can be deployed independently, is a unit of third-party composition and has no (externally) observable state. In UML we use component diagrams to break down systems into understandable chunks that show the dependencies between components.



Do not return in a finally block: return will swallow your exceptions
I was recently working on a code, which was failing without giving any exception.
So I had to add lots of logging to the code, to see where is the bug. I caught nothing via this method.
So I decided to check out the module source code and yeah finally I found it while
debugging. The module was correctly implementing what was required and
generating the required Exception as expected.

vendredi 1 juillet 2011

Veille technologique semaine 26

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • le prochain standard C++ devrait être prêt avant la fin de l'année. Le précédant date de 1998.
  • Oracle confirme que OpenJDK est l'implémentation de référence qui sert de base à la distribution d'Oracle.
  • Changement du look de la Javadoc du JDK7 : changement des stylesheet.
  • Un résumé de la présentation du framework Akka : le pattern actor pour des systèmes distribués, scallable et tolérant au panne.
  • Un chapitre : la meilleur ligne de code est celle qui n'est pas nécessaire. Pourquoi réduire le nombre de lignes de code.
  • Présentation d'un runtime pour faire exécuter les applications android (présent sur les smart phones et tablettes avec le processeur ARM) en natif processeur x86 sur windows.
  • Le pattern object null en remplacement des exceptions NullPointerException : l'invention qui a coûté très chère.
  • La gestion des ressources dans la syntaxe du JDK 7
  • Les classes atomiques du JDK 5 : comment faire des lecture-modification-ecriture sans verrous.
  • La classe Objects du JDK 7 et la méthode equals().

Bonne lecture


The New C++: Lay down your guns, knives, and clubs
"The world is built on C++," Herb Sutter tells The Reg. Considering he's one of the language's chief stewards, we question his impartiality. But he does have a point. After more than 30 years – depending on whose numbers you swallow (these or these) – C++ remains one of computing's most popular programming languages, favored for its speed if not its simplicity.
Apple's Mac OS X, Adobe Illustrator, Facebook, Google's Chrome browser, the Apache MapReduce clustered data-processing architecture, Microsoft Windows 7 and Internet Explorer, Firefox, and MySQL – to name just a handful – are written in part or in their entirety with C++.

And while new languages have since been born, C++ has endured. Java is the only one to have outpaced it in popularity, according to the TIOBE Index. PHP, Ruby, and JavaScript? Sure, some might claim that they are the future, but C++ is the past, the present, and the future.

According to Sutter, C++ is on the verge of its biggest change in the 13 years since it became an official ISO standard, a change that will make it relevant for the next two decades.
The recently finished C++ ISO standard, with the working name of C++0x, is due to be published this summer, following the finishing touches to the ISO spec language and standards wonks agreed upon in March.

Sutter didn't create C++, but he is chair of the ISO's C++ committee in addition to being a noted C++ programmer, author, and chief native-languages architect at Microsoft.


OpenJDK to be Java SE 7 Reference Implementation, Bylaws Ratified by Oracle
The OpenJDK Community Bylaws have been ratified, with 70 votes in favour, no votes against, and nine abstentions. Whilst this represents a major milestone for the OpenJDK project, building from an effort which was started by Sun in 2007, it should be noted that 61 of the yes votes were from Oracle employees, and 46 people who were eligible to vote didn't bother.


New Java SE 7 Javadoc API Documentation Appearance
In my last post, I briefly referenced the Jonathan Gibbons's post What's Up, JavaDoc? that describes some recent changes to Javadoc, including changes that allow a CSS stylesheet to be applied to the documentation. Mark Reinhold's post JDK 7: Are we there yet? talks about the changes to the Java SE 7 API default display style. In this post, I briefly look at this change.


Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Actors"
Lors de la What's Next, Jonas Bonér a présenté Akka, un framework facilitant la réalisation d'applications concurrentes, pouvant passer à l'échelle et tolérantes aux erreurs. Cet article tente de retranscrire le contenu de cette présentation.


Chapter 14. Writing Less Code
Knowing when not to code is possibly the most important skill a programmer can learn. By reusing libraries or eliminating features, you can keep your code base lean and mean. Every line of code you write is a line that has to be maintained.

The most readable code is no code at all.

The best way to cope is to keep your code base as small and lightweight as possible, even as your project grows.



Native x86 Android runtime will enable Android apps on Windows
A startup called BlueStacks has developed an Android runtime environment for the Windows operating system. It will enable users to run Android applications alongside conventional Windows software on Microsoft's operating system.
The technology impressed some major investors who have supplied $7.6 million in Series A funding so that BlueStacks can turn its software into a business.



Presentation: "Null References: The Billion Dollar Mistake"
Abstract: I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. In recent years, a number of program analysers like PREfix and PREfast in Microsoft have been used to check references, and give warnings if there is a risk they may be non-null. More recent programming languages like Spec# have introduced declarations for non-null references. This is the solution, which I rejected in 1965.



Better Resource Management with Java SE 7: Beyond Syntactic Sugar
The typical Java application manipulates several types of resources such as files, streams, sockets, and database connections. Such resources must be handled with great care, because they acquire system resources for their operations. Thus, you need to ensure that they get freed even in case of errors. Indeed, incorrect resource management is a common source of failures in production applications, with the usual pitfalls being database connections and file descriptors remaining opened after an exception has occurred somewhere else in the code. This leads to application servers being frequently restarted when resource exhaustion occurs, because operating systems and server applications generally have an upper-bound limit
for resources.


Java theory and practice: Going atomic
Summary: Until JDK 5.0, it was not possible to write wait-free, lock-free algorithms in the Java language without using native code. The addition of the atomic variable classes in java.util.concurrent changes that situation. Follow along with concurrency expert Brian Goetz as he explains how these new classes have enabled the development of highly scalable nonblocking algorithms in the Java language.


Java 7 Objects-Powered Compact Equals
Obi Ezechukwu's blog High-Octane Java recently featured the post Compact Equals, which compares an implementation of a Java class's overridden equals method in traditional form versus one implemented using arrays of the class's fields and then invoking Arrays.equals on those arrays. I am using this blog post to build upon these examples to demonstrate the utility of Java 7's Objects.equals(Object, Object) method and will demonstrate the usefulness of Objects.hash(Object...) along the way.

vendredi 24 juin 2011

Veille technologique semaines ... dernières.

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • sortie de la version 3.7 de l'outil eclipse Indigo : 62 projets, 46 millions de ligne de code, 408 développeurs, 49 organisations qui contribues.
  • L'avenir de Java : comment Oracle va gérer cet écosystème.
  • Sonar : la qualimétrie du logiciel pour tous.
  • Un livre sur le CMMI avec un chapitre pour le niveau 2.
  • Un article d'IBM au sujet du développement d'application Java temps réel : temps de réponse garantie.
  • Les revues de code et les résultats.
  • Le HTML5 et Microsoft : changement de stratégie ?
  • Les optimisations de la machine virtuelle Java.
  • Le garbage collector du JDK 7 : Garbage First
  • Une demande d'évolution du langage Java : les énumérés devrait être extensible
  • La méthode clone() en Java : comment faire ?  A automatiser dans un outil UML.
Bonne lecture.


Eclipse 3.7 (Indigo) now available
Right on schedule, The Eclipse Foundation has released Eclipse 3.7 (Indigo). Actually, Indigo is a simultaneous release of dozens of projects including the Eclipse Platform, Java development tools, source control tools, GUI designers, and more. This is the eighth successive year in which the Eclipse community has shipped a coordinated release on schedule.


Eclipse Indigo Released
The Eclipse Foundation has announced the release of Eclipse Indigo, a combination of 62 projects with a combined total of 46 million lines of code between them. Eclipse has followed an annual release train of the last week or two of June since Callisto in 2006, although the Eclipse platform has been released annually since 2001.

The simultaneous release allows all projects to standardise on a particular set of dependencies; useful when later projects depend on earlier ones (such as JDT depending on Platform, or Mylyn on EMF). Prior to Callisto, projects would often have specific dependency sets which needed to be satisfied causing problems for wide adoption of certain projects. Since the annual combined release train, stability and interoperability between projects has improved dramatically.


L'avenir de Java se joue maintenant
Cela ne vous a sans doute pas échappé: cette semaine fut particulièrement riche en évènements liés à l'avenir du langage Java et aux instances qui gouvernent son évolution. Voici un tour d'horizon des moments les plus marquants.

Coup de tampon sur Java SE 7
Tout commence par le vote public du JCP (Java Community Process) au sujet de la JSR 336. Les enjeux étaient de taille, vu qu'il s'agit ni plus ni moins de la JSR Umbrella qui chapeaute la version 7 de Java SE.
Commençons par les bonnes nouvelles: la JSR a été approuvée! L'évènement a d'ailleurs été abondamment commenté, par exemple par nos confrères de Développez.com, de H Online ainsi que par Nicolas Martignole, et les résultats sont disponibles ici.
Java SE 7 est donc sur les rails, et c'est plutôt rassurant quand on pense que les spécifications finales et l'implémentation de référence sont attendues pour le 28 juillet prochain. Mais lorsqu'on se penche sur les détails du vote, le tableau est hélas nettement moins rose.
Certes VMWare, la Fondation Eclipse, Intel, SAP, HP, Ericsson et bien entendu Oracle lui-même ont voté pour sans réserves. Mais de nombreux membres — IBM, Red Hat, Goldman Sachs, Fujitsu ainsi que les JUGs brésilien (SouJava) et londonien (London Java Community) — ont émis de sérieuses réserves et ont tous souligné que leur approbation était due exclusivement aux « mérites techniques » de la JSR.
Quant aux grincheux, nous retrouvons Werner Keil qui s'est abstenu, et surtout Google qui — sans surprise — a voté contre.
Mais que reprochent-ils à cette JSR et, par-delà, à la firme de Larry Ellison?
Il s'agit tout d'abord du vieux problème des licences du TCK, dont la revue de presse s'est fait l'écho ici et . Sun, puis ensuite Oracle, auraient placé des restrictions d'usage (Field of Use restrictions) restreignant les plateformes sur lesquelles le langage Java peut tourner et être certifié — nous y reviendrons.
La principale victime de cet état de faits est aujourd'hui Google et l'utilisation qu'il fait du projet Apache Harmony dans son système d'exploitation Android. En plein procès contre Oracle à ce sujet, Google a tenu à manifester son mécontentement par un vote négatif assorti d'un commentaire acerbe: « les licences du TCK ne doivent pas être utilisées pour restreindre ou créer une discrimination à l'encontre d'implémentations compatibles des spécifications Java en incluant des restrictions d'usage sur les implémentations testées. De telles licences ne sont pas conformes aux exigences du JSPA, et violent les attentes de la communauté Java quant à la libre implémentations des spécifications du JCP ». Pour rappel, le Java Specification Participation Agreement (JSPA) est le contrat même d'engagement des membres du JCP.
Un autre point vertement reproché à Oracle, notamment par les JUGs brésilien et londonien, concerne le manque de transparence du JCP lui-même. Oracle ferait preuve de mauvaise volonté à rendre publiques les archives de certains Expert Groups, en particulier celles du Project Coin. Cette attitude a manifestement compliqué la tâche des votants, à tel point que Werner Keil n'hésite pas à parler de « développements en cachette » — un comble pour un langage Open Source.

Y a-t-il un pilote dans l'avion?
Certains — Stephen Colebourne pour ne pas le nommer — n'hésitent pas à voir dans ce vote moins un satisfecit pour Java 7 qu'un arrêt de mort pour les ennemis d'Oracle, Apache Harmony en tête.
Dans son blog, Colebourne estime en effet que « le vote favorable ne fut possible que parce qu'Oracle a pris la décision de tuer Apache Harmony ». Il ne ménage d'ailleurs pas les membres actuels du JCP qu'il traite de « zombies » à la solde d'Oracle.
Or, malgré les protestations lors du vote, Oracle ne semble pas changer de cap. Quelle est sa stratégie actuelle?
Depuis le rachat de Sun, il semble que deux axes se dégagent dans la stratégie d'Oracle vis-à-vis de Java:
1.        Empêcher les forks incontrôlés de Java pour des plateformes spécifiques (cf. Apache Harmony);
2.        Conserver la sphère du développement mobile comme une source potentielle de revenus (cf. Google).
Toujours d'après Colebourne, c'est en effet à la lumière du procès Google vs. Oracle que l'on comprendrait mieux pourquoi Sun puis Oracle ont mis tant de soin à verrouiller la licence du TCK et se sont acharnés contre Apache Harmony. Le bouillant spec lead de la JSR «  Three Ten  » rappelle d'ailleurs qu'initialement Sun avait donné tous les gages nécessaires à la Fondation Apache; ce n'est que plus tard, sentant le danger imminent et notamment le risque de perdre la bataille sur le terrain du développement mobile, que Sun aurait retourné sa veste avec cette trouvaille juridique de génie que nous connaissons bien maintenant: la licence du TCK. Toujours selon Colbourne, cette stratégie est enfin sortie de l'ombre lors du comité exécutif du JCP du 6 octobre 2010: Oracle a alors exprimé publiquement ses craintes qu'Apache Harmony ne crée une menace de « fork » — menace que Google et son système Android, toujours d'après Oracle, auraient su habilement exploiter.

OpenJDK: libre certes, mais incontournable?
Chat échaudé craint l'eau froide: le différend avec Google est loin d'être terminé, mais Oracle semble d'ores et déjà en tirer les conséquences et veut désormais éviter de nouvelles menaces du type Google/Harmony en misant toutes ses cartes sur OpenJDK, projet auquel Oracle a habilement réussi à rallier IBM puis Apple.
Et c'est là qu'intervient le deuxième fait marquant de la semaine, signalé entre autres par nos confrères d'H Online: le 9 juin dernier, Henrik Ståhl, directeur des produits chez Oracle, a annoncé sur son blog que la nouvelle version de Java utilisera OpenJDK pour son implémentation de référence et non plus le JDK « maison » Sun/Oracle.
C'est à nouveau une affaire de licences: le JDK de Sun/Oracle est distribué sous la licence Binary Code (BCL). Cette licence est incompatible avec des implémentations Open Source (comme OpenJDK) en raison de composants comme le plugin Java, qui ne font pas partie du standard Java.
Oracle choisit donc de conférer à OpenJDK ses lettres de noblesse, en faisant de ce projet l'implémentation de référence de Java 7.
Concrètement, comment cela se passe?
D'après Ståhl, l'implémentation de référence sera disponible sous une double licence: BCL pour les implémenteurs commerciaux et GPL v2 avec exception de classpath pour les implémenteurs Open Source.
Autre changement notable: OpenJDK possède son propre TCK et la licence qui l'accompagne, baptisée OCTLA (OpenJDK Community TCK Licence Agreement), sera mise à jour afin de couvrir Java 7; le TCK sera alors théoriquement utilisable gratuitement par tout implémenteur Open Source.
Est-ce donc la fin du conflit autour du TCK?
Pas vraiment: les internautes, répondant à Ståhl, font observer que la licence OCTLA ne s'applique qu'à des implémentations « substantiellement dérivées » d'OpenJDK, et qui plus est, en cas de distribution par une tierce partie, impose qu'elles le soient sous licence GPL. La porte reste donc toujours close pour Apache Harmony… Ståhl enfonce d'ailleurs le clou: « rien de tout cela ne changera le refus d'Oracle d'accorder à [...] Apache Harmony un accès au TCK à des fins de certification; en effet l'OCTLA ne donne accès libre au système de tests qu'aux implémentations dérivées [...] d'OpenJDK ».
Pour les détracteurs d'Oracle, il s'agit d'une manoeuvre dont le but est de se dédouaner auprès de la communauté Open Source: oui, Oracle fait bien de l'Open Source! Ne l'a-t-il pas d'ailleurs rendu JRockit gratuit? Et désormais, voilà que vous pouvez créer librement votre propre implémentation de Java 7! Vraiment? Tant qu'on reste dans le giron OpenJDK, sûrement; mais au-delà, il n'y a probablement pas de salut. Ce que Colebourne résume par une savoureuse boutade: « Apache OpenJDK anyone? »

Les statuts de la Communauté OpenJDK font peau neuve
Troisième fait marquant de la semaine, mais qui découle du précédent: le 14 juin dernier s'est ouvert le vote pour la ratification des statuts de la Communauté OpenJDK. Ce vote prendra fin le 28 juin prochain.
Les statuts gouvernent le fonctionnement de la communauté OpenJDK: groupes, adhésion, procédures de contribution, gouvernance, etc.
L'électorat est constitué des contributeurs ayant « créé au moins 5 changements uniques et non-triviaux dans les dépôts Mercurial d'OpenJDK dans les deux années précédant le vote de ratification ». Or on s'aperçoit très vite que l'immense majorité des votants est affiliée à Oracle; même si quelques « dissidents » sont bien présents (Doug Lea notamment), certains ne manqueront sûrement pas de mettre en doute la légitimité d'un tel vote.

JCP++
Ce n'est pas à proprement parler une actualité, puisque cela date du 17 mai dernier, mais la nouvelle prend tout de même une autre dimension: le JCP va bientôt faire peau neuve.
Baptisé « JCP.next », ce JCP renouvelé sera défini par deux JSRs: 348 et 349 (cette dernière n'étant pas encore publiée).
La JSR 348 introduira des changements dans le fonctionnement du JCP lui-même. A la clé, quatre axes d'améliorations: transparence, participation, réactivité et gouvernance. Et la transparence, lorsqu'on se souvient du vote de la JSR 336, tombe à pic: entre autres, toutes les opérations des Expert Groups devront être menées dans des forums publics; les processus de recrutement de leurs membres seront également publics.
Mais il y a mieux: la JSR 349 quant à elle s'attaquera au JSPA. Or, on l'a vu, c'est là que le bât blessera très fort. Nos confrères d'IT World et de H Online notent à juste titre que le JSPA est au coeur du contentieux entre Apache et Sun/Oracle, la première accusant les seconds de ne pas la respecter.
Amender le JSPA, c'est donc jouer avec le feu; on ne peut qu'attendre avec impatience de voir comment Oracle s'y prendra.
Mais a-t-il seulement le choix?
Depuis quelques mois déjà le JCP est délaissé par des acteurs de première importance: la Fondation Apache d'abord, puis Doug Lea. Pour beaucoup, Stephen Colebourne et Doug Lea en tête, le JCP fait aujourd'hui figure d'institution sclérosée; ils veulent pour preuve des graphiques comme celui-ci, montrant le déclin dans le nombre de JSRs depuis quelques années. Pour d'autres, comme Nicolas Matignole, il est au mieux un moyen de faire face à l'adversité. Il n'est guère que le JUG londonien pour en vanter encore les mérites.
Après l'échec de sa stratégie concernant OpenOffice, Oracle semble cette fois-ci décidé à tirer les leçons de ses erreurs du passé: en adoptant Java SE 7, en mettant en avant OpendJDK, en réformant enfin le JCP, Oracle est peut-être enfin en train de donner des gages sérieux de pérennité au langage Java. Espérons seulement que la future JSR 349 nous donnera raison.


Sonar, l'outil qui manquait à l'usine de développement .NET
Sonar (www.sonarsource.org) est un outil de reporting sur la qualité des projets informatique. Bien qu'à l'origine fait pour le Java, la communauté Open Source a permis l'intégration de Sonar avec d'autre langages : cobol, flex, php, c++ et maintenant .NET.
L'objet de cet article est de vous montrer ce que peut apporter Sonar pour un projet informatique et montrer quelle est sa place dans l'univers .NET.


Interview and Book Excerpt: CMMI for Development
The CMMI for Development (CMMI-DEV) framework, developed at the Software Engineering Institute (SEI), can be used to improve product quality and project and organizational performance.
InfoQ spoke with Mike Konrad, co-author of the book published on the CMMI-DEV framework. We are also making two excerpts from the book ("Applying Principles of Empiricism" from Chapter 3 and "Switching Tracks: Finding the Right Way to Get to Maturity Level 2" from Chapter 6) available for our readers.


Develop with real-time Java
Create applications with predictable response times
1. Why real-time Java?
Runtime processes (garbage collection, class loading, Just-in-time compilation, and thread scheduling) in conventional Java virtual machines (JVMs) make them incapable of running applications with real-time behavior. Real-time extensions to Java technology—based on the Real-time Specification for Java (RTSJ)—enable JVMs with real-time features. You can meet the hard or soft real-time constraints your applications require by leveraging the traditional benefits of the Java language—such as interoperability and safety—and combining them with features that the real-time Java extensions enable. Learn how.


Not doing Code Reviews? What's your excuse?
All of us have known for a long time that code reviews find defects, and that reviews are cheaper and can be more effective than most kinds of testing. In Code Complete, Steve McConnell builds an overwhelming case for code reviews: disciplined code inspections can find between 45%-70% of all defects in code, while even fast, informal reviews can find 20%-30%. Studies at IBM, HP, Microsoft and other places show that it is several times cheaper to find bugs in code reviews than through testing. And evidence keeps coming in to support that code reviews work.


La révolution HTML 5 chez Microsoft va laisser des traces
Il ne se passe pas un jour sans qu'on ne parle d'un fait lié à HTML 5, que ce soit pour encenser ces vertus multiplateformes, enterrer ses principaux concurrents ou annoncer une n-nième spécification. Le dernier en date et non des moindres est la présentation officielle de Windows 8 par Microsoft. Difficile de rester insensible à ce mouvement de fond, que dis-je ce tsunami technologique qui secoue en ce moment la firme de Redmond. Quelle histoire rocambolesque que celle de la stratégie RIA d'un éditeur qui ne sait clairement plus vers quel saint se vouer. Pour bien comprendre l'ampleur du désastre, faisons un petit retour en arrière.


Java HotSpot™ Virtual Machine Performance Enhancements
Compressed Oops
Zero-Based Compressed Ordinary Object Pointers
Escape Analysis
NUMA Collector Enhancements
NUMA Performance Metrics


Garbage-First Collector
What is the Garbage-First Collector?


Java Should Have Extended Enums!
At Devoxx09, Joe Darcy presented the status and future of the Coin project, and how changes to the language are selected and implemented (or vice versa). During his talk, he showed the cost classification of a language change: trivial, small, medium, big, or huge, and emphasized the fact that each change is also a benefit (hard to measure a priori) that can be estimated as big, medium, or small.


La Méthode Clone()
Comment rédiger la méthode clone() ? Quand utiliser Cloneable ? Ce document répond à ces questions.
Il est souvent nécessaire de dupliquer une instance. Cela permet de gérer correctement les exceptions et les agrégations. Nous désirons proposer une méthode public clone() retournant une copie d'une instance.