vendredi 20 août 2010

Veille technologique semaine 33

Pour le bulletin de la semaine 33, je vous propose les sujets suivants :
  • Oracle poursuit Google pour violation de brevets sur l'utilisation de Java dans l'OS Androïd.
  • La dernière version d'Internet Explorer 9 de Microsoft, en cours de développement sur le chemin du HTML 5 avec des performances graphiques accélérer par le matériel.
  • Le GPGPU et les mots de passe : la puissance de calcul des processeurs graphiques permet de craquer les mots de passe simple.
  • La programmation des GPU.
  • Trois articles au sujet du processus waterfall et les méthodes agiles : comment prendre en compte les changements (de spécifications ou de technologie) dans un processus traditionnellement rigide.
  • Sortie d'un livre au sujet du modèle de composant d'IBM : SCA (Service Component Architecture).
  • Un nouveau système de gestion de configuration : Git. Un SCM (Source Code Management) non centralisé.
  • La liste des nouvelles fonctionnalités des NIO.2 du JDK 7 : extensions accès au système de fichier, multicast pour les channels, etc...
  • Un article sur Visual VM 1.3.
  • Le multi-catch de Java du JDK 7.
  • Les styles dans JavaFX 1.3 : séparer le fond de la forme.


Bonne lecture.


Oracle poursuit Google pour violation de brevets
Jeudi dernier, Oracle a lancé une action en justice contre Google pour violation de brevets quant à l'utilisation de Java pour la plateforme Android. L'information a rapidement fait le tour du web et de la twitosphère provoquant à l'encontre d'Oracle son lot de commentaires indignés, notamment dans les communautés Java et libristes (On retiendra le billet peu amène de James Gosling : « The shit finally hits the fan…. »).
Dans sa plainte, Oracle précise que « Android [...] et les appareils qui utilisent Android violent un ou plusieurs brevets parmi les suivants: 6,125,447; 6,192,476; 5,966,702; 7,426,720; RE38,104; 6,910,205; et 6,061,520″. Les brevets en question portent sur l'implémentation de machines virtuelles, l'outillage et les compilateurs.
Google, certainement pour garder les coudées franches, a fait le choix d'implémenter sa machine virtuelle Dalvik sans utiliser OpenJDK (la version GPL2 de Java). Cette implémentation n'est pas pleinement compatible Java et est exécutée sur des terminaux mobiles. Or, lorsque Sun avait « open sourcé une partie de Java » au travers d'OpenJDK, les garanties d'être à l'abri d'attaques pour violation de brevet ne protégeaient que les implémentations pleinement compatibles Java pour desktop et serveur uniquement (pas les implémentations pour terminaux mobiles).
Pour étayer son accusation selon laquelle Google a sciemment violé les brevets relatifs à Java, Oracle avance que Google était, de longue date, au courant des brevets détenus par Sun. Eric Schmidt (CEO de Google) et Urs Hölzle (Senior VP of operations chez Google) ont en effet joué un rôle significatif dans le développement de la technologie Java lorsqu'ils étaient chez Sun.
La réponse de Google à l'attaque d'Oracle (au travers d'un communiqué de presse) est sans surprise : Google estime que la plainte est sans fondement. D'autre part, Google considère qu'avec cette plainte, Oracle n'attaque pas seulement Google, mais aussi la communauté Open Source Java.

A priori, l'objectif d'Oracle n'est pas de « tuer » Android mais de profiter de son succès en imposant à Google de lui reverser une part des revenus de la plateforme. En effet, Java ME est une source non négligeable de revenus pour Sun (Oracle) puisque cette technologie équipe de très nombreux terminaux. Mais le succès fulgurant d'Android sur le marché des smartphones est sur le point de tarir cette source de revenus.
D'autre part, Oracle souhaite sans doute envoyer un message clair quant à sa conception de l'utilisation de la technologie Java là où le silence de Sun vis à vis d'Android pouvait être perçu comme un blanc seing.

Ce genre d'affaire est généralement synonyme de feuilleton judiciaire à rallonge (comme dans le cas emblématique de SCO vs. Linux). Il y a donc peu de chances que le cas Google / Oracle se règle rapidement. La complexité du dossier (notamment en ce qui concerne les tenants et aboutissants techniques) laisse présager de longs débats. Même si l'issu d'un procès reste incertaine Google était certainement préparé à une telle attaque (et est de taille à y faire face) et sa défense sera bien préparée.
Tant que l'affaire ne sera pas réglée, l'ensemble de l'écosystème Android (constructeurs, développeurs, utilisateurs, …) va retenir son souffle, mais l'engouement pour la plateforme Android ne devrait pas trop en pâtir. D'une part, Google continuera de développer la technologie Android. D'autre part, gageons que Google prendra ses responsabilités sur le sujet de la propriété intellectuelle et jouera son rôle de pare feux vis à vis des constructeurs équipant leurs terminaux de l'OS Android.

La fin d'Android est très peu probable. Oracle n'y a aucun intérêt et ce pour plusieurs raisons. D'abord parce qu'Oracle a tout intérêt à ce que Java soit présent sur le marché des smartphones. Or cette présence passe par Android, pas par Java ME et Oracle n'a, aujourd'hui, ni la volonté, ni la capacité d'innover dans ce sens. Ensuite parce que l'essor des smartphones sous Android favorise le développement d'applications utilisant des backend (serveurs) mettant en œuvre des serveurs d'applications Java et des bases de données, augmentant ainsi la taille d'un marché sur lequel Oracle se taille la part du lion. Enfin parce qu'Android réunit une large communauté Java.
Il semble donc que cette affaire ne puisse avoir que deux issues :

  • Google sera contraint à verser une partie des revenus d'Android à Oracle. Soit parce qu'Oracle aura gagné un procès, soit parce que Google aura préféré négocier un accord à l'amiable.
  • Ce sera le status quo. Soit parce qu'Oracle aura perdu un procès, soit parce qu'Oracle retirera sa plainte suite aux négociations qui vont s'entamer (au cours desquels Google pourrait commencer à utiliser ses brevets comme arme de dissuasion).
Ce qui est sûr, c'est que l'image de Java ne sortira pas grandie de l'initiative d'Oracle (qui semble d'ores et déjà avoir perdu la bataille de l'image).
Pour ceux qui souhaitent approfondir le sujet, l'excellent billet de Charles Nutter « My Thoughts on Oracle v Google » fait longuement le tour de la question et propose des perspectives très intéressantes.


Oracle Sues Google Over Java in Android
Late on Thursday, Oracle filed a copyright and patent infringement claim against Google over its Android operating system, opening a legal war between the Silicon Valley firms over the smartphone software platform.
Android has seen rapid growth since its first release in November 2007. Figures from Gartner for the last quarter show it ahead of Apple's iOS for the first time, though it should be noted that these figures were just before the launch of the iPhone 4 when inventory of the Apple product was tight.
The top four smartphone OSes were Symbian (41.2 percent), RIM (18.2 percent), Android (17.2 percent) and iOS (14.2 percent).



Last IE9 Platform Preview Available with Improved Performance and Standards Compliance
Microsoft has released the fourth and last preview version of Internet Explorer 9, which features hardware acceleration, deep integration with the JS engine and has improvements in performance and adoption of standards like SVG, CSS, HTML5, etc.


La sécurité des mots de passe remise en cause par le GPGPU
L'utilisation des cartes graphiques pour effectuer des calculs simples et répétitifs est en train de révolutionner la notion de puissance de calcul des ordinateurs. Si ces cartes graphiques sont incapables encore d'effectuer des calculs très complexes, elles excellent dans ceux qui sont plus simples et répétitifs. Dans ce cas, leurs multiples unités mises en parallèle font merveille et l'on commence à voir fleurir des projets de supercalculateurs qui en seront dotés.
Bien entendu, dans une moindre mesure, ceci sera aussi accessible au grand public et à ceux qui auront les moyens d'acheter des batteries d'ordinateurs donc chacun sera doté de plusieurs cartes graphiques puissantes, des configurations dont le prix final ne dépasse pas quelques milliers d'euros mais qui ont déjà la puissance de calculateurs hors de prix d'il y a quelques années.
Certains pirates ont compris tout l'intérêt de ces solutions qui excellent pour casser les mots de passe par force brute. Cette technique est simple. Elle va tester toutes les combinaisons possibles de mots de passe jusqu'à trouver le bon. S'il fallait auparavant des mois pour y arriver, ce qui rendait les choses inutiles, on pourra demain le faire en quelques minutes.
Des spécialistes de la sécurité considèrent aujourd'hui que les mots de passe de 7 caractères, même s'ils mélangent chiffres, lettres et autres caractères alphanumériques, ne sont plus fiables. La puissance de calcul accessible au plus grand nombre permet maintenant d'en venir à bout dans un délai par trop raisonnable. Ils conseillent d'utiliser des mots de passe alphanumériques d'au moins 12 caractères pour se mettre à l'abri. C'est d'autant plus vrai que nombre d'utilisateurs d'Internet ont tendance à avoir un mot de passe unique pour la plupart de leurs services. Dans ce cas, si le pirate arrive à casser une fois ce mot de passe, il aura accès à tous les comptes de cet utilisateur sur tous les sites qu'il fréquente, autant dire à la totalité de sa vie privée et certainement aux cordons de sa bourse.




Initial Impressions of GPU Programming
In this article I will discuss some of the primary issues with GPU programming. This article will focus on how we implemented the first version of GPU support in the Encog Machine Learning Framework (http://www.heatonresearch.com/encog/) . This article focuses mainly on using OpenCL from Java or C#, however it is general enough to apply to any language that can commu icate with OpenCL.
Overall I am happy with the first generation of Encog OpenCL support. Some things worked well, others did not. In this article I will cover both. I will describe what areas we had issues with, and how we plan to improve GPU support in future versions.


Waterfall vs. Agile: Can they be Friends?
There has been a lot of discussion lately regarding which approach to software development is better; some may say Waterfall, some may say Agile. The truth is that there isn't an absolute answer.

Agile and Waterfall have a different set of characteristics that make them better depending on many external and internal factors related to every project: time to deliver, amount of change expected in the specifications, nature of requirements, type of technical employees…etc.
It is uncommon to find projects that should be purely Agile oriented or Waterfall oriented, that's why companies usually have to combine practices from both of them. In these series of articles we are going to clarify what the main characteristics of Agile and Waterfall are, and how they apply to the classic areas of software development: Development, QA, Management, and Business.

Read the other parts in DZone's 'Agile vs. Waterfall' series.


Waterfall vs. Agile: Development and Business
We saw in the previous article the main differences between agile and waterfall. In the following articles we are going to take a deeper look by focusing on the four main actors in software development: Development, Business, QA, and Management. This article will start with Development and Business.


Waterfall vs. Agile: QA and Management
We saw in the previous articles, the main differences between agile and waterfall. In this last article we are going to take a deeper look focusing on Quality Assurance (QA) and Management.


Book Excerpt and Interview: Tuscany SCA in Action
A new book by Simon Laws, Mark Combellack, Raymond Feng, Haleh Mahbod and Simon Nash Tuscany SCA in Action provides a simple step-by-step guide on how to develop applications leveraging SCA and Apache Tuscany.
This practical book is comprehensive, hands-on guide to Service Component Architecture, Apache Tuscany's specific SCA implementation (based on Java SCA v1.x) and the ways to use Tuscany to build applications. The books starts by explaining main concepts of SCA including components, services, references and composite applications and the way they are used for implementing SOA-based solutions. It then introduces a travel booking example, used throughout the book to explain details of SCA/Tuscany-based implementations. The book covers a wide variety of topics from implementing and binding SCA components, including data representation and transformation and invocation policies to deploying Tuscanybased applications to Tuscany runtime architecture, including ways to extending and embedding Tuscany's runtime.


Getting Started with Git
Git is a postmodern version control system that offers the familiar capabilities of CVS or Subversion, but doesn't stop at just matching existing tools. Git stretches the very notion of version control systems (VCS) by its ability to offer almost all of its features for use offline and without a central server. It is the brainchild of Linus Torvalds, with the first prototype written in a vitriolic two-week response to the "BitKeeper debacle" of 2005.
Today, developers everywhere are migrating in droves to this exciting platform. Users reference its blistering performance, usage flexibility, offline capabilities, and collaboration features as their motivation for switching. Let's get started with Git. You'll be using it like a master in no time at all.


Introducing NIO.2 (JSR 203) Part 1: What are new features?
1. Platform friendly-ness of NIO.2
2. File tree walk.
3. File Operations (Copy, Delete, Move).
4. Symbolic links support.
5. Support for file attributes in NIO.2.
6. File system change notification.
7. SPI for providing new file systems support.

Working with sockets and reding/ writing files we can name the following features:
1. Multicasting is now supported in the DatagramChannel. Both IPv4 and IPv6 are supported.
2. Asynchronous I/O for sockets and Files.


Discover Java VisualVM 1.3
A while back Java VisualVM 1.3 was released. We'll see what's new with this release. At this time, there is no package for Ubuntu, so we'll install it manually


Better exception handling in Java 7 : Multicatch and final rethrow




Stylin' with JavaFX
Using JavaFX CSS to Apply Styling to the User Interface
JavaFX is a platform and language for creating Rich Internet Applications (RIA) that execute on the desktop, in Web browsers, on mobile phones, and on TV. It was introduced in 2007, and version 1.3 was released in April 2010. One of the hallmark features of JavaFX 1.3 is the introduction of JavaFX CSS, which provides the ability to apply styling to any element in the user interface. This article focuses on JavaFX Cascading Style Sheets (CSS), which is primarily the domain of designers but is also important for developers to understand.

vendredi 13 août 2010

Veille technologique semaine 32

Pour le bulletin de la semaine 32, je vous propose les sujets suivants :
  • le site web Last.fm a basé la communication sur le standard JMS : Java Message Service. L'implémentation utilise le produit open source HornetQ de JBoss.
  • Le pattern d'architecture CQRS (Command Query Request Segregation) expliqué par son auteur.
  • Le JSR 308 : annotation type. Prévu pour le JDK 7, un certain nombre de vérification faite à la compilation et à l'exécution comme le @Readonly (alias const) que l'on attend depuis 15 ans en Java, le @Notnull, @Notempty, ... Extrait de la documentation.
  • L'injection de dépendance : la version du framework Spring et la version de Google Guice : les différences et les similitudes
  • Une fiche technique qui résume la technologie de Microsoft pour DotNet : WPF - Windows Presentation Foundation.
  • Les NIO 2 du JDK 7 : les notifications du système de fichiers enfin dans le JDK.
  • Une présentation des langages disponible pour la JVM : Fantom : un résumé et un petit tour de ce langage pas très connu.
  • Trois articles sur les expressions lambda ou closure pour Java 7. L'état des propositions et leur conséquence pour la langage et les API.


Bonne lecture.

L'architecture de Last.fm basée sur le standard JMS (Java Messaging Service) implémenté par HornetQ
Tout le monde connaît Last.fm, le service de streaming et de recommandation de musique. La compagnie a récemment changé son infrastructure de streaming et en a profité pour adopter JBoss HornetQ comme serveur de messaging, au détriment « d'un autre serveur open-source » (mais nous ne saurons pas lequel !). Jeff Mesnil publie sur DZone un article expliquant les raisons de ce changement et la façon dont Last.fm se sert d'HornetQ.
Pour résumer simplement, les messages JMS sont générés principalement par les streamers pour:

  • notifier la fin de l'écoute d'un morceau et donc faire mettre à jour la base.
  • permettre la déconnexion automatique d'un utilisateur connecté à un flux si un message généré par un second streamerindique qu'il vient de se connecter à un autre flux.
Dans sa configuration de HornetQ, Last.fm a mis l'accent sur la performance:
  • la persistance a été désactivée. Comme rapporté par nos lecteurs dans les commentaires d'un précédant article celle-ci est connue pour être consommatrice.
  • messages déclarés comme pré-acquittés, permettant d'éliminer des accès réseau supplémentaires.
Bien sûr tout ceci est fait au détriment de la robustesse. On n'a rien sans rien ! Mais Last.fm préfère perdre des messages plutôt que d'empêcher un auditeur d'écouter sa musique: « Availability was more important than reliable delivery ». Il est à noter que pour renforcer la robustesse, les envois de messages ne sont pas faits n'importe comment: un seul thread s'occupe de la communication JMS. Il communique avec les autres threads en interne par un mécanisme de files, dans lesquelles il puise les messages à envoyer à HornetQ et dépose les messages reçus. Ces files étant limitées en mémoire, cette dernière est donc maîtrisée et comme il y a un seul thread responsable des accès JMS, il n'y a pas de risque de blocage de tout le système.
Pour continuer sur HornetQ, notons que la tant attendue interface REST vient d'être annoncée par Bill Burke, son développeur principal, sur le forum du broker. Cette interface n'est pas encore disponible dans une version officielle de HornetQ, mais sa documentation permet d'ores et déjà de se faire une idée. Basée directement sur HTTP, elle évite de forcer l'utilisation d'une quelconque encapsulation (autre qu'applicative) des messages. Et bien sûr, on peut l'utiliser avec n'importe quel langage: REST est interopérable. La documentation spécifique à la création de messages permet de se faire une idée rapidement. Basée surRestEasy, qui fera aussi partie du futur JBoss AS 6, il y a fort à parier que cette interface fera parler d'elle et ouvrira la voie à de nouvelles utilisations du broker.

Axon, une implémentation Java du pattern CQRS
Le Command Query Request Segregation (CQRS) est un pattern architectural qui a été formalisé fin 2009 par Greg Young et Udi Dahan. Il repose sur l'idée de séparer le code métier selon qu'il s'appuie sur des opérations d'écriture (command) ou de consultation de données (query), plutôt que par découpage fonctionnel. Le but recherché ici est d'offrir une grande scalabilité en permettant aux lectures de s'effectuer de manière synchrone dans un cache, tandis que les requêtes d'écritures sont effectuées de manière asynchrone en mettant à jour à la fois le cache et la base de données sous-jacente.
Les développeurs Java disposent d'une implémentation Open Source de ce pattern, il s'agit du framework Axon (anciennement CQRS4J). Le projet est très actif et vient diffuser une version 0.6 dont la maturité mérite de s'y attarder : gestion et persistance des évènements, intégration à Spring et gestion des transactions.
Ce framework reste modeste pour l'instant et ne couvre qu'un nombre limité d'environnements techniques mais à défaut de répondre à votre besoin il constituera un exemple d'implémentation intéressant à étudier.


Clarified CQRS
After listening how the community has interpreted Command-Query Responsibility Segregation I think that the time has come for some clarification. Some have been tying it together to Event Sourcing. Most have been overlaying their previous layered architecture assumptions on it. Here I hope to identify CQRS itself, and describe in which places it can connect to other patterns.


Type Annotations Specification (JSR 308)
JSR 308 extends Java's annotation system so that annotations may appear on nearly any use of a type. (By  contrast, Java SE 6 permits annotations only on declarations; JSR 308 is backward-compatible and continues to permit those annotations.) Such a generalization removes limitations of Java's annotation system, and it enables new uses of annotations. This proposal also notes a few other possible extensions to annotations.

Examples of type qualifiers
The ability to place annotations on arbitrary occurrences of a type improves the expressiveness of annotations, which
has many benefits for Java programmers. Here we mention just one use that is enabled by extended annotations, namely
the creation of type qualifiers. (Figure 3 gives an example of the use of type qualifiers.)

1 @DefaultQualifier("NonNull")
2 class DAG {
3
4    Set<Edge> edges;
5
6    // ...
7
8    List<Vertex> getNeighbors(@Interned @Readonly Vertex v) @Readonly {
9    List<Vertex> neighbors = new LinkedList<Vertex>();
10      for (Edge e : edges)
11         if (e.from() == v)
12            neighbors.add(e.to());
13      return neighbors;
14      }
15 }

The DAG class, which represents a directed acyclic graph, illustrates how type qualifiers might be written by a programmer and checked by a type-checking plug-in in order to detect or prevent errors.

(1) The @DefaultQualifier("NonNull") annotation indicates that no reference in the DAG class may be null (unless otherwise annotated). It is equivalent to writing as "@NonNull Set<@NonNull Edge>edges;", for example. This guarantees that the uses of edges, cannot cause a null pointer exception. Similarly, the (implicit) @NonNull return type of getNeighbors() enables its clients to depend on the fact that it will always return a List, even if v has no neighbors.

(2) The two @Readonly annotations on method getNeighbors guarantee to clients that the method does not modify, respectively, its Vertex argument or its DAG receiver (including its edges set or any edge in that set).
The lack of a @Readonly annotation on the return value indicates that clients are free to modify the returned List.

(3) The @Interned annotation (along with an @Interned annotation on the return type in the
declaration of Edge.from(), not shown) indicates that the use of object equality (==) is a valid optimization. In the absence of such annotations, use of the equals method is preferred to ==.


Spring vs. Guice: The Clash of the IOC Containers
Spring and Google Guice are two powerful dependency injection frameworks in use today. Both frameworks fully embrace the concepts of dependency injection, but each has its own way of implementing them. Although Spring provides many benefits, it was created in a pre-Java-5 world. The Guice framework takes DI to the next level, leveraging the full power of Java typing, especially annotations and generics. Discover how Guice can make your code more modular, easier to write, and less error prone to maintain.

  • Living in XML Hell
  • Eliminating reliance on String identifiers
  • Preferring Constructor Injection
  • Nullifying NullPointerExceptions
  • Intruding into the domain
  • Replacing Spring verbosity with Guicey compactness
  • Considering other advantages

Windows Presentation Foundation
Windows Presentation Foundation or WPF is a next generation UI framework for creating desktop applications on the Windows Platform. It brings together a number of features and concepts such as a declarative language for constructing interfaces, rich media support, scalable vector graphics, timeline-based animations, sophisticated data binding, and much more.
WPF is a very large topic. The intent of this Refcard is to help you understand the basics of WPF. After we're done you should be able to look at the source of a WPF application and understand what you are seeing. However, in order to effectively use WPF, you will need to continue to learn more though additional and more extensive resources.


Introducing NIO.2 (JSR 203) Part 5: Watch Service and Change Notification
For a long time Java developers used in-house developed solutions to monitor the file system for changes. Some developed general purpose libraries to ease the task for others who deal with the same requirement. Commercial and free/ open source libraries like notify.sourceforge.net, jpathwatch.wordpress.com and www.teamdev.com/jxfilewatcher among others. Java 7 comes with NIO.2 or JSR 203 which provides a native file system watch service.


The Next Big JVM Language talk JavaOne
I'm talking at JavaOne 2010 on the subject of the "Next Big JVM language". I suspect that it might cause some controversey!

Talk
Before writing the talk, I wanted to get some feedback from the community. So, I've got some basic topics and questions I'm looking for feedback on.

1) What makes a language big and popular?
Lots of people have drawn up lists -
Steve Yegge has one (take a look!). But what criteria do you believe make a language big and popular? Static or dynamic? Fast or just fast enough? Lots of features or few? Simple or complex? Does syntax matter? etc. etc.

2) What might be different between a big JVM language and a big language in general (without the JVM restriction)?
Dot NET has several new languages, but they can't be considered. However, if you've seen an interesting idea then thats interesting here.


3) Is it important to reuse existing Java libraries?
Java has a big ecosystem. How important is reusing all those libraries. Or would a fresh start with a new higher quality (less cruft) core library be preferred.


4) What languages should I consider?
I've got Groovy, Scala, Fantom and Clojure on the list, but what else? I'd love to see blog posts by language authors tackling the question of why their language matches the session title.


5) If its none of the above, why not? What are you looking for?
While a random wish list of features is interesting, remember that this is about the next big JVM language. Does your idea fit that?


6) Can Java reinvent itself?
What about java itself - could a reinvigorated Java retain its crown.

Summary
Feedback is definitely wanted, by comment, email or new blog posts. Its a broad topic, but the more feedback the better (or more controversial) the talk will be! (And I'll be starting writing this weekend...


Why Fantom
Overview
Do we really need another programming language? Well obviously we thought so, or we wouldn't have built Fantom! Fantom is designed as a practical programming language to make it easy and fun to get real work done. It is not an academic language to explore bleeding edge
theories, but based on solid real world experience. During its design we set out to solve what we perceived were some real problems with Java and C#. Our background is heavily Java, but many of Java's problems are shared by C# and .NET also.




Fantom Tour
Hello World
We start our whirlwind tour of Fantom's features, with the quintessential hello world:

class HelloWorld {
static Void main() {
   echo("hello world")
   }
}


Lambdas in Java Preview - Part 1: The Basics
As announced at Devoxx last year, closures (or better lambda expressions) will (probably) be added to JDK7. The team of project lambda has checked in initial parts of the implementation into the OpenJDK repositories. This is the first part (see part 2) in a series of blog posts giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. Although most of the examples will work with the current prototype implementation, keep in mind, that this is just a preview, which is based on the straw-man proposal, the specification draft, the discussions on the project lambda mailing list and the current state of the prototype. There might/will be both semantical and syntactical differences to the final version of lambdas in Java. Also some details are left out, e.g. exception handling will probably be out of scope.


Lambdas in Java Preview - Part 2: Functional Java
This is the second part in a series of blog posts (read part I) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. This part focusses on general functional programming techniques, which will be available through the addition of lambdas. Functional programming (although I still wouldn't consider Java a functional programming language) will make Java code more concise, more expressive and more readable in certain kinds of problem situations.




Lambdas in Java Preview - Part 3: Collections API
This is the third part in a series of blog posts (read part 1, part 2 and part 4) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. In this part I'll focus on how the addition of lambdas could affect one of the most used standard APIs - the  Collections API.








Lambdas in Java Preview - Part 4: Proposal UpdateThis is the fourth part in a series of blog posts (read part 1, part 2 and part 3) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. This part describes shortly the changes of a new proposal, that has been published while writing this series, and how it changes some of the examples in this series.

vendredi 6 août 2010

Veille technologique semaine 31

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • sortie de la version 1.0.0 de Gemfire qui est un produit de gestion de données distribuées. Ce produit est interropérable Java, C++ et C# (DotNet), compatible des transactions (JTA), ...
  • Sortie de OpenCL 1.1 : du GPGPU (General-Purpose computation on Graphics Processing Units) par une API normalisée. Comment faire du calcul numérique par le processeur graphique (GPU).
  • Le W3C propose une spécification pour l'expression des émotions : EmotionML (ce n'est pas un poisson d'avril).
  • Les cinq pièges à l'adoption des méthodes agiles.
  • Un chapitre d'un livre qui vient de sortir sur la méthode agile Scrum : le product backlog
  • Un exemple de programmation par contract avec le langage Groovy : une extension du langage Groovy par les annotations. C'est un exemple de DSL (Domain Specific Langage) interne.
  • La compatibilité ascendante : cela concerne chaque niveau. La compilation, le binaire, l'execution. Détail de chaque niveau par l'équipe du JDK.
  • Un article de Dell sur le multi-core versus l'hyperthreading : et le multi-core hyperthreadé ?
  • La programmation fonctionelle et le JDK 7 : le projet Lambda.

Bonne lecture

Spring Releases Gemfire 1.0.0.M1 for Java and .NET

Spring GemFire (for short SGF) brings the Spring concepts and programming model to GemFire, SpringSource's distributed data management platform. The release is available for both Java and .NET.
The features in 1.0.0.M1 include:
  • declarative dependency injection style configurations for the GemFire infrastructure (such as Cache, Region, Interest, etc)
  • exception translation to Spring's portable DataAccess exception hierarchy
  • Template and callback support for easy native API access
  • transaction management support
  • Spring-backed wiring for GemFire managed objects
  • auto-generation of non-reflection based Instantiators

Note that some of these features are currently available only in the Java version.

Through SGF, Spring users should feel right at home when interacting with GemFire while developers familiar with GemFire will see the benefits and flexibility of the Spring container, its powerful AOP integration, and versatile service abstractions. But don't take my word for it – download the project and take the sample application for a spin. It's a console based 'shell' which allows for ad-hoc interaction with the data grid; one can start and stop nodes and see the information shared transparently between multiple clients.



OpenCL 1.1 enhances performance with backward compatibility
The Khronos Group, the organization responsible for maintaining a number of open standards such as OpenGL, WebGL, and OpenMAX, has announced the release of OpenCL 1.1, an update to the cross-platform standard for making it easier to target GPUs and other specialized hardware for parallel processing. The latest update includes a number of performance improvements and added instructions while maintaining full backward compatibility for OpenCL 1.0. The release also establishes an 18-month cadence for updates to the standard.


Expressing Emotions with a New W3C Markup Language, EmotionML
W3C has published the first public working draft of the Emotion Markup Language (EmotionML), a language meant to express emotions in three main ways in today's computer-based communication: annotating data, the recognition of emotional-based states, and generating emotion-related system behavior.

According to the language authors, EmotionML can have applications in various fields like:
  • Opinion mining / sentiment analysis in Web 2.0, to automatically track customer's attitude regarding a product across blogs;
  • Affective monitoring, such as ambient assisted living applications for the elderly, fear detection for surveillance purposes, or using wearable sensors to test customer satisfaction;
  • Character design and control for games and virtual worlds;
  • Social robots, such as guide robots engaging with visitors;
  • Expressive speech synthesis, generating synthetic speech with different emotions, such as happy or sad, friendly or apologetic;
  • Emotion recognition (e.g., for spotting angry customers in speech dialog systems);
  • Support for people with disabilities, such as educational programs for people with autism.


Agilité : Cinq pièges à l'adoption des méthodes agiles
Mike Griffiths, blogueur et agiliste travaillant au PMI, nous présente dans son article les Anti-Patterns nuisant à l'adoption des méthodes agiles. Bien que les bénéfices tirés des méthodes agiles ne soient plus à prouver, le passage à l'agilité n'est pas forcément couronné de succès. Nombreux sont les pièges et les digressions dans lesquels on peut tomber. Mike décrit ensuite cinq pièges courants, mais c'est à vous d'identifier les autres selon le contexte de votre projet.
  • L'agilité n'est pas un miracle
Oui, l'agilité permet de gagner du temps, d'accroître la valeur métier, et de développer un produit de meilleure qualité. Cependant, ce n'est pas une recette magique, qui va permettre à un projet anémique voué à l'échec d'être un succès. Bien au contraire, vous pourriez arriver encore plus rapidement en situation d'échec, ou au mieux vous en rendre compte avant avec des nouveaux indicateurs.
  • L'agilité ne veut pas dire aucune discipline
Certaines personnes ne connaissant pas bien l'agilité ont l'idée reçu que les méthodes agiles font preuves de très peu de discipline, de planification et d'estimation. Les méthodes agiles sont parfois appelées « méthodes légères » par opposition aux anciennes méthodes.
On peut quand même constater de nombreuses cérémonies et activités de haut niveau nécessitant de la discipline, comme: le stand-up daily meeting, le sprint planning, la rétrospective, la démo, etc.
Même si les documents afférents aux cérémonies sont peu nombreux, ils ne sont pas une excuse pour manquer de discipline et éviter de rendre des comptes. Ils contiennent les indicateurs suffisants pour réaliser des plannings, des estimations, etc.

  • L'agilité sans aucune explication
Une équipe agile ne travaille pas toute seule en silo. Elle interagit avec d'autres équipes, comme le marketing, l'architecture applicative, etc. Le caractère itératif d'un projet agile peut les perturber. Ainsi, il convient d'expliquer le processus agile aux autres équipes, avant d'arriver à des situations de blocages ou pire de rejets.
  • L'importance du feedback client
L'une des contraintes importantes des méthodes agiles est d'avoir le client sur site. Cela permet entre autre d'avoir un feedback régulier au cours d'une itération. La réunion de démonstration a aussi pour rôle d'avoir un retour et une validation du client. Attention, même si le client ne fait pas ou peu de retours, cela ne veut pas pour autant dire que tout va bien et que son réel besoin est satisfait. Au contraire, il peut avoir fait preuve d'inattention. Pour éviter cela, Mike propose des sessions de revue, où le client est assisté par un membre de l'équipe.
  • Obsédé par le processus agile
La recherche de l'amélioration du processus agile au sein d'un projet est bonne chose en soi.
Cependant, il ne faut pas tomber dans le cas extrême du scrum master obnubilé par le process et le sur-outillage avec des indicateurs inutiles. Il faut rester pragmatique et garder à l'esprit que l'objectif de l'agilité est de satisfaire le client et répondre à des contraintes business. Il faut donc garder son attention sur lui et non sur le process. Mike suggère d'utiliser des métriques orientées sur l'objectif final: satisfaction client, fonctionnalités réalisées et acceptées, plutôt que le pourcentage de pratiques agiles suivies, ou le temps passé en pair-programming.



Effective Java, second edition – Book Review
This book is the book to read if you want to write good Java code. All the advices are really useful. It's really comfortable to read book from a person who master Java. In fact, Joshua led the design and implementation of numerous Java features.


Working with the Product Backlog
Agile Product Management with Scrum is the product owner's guide to creating great products with Scrum. It
covers a wide range of agile product management topics including envisioning the product, stocking and grooming the product backlog, planning and tracking the project, working with the team, users and customers, and transitioning into the new role.
This article is an excerpt (Chapter 3 'Working with the Product Backlog') from the book; it introduces the product backlog together with its DEEP qualities. It explains how product backlog grooming works, shares advice on discovering and describing product backlog items, and on structuring the product backlog. ScrumMasters, coaches, team members will also benefit from reading the extract as managing the product backlog is teamwork in Scrum.


An Introduction to Programming by Contract
Programming by Contract is known under the name of Design by Contract first implemented by Eiffel, a programming language introduced by Bertrand Meyer.

The main principle of programming by contract is to actually add a program's specification as expressions in the form of meta-data to certain elements in the source code. Contracts, contracts, everywhere…

So far we have seen class invariants, preconditions and postconditions and how they can be applied on class or method declarations. But where do all those contracting takes place? As you might have already supposed, a contract in terms of Design by Contract is an agreement between the supplier (the programmer, the creator) and the client (the one who makes use of it) of a class.


Kinds of Compatibility
When evolving Java code, compatibility concerns are taken very seriously. However, different standards are applied to evolving various aspects of the platform. From a certain point of view, it is true that any observable difference could potentially cause some unknown application to break.
Indeed, just changing the reported version number is incompatible in this sense because, for example, a JNLP file can refuse to run an application on later versions of the platform. Therefore, since making no changes at all is clearly not a viable policy for evolving the platform, changes need to be evaluated against and managed according to a variety of compatibility contracts.


Threads or Cores: Which Do You Need?
Intel and AMD have done their best to differentiate the x86 architecture as much as possible while retaining compatibility between the two CPUs, but the differences between the two are growing. One key differentiator is hyperthreading; Intel does it, AMD does not.

Multicore and HyperThreading (referred to as "HT") are not the same, but you can be suckered into believing they are, because hyperthreading looks like a core to Windows. My computer is a Core i7-860, a quad-core design with two threads per core. To Windows 7, I have eight cores.


Functional Programming Concepts in JDK 7
There's much excitement about JDK 7 and in particular Lambdas! I've waded through the bloat to help you get an understanding of it.
My take is that lambdas will be in JDK 7 - you can see plenty of evidence of that around the web and in the snapshot builds. That said, no decision is concrete (which is a wise tip from The Pragmatic Programmer no less!). This article is aimed at those who don't know much about functional programming or what Lambdas, Closures or Currying are and want to get 'primed'.