Tuesday Sep 24, 2013

In a festive room teeming with over 200 people, including many celebrated Java luminaries, along
with excellent food and drink, the 9th annual JCP Program Awards were
handed out atop the majestic Hilton Hotel on Monday night. As the JCP
states, “The Java Community Process (JCP) program celebrates
success. Members of the community nominate worthy participants, Spec
Leads, and
Java Specification Requests (JSRs) in order to cheer on the hard work
and
creativity that produces ground-breaking results for the community and
industry
in the Java Standard Edition (SE), Java Enterprise Edition (EE), or Java
Micro
Edition (ME) platforms.”

The JCP added a new awards category this year for
Adopt-a-JSR program participants, bringing the total to four: JCP
Member/Participant of the Year, Outstanding Spec Lead, Most Significant JSR,
and Outstanding Adopt-a-JSR Participant.

The room was full of good cheer, playful humor, a music band of Java developers, and enthusiastic
appreciation of much that has been accomplished on behalf of Java technology in
the previous year.

The winner was Azul System’s Gil Tene. The JCP said, “Gil
has worked diligently to provide clear advice on matters of Software Patents,
IP and licensing that seeks to benefit both non-profits/individuals etc as well
as organizations with vested commercial interests in Java. It's not easy
delving into the depths of the legal aspects and the potential impacts of
changes to the JCP, but with help from folks like Gil we're hopeful for a solid
and fair outcome.”

Tene characterized his approach to the JCP as follows: “I
represent Azul Systems on the JCP EC, but I try to apply an approach of ‘do the
right thing first’ in my choices and positions. Coming from a small company that
depends on Java and its ecosystem for its livelihood, I see my role as
representing the interests of an entire sector of non-big-company commercial
folks and of individual and professional developers out there, and providing
some offset and balance to the normal mix of such boards.”

Outstanding Spec Lead

--Brian Goetz,
Oracle

--Jitendra
Kotamraju, Oracle

--Anatole Tresch,
Credit Suisse

--Chris Vignola, IBM

The winner, Oracle’s Brian Goetz, was recognized, “For
tirelessly working away at an incredibly complex JSR - JSR 335, Lambda
Expressions for the Java Programming Language. From a community point of view,
we've appreciated his willingness to listen and consider ideas from other
technologists as well as spending time with groups of developers to understand
the impact of Lambdas on Java.”

Goetz offered a statement in response to the award for his
leadership in creating Lambda Expressions for the Java Language, which also won
for most significant JSR. He said that lambdas, “represent a coordinated
co-evolution of the Java SE platform, including the VM, language, and core
libraries to provide developers with a powerful upgrade -- quite likely the
largest ever -- to the Java SE programming model.We started this JSR in early 2010, but the
topic of closures-in-Java had already been in play in the community for many
years prior, and, of course, there was a broad diversity of opinions as to what
direction, how far, and how fast to evolve the Java programming model.In the end, the most significant dimension of
the challenge turned out to be: how do we integrate these new features in the
language and libraries without them feeling grafted on after-the-fact.I think developers will find programming with
this ‘new and improved Java’ to be a very pleasant experience -- I know I
have.”

Most Significant JSR

--JSR 335, Lambda
Expressions for the Java Programming Language

--JSR 344,
JavaServer Faces (JSF) 2.2

--JSR 352, Batch
Applications for the Java Platform

--JSR 354, Money and Currency API

--JSR 355, JCP Executive Committee Merge

The winner, as previously mentioned, was JSR 335, Lambda Expressions for the
Java Programming Language, which the JCP praised as follows:

“This brings Java kicking and screaming into the modern
programming language age and is seen as a catalyst for the second age of Java.
It's underlying discoveries and improvements with regards to Type Inference has
also resulted in a stronger JVM for all.”

Spec lead Brian Goetz, in picking up the award, remarked,
“This is something we’ve been working on for three-and-a-half-years and it’s
nice to be looking at it through the rear-view mirror.”

Outstanding Adopt-a-JSR Participant

--BeJUG, Johan Vos

--CeJUG, Helio
Frota, Hildeberto Mendonça

--JUG Chennai,
Rajmahendra (Raj) Hegde

--Morocco JUG and
EGJUG, Mohamed Taman, Faissal Boutaounte

The winner was Morocco JUG and EGJUG, Mohamed Taman, and
Faissal Boutaounte, who were praised, “For adopting JSR 339, JAX-RS 2.0
specification, along with many other JSRs. One JIRA issue filed by Morocco JUG on
JSR 339 was classified as a ‘release-stopper’. A quick JIRA search using the ‘adoptajsr’
tag shows that most of the JIRA issues have been created by MoroccoJUG members.
Several presentations and source code have been organized by these groups.
Mohamed presented sessions about the upcoming technologies to widen the range
of users in the future, especially Java EE 7 JSRs and spreading of community
progress and contributions that make us encouraged to participate. Mohamed sent
a clear message that Africa is here and is
full of talented people who are willing to take it to the next level. Mohamed
was responsible for translating an Arabic Adopt-s-JSR web page to allow more
Arabs to participate.”

Taman said that, “Currently, I hold two positions, one as a
Business Solutions Systems Architect and design supervisor and Java Team
leader, at a big financial services company in Egypt, which affects all the
country by building solutions affecting Egyptians every day, by providing more
facilities for businesses and enhancing the economy… I am passionate about
Java. I really love it and have fun coding, and love seeing it grow, day by
day, as if it were my kid.”

The Annual Java Community Process Program Awards at JavaOne is an event and party not to be missed!

Monday Sep 23, 2013

Mark Reinhold, Oracle’s Chief Architect, the
Java Platform Group, took the stage to kick off Sunday’s technical
keynote at the Moscone Center. He began by quoting “father of Java”
James Gosling. For Java to thrive, it must maintain what Gosling called
the “feel of Java”. In other words, it must retain the key values of
readability, simplicity, and universality.

“If we keep those,”
said Reinhold, “then Java will remain not just productive but fun. It is
not enough to simply add popular features each year.”

Lambda Expressions – The Single Largest Upgrade EverHe
turned to lambda expressions, which he described as the single largest
upgrade to the programming model ever -- larger even than generics.
“This is the first time we have done a carefully coordinated
co-evolution of the JVM, the language, and the libraries all together –
and the results still feel like Java,” said Reinhold.

He then
welcomed Oracle Java Language Architect, Brian Goetz, to share the stage
and began by remarking that while most developers understand that
lambda offers a simple way to express code as data, some are not sure
how it helps Java. Goetz responded that lambda expressions would more
than help Java. “It’s going to change the way we all program in Java
every day,” he explained. “Programming well is about finding the right
abstractions. We want the code we write to look like the problem
statements it’s trying to solve, so we can look at it and immediately
know it’s correct. Java has always given us good tools for abstracting
over data types. I wanted to do better in abstracting over patterns of
behavior – that’s where lambda comes in.”

He illustrated this
with some simple code that was, strictly speaking, “good” code, but
weighed down with boilerplate and did not read like the problem
statement it was trying to solve. It could be improved by using an inner
class tool, but that too generated a lot of boilerplate. Reinhardt
pointed out that improving the code made it less pleasant to work with,
as if the developer was being punished for doing the right thing. This
often causes developers to give up and do it the “dumb and ugly way”.

Lambdas
can replace inner classes with a lambda expression which is simply an
anonymous method that captures a behavior without a lot of syntactic
boilerplate. “Lambdas are a nicer syntax,” said Goetz. “But they are
also something deeper. It’s not just a compiler generating inner classes
for you – it uses the invokedynamic feature to get more compact and
higher performance code. It will make a qualitative difference in the
way we program.”

If the right way to write a program is
unpleasant, then people are less likely to do it according to Goetz.
They are more tolerant of doing it the wrong way. He gave an example of
how lambda expressions address this with the collections API involving a
new abstraction to the JDK called stream and showed how to represent a
simple query through applying a filter and mapping transformation,
followed by an aggregation, in a way that is fused into one path without
creating any intermediate weapons.

“Plus
parallelism,” Goetz added. He explained that Java 7 has the fork/join
framework for parallel decomposition that is powerful, flexible, and
highly efficient – but not the easiest thing to use. Goetz showed how
lambdas enable better parallelism without needing to write fork join
code: by asking the collection for a parallel stream it uses fork/join
under the hood.

Lambda also helps with normal sequential code by
making code clearer, less noisy, and easier to read. “When you have code
that is hard to read, that’s where bugs come from. You are trying to
maintain some code, you look at the code and think you know what it
does, but don’t actually know what it does, and boom! – you’ve
introduced a bug.”

All in all, the message was clear: Lambda expressions make Java code easier to read and easier to write.

Working with Lambda and the Collections FrameworkFor
lambdas to be successful, they must work with the Java Collections
Framework, which is now 15 years old. So an evolution of the interface
was in order. Goetz’s team had to grow an interface over time without
breaking implementations of the interface. They added a concept that
allows developers to compatibly add a method to an interface, as long as
a default implementation is provided.

Reinhold remarked that he
has now written a couple of thousand lines of code with lambda features
and really enjoyed it. “I can be more productive, and the end result
still feels like Java,” he said.

To get started learning lambda expressions, Java developers can go to the OpenJDK Project Lambda page and download the developer preview builds there.

Reinhold
reminded attendees that there is a great deal more in Java SE 8 besides
lambda expressions. Developer preview builds can be downloaded at JDK8.java.net.
“Now is a great time to download JDK 8 and take it for a spin. Every
planned feature is in there. It’s reasonably stable and it passes almost
all of the tests. If you have any feedback, please send it in!” said
Reinhold.

Playing ChessIn the rest of the technical
keynote, Oracle’s John Ceccarelli, head of engineering for Oracle’s
NetBeans team and Oracle’s JavaFX architect Jasper Potts, arrived on
stage to demonstrate a Duke pad running real Java via a chess program
that was connected to a server. The iPad operated through an HTML5
client talking to a Java EE 7 back end with an EE server in charge of
messaging, communication, game state, and so on, with clients hook into
it – all built with NetBeans. Jasper Potts further showed off the chess
demo with an HTML5 client using a front end to a chess server that was
managing the chess games. Then a robot, powered by Java ME 8, took over
the game.

Oracle Software Engineer, Santiago Pericas Geertsen,
who built the chess server, also described how it was built with 5
distinct functional modules.

In sum, attendees witnessed a server
running Java EE 7 hooked up with a variety of clients, some written in
HTML5, one written in JavaFX on a Duke pad, one using JavaFX 3D on a
powerful laptop, plus a Java ME 8-powered robot contributing to the
ongoing chess game. In the process, the powers of the Raspberry Pi were
demonstrated.

Developers were encouraged to jump in the water, go for a swim, and have fun with NetBeans and Java embedded.

Java SE 9 and BeyondWrapping
it up, Reinhold peered a bit into the future and suggested some
possible directions for Java, some of which are already in development:

One
is Java on GPUs, graphic processing units. As GPUs are being used more
and more widely to process big data he suggested that it would be good
to make Java work directly with the GPU rather than having to call out
to some primitive interface. An OpenJDK called Sumatra has people
working on this.

Reinhold spoke of the need for reification.
Java’s generics, added in 2004, are based on the notion of erasure for
good technical reasons as a sound way to create a type system that
supports migration compatibility. But this creates programming problems
in which the erasure approach severely limits what can be expressed.
Reinhold suggested that introducing some reification and eliminating the
“annoying dichotomy between primitive and reference types” would be of
value.

He mentioned JNI 2.0 and said, “It just shouldn’t be so hard to integrate Java with native code after all these years.”

He
called for memory efficient data structures: “As we get into big data –
all this boxing and pointer chasing makes it hard to do big data well.
We could have less boxing and pointer chasing and load a lot more data
into memory.”

Finally, he talked about the notion of a truly
modular platform. “The compact profile in Java 8 is a start but it is
not flexible enough. We need to continue to unify the Java SE and Java
ME platforms.”

Thursday Sep 27, 2012

JavaOne Rock Stars,
conceived in 2005, are the top-rated speakers at each JavaOne
Conference. They are awarded by their peers, who, through conference
surveys, recognize them for their outstanding sessions and speaking
ability. Over the years many of the world’s leading Java developers have
been so recognized.

Martijn Verburg has, in recent years, established himself as an
important mover and shaker in the Java community. His “Diabolical
Developer” session at the JavaOne 2011 Conference got people’s attention
by identifying some of the worst practices Java developers are prone to
engage in. Among other things, he is co-leader and organizer of the
thriving London Java User Group (JUG) which has more than 2,500 members,
co-represents the London JUG on the Executive Committee of the Java
Community Process, and leads the global effort for the Java User Group
“Adopt a JSR” and “Adopt OpenJDK” programs.

Career highlights
include overhauling technology stacks and SDLC practices at Mizuho
International, mentoring Oracle on technical community management, and
running off shore development teams for AIG. He is currently CTO at
jClarity, a start-up focusing on automating optimization for Java/JVM
related technologies, and Product Advisor at ZeroTurnaround. He
co-authored, with Ben Evans, "The Well-Grounded Java Developer"
published by Manning and, as a leading authority on technical team
optimization, he is in high demand at major software conferences.

Verburg is participating in five sessions, a busy man indeed. Here they are:

CON6152 - Modern Software Development Antipatterns (with Ben Evans)

UGF10434 - JCP and OpenJDK: Using the JUGs’ “Adopt” Programs in Your Group (with Csaba Toth)

When I asked Verburg about the biggest mistakes Java developers tend to make, he listed three:

A lack of communication -- Software development is far more a
social activity than a technical one; most projects fail because of
communication issues and social dynamics, not because of a bad technical
decision. Sadly, many developers never learn this lesson.

No source control -- Developers simply storing code in local filesystems and emailing code in order to integrate

Design-driven Design -- The need for some developers to cram
every design pattern from the Gang of Four (GoF) book into their source
code

All of which raises the question: If these practices are so bad,
why do developers engage in them? “I've seen a wide gamut of reasons,”
said Verburg, who lists them as:

* They were never taught at high school/university that their bad habits were harmful.* They weren't mentored in their first professional roles.* They've lost passion for their craft.* They're being deliberately malicious!* They think software development is a technical activity and not a social one.* They think that they'll be able to tidy it up later.

A couple of key confusions and misconceptions beset Java developers, according to Verburg.

“With Java and the JVM in particular I've seen a couple of trends,”
he remarked. “One is that developers think that the JVM is a magic box
that will clean up their memory, make their code run fast, as well as
make them cups of coffee. The JVM does help in a lot of cases, but bad
code can and will still lead to terrible results! The other trend is to
try and force Java (the language) to do something it's not very good at,
such as rapid web development. So you get a proliferation of overly
complex frameworks, libraries and techniques trying to get around the
fact that Java is a monolithic, statically typed, compiled, OO
environment. It's not a Golden Hammer!”

I asked him about the
keys to running a good Java User Group. “You need to have a ‘Why,’” he
observed. “Many user groups know what they do (typically, events) and
how they do it (the logistics), but what really drives users to join
your group and to stay is to give them a purpose. For example, within
the LJC we constantly talk about the ‘Why,’ which in our case is several
whys:

* Re-ignite the passion that developers have for their craft* Raise the bar of Java developers in London* We want developers to have a voice in deciding the future of Java* We want to inspire the next generation of tech leaders* To bring the disparate tech groups in London together* So we could learn from each other* We believe that the Java ecosystem forms a cornerstone of our society today -- we want to protect that for the future

Looking ahead to Java 8 Verburg expressed excitement about Lambdas.

“I
cannot wait for Lambdas,” he enthused. “Brian Goetz and his group are
doing a great job, especially given some of the backwards compatibility
that they have to maintain. It's going to remove a lot of boiler plate
and yet maintain readability, plus enable massive scaling.”

Check
out Martijn Verburg at JavaOne if you get a chance, and, stay tuned for
a longer interview yours truly did with Martijn to be publish on
otn/java some time after JavaOne.

Tuesday Jul 24, 2012

A new article, now up on otn/java, provides information about the upcoming 2012 JVM Language Summit, scheduled for July 30–August 1, 2012 on the Oracle campus in Santa Clara. The Summit brings together top language designers, compiler writers, tool builders, runtime engineers, and VM architects, from around the world for an open technical collaboration.

Summit organizer Brian Goetz of Oracle remarks: "We've been running the JVM Language Summit for the past five years. The attendees at the Summit are the people who are making languages on the JVM happen—there are typically architect-level representatives from many JVM language communities including JRuby, Jython, Scala, Groovy, and Clojure. This is a tremendous opportunity for the community to influence the future direction of the JVM and for us to learn more about how the JVM is being used, where it shines, and where it falls short."

The schedule is equally divided between traditional presentations, most of which are limited to 40 minutes, and informal workshops, which consist of small facilitated discussion groups among self-selected participants to enable deeper dives into the subject matter. There will also be impromptu lightning talks.

Thursday Feb 02, 2012

In Part One of a two-part
interview, titled “Java Champion Dick Wall on Genetics, the Java Posse, and
Alternative Languages (Part One),” Java Champion and Java Posse member Dick
Wall explores the potential of genetic analysis to enhance human health, shares
observations about alternative languages for the Java Virtual Machine (JVM),
and reveals inside dope on the Java Posse.
Wall admits to learning from Brian Goetz, Java language architect at Oracle, that pretty much everything he thought
he knew about optimizing for the JVM was wrong, and discusses not only his
current work using Scala to enhance our capacity to gain knowledge of our
genetic vulnerabilities, but shares what he has learned about his own genetic
challenges. In addition, he recounts some adventures with the Java Posse.

From the interview:

“…when I started working in Scala, I was worried that lots
of extra immutable objects, which are created when you use immutable data
often, would result in a lot more work for the garbage collector. After talking
with Brian about it, I realized that, in fact, the opposite is often or usually
true. Short-lived, immutable objects usually exist in a special part of the
JVM’s memory referred to as Eden.
Releasing the memory back to the pool from there is almost without cost. It is
only longer-lived objects that get promoted to the JVM main heap that are
expensive to garbage collect. So lots of small, short-lived objects can
actually help the garbage collector out. There are other ways immutability can
help or hurt performance, but ultimately, I decided to code for style and
correctness first and worry about performance if and when it becomes an issue.”

Friday Nov 18, 2011

Some day I will make it to Devoxx – for now, I’m content to
vicariously follow the blogs of attendees and pick up on what’s
happening. I’ve been doing more blog "fishing," looking
for the best commentary on 2011 Devoxx. There’s plenty of food for
thought – and the ideas are not half-baked.

The bloggers are
out in full, offering useful summaries and commentary on Devoxx
goings-on.

Constantin Partac, a Java
developer and a member of Transylvania JUG, a community from
Cluj-Napoca/Romania, offers an excellent summary of the Devoxx keynotes.

Here’s a sample:

“Oracle Opening Keynote and JDK 7,
8, and 9 Presentation• Oracle is committed to
Java and wants to provide support for it on any device.• JSE 7 for Mac will be released next week.• Oracle would like Java developers to be involved
in JCP, to adopt a JSR and to attend local JUG meetings.• JEE 7 will be released next year.• JEE 7 is focused on cloud integration, some of the
features are already implemented in glassfish 4 development branch.• JSE 8 will be release in summer of 2013 due to
“enterprise community request” as they can not keep the pace with an
18 month release cycle.• The
main features included in JSE8 are lambda support, project Jigsaw, new
Date/Time API, project Coin++ and adding support for
sensors.

Ivan St.
Ivanov, of SAP Labs Bulgaria, also commented on the keynotes with a different
focus. He summarizes Henrik Stahl’s look ahead to Java SE 8 and
JavaFX 3.0; Cameron Purdy on Java EE and the cloud; celebrated Java
Champion Josh Bloch on what’s good and bad about Java; Mark Reinhold’s
quick look ahead to Java SE 9; and Brian Goetz on lambdas and default
methods in Java SE 8.

Here’s St. Ivanov’s account of Josh
Bloch’s comments on the pluses of Java:

“He started with the
virtues of the platform. To name a few:

Tightly specified language primitives and evaluation order – int is
always 32 bits and operations are executed always from left to
right, without compilers messing around Dynamic
linking – when you change a class, you need to recompile and rebuild
just the jar that has it and not the whole application Syntax similarity with C/C++ – most existing
developers at that time felt like at home Object
orientations – it was cool at that time as well as functional
programming is today It was statically typed
language – helps in faster runtime, better IDE support, etc. No operator overloading – well, I’m not sure why it
is good. Scala has it for example and that’s why it is far better for
defining DSLs. But I will not argue with Josh.”

It’s worth
checking out St. Ivanov’s summary of Bloch’s views on what’s not so
great about Java as well.

What's Coming in JAX-RS
2.0

Marek Potociar, Principal
Software Engineer at Oracle and currently specification lead of Java EE
RESTful web services API (JAX-RS), blogged on his talk about what's coming in JAX-RS
2.0, scheduled for final release in mid-2012.

Here’s a
taste:

“Perhaps the most wanted addition to the JAX-RS is the
Client API, that would complete the JAX-RS story, that is currently
server-side only. In JAX-RS 2.0 we are adding a completely
interface-based and fluent client API that blends nicely in with the
existing fluent response builder pattern on the server-side. When we
started with the client API, the first proposal contained around 30
classes. Thanks to the feedback from our Expert Group we managed to
reduce the number of API classes to 14 (2 of them being exceptions)! The
resulting is compact while at the same time we still managed to create
an API that reflects the method invocation context flow (e.g. once you
decide on the target URI and start setting headers on the request, your
IDE will not try to offer you a URI setter in the code completion). This
is a subtle but very important usability aspect of an API…”

Obviously, Devoxx is a great Java conference, one that is hitting this
year at a time when much is brewing in the platform and beginning to be
anticipated.