Hi, I'm Harrison. I currently work at me&u as a software engineer. I enjoy golfing, gaming, tending to my veggie garden and playing with my dog Boots.

Recent Posts

Thursday, February 20, 2025

Undertale Start#gamefaqs.gamespot.com

I've just started Undertale. This guide has been a good one to read so far to learn about the game and understand some basic mechanics.

Practise Playbook

These are the shots I work on in the hitting net:

  1. Chipping, any iron or wedge, trying the hit the ball solid with an open club face, really move the club in a straight line through the ball, less wide stance, once you're hitting these solid move up to 70% shots
  2. Medium iron shots, any iron or pitching wedge, chippy and low 70% shots, try to get inside the ball, hit with good compression, this helps you get into a good rhythm, once you're hitting these solid you can move up to the 90% shots
  3. Full shots, 3 wood, hybrid, any iron or pitching wedge, 90% shots, try to get inside the ball, hit with good compression, hit most of these shots off a low tee

Sopranos Season 4#reddit.com

I've just finished season 4 of The Sopranos. I'm still loving the show but season 4 was the worst out of all the seasons so far. In saying that, the final episode where Tony and Carmela break up was a very accurate portrayal of divorce and the chaos that surrounds it.

It's quite interesting reading through the Reddit post I linked about what people's favourite seasons and episodes are. Season 3 was phenomenal and my favourite at the moment.

Wednesday, February 19, 2025

Gulf Of Something#gulfof.mapquest.com

This is a good meme.

Sunday, February 16, 2025

Hydration In React

Just for my own learning today I had a bit of a play around with React hydration and server side rendering (SSR).

Whilst I've used frameworks like Next.js and Remix I've never just done the "from scratch" implementation of React SSR.

Here were the steps I followed:

  1. Implement a basic GET endpoint, I'm using Elysia and bun, the call to html() essentially just calls the react-dom/server renderToString function and returns a Response
app.get("/test/ssr", async () => {
  const response = html({
    title: "Test SSR",
    meta: {
      description: defaultDescription,
      "theme-color": "#1c1917",
    },
    links: [],
    scripts: [{
      src: "/client.js",
      defer: true,
      type: "module",
    }],
    body: <Test />,
    styles: [GLOBAL_CSS],
  });

  return response;
})
  1. At this point all things are pretty standard, a GET request is sent to /test/ssr and a response is sent back to the client as HTML
  2. Note the /client.js file that's sent back to the browser as a script
<head>
	<script src="/client.js" type="module" defer=""></script>
</head>
  1. This script loads after the HTML renders, it contains a bunch of React code which I've created using a build step
  2. Before the build step the client.js is actually a client.tsx file which looks like this
/// <reference lib="dom" />
import React from "react";
import { createRoot, hydrateRoot } from "react-dom/client";
import { Test } from "./pages/test"

const rootElement = document.getElementById("root");

if (!rootElement) throw new Error("Root element not found");

if (rootElement.innerHTML.trim().length) {
  hydrateRoot(rootElement, <Test />);
} else {
  createRoot(rootElement).render(<Test />);
}
  1. The <Test /> component has some tanstack-query setup and some basic React state
import React, { useState } from "react";
import { Something } from "../components/something";
import { Nav } from "../components/nav";
import {
  QueryClient,
  QueryClientProvider,
} from '@tanstack/react-query'

export const Test = () => {
  const [count, setCount] = useState(0);

  const queryClient = new QueryClient()

  return (
    <QueryClientProvider client={queryClient}>
      <div className={`max-w-xl mx-auto p-4 text-opacity-80 font-serif`}>
        <Nav />
        <button onClick={() => setCount(count + 1)}>Increment</button>
        <p>{count}</p>
        <Something />
      </div>
    </QueryClientProvider>
  );
}
  1. The <Something /> component actually uses tanstack-query with some sleep logic to replicate an API call
import { useQuery } from "@tanstack/react-query";

const sleep = (ms: number): Promise<void> => {
  return new Promise((resolve) => setTimeout(resolve, ms));
};

export const Something = () => {
  const { data, isLoading } = useQuery({
    queryKey: ["something"],
    queryFn: async () => {
      await sleep(5000);
      return "Something";
    },
  })

  return isLoading ? <p>Loading...</p> : <p>{data}</p>
}
  1. I need to bundle this code up so that the browser can interpret the JSX that I'm writing, I can use the bun build CLI tool to do this, I just need to pass the parent file (client.tsx) to the build tooling as it'll also bundle up the children, note that I'm also using uglifyjs to minify the JS making the resource size as small as possible
bun build ./client.tsx --outdir ./dist && uglifyjs ./dist/client.js --compress --mangle --output ./dist/client.js
  1. I then have a /client.js endpoint in my Elysia web server
app.get("/client.js", async () => {
  const path = "./dist/client.js";

  const file = Bun.file(path);

  const text = await file.text();

  return new Response(text, {
    headers: {
      "Content-Type": "text/javascript",
    },
  });
});

When the client.js file executes in the browser the React hydration process occurs. The server HTML is compared to what React renders on the client. If this matches up you're all good. If it doesn't match up you'll get an error.

But essentially any code that's a child of client.tsx you can treat like traditional SPA style React. You have useState and you can handle async things inside of useEffect. You can use tools like tanstack-query or zustand for state management.

Wednesday, February 12, 2025

Noojee#instagram.com

This looks like a fun family day for me, Emma and Boots to do.

Scorebug#daringfireball.net

Love a good nerd out over a scorebug.

I like the new NFL one that's being talked about here.

I noticed the change immediately (of course), and my knee-jerk instant reaction was negative. Too big, too bold, too different. Don’t like. That’s natural. Human beings evolved to be alarmed by change. If everything looks the same as usual, everything is probably as safe as usual. If something looks jarringly different, it might be a sign that you’re about to be killed. (Evolutionarily speaking.)

So I started studying and considering the changes to Fox’s scorebug. I quickly not only warmed up to the new scorebug, I decided I really like it. It’s better than Fox’s old one, and better than every other network’s (which all largely look the same), in almost every single regard.

The AFL aught to freshen up it's scorebug too. My favourite of all time is still the 1999 era one (the one that has a gold/brown border). In saying this, adopting something new like what the NFL has done here would be interesting.

Pine Barrens

These last few weeks I've truely become addicted to The Sopranos.

Season 1 and 2 are fantastic but what really has me hooked is season 3. The epitome of the sheer chaos and edge of your seat viewing is the Pine Barrens episode.

The Jackie Jr storyline, Gloria and Tony, Christopher and Paulie getting stuck in the woods, the humour of Bobby; there is just so much plot to hook you in.

I feel like Pine Barrens is The Sopranos version of The Rains of Castamere. This backed up by the fact that both of these episodes are towards the end of their season 3's.

Sunday, February 9, 2025

Muster Dogs Season 3#iview.abc.net.au

I've watched two episodes of season 3 so far and I love it.

Quoting from this ABC article about the new season:

But which makes the better pet? And what should you think about if you've got a country dog in the city?

In collie breeder Mick Hudson's opinion, collies are "more trainable", whereas kelpies bring a greater "natural ability".

"Farmer gets him a kelpie, takes him into the paddock and he learns the job himself," he told ABC iview's Muster Dogs: Collies and Kelpies.

"At the end of the day, they're both Australian-bred dogs and both breeds will do the job.

Mates

Love all these boys. Cheers for a fantastic weekend!

Friday, February 7, 2025

Metal Gear Solid Review

Metal Gear solid is the most cinematic game I've ever played. It truely feels like a movie which is also a game. The story and cut scenes are done so well and the character development (whilst cheesy at times) is superb. It's like reading a good book that you can't put down. You can't wait to see what happens to certain characters. Some other thoughts:

  • The game had fantastic bosses, they all had interesting back stories and had a unique attribute to them
  • I particularly enjoyed the Sniper Wolf boss battles
  • The Psycho Mantis boss was so weird, I don't think I've ever had a gaming experience like it before where switching controllers is the strategy
  • Many of the puzzles are Zelda like, there's a bunch of blowing holes/crawling under walls to progress
  • The music is unique and done fantastically well, it's very orchestral and changes tone based on the action
  • I have no idea how some of these bosses keep surviving, Liquid Snake died like 5 times throughout the whole story, he just kept coming back
  • The FOXDIE plot line was really cool, using Solid Snake to infect others without him even knowing
  • The graphics are very limited but they have a certain charm to them, similar to Ocarina of Time even primitive 3D graphics don't matter if the game is good
  • The sneaking and stealth based mechanics are well done, it's genuinely quite tricky to progress through certain stealth sections without being caught because you need to also collect all the items in the area
  • There's a nice variety of weapons, for bosses there's lots of usage of the Stinger (missile launcher) which I enjoyed, shooting the soldiers with the FAMAS is kind of annoying, not having first person COD style aiming kind of sucks
  • Let's just say there are some very 90s aspects of this game in the dialog

Thursday, February 6, 2025

Gemini#youtube.com

The AI news really is captivating right now. The Gemini model looks great but what really stands out is the API pricing. It crushes the competition on an input/output basis.

McAtlas#mcatlas.com

This is a cool coffee table book. Low key excellent gift idea.

ChatGPT For Music

ChatGPT is a fantastic way to discover new music.

Here are some example queries of mine from earlier this week:

whats some great albums by artists similar to early daft punk albums

what are johhny cash's best albums

with the output here and here.

Reviewing the output I was able to "discover" an old favourite in the self titled Justice album as well as At San Quentin (Live).

Tuesday, February 4, 2025

CRA Deprecated#youtube.com

This brings back a lot of memories of working with create-react-app at Coder Academy.

There are so many better solutions now. Glad to see it being sunset.

State Of Auth#youtube.com

This is always a topic I find interesting.

The takeaway here: better-auth seems really nice.

We're stuck on auth0 at work.

Apple Report Card 2024#sixcolors.com

iPhone, developer relations and world impact down. Not good.

The developer relations category is particularly rough:

The vibes are bad out there, folks. This is the lowest score this category has received since the very first year of the survey. Apple’s aggressive responses to regulatory pressure, particularly in the EU, were widely criticized as hostile, manipulative, and profit-driven rather than user- or developer-focused. The rollout of third-party app stores and alternative payment options was seen as an exercise in “malicious compliance” designed to discourage participation rather than actually foster openness. Additionally, Vision Pro’s weak app ecosystem highlighted the declining trust developers have in Apple’s new platforms.

Monday, February 3, 2025

Bloke Whistle#abc.net.au

In recent weeks, Opposition Leader Peter Dutton has increasingly talked up his "anti-woke" agenda across online platforms, including podcasts.

So, is he trying to appeal to disenfranchised male voters?

In a podcast chat with entrepreneur Mark Bouris, Dutton outlined what he called an "anti-woke revolution" occurring globally. But he also said that young men have had enough of being overlooked for jobs and promotions, especially when they have female partners who have "decided" to stay home with the kids.

So we're going down the American path are we? Yikes.

I don't know what strategy Labor uses to combat this?

This week, The Australian Financial Review (AFR) reported its polling had found a sharp gender divide among younger voters, with men far more disposed towards Dutton than women, and more optimistic about Australia's economic outlook. It also showed that women in the same age groups are more left-leaning. In the breakdown of aggregate data from the last three AFR/Freshwater Strategy opinion polls, 37 per cent of young male voters — aged between 18 and 34 — preferred Dutton as prime minister, compared with 27 per cent of women in the same age group.

Luka Davis#espn.com.au

In a blockbuster trade that figures to impact the Western Conference balance of power for years to come, the LakersMavericks and Jazz completed a three-team trade that sends Luka Doncic to Los Angeles and Anthony Davis to Dallas.

This has to go down as one the most insane sports trades ever. In any league.

James learned of the trade when it broke while he was out to dinner with family after Saturday's win against the Knicks in New York, sources close to the Lakers superstar told ESPN. James was surprised by the news, sources said. Davis and Doncic were also not informed of the trade ahead of time, sources told Charania.

It's just weird that no one knew about this. The whole truth is not out there.

Saturday, February 1, 2025

DeepSeek#abc.net.au

DeepSeek now appears to have debunked one of the tech world's holiest scriptures, achieving similar success with far fewer and far older chips.

"It marks the end of US dominance of the AI race," says Toby Walsh, chief scientist at the AI Institute of the University of New South Wales.

"It's like running the four-minute mile," he says.

"When Roger Bannister first ran the four-minute mile, it demonstrated it was physically possible."

I'm yet to try DeepSeek but it seems extremely promising. What this means for ChatGPT and the other LLM based companies will be very interesting.

If we see more open source models that have the same usefulness as ChatGPT then its commercial viability is diminished. Why pay for it?