For the longest time, the separation of concerns has been the ultimate guiding principle of software engineering. This eventually gave rise to the ubiquitous MVC architecture. But, in this article, we'll explore a better way to structure a codebase using a vertically sliced architecture.
It is common wisdom in the programming world to discourage the use of global variables. I've recently come across a bug that humbled and reminded me about these pitfalls. Let me tell you a cautionary tale about global configuration objects.
I've dealt with a wide spectrum of programming languages over the years. One common theme that I've observed is that object-oriented programming patterns tend to yield the most verbose and indirect abstractions. In this article, we explore how pure object-oriented code necessarily leads to more verbose code and more opaque indirections.
For the longest time, I've always thought that JavaScript generators perform better than chained array methods in terms of execution time. But are generators actually faster than chained array methods? It's finally time to put that to the test—with statistical rigor of course!
The comma operator is one of the lesser-known operators in C-like languages such as JavaScript and C++. Essentially, it delimits a sequence of expressions and only returns the result of the final one. So why would this ever be useful? In this article, I present a compelling case—perhaps the only one frankly speaking—for the comma operator.
So one of my articles from my naive 2018 self finally bit me in the back side. Six years and one computer science degree later, I have vastly changed my perspective on bitmasks. In this article, we will discuss why bitmasks are not so esoteric and impractical after all.
A recent trend has shaken up the JavaScript-TypeScript community: the anti-build-step movement. In this article, however, I will not argue whether TypeScript is still relevant today. Instead, I reflect on my own journey of stepping away from TypeScript—but for a completely different reason: consumer semantics!
Cybernetically enhanced web apps: Svelte is Stack Overflow's most admired JavaScript UI framework in 2023. In this article, we review the merits of the Svelte framework and its wider ecosystem.
Have you ever spent more than a few seconds staring at the same line of code? How often did you find conditionals that were tricky to parse? In this article, we discuss how confusing conditionals manifest in our code. Along the way, we also explore different refactoring techniques for improving the readability of conditional control flows.
In this article, I reflect on my experiences with trunk-based development as the project lead for DocTrack, my undergraduate project that rewrites the University of the Philippines' document tracking system as a progressive web app.
More often than not, we find that promises and events have fundamental incompatibilities that make them difficult to interleave. Ultimately, can promises and events coexist? In this article, we explore this question and propose a neat solution.
In this article, we implement a safe implementation of a direct-address table using unsafe code in Rust. In doing so, we explore the mindset and thought processes involved when upholding safety.
After an entire semester of C assignments, I share how Rust patterns and idioms helped me power through it all.
If there's anything about Rust that Rustaceans have a particular aversion to, it would most certainly be cloning and heap allocations. In this article, we will explore how taking advantage of immutability allows us to optimize memory usage.
At the moment, there is no standardized way to write asynchronous constructors in JavaScript. However, this does not mean there aren't any workarounds! In this article, we will discuss the various ways to emulate `async` in `constructor`. Most of them are not-so-ideal, but in the end, I will demonstrate the proper way.
As strange as it may seem, generic `impl` blocks actually have macro-like capabilities. When coupled with the trait system, Rust offers a powerful mental framework for composition-based polymorphism. In this article, we will explore how treating generic `impl` blocks like macros can be an insightful shift in perspective when dealing with generics and trait bounds.
The Rust programming language has steadily been on the rise in terms of adoption and popularity. But is all the hype justified? In this article, I reflect on my experience with Rust in the past year, tackling the golden moments as well as the pain points.
The modern Web boasts leaps and bounds of progress in recent years. The Web has truly become a capable, reliable, scalable, and viable platform for modern applications. However, with all of these fancy features comes the cost of complexity. Build systems rendering the Web as a compilation target have become a common trend among production-grade applications. For new aspiring developers (such as ourselves back then), is this really the best path forward?
In the previous article, I discussed the best practices for ES6 promises. Picking up from where we left off, I extend the discussion to ES2017 asynchronous functions, which happen to just be "syntactic sugar" over promises.
ES6 promises are great! Yet... they are still quite painful to deal with. In this article, I share the best practices I have learned over the years that helped me make the most out of asynchronous JavaScript.
Learning JavaScript is a wild, tempestuous journey. With so much to learn, it is difficult to keep up with the times. Here are 18 videos I consider to be "essential" in learning JavaScript at a deeper level. Each of these videos once sparked a "eureka moment" within me that ultimately helped in piecing together the JavaScript puzzle.
Setting aside harsh connotations for now, "constructive stupidity" plays a major role in one's motivation to learn. In this article, I illustrate how a shift in mindset (on "stupidity") can foster a healthy, constructive attitude towards learning.
Cryptography is the fundamental lifeblood of computer security. Unfortunately, with all the hardcore theory and mathematics, it has become one of the least approachable topics in computer science. In this article, as part of our exploration into the essence of cryptography, we will look into the difference between ciphers and hashes.
Idle code is the antithesis of efficiency. In this article, we will look into various ways to reduce a program's idle time during asynchronous operations. From concepts such as concurrency and proper I/O scheduling, this is the beginning of a series that explores the world of asynchronous JavaScript.
In a world that heavily depends on the Internet, we often don't think about the marvelous engineering that makes the modern lifestyle possible. In the first installment of "The Internet in a Nutshell" series, we will explore how the Internet works from a high-level point of view. Throughout this series, we will explore the incredible technologies, infrastructures, and concepts of the Internet that we may have taken for granted in today's time.
As we accustom ourselves with the magical world of promises and asynchronous functions, JavaScript has truly become more than _just_ a "single-threaded language". But nevertheless, there is a great responsibility that comes with these modern features. In this article, I shed light on an often overlooked code smell of asynchronous operations: nested promises.
More often than not, we confuse and interchange the many falsy values in the JavaScript language: `false`, `0`, `null`, and `undefined` among others. In this article, I explain the semantics behind these values so that we can be better informed about their proper usage. By knowing when to use the appropriate falsy value, we can write more readable, maintainable, and semantically correct code.
Changelogs, release notes, and patch notes all have a common objective: to inform readers of recent changes. However, it is unfortunate to know that some still consider the humble changelog as an "optional" stage in the development cycle. In this article, by citing various software changelogs as examples, I discuss how good, clear, and informative changelogs (1) improve overall user experience and (2) establish brand identity and "hype".
A programming _language_ is called a _language_ for a reason. In this article, I share with you the grammar-based naming convention I follow for all of my projects. It is indeed a common naming convention, but I hope this article serves as a useful reference for those just beginning their programming journey.
With the ubiquity of high-level, dynamically-typed languages, we have lost control over the memory allocations of our numbers. In this article, I take the time to give thanks to the unsung heroes of memory optimization: unsigned integer types.