| Random Link ¯\_(ツ)_/¯ | ||
| Sep 11, 2026 | » | DRY - Don't Repeat Yourself
2 min; updated Sep 11, 2026
If three classes all validate email addresses in the same way, create a shared validation method. That way, if email validation rules change, you update the one method. Sometimes the simplest solution is to duplicate code in two places rather than build an abstraction. The key is whether the logic is conceptually the same, not just textually similar. |
| Sep 28, 2021 | » | Observer
8 min; updated Sep 10, 2026
Rant: some of willchan’s thoughts on WeakPtr, for those who care to read criticizes the observer pattern for murking dependency chains. Investigate more in this regard. IntentA one-to-many dependency between object so that when one object (subject) changes, all its dependents (observers) are notified and update automatically. ... |
| May 28, 2023 | » | Relational Model Versus Document Model
8 min; updated Jul 14, 2026
A relational data model uses tables that consist of rows and columns. A row can be uniquely identified by a table + ID combination. A column entry can reference another row in another table through a shared key. One goal is to avoid duplicating data. However, to answer a real-world query, we end up paying th cost by joining results from multiple tables. That said, with proper indexing and prior research, combining results is pretty fast. ... |
| Jan 2, 2026 | » | Remarks on Numeric Types
2 min; updated Jan 2, 2026
Inconveniences of Unsigned Types in .NETLanguages like C++ come with convenient support for unsigned integer types where
non-negative values make sense. In contrast, .NET tends to use signed integer types even where unsigned ones would be more intuitive, e.g., .NET is language independent. Languages like C#, F#, and Visual Basic target
.NET implementations. The Common Language Specification (CLS) is the set of
features that are common to all the languages. Of relevance is the fact that
|
| Aug 23, 2025 | » | AoC 2024 Day 07: Bridge Repair
6 min; updated Aug 23, 2025
ParsingEach line represents a single equation, e.g., Part One needs to make a decision based on each line independently. Parsing each line into a data structure and yielding that should suffice. Part OneUsing only add and multiply, evaluated left-to-right (not according to math precedence rules), determine which equations could possibly be true. For example, \(292 = ((11 + 6) \times 16) + 20\). Of the equations that could possibly be true, what is the sum of their results? ... |
| Jun 22, 2024 | » | Testing in a Monorepo
7 min; updated Jun 22, 2024
Testing Web ComponentsWhile any test framework can work, it’s better to test web components in a browser environment because that’s where they’ll be used. Node-based frameworks would require too much shimming of DOM calls that’d make the tests unrepresentative. and are good options for browser-based testing. is powered by ES-build, and so is the client-side of the app; let’s go down this path and see where it leads. CommonJS modules don’t work in the browser . Earlier on , using ESM on the server turned out difficult. Hopefully, that doesn’t me bite back now. ... |
| May 5, 2024 | » | Inheritance
2 min; updated May 5, 2024
MixinsA mix-in is an abstract subclass. This technique is especially useful in languages where a class can only have a single superclass. |
| Apr 27, 2024 | » | Markup Features
4 min; updated Apr 27, 2024
Syntax HighlightingPreviously, we’d highlight code on the client by loading
Back in
2018
,
we installed |
| Apr 19, 2024 | » | Client/Server Interface
8 min; updated Apr 19, 2024
How to handle redirects without setting |
| May 12, 2022 | » | Classes in C++
15 min; updated May 12, 2022
A class is a user-defined type provided to represent a concept in the code of a program. Essentially, all language facilities beyond the fundamental types, operators, and statements exist to help define better class or to use them more conveniently. Sometimes I have problems defining the concept that is going to be
encapsulated as a class. Other times, the naming is hard, and I result
to common patterns like |
| Mar 16, 2022 | » | AoC 2021 Day 09: Smoke Basin
13 min; updated Mar 16, 2022
massiv; Fusion; Box vs. Unboxed; Connected Components; Data.Set; Monadic map |
| Feb 23, 2022 | » | AoC 2021 Day 03: Binary Diagnostic
14 min; updated Feb 23, 2022
Day 3 - Advent of Code 2021.
Eric Wastl.
Problem DescriptionPart OneThe submarine has been making some odd creaking noises, so you ask it to produce a diagnostic report just in case. The diagnostic report (your puzzle input) consists of a list of binary numbers which, when decoded properly, can tell you many useful things about the conditions of the submarine. The first parameter to check is the power consumption. ... |
| Jan 15, 2022 | » | 020. Factorial Digit Sum
1 min; updated Jan 15, 2022
Problem Statement\(n!\) means \(n \times (n - 1) \times … \times 3 \times 2 \times 1\). For example, \(10! = 10 \times 9 \times … \times 3 \times 2 \times 1 = 3628800\), and the sum of the digits in the number \(10!\) is \(3 + 6 + 2 + 8 + 8 + 0 + 0 = 27\). Find the sum of the digits in the number \(100!\) ... |

While working on a microservices-based chat application, I wanted to the ability to serialize and de-serialize
...Messageobjects between micro-services. Different services had slightly different needs for what to serialize, e.g., text-onlyMessages,Messages with attachments, system-generatedMessages, etc.