-
Event Sourcing and Change Data Capture
Friday, December 6, 2024These two strategies aim to solve the same problem, but in opposite ways.
They may sound alien or complicated if you haven't used them yet —they sure felt that way to me a few years ago— but there is no mystery to them, really.
Also, of these two, there is a clear winner and one we generally want to avoid. Can you guess which is which?
-
The Temporal API is Moving Forward!
Saturday, February 10, 2024The Temporal API has made great progress since I wrote my article on it, The Temporal API Is Awesome.
The major milestones have been:
- The TC39 proposal has made a huge leap forward.
- Deno added first-party support for it in its 1.40 release.
What does this mean and why is this important?
-
-
Temporal API is Awesome
Wednesday, August 23, 2023Dates in JS suck. Well, they suck in all languages, really. It's surprisingly hard to get right.
The native
Date
is super limited. Sure, you cannew Date('2015-10-21T01:22:00.000Z')
anddate.toISOString()
, maybedateA < dateB
, but that's pretty much it. Need to add minutes, hours, or whatever to a date, check how many days there are until X date, etc? Good luck with that1.So a bunch of libraries were developed to solve this issue. MomentJS was the best way back when. In 20202 the project added a project status page, declaring MomentJS a legacy, deprecated project, and suggesting alternatives. Luxon was one of them, which actually was —and is— excellent.
But wouldn't it be nice to just have a standard solution, provided out-of-the-box by browsers, NodeJS, Deno, Bun and whatever new JS runtime gets released next week?
Enter...
-
tl;dr: The Crazy Scale of Amazon S3
Monday, August 7, 2023There's a pretty cool article about the scale of S3: Building and operating a pretty big storage system called S3.
It's pretty long: ~6.5k words, ~36k chars. Here's the tl;dr version of it.
-
Closures And Objects Are Equivalent
Friday, July 28, 2023Here's a little story about objects and closures I really like:
The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures."
Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and looked forward to informing his master of his progress.
On his next walk with Qc Na, Anton attempted to impress his master by saying "Master, I have diligently studied the matter, and now understand that objects are truly a poor man's closures." Qc Na responded by hitting Anton with his stick, saying "When will you learn? Closures are a poor man's object." At that moment, Anton became enlightened.
— Anton van Straaten
-
What is Software Architecture?
Thursday, July 13, 2023This term is vague enough that most of us have some intuitive understanding of it but there's no consensus about what it actually means.
The following is my own definition, based on my experience and biases, but I find it useful for communication — particularly with managers3.
Software architecture (or lack thereof) is what determines the cost, in both time and money4, of adding a new feature to an application.
-
Premature Optimization is the Root of All Evil
Friday, May 5, 2023This famous quote, usually attributed to Tony Hoare, was popularized by Donald Knuth's book Structured Programming with go to Statements, published in 1974. That was 49 years ago.
In dog years, that's about 200 human years. In software-industry years, it's more like a millennium. Computers have changed drastically since then.
Does this rule still apply?
-
It's Not a Framework
Thursday, January 26, 2023ReactJS isn't a library. ExpressJS isn't a framework.
-
Encrypting Images with Electronic CodeBook
Thursday, October 27, 2022I recently started a series on Encryption with JavaScript. In my latest entry I mentioned I'd follow up with Modes of Operations.
Before we dive into that last piece of the series, I wanted to have a little fun and showcase encryption of images with the most primitive (and insecure) mode of operation, Electronic CodeBook (ECB for short).
-
Encryption with JavaScript — Part 2
Friday, September 30, 2022Welcome back to my series on encryption with javascript. In Encryption with JavaScript — Part 1 we went over some of the different libraries that exist in the JavaScript space and chose NodeJS's Crypto Module for our examples.
Today we'll see what a cipher algorithm is, what different options we have and information on cipher keys (also known as encryption secret).
-
Encryption with JavaScript — Part 1
Sunday, September 25, 2022A while back, while working at Po.et, I undertook a migration that required implementing encryption into the main API.
Back then I didn't really know much about encryption, so I started by doing some research, and then building a PoC. Eventually I implemented a working
encrypt
function, which I could use as follows: -
Interview by Bitcoin Magazine
Saturday, December 14, 2019I was recently interviewed by Bitcoin Magazine about how we Argentines are using Bitcoin and other cryptocurrencies as a store of value.
You can read the whole piece here: Economic Uncertainty, Restrictions in Argentina Show Power of Bitcoin.
-
Make the Change Easy, Then Make the Easy Change
Tuesday, October 1, 2019I first heard this phrase from Eric Elliot in one of our 1:1s at Po.et. It's was coined by Kent Beck, creator of Extreme Programming and one of the seventeen software developers that signed the Agile Manifesto.
It's a very simple rule of thumb that will take you very far in software engineering.
-
Naming Things
Friday, September 6, 2019Naming things is a crucial aspect of software design in general. As such, it's very hard to immediately see its value and very tempting to avoid spending any time or mental energy at all on it.
There are only two hard things in Computer Science: cache invalidation and naming things.5
Only people who have had to work on old code bases written hastily by other developers that are no longer around, or in some cases even their own personal projects stalled not so long ago, have felt the pain associated with reading source code and wondering what the hell it does and if it's even doing what it should.
The return of the time and effort invested in naming things as clearly as possible is most easily perceived in the long run. But it's usually when it's missing that it's noticeable the most.
-
Hello World!
Friday, July 12, 2019Hello world! This is me, starting a blog once again.
I'll be sharing opinions and experience on JavaScript, software architecture, Bitcoin, crypto, and other random stuff.
Stay tuned. Or not. I'm fine either way.