Not to rush Christmas, but I think I'll try my hand at Advent of Code this year. It will be a good chance to play around with Rust.
Travis Fantina
Adding a `soft_delete` to Ecto Multi pipelines
I'm a big fan of Ecto, Elixir's database wrapper. The Multi library lets you build up a series of operations that happen in order, if one fails the entire operation rolls back. Multi comes with the a lot of standard CRUD built in, insert/4, update/
Went walking with my daughter and we picked some autumnal bouquets.
TIL Struct matching in Guards
Not so much a TIL but I always get confused with the proper syntax. You can pattern match on a struct and use it in a guard to only let through the structs you want:
@spec address_formater(BillAddress.t() | ShipAddress.t()) :: String.t()
def address_formatter(%struct{} = address) when
I'm 33 years old and I only learned how to spell "doesn't" this year. Getting enough practice where I almost spell it right the first time. (I think I used to default to dosen't).
TIL UUIDv4 vs UUIDv7
I've always run with UUID v4 because it's the default for the Ecto.UUID library in Elixir. However a coworker recommended UUID v7. Having never really looked into UUID other than to implement as a primary key the distinction was news to me.
Effectively;
* UUID v4
TIL INSERT INTO with SELECT constraints
In the past month I've had to write a lot of SQL to migrate a system and split existing "locations" into tenants ie. migrating data from a public schema to a tenant's schema is gets messy due to foreign key constraints. Order of operations
July 2024 Music Recap
One of the things I miss most about Spotify is Wrapped. I always feel a pang of envy at the end of the year when people are sharing their Wrapped stats, to the point where I've thought about trying to hook into Tidal's underdeveloped API and
Why Cybertruck when you could Cyberduck! I think I've been using Cyberduck for 100% of my FTP needs for at least 15 years. Such a rock solid piece of software.
SQL is the way, SQL is always the way! I killed myself for hours this morning trying to query/clean some data in Rails, started writing raw SQL and had it sorted in 30 minutes!