February 15, 2024

Javascript crimes: Week 4 of 48 in 24

I’m now well over a week behind with these challenges, so it’s Thursday of week 5, but we’re just finishing up week 4. Part of the issue is I’m quite bust, but part of the issue is that I am trying to use this as an opportunity to learn elixir, and I’m doing the elixir learning track. This means that the exercises are locked until I do the relevant learning exercises that teach the concepts. Read more

February 2, 2024

Haskellbrain: Week 3 of 48 in 24

Well, I’m quite late with this week’s challenges. Again, I was only going for the silver medal of doing any three languages, but I didn’t have a lot of time to spare for the challenges last week, and I also spent more time than I should have tweaking my haskell solution in particular. This week’s exercise is fizzbuzz, but slightly different. JavaScript First up, here’s my javascript solution. export const convert = (num) => { let s = [[3, "Pling"], [5,"Plang"], [7,"Plong"]] . Read more

January 27, 2024

Indiana Jonesing: Week 2 of 48 in 24

This week’s challenge was to reverse a string. And I took the “Indiana Jones when that guy waves the sword around and Indy just shoots him” approach this week and got the silver medal using three languages that make this exercise a one-liner. Clojure First up, Clojure: (ns reverse-string) (defn reverse-string [s] ;; <- arglist goes here (clojure.string/reverse s) ) Haskell Next Haskell: module ReverseString (reverseString) where reverseString :: String -> String reverseString str = reverse str JavaScript And finally, Javascript. Read more

January 23, 2024

Starting off easy: Week 1 of 48 in 24

Exercism – one of my favourite “learn to code” websites – is doing a thing where each week (ish?) there is a new challenge to solve a coding exercise in several languages. It’s called “48 in 24”. It looks like you get a bronze medal if you solve the coding exercise in some language, a silver medal if you solve it in three specific languages, and a gold medal if you solve it in any three languages in 2024. Read more

September 26, 2023

How Errors Compound

I was messing around with a project recently, and I thought everything was going swimmingly. My unit tests were passing, the output to stdin looked like I’d expect. And then I made one small change, and instead of the binary number I was expecting, I saw: 1010101001001020 “Ones and zeroes everywhere. And I think I saw a two!”; “It was just a dream, Bender. There’s no such thing as a two. Read more

© Seamus Bradley 2021–3

Powered by Hugo & Kiss.