Welcome to my PinkLetter. A short, weekly, technology-agnostic, and pink newsletter where we cultivate timeless skills about web development.
Ciao!
In my university years, I was in exploration mode: whatever I sucked at was the next thing to learn on my list. That's how I signed up for a cooking course.
I can still hear the chef shouting at me: "clean up that mess!" I was annoyed, but he was right. You cannot perform well with a disorganized working area.
This week I've been restoring old wooden doors. I removed the old paint, spackled, and re-painted them white.
Unfortunately, this time I didn't have a carpenter screaming at me, so I fucked up.
Once I read that when you find yourself adding the forty-third column to the "users" table, not only you get your VIP card to the legacy club, but also you should have seen it coming a few dozens of columns ago and course-corrected then.
Well, I was painting with an unstable roller brush that I didn't take the time to fix. I didn't have gloves because who wants to fetch them from the other room. Also, my black jacket was dangerously close to the white paint I was using.
I could have stopped for a second to refactor the working environment. But I talked myself out of it.
I dropped the roller sponge to the ground, dirtied my hands trying to recover the situation, and, eventually, stained my black jacket. And if that wasn't enough, I realized I didn't have the solvent to remove the type of paint I was using.
Remember, it's never too late to start doing the right thing.
Yeah, I know. Discipline is a pain in the ass. But the alternative is worse!
A Look at Server-Sent Events by Simon Prickett
Server Sent Events are a standard allowing browser clients to receive a stream of updates from a server over a HTTP connection without resorting to polling. Unlike WebSockets, Server Sent Events are a one way communications channel - events flow from server to client only.
(Riccardo: I think I've stolen this one from Rafał.)
Postgresql: How to write a trigger by Hans-Jürgen Schönig
Just like in most databases, in PostgreSQL a trigger is a way to automatically respond to events. Maybe you want to run a function if data is inserted into a table. Maybe you want to audit the deletion of data, or simply respond to some UPDATE statement. That is exactly what a trigger is good for. This post is a general introduction to triggers in PostgreSQL. It is meant to be a simple tutorial for people who want to get started programming them.
(Riccardo: I've never used triggers, but it looks like a great tool to keep in the toolbox.)
Dynamic Static Typing In TypeScript by Stefan Baumgartner
In this article, we look at some of the more advanced features of TypeScript, like union types, conditional types, template literal types, and generics. We want to formalize the most dynamic JavaScript behavior in a way that we can catch most bugs before they happen.
(Riccardo: I still believe using TypeScript safely is more complicated than Haskell. But it's good to see this stuff is doable.)