Tag: Java
-
Tftjs Newsletter Video for Oct 30, 2023

This week’s video version of the Tales from the jar side newsletter is now available! Here’s the bullet-point summary, once again provided by the Glasp youtube-summary plugin (emphases and images added): This newsletter seems like a blend of technical insights, personal anecdotes, and lighter content, offering something for a range of interests. That’s not a…
-
Tftjs Newsletter Video for Oct 23, 2023

This week’s video version of the Tales from the jar side newsletter is now available! Here’s the bullet-point summary, once again provided by the Glasp youtube-summary plugin (emphasis added): If you’d rather read than watch, the regular newsletter can be found here. The entire newsletter archive (nearly five years of weekly newsletters) is available for…
-
OpenAI and Java: Transcribe and Analyze Meeting Minutes

The overall idea is to reimplement the OpenAI tutorial found here in Java instead of Python. That allows me to work with Java parallel streams, text blocks, the HttpClient API, Java records, and more.
-
Using Spring HTTP Exchange Interfaces to access REST services
Summary and discussion of my YouTube video on using Spring’s HTTP exchange interfaces as a client for a free restful web service.
-
Spring with ChatGPT
Last week I published another video on my YouTube channel. The title is Spring & AI without Spring AI: Chat with GPT. It’s part of my series on integrating the OpenAI services into Java systems without using the experimental Spring AI framework. Nothing against that framework, of course — it’s just very early in the…
-
Spring’s queryForStream Method
During one of my recent Spring and Spring Boot training course, I talked about the three major ways to access relational data from Spring: Send already-worked-out SQL using the JdbcTemplate, Work with Hibernate by injecting the JPA EntityManager using the @PersistenceContext annotation, and Simply extend one of the Spring Data interfaces, like CrudRepository. I told my students how I always struggle…
-
Simple Demo of Gradle Parallel Tests
The maxParallelForks property runs test classes in parallel, but not individual tests in a class.
-
Solving the Daily Jumble
Recently I decided to subscribe to my local newspaper (the Hartford Courant, pronounced current) again. That’s been valuable by itself, and brought some benefits I forgot about (like a comics page), but one of the unexpected side effects has been the Daily Jumble. The idea is to unscramble the clues to form words. All of…
-
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.…
-
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…