Implementing signals and reactivity with vanilla JavaScript
Let's demystify signals and reactivity, one of the most popular patterns in modern JavaScript, using event-driven programming!
30 seconds of code contains a curated collection of code articles covering a wide range of development needs. The collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.
Let's demystify signals and reactivity, one of the most popular patterns in modern JavaScript, using event-driven programming!
In the last installment of the series, we'll refactor our codebase to reduce bundle size and complexity, while making it more maintainable.
Having set up our environment and designed the API, it's time to implement the RegExp library we've been planning, using Vite and Vitest.
Building atop the TDD foundation from last time, let's explore how to design a user-centric API for our JavaScript library.
I recently built a project using Test-Driven Development (TDD) and it was a great experience. Here's why I think you should try it, too.
A few days ago, I stumbled upon a perplexing piece of JavaScript behavior. Let's break it down.
Building on top of everything we've tried in past articles, we'll use the Earley parsing algorithm to parse and evaluate math expressions.
Picking up where I left off last time, I'm wrapping up the Brainfuck interpreter, by making a simple VM for code execution and debugging.
Continuing on the code interpretation path, I'm attempting to build a Brainfuck interpreter, using an AST to represent and execute the code.
Yet another interpreter article, this time around we'll be building a full-fledged interpreter for the esolang Smallfuck.
Expanding upon previous articles on bracket matching and tokenization, it's time to try a basic HTML tokenization and validation algorithm.
Learn how to tokenize math expressions, using a simple JavaScript algorithm, forming the basis for more complex interpreters and compilers.
Parsing Reverse Polish Notation, also known as postfix notation, is a simple algorithm that can be implemented in JavaScript using a stack.
Delve deep into the Myers diff algorithm and learn how to calculate the difference between two strings in JavaScript, the way Git does.
A common problem when building parsers is finding matching bracket pairs in a string. Here's how you can solve it with JavaScript.
The longest common subsequence is the longest subsequence common to all given sequences and can be easily found using dynamic programming.
I recently came across a fairly interesting algorithmic problem when formatting day and hour ranges. Here's my take on the solution.
In this installment of the ActiveRecord-like JavaScript implementation, we will revisit modeling relationships between objects.
In this installment, we'll create a custom object inspect utility to help us debug our complex objects in the console.
Returning to the models and records part of the implementation, this time around we'll explore how to add constraints to individual fields.
Expanding even further upon our ActiveRecord-inspired project, we'll figure out how to create factories that produce complex objects.
In the fourth part of the series, we will look at how to serialize complex JavaScript objects.
In the third installment of implementing an ActiveRecord-like pattern in JavaScript, we'll model and optimize object scoping.
Continuing on the journey to implement an ActiveRecord-like pattern in JavaScript with object attributes and relationships.