import JSSnippet from "../../components/JSSnippet.svelte" When we lean about exception handling, and the try/catch/finally statements, we are told that the finally block is guaranteed to always execute. Here is an example: <JSSnippet client:load> function doSomething() { } try { doSomething(); console.log("Done!"); return 42; } catch (e) { console.error("Got error:", e); } finally {…
import JSSnippet from "../../components/JSSnippet.svelte" It has been a very long time since I last had to deal with hoisting in JavaScript. If my memory serves me correctly, it had something to do with using ES module imports in Jest . Oh man... I have never enjoyed using Jest. It always felt like I needed to fight it to get it to do what I want. Or maybe it was just "skill issue". Fast forward…
import CodeBlock from "../../components/CodeBlock.astro"; export const coverage = [0, 0, 5, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1] This week, I was having a conversation with another engineer, and they had an interesting remark. They claimed that devops should have some control over a project pipeline workflow in case we impose a code coverage threshold. Otherwise, "an engineer would be able…
<img style="margin: 0 auto; max-width: 95%;" src="https://media.tenor.com/2kAO6lk_cbIAAAAd/pointing-leonardo-di-caprio.gif" alt="Leonardo Dicaprio Reaction GIF" /> It is very possible that you had such a reaction while reading my previous post , especially at the part where I mentioned that moving the delay to the bottom of the loop was a mistake. The move at the bottom was an attempt to address…
A few weeks ago, my colleagues at SprintEins shared an article describing a solution for rate limiting fetch requests in the Deno to avoid reaching an API rate limit. I used to write similar code in the past, so this really caught my attention. Original implementation The original implementation described in the first part of the artile series proposes an initial "not production ready" solution:…
I remember the early days of social media interaction when I would got to an internet cafe just to have a chat on mIRC with someone from my community. If I was lucky, I would even get to have a blind date. Those years seem like ages ago and a lot has changed, gone are the days of mIRC, HI5, MySpace, and Yahoo Messenger. I've never been a big fan of Twitter so my social media activity revolved…