A poem about the finality of life.
This is the first poem I ever wrote. It is about the sense of helplessness and loss of control everyone may feel in the final moments of their life. The poem was published in my high school literary magazine in 1987.
Here I am,
Lost in time;
time so slow
A breath of wind,
too soon I fear.
for death is near.
Upon a table
My life before me
in mind’s eye.
before I die.
God have mercy
on me I pray.
Forgive my sins
of yesterday. …
A poem about the little things in life.
I wrote a poem titled “Playing in the Sand” when I was in high school. It was published in my high school literary magazine in 1988. This poem has remained one of my favorites over the years. I think of it every time I go to the beach. I thought the poem might have been lost to time, but my wife found my high school literary magazines today while organizing the closet in our office. I’m posting it today so that I might not lose it again. …
How to define contractual, structural, and verifiable immutable Java collections.
JDK 15 was released on September 15, 2020. JEP 360 Sealed Types was included as a preview feature in this release. Sealed Types is part of Project Amber. Sealed classes or interfaces can be used to restrict the interfaces or classes that are allowed to extend them. This is accomplished by using the
An interface or class is contractually immutable if the available public methods do not allow an instance to be mutated after it is constructed. A contractually immutable collection should not expose methods like
clear and a mutable
Iterator . These methods are available on the
Set types in Java. …
Some strategies for handling exceptions in Eclipse Collections before and after Java 8
Brian Vermeer wrote a great blog on Exception Handling in Java Streams.
The post reminded me of the exception handling support we have had in Eclipse Collections for a few years now. I thought I would show some simple examples of handling Checked Exceptions using Eclipse Collections before and after Java 8. I will also show examples that will work with Java Streams.
There is an interface in Java named
Appendable is a parent interface of
PrintStream and several other classes. The interface has been around since Java 5. …
This is the release we’ve been waiting for.
Eclipse Collections 10.2 was released in February 2020 and was a relatively small bug fix release after the somewhat monumental 10.0 release. I am happy to say that six months later, the 10.3 release has a lot of new features submitted by our outstanding community of contributors.
Thank you so much to all of the contributors who donated their valuable time to making Eclipse Collections more feature rich and even higher quality. Your efforts are very much appreciated.
If you’re thinking about contributing to an open source project but aren’t sure, check out this great blog from one of our community contributors. In the blog Sirisha Pratha explains some of the benefits she has experienced as she has become an active contributor in the OSS community. …
Three years of public blogging and still going strong.
Three years ago, I wrote my first public blog on Medium. It was about Symmetry in API design. Two Years later I published a blog celebrating two years of blogging.
I set my goal for 2020 to find more bloggers and help them find their voices.
I have a new sense of community and purpose since I was selected as a Java Champion. I want to help more bloggers find their voices. …
When an iteration pattern is so common you give it a name.
Sometimes you want to look to see if a collection contains an element that matches a value based on one of it’s attributes. In the example below, I use the method
anySatisfy from Eclipse Collections to see if any of the pairs have a “2” or “3” in the
public void anySatisfyContains()
MutableList<Pair<Integer, String>> list =
list.anySatisfy(pair -> pair.getTwo().equals("2")));
list.anySatisfy(pair -> pair.getTwo().equals("3")));
We could extract the value for
pair.getTwo() using the
collect method with a
Function specified as a method reference. …
An evolution of iteration APIs in Eclipse Collections
When the first iteration methods were implemented in Eclipse Collections they were all eager. Eager is the default behavior on the collection interfaces and implementations in Eclipse Collections.
When using eager methods with multiple operations in a fluent style, you may create intermediate collections.
The call to
select above will create a
MutableList<Integer>. The call to
collect then creates a
MutableList<String>. The following code shows explicitly the return types of the calls to
The imperative code for
collect would look as follows.
When we started replacing imperative
for loops with higher level iteration patterns we occasionally saw
for loops that were doing multiple things. These
for loops could be broken down into individual steps like
collect, but it was then clear that there was more temporary garbage being created. This is when we introduced one of the first fused methods named
collectIf. The method
collectIf is a shorter name for
A CJUG Lightning Talk — June 11, 2020
The following blog has some background info on my past 20 years programming professionally in Java. I wrote the blog to celebrate Java’s 25th birthday and to share the story of how I have been MovedByJava during my career. I’m linking this here to save me time during my intro.
You can also find me on Twitter here.
I will be live coding solutions to Exercise 1 and 4 of the Pet Kata in 10 minutes.
Video of the session:
Java is still going strong after 25 years. I’m even more excited for the next 25.
I started learning Java in 1997. I started programming professionally in Java in 2000. Two decades later, I am still programming happily in Java. My plan is to continue programming in Java and to help Java compete as the programming language of choice for new developers.
I’m just getting warmed up.
I’m going to tell some of my story of developing with Java, and how for 20 years Java has continued to help steer my career.
I was a full time Smalltalk developer who worked in IBM Global Services and used IBM’s VisualAge for Smalltalk IDE to code in the 1990’s. When I started learning Java, I used IBM’s VisualAge for Java IDE. I loved this IDE, probably because it felt familiar and comfortable coming from VisualAge for Smalltalk. I believe VisualAge for Java was developed using VisualAge for Smalltalk, and both products used an amazing version control system called Envy. …