Weeknotes 96
30th April, 2023
“Compilation problems”
-
“Why ChatGPT Won’t Replace Coders Just Yet”
The “bullshit” problem turns up in code, too
-
For a while now I’ve experienced compilation issues when installing new Erlang versions with asdf. Which is annoying because I often want to quickly try out some of the new improvements to the Elixir ecosystem and ending up in a
./configure
debugging session is no fun.After digging in a bit it seems that the Erlang
configure
step thinks that this machine isx86_64
, which it isn’t. I’m fairly sure this is down to me using Rosetta 2 (x86
emulation) when I set everything up. Back when I got this machine there were various teething issues, also compilation related, with getting my Ruby projects up and running, so I setup iTerm is be run under Rosetta and everything started working.However, I think now is the time to start anew and remove any emulation. A lot of Ruby issues have been ironed out, and it might just fix my Erlang problems too. Watch this space.
-
Did you know you can find out whether a file starts with a BOM by using
xxd
and seeing what the first three bytes are?xxd -l 3 -p path/to/file
If they are
efbbbf
then you have found a BOM.Why, yes. I have been reading The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!). Again.
-
I listened to The Witch Trials of J.K. Rowling audio documentary. The fact that I hesitated to even include that fact here should give you an idea of just how contentious the issue is.
-
Some feedback on a recent PR of mine prompted a small investigation into how the default ordering of records works with ActiveRecord. So a reminder.
A standard
order(name: :asc)
is going to order like this.Annabel Barry Christoph annabel
Using SQL with
LOWER
likeorder("LOWER(name) ASC")
is going to get you something more sensible in most cases.Annabel annabel Barry Christoph
If you change the column datatype to
citext
you get something different again.annabel Annabel Barry Christoph
Which is correct depends on you 😉
I know a previous colleague, and current friend, suggested in the past that all email columns, in particular, should be
citext
to save the constant calls toString#downcase
orLOWER(field)
before comparison. I think there’s something in that. -
Smartphones With Popular Qualcomm Chip Secretly Share Private Information With US Chip-Maker
This is possible because the Qualcomm chipset itself sends the data, circumventing any potential Android operating system setting and protection mechanisms.
🔥 This is fine 🔥