JUG Meetup in Chennai with Venkat

Getting high on a Saturday with Venkat Subramaniam's meet up in JUG Chennai

Posted on November 27, 2017

Venkat Subramaniam's talks are funfairs. I have been listening to Venkat for the last 15 years and it's only getting better. Last week I was fortunate to attend a day long session with Venkat in Chennai, organised by the Java User Group. Entry of speakers to the hall invites myriad responses from the audience. When Venkat enters a conference hall to speak, people's eyes brighten up, their faces immediately put up a nice smile and everyone turns their minds on to a charging mode. Yes, Venkat's sessions charges you fully and lifts up your spirits.

The first talk was about 'The Power and Perils of Parallel Streams'. Venkat started with the Threading model and the API in Java and how it has evolved over a period of time. He introduced to the Stream API in Java 8 and discussed parallelism in it. A Few key take away points in this session:

  • Do not use parallel streams, just because you want to increase the speed. You need the correct output too
  • Streams usually preserve the order of the source collection, while parallels change the order and forEachOrdered preserves the order
  • Parallel streams are not asynchronous. They block the main thread. And the main thread also takes part in the parallel operations
  • Number of threads to create = Number of cores/ (1 - Blocking factor)
  • Streams execute a collection of functions on a value which helps in better design, while languages like JavaScript don't work like this

The second talk was on 'From Functional to Reactive Programming'. This was an introductory talk to a new paradigm of Reactive Programming. I have been dabbling with Reactive stuff with Spring 5 and RxJava for quite sometime, so personally it wasn't satiating. But I could see a lot of people in the audience enjoy this topic, as many found it very new and a bit overwhelming because of "yet another paradigm" :) A Few key take away points in this session:

  • Reactive programming is response to stimuli. It's like our Excel sheets. You change data in a cell and automatically other dependent cells are updated
  • Error handling in Java Streams sucks and the Observables in Reactive treat errors as first-class citizens
  • You can share subscribers; create different subscribers sessions; buffer responses etc.

Venkat Subramaniam

The post-lunch talk was an eagerly awaited one.'Exploring Java 9'. Venkat touched upon some of the new features and improvements in Java. A few points.

  • The of() methods of creating new collections
  • The autocloseable try final block
  • New Module structure in Java
  • New REPL, JShell(My favourite!!!)

And the last session was 'Twelve Ways to Make Code Suck Less'. I think, Venkat should spend an entire day on this topic alone, by renaming it to '120 Ways to Make Code Suck Less'. :) Whenever he discussed a bad practice in our code, my mind popped up with two more related horrible things I do while I write code :) Some of my observations in this day-long talk.

  • Married or Single, any part of the world, spouse jokes are always a big hit and a long-married man like Venkat delivers them like a veteran stand-up comedian
  • You want to have a boring day as a programmer, write code in Haskell :)
  • Java has interesting names for their new APIs, so that they are consistently confusing to a programmer
  • You write bad code, you climb up the ladder in an organization quicker and become a manager

I didn't sleep the night before this talk and walked in to stay for an hour or so and go home to grab some sleep. But I was one of the last guys to the leave the room at the end of the day. And that, I consider a big achievement for an instructor!!!.