Weeknotes 179
1st December, 2024
“Tumultuous week”
-
Stop sending me emails saying that my “statement is available” when it is, in fact, not available. If you haven’t processed the document yet, don’t send the email. Looking at you Companies House and HMRC.
-
Black Friday struck again! I bought a Yum Asia Panda Mini rice cooker. It will pay for itself in literally some amount of years. And now I have an excellent excuse to buy a fucking massive bag of rice, which I’ve been wanting to do for years.
-
I took the time to actually learn what
@impl true
is for in Elixir this week. Up to now I’ve just been scattering them about until the compiler was happy 😆Basically, it makes it clear the function you are implementing is a callback from a Behaviour, which makes the code more obvious.
This ElixirCasts video explained it well.
-
I applied for a new business bank account this week and after the sign-up process, and application approval, they managed to issue me not the current and savings accounts I was expecting, but three different accounts.
Can you trust a bank who can’t correctly provision your bank account? I guess we’ll see 😬
-
Another side project idea struck me this week which made me even less interested in the current side project. I must finish something. I’m a bit stuck again, but I’ve made a plan for how to get unstuck.
-
Philips have failed to send the items I bought. Worse still, they can’t tell me when they will, but are still selling the same items on their online store.
And on top of that the incorrect items were picked up by courier at 4:30pm when I was given a 11am -> 1pm collection window, ruining my plans.
-
Dynamic order by using Phoenix Ecto – informative post on ordering queries in Elixir’s Ecto.
-
Storing times for human events – Anyone who tells you “just store as UTC” has not understood the complexities involved in times and timezones. Remember, hubris is rife in this industry. Being able to write a computer programme does not make you infallible.
-
My opinion on squash merge: don’t. This is the hill I’ll die on.
There is no need to squash.
I rewrite the history of my work-in-progress branch a lot, with the intent of getting a nice history that helps reviewers & others. As much as possible, I try to do this constantly, along with coding, because a big history cleanup after all is done is usually more difficult.
A lot of the replies to this thread are a bit disappointing.
I’ve said it before and I’ll say it again – empathy. For the reviewers, for future bug fixers. Showing the story of a change makes review so much easier. All the information you found along the way to a code change is recorded in the commit.
Why would you throw this knowledge away by squashing? Let’s be honest, because you didn’t bother to document any of it to start with.
Hauleth is more to the point, but correct:
Squash merges are dirty solution for people who cannot use rebase “merges” and cannot keep their commit history clean.
-
Tumultuous week at work. It started by saying goodbye to a couple of colleagues, and ended with me finding out I will need to say goodbye myself. The silence from some has been deafening.
My last day will actually be the end of December. I’ll be looking for work in the new year.
-
Shrinking a Postgres Table – Some interesting techniques for reducing the size of a Postgres table, but mostly a showcase for how you can use AI to talk over ideas. I’ve found this invaluable recently.
-
Removing query string parameters from a URL given a prefix – with Elixir.
-
I found a website this week which had “links” to “pages”, but no actual
<a href="">
in sight! JavaScript required to click on blog post pages? Come. On.Let’s make proper websites still, yeah?
-
The beauty of debugging in Elixir when using dbg() reminded of the
dbg
macro which I apparently wrote about in Weeknotes 56."Elixir is cool!" #=> "Elixir is cool!" |> String.trim_trailing("!") #=> "Elixir is cool" |> String.split() #=> ["Elixir", "is", "cool"] |> List.first() #=> "Elixir" "Elixir"
-
Why pipes sometimes get “stuck”: buffering – I’m pretty sure I’ve had this happen to me and just had no idea what was going on, so it’s nice to finally know what was going on.
-
The IKEA Bekant desk I use has served me well. The only thing is that it doesn’t have any support for saved desk height positions. This might sound lazy, but raising and lowering to the exact height you want can get tiresome.
Which is why I’ve bought a Megadesk!
Megadesk is an open-source, drop in controller for the IKEA Bekant standing desk
I don’t plan on keeping the Bekant forever, it is feeling a bit old now, but in the mean time I can upgrade it with the Megadesk to breath some new life into it.