Sunday, 22 November 2026

Harry Winser.com

Musings on tech, photography, and culture

3 Reasons Why I Love Java

An ode to Java

I love programming.

I still do, 10 years in.

Those who follow me on Mastodon know I love to complain about code and tech, but they should also know that I only complain because of my love for it.

I love throwing myself at a problem over and over. I love the feel of typing on a keyboard. I love finding the random post on StackOverflow that is the exact issue I have, and discovering I’m not alone. I love attending meet-ups and finding so many people as passionate as I am.

There are so many aspects to love about programming.

With that in mind, this post as a sort of love letter to Java. Java was and still is the language I’ve made a career out of. Java has enabled me to travel, talk at conferences and meetups, rent flats, eat out, buy gifts, buy a house, and generally enjoy living.

This blog is also for those who wonder why people still love Java in 2025. Why it’s still one of the most used languages, and why it’s probably not going to go anywhere for a fair while.

1. Consistency & Stability

Java is a stunningly consistent language and ecosystem. The developers of it care deeply about not making breaking changes, and ensuring that folks can easily upgrade between versions. It’s “slow” to make big changes.

Let look at the build systems, which have been around for a long while now. The two main build systems are old. Maven is almost 21 years old and Gradle is 16 years old. With age comes consistency and stability. Oh and libraries are pretty most always hosted on Maven Central, and have been for years.

With this level of stability and consistency tutorials can remain relevant for years. You can read a tutorial from 2015, and it’ll probably still work today.

Libraries and Frameworks have also been around for a while too, which means there are loads of documentation. And because they’ve all been widely used, it’s likely others will have run into issues before you get to them and will have been fixed.

That’s not to say Java doesn’t change. A lesser known fact is that a new version of Java is released every six months. Every March and September. Any feature that’s ready to be shipped gets shipped. Gone are the days of massive releases like Java 8, which added a load of very useful stuff but a fair bit of stress when updating from Java 7.

When writing a complex system that needs to be maintained for years to come, you can’t go wrong with Java. Stability and consistency matter, and shouldn’t be overlooked because of a “new hotness”.

2. Speed & Compatibility

Java got a lot of flack in the late 90’s and 00’s for being slow. And it certainly deserved it. But since then, it has done a lot to be fast.

Like, really fast.

The JVM, which it runs on (as do other languages), powers a fair number of search engines. Elasticsearch is written in Java. So is Hadoop, which can deal with petabytes worth of data. Then there’s also the companies like Uber, Netflix, and Amazon, that run Java for their major systems. Amazon even releases their own JDK, which it tweaks for internal use.

Java can also be customised for its environment, specifying how much memory it uses and CPU. Standard stuff, but you can decide on what sort of Garbage Collection you’d like to use, as well as how the memory is partitioned between different heaps. This means you can tailor (or really screw up) how it runs depending on your needs.

It also runs everywhere. Set top boxes, personal computers, phones, serverless, Raspberry PI’s, ARM computers. Wherever it’s needed, Java is there. So many JVM and Java ports exist, it’s awesome. Do all of these work well? No. But if you want to run Java, you pretty much can.

Quick side note; you totally can run AWS Java Lambdas. But should you? That’s up to you, as it is slower to boot, and it is a more verbose language to write very small functions. That’ll be down to your needs and is out of scope of this post.

3. Libraires & Specifications

I know I’ve touched on Libraries in point 1. however I feel it’s worth it’s own section. There are a tonne of libraries for Java, and a lot of them battle tested.

Spring & Spring Boot deserve a mention, for powering a lot of web servers the world over. And these are free! And because they’re so widely used, there are lots of people improving them, teaching them, and writing about them. There are also loads of libraries built on top of these frameworks, enabling access to AWS services or introducing new paradigms like async/await (Reactive Programming).

Java also comes with a load of specifications, which library builders can use to interface with other tech. Accessing databases for example is specified via the JDBC API. Meanwhile, working with web applications can be done via the Serverlet specification. Just for clarity, I don’t recommend working directly with either of these specifications. They’re for low level interactions, and instead I recommend using libraries built on top, like Tomcat. Which loops back to an earlier point - tried and true libraries exist for the all the standard stuff, enabling you to build.

With Java, these specifications enable libraries to talk to each other, and build on each other. A shared understanding of whats available. This is awesome, in a world where a lot of folks don’t like talking or working together. Though it’s not always perfect (I’ve spent a fair few hours debugging when they don’t line up), it’s great when it does work and means you can focus on your Job instead of writing code to access a database (unless that is your job).

In summary, I love Java. It’s gotten me through some difficult problems, and has been a stalwart companion. I do think Kotlin is a solid alternative if you want something a little less verbose and is null safe. When picking Java for a new project you can rest easy knowing that the community is strong, the libraries are numerous and well cared for, and it’ll still be there for you tomorrow.


Looking ahead into 2025

Lets talk about 2025, seeing as its the 1st January!

Lets talk about 2025, seeing as it’s the 1st January!

Below you’ll find an outline of what I hope to achieve next year and also my top three technical and political predictions. Hopefully we’ll all still be here next year to find out just how wrong I was!

Personal

From a personal stand point, 2024 has been about solidifying what I have. I’ve climbed further out of the “burn out” hole, my little house feels lived in and cosy, and I even got back into writing little side projects like thoughtstream.me (plug plug nudge nudge go check it out!). I even attended a meet up for the first time in roughly 5 years.

So I’d like 2025 to be about moving forward. Using the amazing foundation I have with my partner, my home, and my friends, I want 2025 to be about taking “The next step”.

Goals and resolutions

Yes yes I know folks don’t tend to keep resolutions, but I always set them every year. Some stick, some fall by the wayside very quickly. These two I feel are pretty achievable:

  1. Write a blog post once a week
  2. Learn one new song on guitar a month

I’ve really enjoyed bringing harrywinser.com back to life, and would love to flesh it out with more technical musings, silly little project ideas, and maybe sharing my photography and music. Hugo is an excellent static site generator, and I look forward to exploring more about it as I post.

As for learning more music; in 2023 I got very into playing in local bars in and around Plymouth. However 2024 has been a bit of a hiatus for me and I’d love to get back into it. So I want to use this as a way to push myself into practising and getting back out there to perform. The itch is certainly there and I know my mental health will appreciate getting back into music.

2025 predictions

Lets break this down into two; technical and political.

Technical

2024 was a bit of a weird year. A.I. became all the rage, crypto might be leaving it’s “winter”, Google might have to sell Chrome, a toaster is probably now an Xbox, and the Games Industry layoffs seem to be continuing.

With that in mind, here are my three tech predictions:

  1. A.I. will fizzle out - A.I is everywhere, but it’s not proven actually useful. They lie hallucinate making trust a real issue. The text prediction/writing is proving useful, but I think we’re in for a major rebalancing of expectations this year as to what users expected, and what A.I can actually do.
  2. There will be a Trump crypto bounce - pretty obvious one, and I’m not the only one making this prediction, but I expect to see an all time high for Bitcoin by the end of January, as Trump is sworn in. Post that, I think it’ll be rocky, depending on what Trump actually does. (Please do not mistake this prediction as an endorsement of Crypto).
  3. Apple won’t release anything exciting - 2024 had the Apple Vision Pro, Mac Mini, and a bunch of other releases. I don’t think we’ll be seeing anything like a foldable. I reckon incremental upgrades, and potentially Apple Intelligence will be downplayed (as per prediction 1.)

Political

2024 was a big year for politics watchers. Obviously Trump being elected was a biggie, but closer to home here in the U.K. we finally threw off the 14 years of bad Tory management. And replaced it with, arguably, Tory Light ™️ (there’s certainly more to say on this topic, so look for a blog post on this soon).

With those in mind, lets do my three political predictions:

  1. Starmer will still be in number 10 - the UK has had a lot of Prime Minsters in the last 14 years. Bar any major disaster, I think Starmer will still be in charge by 2026.
  2. Reform will consume the Conservatives (whatever that means) - when Kemi Badenoch became the head of the Conservative party, there was a sense of “Oh no, what have they done?” and since then, she’s done nothing to dissuade those feelings. Reform has moved the Right much more Right, while Labour has pulled the Left to the Centre. This leaves the Conservatives as not being Right leaning enough for the fanatics, and not Centre enough for those looking for traditional conservative values. The question being; what do they bring to the table?
  3. Trump and Musk will fall out - we can already see this happening. But two people with massive egos don’t work well together. It’ll be interesting (in a painful way) to see what will win out. Infinite wealth, or the most powerful seat. Either way, I don’t think they’ll be best friends by the start of 2026.

I wish you luck and fair weather for 2025

And with that I shall leave you to ponder what 2025 might bring your way. Whatever it does bring, I wish you health, wealth, and happiness.


Quiz of the Year 2024 Answers

Answers for 2024 Quiz

Here are the questions and answers to the Quiz of the Year 2024

News from 2024

  1. In January, what scandal caught the publics attention after an ITV drama?
    1. Post office Scandal
  2. In February, a Willy Wonka experience opened in Glasgow. It was a disaster but has since been recreated in LA, as well as spawning a musical. How much was a ticket? (£35)
    1. £35
  3. In March this year, which country became the first to make Abortion a Constitutional right?
    1. France
  4. In April, what birthday did BBC 2 celebrate?
    1. 60th
  5. On 22nd of May, Rishi Sunak announced that a general election will be held. What was happening, as he stood outside of number 10?
    1. Raining, music playing - I’d accept a few answers here
  6. On the 4th of June, a woman was arrested for throwing what at Nigel Farage?
    1. A Milk Shake
  7. Who became British Prime Minister ?
    1. Sir Kier Starmer
  8. The Olympics were held in Paris, France. How many Medals did Britain get?
    1. I’d accept +-10 for this answer, which was 65
  9. In September what well known restaurant chain, which mostly concerned itself with Fridays and religion, went into administration?
    1. TGI Fridays
  10. Name the two super hero movies released in October; both were sequels, and one was from DC and the other from Sony/Marvel.
    1. Joker: Folie à Deux, Venom: The Last Dance
  11. In November who became the leader of the Conservative Party?
    1. Kemi Badenoch
  12. In December, what time of day does this person (from the previous answer) think sandwiches should be eaten?
    1. Breakfast

Nerd + Tech round

  1. Name at least one of the top selling games in the UK this year
    1. 1.EA Sports FC 25 2.Hogwarts Legacy 3.Call Of Duty: Black Ops 6 4.EA Sports FC 24 5.Mario Kart 8 Deluxe 6.Super Mario Bros. Wonder 7.Minecraft 8.Nintendo Switch Sports 9.The Legend Of Zelda: Echoes Of Wisdom 10.Super Mario Party Jamboree. Allow for some rough guesses / answers. For example, just Zelda would do.
  2. What numerical version of the iPhone was released this year?
    1. 16
  3. Please write down what’s wrong with this statement: According to the rules of Quidditch, throwing the Quaffle though an opponent’s hoop earns 10 points, hitting an opponent with a bludger earns 0 points, and catching the golden snitch earns 50 points and ends the game.
    1. It’s actually 150
  4. How Many sides does a d20 have?
    1. 20
  5. Fireball can be cast using what minimum level spell slot?
    1. 3rd level
  6. What is the full name of the Grifindor ghost?
    1. Sir Nicholas de Mimsy-Porpington.
  7. Please write down what’s wrong with this statement: In Star Wars, in order to free young Anakin Skywalker from slavery, Qui-Gon Jinn first uses a Jedi Mind Trick to convince his master Watto, a Toydarian junk merchant, to allow him to pod race.
    1. Mind tricks don’t work on Toydarians
  8. What year was Windows 11 released?
  9. 2021
  10. Dumbledore has a scar above his left knee. What does it resemble?
    1. A map of the London Underground.
  11. Who invented the World Wide Web?
    1. Tim Berners-Lee

Chaos round

  1. Spell “Ore” - in a sentence: “you could use an oar or a shovel, to get at that ore”
  2. Spell “There” - in a sentence: “Their yours, and they’re all the way over there”
  3. How tall does insert friend here think the Eiffel tower is in meters?
    1. Actual answer is 330 m, but whatever they wrote is the answer
  4. What does A.B.C stand for? (A.B.C was shown on A.B.C and on A.B.C) - Airway Breathing Circulation, Australian Broadcasting Corporation, American Broadcasting Company.
    1. I’d accept Australian Broadcasting Corporation, but most inventive answer wins.
  5. What well known song has the chord progression C, G, A minor, F (Loads use this progression, and so pick your favourite - for example, “Let It Be” by The Beatles. You might also decide that the most interesting song wins).

Quiz of the Year 2024

My quiz for 2024! Categories include; News from 2024, a nerd / tech round, as well as a chaos round

Below is the quiz I’ll be running for some friends at this year NYE party. It’s very British and quite nerdy, as I’ve tailored it towards who will be there.

You can find the answers to this quiz here: Quiz of the Year 2024 - answers.

Enjoy, and Happy New Year!

News from 2024

  1. In January, what scandal caught the publics attention after an ITV drama?
  2. In February, a Willy Wonka experience opened in Glasgow. It was a disaster but has since been recreated in LA, as well as spawning a musical. How much was a ticket?
  3. In March this year, which country became the first to make Abortion a Constitutional right?
  4. In April, what birthday did BBC 2 celebrate?
  5. On 22nd of May, Rishi Sunak announced that a general election will be held. What was happening, as he stood outside of number 10?
  6. On the 4th of June, a woman was arrested for throwing what at Nigel Farage?
  7. Who became British Prime Minister ?
  8. The Olympics were held in Paris, France. How many Medals did Britain get?
  9. In September what well known restaurant chain, which mostly concerned itself with Fridays and religion, went into administration?
  10. Name the two super hero movies released in October; both were sequels, and one was from DC and the other from Sony/Marvel.
  11. In November who became the leader of the Conservative Party?
  12. In December, what time of day does this person (from the previous answer) think sandwiches should be eaten?

Nerd + Tech round

  1. Name at least one of the top selling games in the UK this year
  2. What numerical version of the iPhone was released this year?
  3. Please write down what’s wrong with this statement: According to the rules of Quidditch, throwing the Quaffle though an opponent’s hoop earns 10 points, hitting an opponent with a bludger earns 0 points, and catching the golden snitch earns 50 points and ends the game.
  4. How Many sides does a d20 have?
  5. Fireball can be cast using what minimum level spell slot?
  6. What is the full name of the Grifindor ghost?
  7. Please write down what’s wrong with this statement: In Star Wars, in order to free young Anakin Skywalker from slavery, Qui-Gon Jinn first uses a Jedi Mind Trick to convince his master Watto, a Toydarian junk merchant, to allow him to pod race.
  8. What year was Windows 11 released?
  9. Dumbledore has a scar above his left knee. What does it resemble?
  10. Who invented the World Wide Web?

Chaos round

  1. Spell “Ore” - in a sentence: “you could use an oar or a shovel, to get at that ore”
  2. Spell “There” - in a sentence: “Their yours, and they’re all the way over there”
  3. How tall does insert friend here think the Eiffel tower is in meters?
    1. Actual answer is 330 m, but whatever they wrote is the answer
  4. What does A.B.C stand for? (A.B.C was shown on A.B.C and on A.B.C) - Airway Breathing Circulation, Australian Broadcasting Corporation, American Broadcasting Company.
    1. I’d accept Australian Broadcasting Corporation, but most inventive answer wins.
  5. What well known song has the chord progression C, G, A minor, F (Loads use this progression, and so pick your favourite - for example, “Let It Be” by The Beatles. You might also decide that the most interesting song wins).

Async Await Typescript Csv Parser

Example code for a TypeScript CSV parser with Async/Await

On far too many occasions I need to parse CSV files to extract the data. I’ve found over the years that also converting them to TypeScript objects is a big help.

I’ve written variations of this code over and over again, and I’m getting annoyed at myself for forgetting / losing previous versions of it. So today, I’m going to share my “janky” yet simple way of parsing a CSV to TypeScript objects.

As with all code on the internet; please make sure you read it and understand it before jamming it into your projects!

The code

import * as fs from "fs";
import * as path from "path";
import { parse } from "csv-parse";

interface ReadCSVOptions {
  columns: string[];
  delemiter: string;
}

const readCSV = async <T>(
  file: string,
  options: ReadCSVOptions,
): Promise<T[]> => {
  const csvFilePath = path.resolve(__dirname, file);
  const fileContent = fs.readFileSync(csvFilePath, { encoding: "utf-8" });
  const csvParser = parse(options);

  return new Promise<T[]>((resolve, reject) => {
    const results: T[] = [];

    csvParser.on("readable", function () {
      let record;
      while ((record = csvParser.read()) !== null) {
        // ignore the row if it equals the same as header
        if (record[options.columns[0]] === options.columns[0]) {
          continue;
        } else {
          results.push(record);
        }
      }
    });

    csvParser.on("error", function (err) {
      reject(err);
    });

    csvParser.on("end", function () {
      resolve(results);
    });

    csvParser.write(fileContent);
    csvParser.end();
  });
};

A few items of note

  1. While I’ve used it personally for little scripts, if you plan to use it for “production” code, PLEASE TEST IT!
  2. I’m aware there are probably npm libraries out there for this exact thing, but I couldn’t find a working one.
  3. It relies on csv-parse - which looks pretty well used and is well supported.
  4. This will load everything into memory. So maybe avoid using for very large CSV files.