Starting a New Project – Let’s Choose a Tech Stack!

It’s time to start a new project. Because one can never have enough side projects! /s

This particular project I’ll be writing about in this post is derived from the multi-tenant music collector’s database I’ve already started working on. I’ve finally gotten back to it, during a slight break in collecting and music listening, to write up some of my thinking about this particular project.

Stated Objectives For This Application

  1. Personal Reasons: I always like to have side projects that I could make use of myself. Since I’ve recently started collecting music again, and in that am a new collector of vinyl albums, I wanted a better way to organize all that music and the extensive history, members, song, lyrics, and related information about the music and artists.
  2. For Everybody: Beyond the desire to have a well built application to provide the capabilities I’ve described above, I also want to provide this capability to others. In light of that capability, I’ll be designing this application as a multi-tenant application so that you too dear reader, once I get it built can use the application for your own music collection.
  3. Choose The Tech Stack: I’ll need to write this application in something, obviously, so this post is going to cover my reasoning for the tech stack I’m going to use. The application will be built in three core pieces: the database, the services and middle tier layer, and the user interface. I’ll detail each and cover the reasoning for the stack I’ll choose for each section.
Continue reading “Starting a New Project – Let’s Choose a Tech Stack!”

Speaking of Spring Boot Java Logging, Some Misadventures

Preface: I set out upon a task to incorporate some masking, redaction, or filtering of some sort on PII (Personally Identifying Information) for the log files and log data an application service is producing. The application pre-exists, so this isn’t entirely a green field situation, but the application generally fits a Spring Boot Service style application. The one key thing I wasn’t sure about when starting, was what kind of logging was already incorporated into the operational service.

Log Masking for Different Logging Libraries

The first solution I came up with was to incorporate a converter or appender of some sort that would mask PII with a string of some sort, like “****” or “—–“. This solution that I came up with, upon checking, looked like it would work out ok with or for a number of the top logging libraries for Java, specially libraries that run with or as a Spring Boot service like LogBack or Log4j.

Continue reading “Speaking of Spring Boot Java Logging, Some Misadventures”

An Approach to Learning Java Fast for New & Experienced Polyglot Coders

If you’re just starting out learning Java, here are the top 5 things you can do to get started effectively:

  1. Set Up Your Development Environment:
    • Install the Java Development Kit (JDK) on your computer. You can download it from the official Oracle website or use an open-source distribution like OpenJDK. It can be confusing at first, because there are a bunch of versions you *could* get started with depending on a million different variables, just pick the latest though and get going.
    • Choose a code editor or Integrated Development Environment (IDE) like Eclipse, IntelliJ IDEA, or Visual Studio Code to write and run your Java code. IDEs offer features like code completion and debugging, which can be very helpful for beginners.
  2. Learn the Basics of Java:
    • Start with the fundamental concepts of Java, such as variables, data types, operators, and control structures (if statements, loops).
    • Understand the object-oriented programming (OOP) principles that Java is based on, including classes, objects, inheritance, encapsulation, and polymorphism. Even if you do not use any of these and you’re taking a different approach (functional, top-down, etc) it’s really important to at least learn and understand the OOP concepts and capabilities of Java, as at some point you will see these and to understand what is going on, you’ll need to understand this part of Java.
Continue reading “An Approach to Learning Java Fast for New & Experienced Polyglot Coders”

Execution failed for task ‘:compileJava’ Quickie Fix

I’ve been doing a lot of Java development lately and this problem seems to rear up at me every time I switch Java or JDK versions. After I found a fix I did a little research and here’s the summary of what happened.

The issue arises in a Java development environment, particularly when using IntelliJ IDEA with Gradle as the build tool. The error message “Execution failed for task ‘:compileJava’. > error: invalid source release: 21” indicates a mismatch between the Java version set in IntelliJ IDEA and the source compatibility version specified in the Gradle build configuration. This problem often occurs when switching between different versions of Java/JDK, as IntelliJ does not always automatically sync the Java version used across the Gradle build system.

What the error looks like in Intellij.

Solution Steps:

1 Verify Current Java Version:

  • Open a terminal or command prompt.
  • Run java -version to check the installed Java version.

2 Open IntelliJ IDEA Settings:

  • Launch IntelliJ IDEA.
  • Navigate to File -> Settings (or IntelliJ IDEA -> Preferences on macOS).
Continue reading “Execution failed for task ‘:compileJava’ Quickie Fix”

Java Time with Introspective GraphQL on Chaos Database AKA Pre- Refactor Prototype Mutating Database Spring Boot Java Hack App

With the previous work to get a testing environment built and running done (in Python), I was ready to get started on the GraphQL API as previously described. As a refresher, this description,

singular mission to build a GraphQL API against a Mongo database where the idea is, one could query the underlying collections, documents, and fields with the assumption that users would be adding or possibly removing said collections, documents, and fields as they needed.

My intent is to build with with a Java + Spring stack. Just like with the Python app in the previous post, the first thing I like to do is just get the baseline GraphQL API “Hello World” app up and running.

At the end of this post I’ll include/link the Github repository.

Phase 1: Getting the Initial GraphQL API Compiling & Running with a “Hello World”.

Prerequisites & Setup

  • The post previous to this “Fruit and Snakes: Frequent Mutative Mongo User Database with Python” I created the Mongo Database and setup the app that would create, every few seconds, new collections, documents, and other collateral to put into a Mongo database for the sole purpose of creating this GraphQL API.
  • I’ll be using Java 17 for this work, so to ensure the least risk of versioning issues, get Java 17. The same goes for Spring 3. I’ve shown my selections from the Spring Initializr (not using Intellij? Cool, get a start with the Spring Initializr Site) in the screenshots that follow.
Continue reading “Java Time with Introspective GraphQL on Chaos Database AKA Pre- Refactor Prototype Mutating Database Spring Boot Java Hack App”