Know your Java
Know your Java - Venkat Subramaniam
Know your Java - Venkat Subramaniam
Points touched upon
- [[Tech/Pioneers/Venkat Subramaniam]] showing surprising behaviours of the Java language that even experienced developers can get wrong.
- Venkat Subramaniam's discussion on common Java programming mistakes, unexpected language behaviors and the importance of understanding how Java APIs work.
- The difference between
List.remove(int)andCollection.remove(Object), how method overloading and autoboxing can produce unexpected results and why API design requires careful consideration. - The benefits of type inference using
var, how inferred concrete types can change method selection and why programmers must understand what the compiler determines. - The difference between
Arrays.asList()andList.of(), why fixed-size collections are not necessarily immutable and the advantages of immutable collections for safe copying and sharing. - The dangers of modifying shared mutable state inside Java streams, how parallel execution introduces unpredictable results and why such problems can remain unnoticed until production.
- The importance of pure functions and side-effect-free lambdas, especially when using functional programming and parallel streams in Java.
- How lazy evaluation works in Java streams, the difference between intermediate and terminal operations and why immutability and function purity are essential for correctness.
- The importance of writing readable and maintainable code instead of clever programming puzzles, understanding language behavior and using code reviews to prevent subtle defects.