Coding Posts
Avoid Runtime Errors with Optionals
Coding Aug 19, 2019
Learn how to use Optionals properly with flatMap avoiding null pointer exceptions.
- Java
How future languages will prevent Log4Shell
Coding Dec 22, 2021
Learn how modern programming languages like Unison and Koka avoid vulnerabilities like Log4Shell in Java by preventing third-party code from executing side-effects.
- Java
Implementing a light/dark mode toggle with pure JS/CSS
Coding Jan 4, 2022
Learn how to implement a minimal light/dark mode toggle in Eleventy with pure JavaScript and CSS.
- Eleventy
- JavaScript
Identifying bad code with function usage patterns
Coding Jan 13, 2022
Learn how to look at the call patterns of functions to identify code smells and refactor bad Java, TypeScript and JavaScript code.
- JavaScript
Building a 1000 line Java program in 6 lines of Haskell
Coding Jan 15, 2022
Let's disassemble an overly expressive six-line algorithmical Haskell program. I walk you through all the tricks, weirdness and beauty.
- Haskell
Resolve a list of promises synchronously
Coding Apr 15, 2022
Learn how to execute and resolve a list of JavaScript promises synchronously instead of in parallel with Promise.all.
- Node.js
- TypeScript
- JavaScript
Custom-themed Mermaid diagrams in Eleventy
Coding Jun 3, 2022
Learn how to use Mermaid diagrams embedded in your Markdown files in Eleventy. Globally define a custom theme that is used in each diagram.
- Eleventy
- JavaScript
Showing Plausible view counts in an Eleventy blog
Coding Jun 8, 2022
Learn how to integrate the retrieval of page view stats from the Plausible Analytics API into your Eleventy build process to show them in your blog or website.
- Eleventy
- Plausible
Rendering a file structure with Prism in Eleventy
Coding Jun 15, 2022
Learn how to display a file system structure nicely on your Eleventy website with Prism.
- Eleventy
- JavaScript
Injecting an HTML snippet into every 11ty post
Coding Jul 21, 2022
Learn how to inject a rendered Nunjucks template into every post of your Eleventy blog.
- Eleventy
- JavaScript
Best of Lodash
Coding Jun 2, 2023
A collection of Lodash functions that are still useful in modern JavaScript.
- Lodash
- TypeScript
Declaring over updating RxJS observables
Coding Jun 2, 2023
Declare how your RxJS observable is computed from other observables. Don't update other observables when your observable changes.
- RxJS
- TypeScript
- Angular