I want to want the Facebook Pervert Glasses I want to want the Facebook Pervert Glasses by: Ethan McCue I was in the marching band in High School. If you know me, that should track. Part of being in a marching band is memorizing where you need to go on the field and when. We would have a week-long bootcamp before school started where we would drill that and the songs into our heads. At the time,…
50 out of 413 Companies that use my libraries 50 out of 413 Companies that use my libraries by: Ethan McCue Maven Central gives a stats page to publishers of libraries telling them roughly how many downloads their libraries get. But if you want to know more specific info, say "which of my libraries gets the most downloads," they point you to a separate service called "Scarf." And wow, that is…
People Hate AI Art People Hate AI Art by: Ethan McCue There's a vivid mental image I have in my head of a T-Rex giving a thumbs up. So I had ChatGPT generate that for me. If your initial reaction to reading that and seeing that is some variation of "ughhh" or rolling your eyes or "fuck this guy" congrats. You are normal. If it wasn't I cannot stress to you enough that you are an outlier. Whenever…
A Brisk Introduction to Linked Lists and Binary Search Trees A Brisk Introduction to Linked Lists and Binary Search Trees by: Ethan McCue ## Linked Lists A linked list is either An empty list A "not empty" list, which has a "head" and a "tail" In Java we can represent this situation using a "sealed interface." // A linked list is either empty or not empty. sealed interface LinkedList < T > permits…
Python Only Has One Real Competitor Python Only Has One Real Competitor by: Ethan McCue Clickbait subtitle: "and it's not even close" Python is the undisputed monarch in exactly one domain: Data Science. The story, as I understand it, goes something like this: Python has very straight-forward interop with native code. Because interop is straightforward, libraries like numpy and pandas got made.…
public static void main(String[] args) is dead public static void main(String[] args) is dead by: Ethan McCue As of September 16th, year of our lord 2025, this is no longer the first Java program you need to write. public class Main { public static void main ( String [] args ) { Scanner scanner = new Scanner ( System . in ); System . out . print ( "What is your name? " ); String name = scanner .…
Approximating Named Arguments in Java Approximating Named Arguments in Java by: Ethan McCue Named arguments are a language feature where you can provide arguments to a function call by name instead of positionally. This is usually paired with some mechanism to have default values that a caller does not need to specify Take the definition of k_means from scikit-learn for example. def k_means( X,…
Inheritance vs. Composition Inheritance vs. Composition by: Ethan McCue This list is the result of a question posed by [Mika Moilanen](https://github.com/mikmoila). It's not comprehensive, but I think it's illustrative of a way to break down these choices that's a tad more healthy than "always choose X" or "never do Y." Specifically because you can take these properties and evaluate them against a…
The Economics of AI (Ed Zitron is Wrong) The Economics of AI (Ed Zitron is Wrong) by: Ethan McCue Ed Zitron, or as my friends call him while doing the SpongeBob thing "EdWaRd," [Seems to think that AI is in some manner a bubble](https://www.wheresyoured.at/the-haters-gui/). This is patently ridiculous. To understand why you need to understand a little basic kindergarten level economics. The…
Issues you will face binding to C from Java. Issues you will face binding to C from Java. by: Ethan McCue Specifically using the Foreign Function and Memory API. I've written about some of these issues before, but now I have a project I can use as an example. Stick around to the end for an open challenge to the audience. Context Yu-Gi-Oh is a children's card game from Japan. Each player has "life…
Clojure as a First Language Clojure as a First Language by: Ethan McCue This might come as somewhat of a shock to my regular audience, but I don't only write Java. The reason I focus so much on specifically Java education is because it is often the first language people are taught. This matters for a lot of reasons, not all of which I have the page space to get in to, but crucially being taught…
A Modest Critique of Optional Handling A Modest Critique of Optional Handling by: Ethan McCue `java.util.Optional` is a class that breaks peoples brains a bit. It offers a way to represent a potentially missing piece of information. If your method might not produce a result you can use an empty Optional to represent that. Optional < LocalDate > birthday ( String name ) { return switch ( name ) {…
Go's HTTP Server Patterns in Java 25 Go's HTTP Server Patterns in Java 25 by: Ethan McCue I'm not a professional Go programmer so feel free to correct me on anything. The rest of this post is going to follow the example program from this piece of Go Documentation . I'm even going to straight rip a lot of the prose. My intent is to highlight how you can do spiritually similar things in Java. The…
Groyper Big Balls Vibe Codes away Social Security Groyper Big Balls Vibe Codes away Social Security by: Ethan McCue " Groyper " is the term used to describe the followers of Nick Fuentes . Nick Fuentes is a "Hitlerist," meaning he agrees with specifically the policies of Adolf Hitler . You might also know him as the "Your Body, My Choice" guy. " Big Balls " is the name of one of the young fascists…
Life Altering Postgresql Patterns Life Altering Postgresql Patterns by: Ethan McCue Believe it or not, I don't think that title is clickbait. There is a set of things that you can do when working with a Postgres database which I have found made my and my coworker's lives much more pleasant. Each one is by itself small, but in aggregate have a noticeable effect. Use UUID primary keys UUIDs have…
New build tool in Java! New build tool in Java! by: Ethan McCue The title is a `? -> !` of [this recent thread on Reddit](https://www.reddit.com/r/java/s/ItXOn0eBmg) and really a continuation of this series of posts ([1](https://mccue.dev/pages/1-11-24-cli-flow), [2](https://mccue.dev/pages/5-29-24-module-compilation), [3](https://mccue.dev/pages/5-30-24-module-libs-and-tests),…
The Ultimate Guide to Data Structures and Algorithms (DSA) The Ultimate Guide to Data Structures and Algorithms (DSA) by: Ethan McCue This guide has two sections, one for employers and one for prospective employees. We'll start with employees. For Employees Step 1. Obtain a copy of "Algorithm Design" by Jon Kleinberg and Éva Tardos. Any edition is fine. Step 2. Follow structured coursework on that…
How to use SDL3 from Java How to use SDL3 from Java by: Ethan McCue Using native code libraries from Java is both easier than its ever been and still a little bit frustrating. To understand that duality I wrote this pretty basic tutorial on how to use the newly-ish released SDL3 from Java. This should be useful both for those invested in the Java ecosystem and those who have a more practical…
Java Build Scripts Java Build Scripts by: Ethan McCue I've written before about how I think that while they need some bolstering ( here ) using the CLI tools to build Java code is more practical than you might think ( here and here ). What I didn't talk about, or tip-toed around, is that writing build scripts in bash , PowerShell , cmd.exe , etc. is not very cross-platform. You can install bash on…
C Growable Arrays: In Depth C Growable Arrays: In Depth by: Ethan McCue An extremely common question people have when using `C` for the first time is how to make an array of elements that can grow over time. I know this is a common question because one older post on this website where I explained the concept (badly) gets tons of organic traffic. It's not a bad question either. Nearly every…
Just use Postgres Just use Postgres by: Ethan McCue This is one part actionable advice, one part question for the audience. Advice: When you are making a new application that requires persistent storage of data, like is the case for most web applications, your default choice should be Postgres . Why not sqlite ? sqlite is a pretty good database, but its data is stored in a single file. This…
I Can't Run My Rust Game Either I Can't Run My Rust Game Either by: Ethan McCue Yesterday I [talked about an issue I had updating a Rust project](https://mccue.dev/pages/7-31-24-rust-just-failed-its-test). The time between when that project was working for me and when it was not was only a few months. But I have one other Rust project I haven't touched in a while. This little game . In it, you…
Rust Just Failed an Important Test Rust Just Failed an Important Test by: Ethan McCue I have two Rust projects I maintain. The first is a parser for the EDN Data Format . I haven't had to touch that one in a while. Best I can tell it's all still working. The second is a fork of the Rust Playground for running Java code . I also haven't had to touch that one in a while, but I did today to update…
You can run Java like Python now You can run Java like Python now by: Ethan McCue This is meant to be a brief PSA for the programming general public. All this is known to the people following Java closely, but I figure most are not. As of Java 22, you can run Java code like you would an interpreted language such as Python, Ruby, JavaScript, etc. This means that ahead-of-time compilation is no…
After CrowdStrike, Programmers Deserve Consequences. After CrowdStrike, Programmers Deserve Consequences. by: Ethan McCue An Anesthesiologist can expect a salary of over $300k. This is because putting you to sleep for surgery is actually kinda risky. If they do their job wrong you die. Their salary reflects the fact that they take on much of the liability for that. When a Structural Engineer…
A Dramatic Reading: I Will Fucking Piledrive You If You Mention AI Again A Dramatic Reading: I Will Fucking Piledrive You If You Mention AI Again by: Ethan McCue I thoroughly enjoyed reading this blog post entitled "I Will Fucking Piledrive You If You Mention AI Again" on the Lucidity blog. I choose to hope that it is a sign that professional developers, as a group, have a developed at least a few…
Extension methods make code harder to read, actually Extension methods make code harder to read, actually by: Ethan McCue I apologize in advance for whatever comment sections form around this. What are instance methods? In many languages you can associate functions with a type. class Dog { void bark () { System . out . println ( "Bark!" ); } } The name these are given differs on the language you…
Modules Make javac Easy: Part. 2, Dependencies and Tests Modules Make javac Easy: Part. 2, Dependencies and Tests by: Ethan McCue This is a follow-up to [this post](https://mccue.dev/pages/5-29-24-module-compilation). The biggest things I left out in the workflow I was describing are how to handle external dependencies and how to run tests. On the one hand, I feel like I understand how those would…
Modules Make javac Easy Modules Make javac Easy by: Ethan McCue If you use Java modules, using `javac` to compile your code is easy. I figure this wouldn't be known widely - its not that popular for people to use javac directly these days - but its interesting. Without Modules javac compiles any files you list in its invocation. javac -d build src/Main.java src/Other.java If the other source files…
Getting Started with java.sql Getting Started with java.sql by: Ethan McCue I get a lot of questions based on a very common school assignment. A student is asked to make a desktop GUI app and, as part of that, connect to and work with a locally hosted MySQL database. In this setup, presumably due to the same set of circumstances that leads to someone showing MySQL as an option for a locally hosted…
The Java Command Line Workflow The Java Command Line Workflow by: Ethan McCue A while ago, I released a draft of the [jresolve](https://github.com/bowbahdoe/jresolve-cli) command line tool. Its function is to take a set of root dependency declarations and resolve the full set of transitive dependencies. I'm happy with the API, but there are some things to fix up. But I think jresolve 's existence,…
org.xerial.sqlitejdbc org.xerial.sqlitejdbc Maven: org.xerial/sqlite-jdbc Module Name: org.xerial.sqlitejdbc GitHub: xerial/sqlite-jdbc What is it org.xerial.sqlitejdbc lets you create and interact with a SQLite database from Java. Why use it To quote the blurb on the SQLite website SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL…
de.poiu.apron de.poiu.apron Maven: de.poiu.apron/apron Module Name: de.poiu.apron GitHub: hupfdule/apron What is it de.poiu.apron gives you the ability to read and write properties files while preserving comments, whitespace, and order of entries. Why use it java.util.Properties is one of the simpler ways to add configuration to a project. Properties files are just key value pairs separated by an…
com.ethlo.time com.ethlo.time Maven: com.ethlo.time/itu Module Name: com.ethlo.time GitHub: ethlo/itu What is it com.ethlo.time provides utilities for parsing and producing the date and time formats that you are likely to run into on the internet. Namely, RFC-3339 timestamps and the W3C date and time Formats . Why use it While the java.time packages provide generic date and time parsing and can…
com.fasterxml.uuid com.fasterxml.uuid Maven: com.fasterxml.uuid/java-uuid-generator Module Name: com.fasterxml.uuid GitHub: cowtowncoder/java-uuid-generator What is it com.fasterxml.uuid has methods to generate, and customize the generation of, UUIDs. Why use it Most of the time, folks use UUID.randomUUID() to get their universally unique identifiers. That makes a UUIDv4. But the world of UUIDs is…
dev.mccue.microhttp.session dev.mccue.microhttp.session Maven: dev.mccue/microhttp-session Module Name: dev.mccue.microhttp.session GitHub: bowbahdoe/microhttp-session What is it dev.mccue.microhttp.session provides an interface for encoding session data in microhttp responses and decoding session data from microhttp requests. Last one from me for this series, I promise. This just took a lot of…
dev.mccue.async dev.mccue.async Maven: dev.mccue/async Module Name: dev.mccue.async GitHub: bowbahdoe/java-async-utils What is it dev.mccue.async provides one class - Atom . Atom wraps an AtomicReference and gives a simpler, if less powerful, API that is geared around atomic compare and swap operations. Why use it If you are from the Clojure world, this gives an API directly inspired by its atom…
dev.mccue.microhttp.json dev.mccue.microhttp.json Maven: dev.mccue/microhttp-json Module Name: dev.mccue.microhttp.json GitHub: bowbahdoe/microhttp-json What is it dev.mccue.microhttp.json provides JsonResponse , a class which implements IntoResponse and thus can be used alongside microhttp and microhttp-handler to produce responses which contain html. It automatically adds the appropriate…
dev.mccue.json dev.mccue.json Maven: dev.mccue/json Module Name: dev.mccue.json GitHub: bowbahdoe/json What is it dev.mccue.json provides the ability to read and write JSON data as well as to encode data into JSON and decode data from JSON. Why use it Most popular JSON libraries use data-binding. You make a class, possibly annotate it a little bit, and then some automatic logic binds the data…
com.samskivert.jmustache com.samskivert.jmustache Maven: com.samskivert/jmustache Module Name: com.samskivert.jmustache GitHub: samskivert/jmustache What is it com.samskivert.jmustache is an implementation of the Mustache templating language . Why use it Mustache is one of many templating languages used for generating HTML. It has the unique advantage of being especially portable between languages…
com.nulabinc.zxcvbn com.nulabinc.zxcvbn Maven: com.nulab-inc/zxcvbn Module Name: com.nulabinc.zxcvbn GitHub: nulab/zxcvbn4j What is it com.nulabinc.zxcvbn , so named after one of the 100 most common passwords , is a password strength estimator. Why use it People aren't very good at picking passwords. While it is technically their fault if they make their password 123456 and get their bank account…
dev.mccue.microhttp.cookies dev.mccue.microhttp.cookies Maven: dev.mccue/microhttp-cookies Module Name: dev.mccue.microhttp.cookies GitHub: bowbahdoe/microhttp-cookies What is it dev.mccue.microhttp.cookies provides a utility parsing cookie headers sent in requests, specifically microhttp's Request objects. Why use it If you've asked a user to send you a cookie on subsequent requests, such as with…
dev.mccue.microhttp.setcookie dev.mccue.microhttp.setcookie Maven: dev.mccue/microhttp-setcookie Module Name: dev.mccue.microhttp.setcookie GitHub: bowbahdoe/microhttp-setcookie What is it dev.mccue.microhttp.setcookie provides a utility for generating a Set-Cookie header for use in a microhttp Response . Why use it Whenever a web browser receives a response from a website, depending on user…
com.sanctionco.jmail com.sanctionco.jmail Maven: com.sanctionco.jmail/jmail Module Name: com.sanctionco.jmail GitHub: RohanNagar/jmail What is it com.sanctionco.jmail parses and validates email addresses. Why use it Web applications often need to work with email addresses in some form. If you find yourself needing to check if something is a valid email address, jmail is more correct than the…
org.apiguardian.api org.apiguardian.api Maven: org.apiguardian/apiguardian-api Module Name: org.apiguardian.api GitHub: apiguardian-team/apiguardian What is it org.apiguardian.api provides an @API annotation. This gives a structured place to document API stability guarantees. Why use it If you are writing an application, generally no API is truly stable. You are free to change whatever you need to…
dev.mccue.microhttp-html dev.mccue.microhttp-html Maven: dev.mccue/microhttp-html Module Name: dev.mccue.microhttp-html GitHub: bowbahdoe/microhttp-html What is it microhttp-html provides HtmlResponse , a class which implements IntoResponse and thus can be used alongside microhttp and microhttp-handler to produce responses which contain html. It automatically adds the appropriate Content-Type…
dev.mccue.html dev.mccue.html Maven: dev.mccue/html Module Name: dev.mccue.html GitHub: bowbahdoe/html What is it html provides an Html type and a template processor which produces Html and auto-escapes any embedded values. Why use it Before template processors, your options for producing html were to Keep the HTML in a template - usually, but not always, in a separate file Generate HTML with a…
org.slf4j.simple org.slf4j.simple Maven: org.slf4j/slf4j-simple Module Name: org.slf4j.simple GitHub: qos-ch/slf4j What is it slf4j-simple is a logging implementation for slf4j-api . It prints log message emitted at a level of INFO or above to System.err . Why use it If any dependency you have uses slf4j-api you will get errors at startup about not having a logging implementation. slf4j-simple is…
org.slf4j org.slf4j Maven: org.slf4j/slf4j-api Module Name: org.slf4j GitHub: qos-ch/slf4j What is it slf4j-api - "Simple Logging Facade for Java" - is a logging facade. For Java Why use it Logging facades let portions of a larger program emit text based logs without needing to know how those logs will be published. This means external libraries will often emit logs via slf4j and expect that the…
dev.mccue.microhttp.handler dev.mccue.microhttp.handler Maven: dev.mccue/microhttp-handler Module Name: dev.mccue.microhttp.handler GitHub: bowbahdoe/microhttp-handler What is it microhttp-handler provides interfaces for making composable handlers for microhttp . There are two interfaces in the module, IntoResponse and Handler . IntoResponse is something which can be converted into a Response .…