You are viewing details from a past event. Please check our upcoming event schedule if you are looking for current content.

Kenneth Kousen

President, Kousen IT, Inc.

Ken Kousen is a Java Champion, several time JavaOne Rock Star, and a Grails Rock Star. He is the author of the Pragmatic Library books “Mockito Made Clear” and “Help Your Boss Help You,” the O'Reilly books “Kotlin Cookbook”, “Modern Java Recipes”, and “Gradle Recipes for Android”, and the Manning book “Making Java Groovy”. He also has recorded over a dozen video courses for the O'Reilly Learning Platform, covering topics related to Android, Spring, Java, Groovy, Grails, and Gradle.

His academic background include BS degrees in Mechanical Engineering and Mathematics from M.I.T., an MA and Ph.D. in Aerospace Engineering from Princeton, and an MS in Computer Science from R.P.I. He is currently President of Kousen IT, Inc., based in Connecticut.

Presentations

Latest Features in Java

9:00 AM MDT

This workshop discusses the features added to Java since Java 8. After a review of the functional additions (streams, lambda expressions, and method references), topics will include Local Variable Type Inference (LVTI), collection factory methods, the Java shell, the new HTTP client, the enhanced switch statement, text blocks, records, pattern matching, and sealed classes.

Features will be demonstrated for Java versions from 8 through 17, using preview versions where available.

  • Java Licensing and Release Schedule
  • Functional Programming in Java
    • Lambda expressions
    • Method references
    • Streams
    • Optional data type
    • Static and default methods in interfaces
  • The java.time Package
  • Collection Factory Methods
    • List.of
    • Set.of
    • Map.of
    • Map.ofEntries
  • Local Variable Type Inference
  • JShell
  • HTTP Client
  • Enhanced Switch Statement
  • Text Blocks
  • Records
  • Pattern Matching
  • Sealed Classes
  • Miscellaneous Features
  • A bit about JPMS

Property-Based Testing: Concepts and Examples

10:30 AM MDT

Property-based testing (PBT) validates the expected behavior of a system by checking it against a range of data points. A well-chosen set of properties will give the user a lot of confidence that the system is behaving as expected. The idea is that when the code is modified, failures in the tests reveal problems that would not have been found otherwise. This talk will cover the basic principles and several examples of PBT, using the jqwik library.

PBT allows you to define invariants (like reversing a list twice should result in the original list) and verify that they hold given generated changes that include a wide range of random inputs, including edge and corner cases. The jqwik library works well with JUnit to provide an important part of your testing strategy.

Effective JUnit Jupiter, with AssertJ

1:00 PM MDT

The fundamental testing libraries in Java have undergone complete redesigns in the past few years. JUnit 5, known as JUnit Jupiter, redesigns the most well-known tool in all of testing. This talk will demonstrate the new features, how they are intended to be used, and discuss experimental ideas in the pipeline.

JUnit has been remarkably stable over the years and is one of the most widely adopted frameworks in the Java world. The latest version, JUnit 5, takes JUnit to the next level. Full of new features like conditional test execution, parametric testing, labeling and filtering tests, and more, it brings all the modern thinking on testing into the JUnit world. It also takes advantage of the functional features added to Java since version 8 to create a powerful, new library for testing your code.

Effective Mockito: Mocks, Stubs, and Spies

3:00 PM MDT

The Mockito framework is the most popular library for creating mocks, stubs, and spies for your tests. This talk reviews why and how you might want to do that, including unit vs integration tests, creating your own mocks and stubs, setting expectations, and verifying the results.

The Mockito documentation is notoriously misleading if you don't already know the principles behind the library. This talk gives an example that hopefully clears up any confusion and makes the docs useful. Many examples will be provided covering a wide range of capabilities. In addition to the basics, issues like mocking static methods, mocking final methods and classes, using spies for existing classes, and more will be examined.

Key Gradle Concepts And Practices

5:00 PM MDT

Gradle has been described as the open source project with the most documentation that doesn't help. Key concepts, like the different steps Gradle takes at initialization time, configuration time, and execution time are not obvious, but must be understood to use Gradle effectively. This talk will cover those topics, as well as how to use source sets, IDE integration, testing in parallel, the build cache, and multi-project builds.

New topics to be included based include writing your own custom tasks, using version constraints, archiving and expanding files and folders, and incremental builds for efficiency.

Recently revised to include dependency conflict resolution, lazy task creation, the TOML file for versioning, and more.

Mental Bookmarks and the Fractal Nature of Success

7:30 PM MDT

Good discussions are supposed to diverge from their intended path. Free association is a feature, not a bug, and helps you see new connections between ideas. Without structure, however, it can be difficult to add context to new ideas and understand how they relate to more immediate problems. This talk discusses the technique of mental bookmarks – how to remember where you were when a discussion diverged. In addition to giving you a reputation for having an amazing memory, the skill also helps with personal awareness in general.

To give the technique context, we'll look at the fractal nature of success – the way we tend to see our current environment in relative terms, always comparing ourselves to those slightly more successful and slightly less successful.

Upgrade to Modern Java: 2025 Deep Dive

9:00 AM MDT

Over the past few years, the basic idioms and recommended programming styles for Java development have changed. Functional features are now favored, using streams, lambda expressions, and method references. The new sixmonth release schedule provides the language with new features, like modules and local variable type inference, much more frequently. Even the new license changes in the language seem to complicate installation, usage, and especially deployment.

The purpose of this training course is to help you adapt to the new ways of coding in Java. The latest functional approaches are included, including using parallel streams for concurrency, and when to expect them to be useful. All the new significant features added to the language will be reviewed and evaluated, with the goal understanding what problems they were designed to handle and when they can be used effectively in your code.

Upgrade to Modern Java: 2025 Deep Dive

11:00 AM MDT

Over the past few years, the basic idioms and recommended programming styles for Java development have changed. Functional features are now favored, using streams, lambda expressions, and method references. The new sixmonth release schedule provides the language with new features, like modules and local variable type inference, much more frequently. Even the new license changes in the language seem to complicate installation, usage, and especially deployment.

The purpose of this training course is to help you adapt to the new ways of coding in Java. The latest functional approaches are included, including using parallel streams for concurrency, and when to expect them to be useful. All the new significant features added to the language will be reviewed and evaluated, with the goal understanding what problems they were designed to handle and when they can be used effectively in your code.

Books

Modern Java Recipes: Simple Solutions to Difficult Problems in Java 8 and 9

by Ken Kousen

The introduction of functional programming concepts in Java SE 8 was a drastic change for this venerable object-oriented language. Lambda expressions, method references, and streams fundamentally changed the idioms of the language, and many developers have been trying to catch up ever since. This cookbook will help. With more than 70 detailed recipes, author Ken Kousen shows you how to use the newest features of Java to solve a wide range of problems.

For developers comfortable with previous Java versions, this guide covers nearly all of Java SE 8, and includes a chapter focused on changes coming in Java 9. Need to understand how functional idioms will change the way you write code? This cookbook—chock full of use cases—is for you.

Recipes cover:

  • The basics of lambda expressions and method references
  • Interfaces in the java.util.function package
  • Stream operations for transforming and filtering data
  • Comparators and Collectors for sorting and converting streaming data
  • Combining lambdas, method references, and streams
  • Creating instances and extract values from Java’s Optional type
  • New I/O capabilities that support functional streams
  • The Date-Time API that replaces the legacy Date and Calendar classes
  • Mechanisms for experimenting with concurrency and parallelism

Gradle Recipes for Android

by Ken Kousen

Using the Android Studio IDE and the Gradle build tool will make Android app development much simpler—as long as you know your way around Gradle. This practical guide shows you how Gradle works with Android so that you can use it effectively on your projects. You’ll learn ways to customize project layouts, add dependencies, and even generate multiple different versions of your application.

  • Use Gradle independently and from with the new preferred IDE, Android Studio
  • Integrate tests into standard Android project builds
  • Easily customize builds to add popular third-party libraries as dependencies
  • Generate artifacts with various properties, like debug or release, and different flavors, like paid or free

Making Java Groovy

by Ken Kousen

Summary

Making Java Groovy is a practical handbook for developers who want to blend Groovy into their day-to-day work with Java. It starts by introducing the key differences between Java and Groovy—and how you can use them to your advantage. Then, it guides you step-by-step through realistic development challenges, from web applications to web services to desktop applications, and shows how Groovy makes them easier to put into production.

About this Book

You don't need the full force of Java when you're writing a build script, a simple system utility, or a lightweight web app—but that's where Groovy shines brightest. This elegant JVM-based dynamic language extends and simplifies Java so you can concentrate on the task at hand instead of managing minute details and unnecessary complexity.

Making Java Groov is a practical guide for developers who want to benefit from Groovy in their work with Java. It starts by introducing the key differences between Java and Groovy and how to use them to your advantage. Then, you'll focus on the situations you face every day, like consuming and creating RESTful web services, working with databases, and using the Spring framework. You'll also explore the great Groovy tools for build processes, testing, and deployment and learn how to write Groovy-based domain-specific languages that simplify Java development.

Written for developers familiar with Java. No Groovy experience required.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

What's Inside

  • Easier Java
  • Closures, builders, and metaprogramming
  • Gradle for builds, Spock for testing
  • Groovy frameworks like Grails and Griffon

About the Author

Ken Kousen is an independent consultant and trainer specializing in Spring, Hibernate, Groovy, and Grails.

Table of Contents

    PART 1: UP TO SPEED WITH GROOVY
  1. Why add Groovy to Java?
  2. Groovy by example
  3. Code-level integration
  4. Using Groovy features in Java
  5. PART 2: GROOVY TOOLS
  6. Build processes
  7. Testing Groovy and Java projects
  8. PART 3: GROOVY IN THE REAL WORLD
  9. The Spring framework
  10. Database access
  11. RESTful web services
  12. Building and testing web applications

Groovy Fundamentals [Online Code]

by

Number of Videos: 4 hours - 23 lessons
Author: Ken Kousen
User Level: Beginner
Learn the advantages of using Groovy by itself and with existing Java projects. This video workshop takes you into the heart of this JVM language and shows you how Groovy can help increase your productivity through dynamic language features similar to those of Python, Ruby, and Smalltalk. Presenter and Java consultant Ken Kousen demonstrates how writing anything from a simple build script to a full scale application is much easier with Groovy than with Java. You’ll quickly learn how to add Groovy to your projects, and then explore the language through a host of examples and demonstrations. Once you complete this course, check out Ken’s other videos on the subject: Practical Groovy and Mastering Groovy. - Walk through Groovy’s basic data types. Use the “slashy” string syntax to define regular expressions. - Learn how operator overloading in the libraries simplifies your code - Control and customize all the natural defaults and autogenerated code in POGOs - Get demonstrations on using closures, and mixing Java and Groovy classes together - Know when and how to use Abstract Syntax Tree (AST) transformations - Parse and generate both XML and JSON - Access RESTful web services with ease Ken Kousen, President of Kousen IT, Inc., is a technical trainer, mentor, and consultant in all areas related to Java, specializing in Android, Spring, Hibernate/JPA, Groovy, and Grails. He is the author of Making Java Groovy (Manning) and the upcoming O’Reilly book, Gradle for Android.

System Requirements:
  • Supported OS:   [Mac Mountain Lion 10.8, Mac Lion 10.7, Mac Snow Leopard 10.6, Mac Leopard 10.5, Mac OS X, Macintosh]
  • Processor:   Any
  • RAM:   Any
  • Hard Disk:   3GB
  • Video Card:   Any