March 27, 2023

Do Submarines Swim?

By now I’m sure everyone has seen enthusiastic AI boosters being completely wowed by ChatGPT and other Large Language Models (LLM) and also AI detractors pointing out the flaws of these models. For example, here’s a big compilation of such LLM failures. I think I’m probably more on the critical side, but I think a lot of the criticisms fall flat. Or better, the examples are failures, but the conclusions people draw on the basis of those failures are flawed. Read more

January 27, 2023

Python's Counter

The problem Python has a Counter object – it’s found in the collections module – and I’ve become convinced that it’s… a bit weird? The basic idea is fine: it’s a dictionary but the keys are things you want to count, and the values are the amount of the thing you have counted. The neat thing is if you initialise a counter with an iterable like a string or a list, it’ll give you the counts for the number of times each element appears. Read more

January 13, 2023

Subclass Like a Boss

I had this idea for a project I could do, but I thought “maybe I should do this other thing first to get to grips with the API”. I was doing something for that project, and got distracted doing a simpler project to learn about the technologies and tools involved. I got distracted from that project by some weird behaviour of a class in the python standard library (I’ll post about that later). Read more

January 7, 2023

Miscellaneous Python Bits

In a previous post I said I would come back to explain a few somewhat opaque lines in my matrix-based solution to Advent of Code 2022, day 2. This is what I’m going to do here. There’s three smallish things I thought it was worth pointing out. None is going to surprise veteran python coders, but they might be of interest to some. Building matrices So the first line I want to look at is: Read more

December 29, 2022

Rock Paper Scissors With Matrices

I had a go at the first couple of weeks of problems from Advent of Code this year. I’ve posted my answers over here. I stopped after day 13 because the problems were getting harder but the time I had to devote to them could not increase. I hope to come back to them at some point. But today I wanted to point out something interesting about the day 2 puzzle. Read more

© Seamus Bradley 2021–3

Powered by Hugo & Kiss.