Stuff I've learned recently…

I teach this stuff. I didn't say I could do it.

  • Home
  • About Me
  • Groovy
  • Java
  • Kotlin
  • NFJS
  • Teaching
  • Why Use Mocks?

    Testing A Simple Publisher/Subscriber System With Mockito One of the challenges I find when teaching Java testing with Mockito is that the docs, while complete, don’t motivate why you want to use mocks in the first place. This post includes a simple example to show why mocking frameworks are important and where they are useful. […]

    Ken Kousen

    March 3, 2020
    Java, Mockito
    Java, JUnit 5, Mockito
  • Antarctica Time Zones in Kotlin on GraalVM

    They say you can tell someone is a developer by whispering the word “timezone” in their ear and watching a shudder go down their spine. Here, from Wikipedia, is a picture of the time zones in Antarctica. Amazing, right? But the funny part isn’t immediately obvious. See how the South Pole is inside that hashed […]

    Ken Kousen

    January 4, 2020
    Groovy
    Kotlin
  • A Few Astronomical Examples in Kotlin

    The website Open Notify provides a few URLs that return JSON data from NASA. There are currently three links supported: Number of people in space Current location of the International Space Station Overhead pass predictions for the ISS Just for fun, this blog post uses Kotlin to access each one, transform the results in Kotlin […]

    Ken Kousen

    December 19, 2019
    Groovy
    Kotlin
  • Fibonacci in Kotlin

    I didn’t realize it until I noticed the trending topic on Twitter, but Saturday, November 23 was Fibonacci Day. That gave me an opportunity to drag out one of my favorite old jokes: For those unaware or who don’t remember, the Fibonacci series starts with 0 and 1, and then each subsequent number is the […]

    Ken Kousen

    November 26, 2019
    Kotlin
    Kotlin
  • Annotated TOC for Kotlin Cookbook

    Last week I received an email asking about a table Of contents for my new Kotlin Cookbook, saying they couldn’t find one either on the O’Reilly Media site or on Amazon. It’s a lot easier to make a decision about buying a recipe book if you have a list of recipes. When I checked last […]

    Ken Kousen

    November 20, 2019
    Kotlin
    Kotlin
  • Kotlin Palindrome Checker

    This post, based on code from my new Kotlin Cookbook, shows how to write a palindrome checker in Kotlin. Along the way it discusses raw strings and regular expressions, writing functions as single statements, and creating an extension function on String. First, a quick definition. A palindrome is a string whose characters are the same […]

    Ken Kousen

    November 16, 2019
    Kotlin
    Kotlin
  • A Deep Dive into the KotlinVersion Class

    Getting the current Kotlin version is easy, but the actual KotlinVersion class is much more interesting. This post shows how to get the Kotlin version programmatically, but then looks at the details of the KotlinVersion class, including how it demonstrates a great way to write an equals method and more. Note that this demo is […]

    Ken Kousen

    November 9, 2019
    Kotlin
    Kotlin
  • Java 11 HttpClient, Gson, Gradle, and Modularization

    This post describes a simple system that uses the new HttpClient class that comes with Java 11 to access a RESTful web service. After demonstrating basic functionality, changes are made to parse the results using Gson, and even modularize the code and have it work with Gradle. The goal is to provide an example for […]

    Ken Kousen

    September 22, 2018
    Java
    Gradle, Gson, Java
  • Managing Your Manager: The Video Course

    I’m a regular speaker on the No Fluff, Just Stuff tour (I’m now entering my ninth year, which I can hardly believe), and one of the talks I’ve given there for many years is called “Managing Your Manager”. It’s been one of my most successful talks, and I’ve given several versions of it, including as […]

    Ken Kousen

    February 3, 2018
    Management
    Management
  • Java 8 Constructor Refs (In All Their Glory)

    [Note: my last post announced my new book, Modern Java Recipes, is now available from O’Reilly publishers in Early Release form. As a sample, I included a discussion of the Predicate interface, one of the new functional interfaces in the the java.util.function package. In this post, I highlight constructor references, which are discussed in another […]

    Ken Kousen

    March 26, 2017
    Java
Previous Page
1 2 3 4 … 23
Next Page

About the Blog

Stuff I’ve Learned Recently chronicles my adventures in the world of teaching software development, primarily focused on Java and related languages, like Groovy and Kotlin. I also teach Spring, Android, Gradle, and more.

Popular Posts

  • Groovy Podcast, Episode 88 (S06E03)October 9, 2022
  • Groovy Podcast, Episode 87 (S06E02), with Ken Kousen and Sergio del Amo CaballeroJune 16, 2022
  • Spring’s queryForStream MethodMay 26, 2022

Newsletter

Subscribe to our email newsletter for a weekly dose of travel inspiration.

Blog at WordPress.com.

 

Loading Comments...