vendredi 8 janvier 2010

Veille technologique semaine 1

Pour le bulletin de cette première semaine de l'année, je vous propose les sujets suivants :
  • un premier article ironique qui fait une analogie entre le développement logiciel et un hôpital. Cela doit être du vécu ?
  • un projet ambitieux de processeur conçu en Chine, pour des raisons d'indépendances.
  • Les 7 principes du KISS : Keep It Simple and Stupid.
    C'est un principe philosophique qui désigne le fait que la simplicité dans la conception devrait être le but recherché et que toute complexité non-nécessaire devrait être évitée. Ce principe très utile est appliqué dans grand nombre de disciplines telles que le développement logiciel, l'animation, le journalisme, la photographie, l'ingénierie, l'aviation et la planification stratégique.

    Ce principe est à rapprocher au principe du Rasoir d'Occam aussi appelé « principe de simplicité », « principe de parcimonie », ou encore « principe d'économie », il exclut la multiplication des raisons et des démonstrations à l'intérieur d'une construction logique.
  • Le pattern builder en Java avec des interfaces génériques.
  • Le service provider du JDK 6 : article en français (j'avait déjà envoyé une version anglaise).
  • Un article sur les tuples proposé par le leader de Mono comme évolution du langage C#.
  • Les simplifications de la verbosité du langage Java prévue pour le JDK 7.
  • Un article très technique sur les optimisations de la JVM pour les "Tail Call" : une méthode qui fait un return en appelant une autre méthode. Optimisation classique des compilateurs.

Bonne lecture.


L'informatique, ou l'art de l'opération au couteau à beurre
Vous êtes à l'hôpital, et vous êtes sur le point de vous faire opérer. Une infirmière a roulé votre lit depuis votre chambre jusqu'à la salle d'opération, traversant un labyrinthe de coulours froids aux murs décrépits dans un grincement de roues lancinant. Puis elle s'est retirée, vous laissant seul.


People's Processor: Embrace China's Homegrown Computer Chips
Imagine that your nation is entirely dependent on a belligerent and economically unstable foreign country for a precious commodity. Imagine that without that commodity, your entire society would grind to a halt. Got it? OK, now imagine that your nation is China, the belligerent nation is the US, and the commodity is CPUs.

Chinese government sponsored an ambitious initiative to create a sort of national processor. Work on the Loongson, or Dragon Chip, began in 2001 at the Institute of Computing Technology in Beijing. The goal was to create a chip that would be versatile enough to drive anything from an industrial robot to a supercomputer.


Explore Model Driven Architecture and Aspect-oriented Programming

In recent years, two new trends in software engineering have been established — Aspect oriented Programming (AOP) was developed to extend and ease programming, and the Model Driven Architecture (MDA) was introduced to take full advantage of the power of modeling. Many people are confused when confronted with both AOP and MDA. This article provides a crash-course on both topics and explains the differences and similarities between the two.

Although AOP and MDA were developed from very different viewpoints: programming vs. modeling; weaving many inputs into one output vs. creating many outputs from one input, there is a great deal of common ground between them and both techniques are used for identical purposes. There is no need to choose between them. They complement each other and can be used together successfully.


The 7 characteristics of simple code (KISS)
I used to believe that the most important quality of code is its extensibility. The code had to be prepared for future changes so I would code lots of things not necessary now. But after realizing that I never was right upfront guessing what the future changes will be, and after having quite a few maintenance and handover nightmares, a few a years ago I decided that I will take the opposite approach to what good
code is. Ever since I did that, I am every day more convinced that the key characteristic of good code is simplicity. Simple code is easy to read and easy to change. And because it is simple, it is less prone to have bugs (the more complex the algorithm you are creating the more changes to make a mistake). Whenever you are coding, I recommend you to check every time if your code is still simple, and remember: "there are no hard problems, only hard solutions".


Des interfaces extensibles avec les Self-Bounded Generics
Certains objets complexes nécessitent d'être construits ou paramétrés en plusieurs étapes, comme les composants d'une interface graphique (définition de leur taille, position, couleur...) ou les requêtes SQL (génération des clauses select, from, order by...), Ces étapes sont matérialisées par un ensemble de méthodes, que le développeur doit appeler dans un ordre précis pour réaliser le processus de construction, au terme duquel l'objet finalisé lui est retourné. Ces méthodes peuvent appartenir à l'objet lui-même, ou à un objet externe implémentant le design pattern Builder.

Afin de simplifier la vie du développeur et de rendre le code plus lisible, il est intéressant de coder ces méthodes de manière à pouvoir chaîner leurs appels : l'objet possède alors une interface dite "fluide" (fluent en anglais).

Il suffit pour cela que chaque méthode renvoie l'instance courante de l'objet auquel elle appartient :
public class Foo {
public Foo method() {
(...)
return this;
}
}

Cet article expose la principale limitation de cette approche et propose une méthode simple pour la contourner, grâce à la technique des Self-Bounded Generics.


Java : présentation du Service Provider API
La spécification JAR (http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html) propose depuis Java 6 une fonctionnalité fort pratique mais relativement méconnue : la Service Provider Interface (SPI). Derrière ce nom peu engageant se cache un mécanisme de découverte et de chargement dynamique de classes répondant à une interface donnée. Son utilisation est heureusement fort simple, et nous verrons ici qu'il est possible de s'en servir comme d'un système de plugins rudimentaire.


C# Support for Tuples
More Mono proof of concept extensions to C#.
As part of the list of things I would like to see in C# is support for tuples in the language. They would show up in a few places, for example, to return multiple values from a function and assign the results to multiple values at once.



JDK7 Tackles Java Verbosity
The Java Language changes accepted for inclusion in JDK7 have been announced by Joseph Darcy. We already knew that closures were off the menu. So too, unfortunately, is language support for arbitrary-precision arithmetic. The final list is pretty non-controversial and includes a number of changes that will reduce the verbosity of Java programs (one of the main criticisms of Java from proponents of other languages). Java will never be as terse as Perl or Haskell, but that's no bad thing. One of the strengths of Java is its readability. There are however some areas where the language is needlessly verbose and that's what these changes are addressing.


Tail call anyone ?
Last June, Arnold Schwaighofer push a patch to mlvm repository that allow to transform tail call invocation of a method to a jump. Even if this transformation is classical in language like Lisp, Scheme or Caml, the JVM was not offering any help to optimize this kind of call until this patch.

Recently, Tom Davies has refreshed the patch in order to be used with a more recent jdk7 beta VM. Really cool, indeed.

Aucun commentaire: