I keep coming back to the same thought when I sketch APIs on a napkin at a cafe: streams make code cleaner. We ship more JSON across the wire every week. We smash more collections into memory than we want to admit. The more I build services, the more I…
Tag: java
Java 8 Date-Time API for Humans
The best part of Java 8 is not lambdas for me. It is the fresh date time API that finally reads like human code. The old one turned simple tasks into a maze. Now calls look clean and the intent is obvious. After years of wrestling with Date, Calendar and…
Working with Java Streams in Real Projects
Java 8 finally landed on real servers and the Stream API is now part of my daily routine, for good and for weird. I keep meeting teams that tried Java Streams in small scripts and then moved back to loops when the code hit production. The usual reasons are fear…
Java 8 Lambdas Explained
Lambdas just landed in Java 8 and they already make my code feel lighter and way easier to read. Oracle shipped Java 8 a few weeks ago and the headline feature is lambda expressions. If you have been living inside anonymous inner classes for callbacks, sorting, or listeners, this is…
Streams Are Here in Java 8
Java 8 just landed, and the new Stream API is the feature I keep reaching for first. Streams flip our usual loop habit on its head. Instead of telling the computer how to iterate and where to push items, we describe what we want, and Java takes care of the…
My Favorite Thing About Java 8
Java 8 just landed and my favorite feature finally feels right for me personally. Let me skip the suspense and say it out loud: lambdas are the thing I have been craving in Java for years. We have all sculpted endless anonymous classes just to pass a tiny behavior into…
The Diamond Operator Simplifies Life
I finally stopped squinting at angle brackets today, and it feels like my code exhaled. The Java diamond operator has been sitting in my editor for a while, but today it clicked for real. You know that little pair of empty brackets in new HashMap<>(). That is the one. It…
Enums in Java 5
I keep bumping into old int constants and bit masks, and each time I do, I hear a tiny voice saying use enums in Java 5 already. Enums landed with Java 5 and they are more than a cute list of names. They are full blown types with behavior, and…
Understanding Java Annotations
Java annotations feel like sticky notes you can attach to code without changing what the method or class does. What are Java annotations They are metadata baked right into the source. Think of @Override, @Deprecated, or the JUnit 4 @Test you have likely seen this week. The compiler and tools…
Enhanced for loop in Java 5
I keep running into moments where the enhanced for loop in Java 5 turns a messy block into something I can read in one sip of coffee. J2SE 5.0 brought shiny stuff like generics and annotations, yet the quiet hero for day to day code is the foreach style loop….