Weeknotes 65
25th September, 2022
“Verified debugging schedule”
-
“Kids are using AI to write essays and get straight As”. I’m not even mad. I don’t know which service/AI is being used, but I tried out Jenni and was impressed.
-
I’m not very good at SQL. I just don’t use it enough in its raw form due to ORM usage. However, I used a
HAVINGclause this week, and it’s handy so I’m documenting it here.SELECT owner_id, COUNT(owner_id) FROM events GROUP BY owner_id HAVING COUNT(owner_id) > 1Find all events with more than 1 row. I used this to diagnose a duplicate data issue.
-
This is very nice feature in iOS 16 (via @RvRoo)
Just discovered that the iOS 16 edit menu for text includes conversions.
If you select a unit amount such as 1/4 inch the popover menu will show the conversation to metric automatically. It also works with currencies.
-
Chris McCord announced that Phoenix 1.7 will include a new Verified Routes feature.
Phoenix 1.7 includes a new Phoenix.VerifiedRoutes feature which provides ~p for route generation with compile-time verification.
Use of the sigil_p macro allows paths and URLs throughout your application to be compile-time verified against your Phoenix router(s). For example the following path and URL usages:
I’ve often found using path helpers troublesome, both in Phoenix and Rails. I often forget the names, arity, and argument order. Verified Routes look very much to be the best of both worlds – build routes as strings, but compile-time checks to make sure the path exists.
-
Yet another interesting video from TJ Devries on
vim.schedule.Neovim is not multi-threaded, but has an event loop.
vim.scheduleallows you to schedule a function to be run at the next opportunity. But as TJ explains, it is deterministic – you can work out when it will be run.It seems that some Neovim APIs can’t be accessed in certain situations, and that is when you might use
vim.schedule. TJ explains it better than I. -
South West Ruby took place this week. It was a great turn out, with two great talks by Ksenija Vasjko and Stan Lo.
Sonja spoke about various Rails tips, of which one was the new
load_asyncfeature coming in Rails 7 – I’m keen to see what sort of impact that can have on loading times.Stan spoke about ruby/debug, the newest Ruby debugger. Historically I’ve been very poor at adopting and using debuggers. I have been a
putsdebugger. Early on in my Ruby career the focus on testing was so great that I only ever used them in a very basic way, but Stan’s talk has me interested in learning more.Stan has written a blog post on migrating from ByeBug and a useful cheatsheet too.
-
LiveView 0.18 was released. Some nice new features – Declarative Assigns and Slots, HEEx HTML Formatter, and Accessibility improvements.
-
Debug with Mario sounds in Visual Studio – lovely work.