In this live video interview with screencasting, I show a bit of functional programming style in Java 8. I also rant about whether math is necessary to be a good programmer, and predict how organizational structures are changing to support learning.
STLCodeCast Episode 19
My Pluralsight course on FP with Java
Why replace our carefully chosen, exactingly specified example-based tests with properties, when properties are harder to write and less specific?
link to YouTube
Video from Midwest.io 2014
Related code: https://github.com/jessitron/scalacheck-prisoners-dilemma
If you’re a Java programmer who’s itching to switch to a newer, more exciting language, then remember we can still improve the paradigms we’re using in the language we get paid to use.
Erik Onnen’s video on InfoQ, Java.next, talks about why Java is still the language best-suited to the JVM, and how we can write Java code that doesn’t suck.
The first half of the video, about why Java is the best JVM language, boils down to “Java is easy to read because we’re all so familiar with it” and “Java has the best tools available to it.” It’s true that pure Java (with no AOP, no ORM frameworks, and no containers at all) is the most predictable and debuggable way to write for the JVM. But these aren’t good reasons to limit ourselves. Skip this half of the video.
It gets interesting at about 32:50: how we can write better Java. He has fantastic points here, about how we should throw away anything Enterprise-y, including containers; separate behavior from data; write small discrete services that pass immutable objects; never throw checked exceptions. So true! Use dependency injection – without a container. Write wep apps – without WARs. (Somebody should give a talk: Java Web Applications for Pacifists.”)
The 20 minutes of talk starting at 32:50 are useful to any Java developer looking to improve their code and think outside of the large corporate box we were trained in. (Caveat: he specifies early in the talk that most of these recommendations are only usable in greenfield development.) On the other hand, if you already <3 functional programming, this video will be preaching to the choir and you're better off looking at a video from StrangeLoop.