Front End Development

Crafting Recursive Prompts with Plop

When scaffolding new projects or features, repetitive tasks like file creation and boilerplate code can waste valuable time. That’s where Plop comes in—a micro-generator framework that helps automate these monotonous processes. Today, we’re diving into the world of recursive prompts in Plop, which allows you to interactively collect data in a loop based on user input. What Are Recursive Prompts? Recursive prompts enable you to repeatedly ask the user a series of questions until a certain condition is met. This is particularly useful when the required inputs are not fixed, such as adding an unknown number of items to a list.

How to Implement Token Bucket Rate Limiting In NestJS

Rate limiting is a crucial aspect of building scalable and secure web applications. It helps prevent abuse and ensures the fair usage of resources. In this blog post, we will explore how to implement token bucket rate limiting in a NestJS application with a reset interval of 24 hours. What is Token Bucket Rate Limiting? Token bucket rate limiting is an algorithm that controls the rate at which a system processes requests. The main idea is that a fixed number of tokens are added to a bucket regularly. When a request arrives, a token is removed from the bucket. If there are no tokens left, the request is rejected.

Fetch Signals: The Dog Whistle for Your Asynchronous Fetch API Calls

If you’ve ever found yourself knee-deep in a pile of asynchronous Fetch API calls, you’ll understand the desire to have a method for controlling them — something akin to a dog whistle, but for your code. Enter the Fetch API’s Signals. And no, they’re not Morse code, semaphore flags, or even smoke signals. They’re a mechanism to control our fetch requests but with more grace and finesse than just shouting “STOP!” at your screen.

How to Interview Front-End Developers Without Coding Puzzles or Algorithms?

When hiring front-end developers, there are many ways to evaluate candidates’ skills and abilities. However, some assessment methods can be exclusionary, while others may not accurately reflect the type of work the candidate will do. In this article, we’ll explore some efficient ways to test front-end developer hires without relying on coding puzzles and algorithms and how to be mindful of inclusivity. I come from a self-taught background, a time when self-taught invited increased scrutiny because being self-taught in the early to mid-00s wasn’t as common as it is now. We have numerous online courses, boot camps and other resources. When I learned to code, these thick phonebook-like books that came with one or more CD-ROM discs with software and code examples were how many learned.

Passing Environment Variables Into Your Code With Webpack

In some use cases, it can be beneficial to pass environment variables into your code. In my case, at build time I pass an environment variable to Webpack in the form of --env production and so forth. I wanted to get this in my code so I could load different configuration files depending on the built environment. I have three environments I build for: Production Staging Development While there are code solutions you can implement such as checking the URL, I wanted something handled in the build itself.

I tried TailwindCSS for the first time

After avoiding Tailwind for such a long time, I finally decided to sit down and see what the hype was all about and use it with Aurelia 2. There are some pros and cons, some complications but it was a surprisingly positive experience.

Unpkgd Is Down (Again)

After an outage seven days ago, unpkgd.com, a widely used CDN for NPM packages, is again down. This time, the outage is more severe. At the time of writing, unpkgd.com has been down for hours. Even the official status page is down. With two outages in such a short period, I am starting to doubt whether I will continue to use unpkgd in the long term. It’s a free service, so I can’t complain really. But, it does highlight the fragility of relying on free services.

Fixing the color-adjust shorthand is currently deprecated warning in Autoprefixer

As much as I love front-end development, the ecosystem can sometimes inflict unnecessary pain. Given the front-end ecosystem relies on very few packages for a lot of modern development, when something changes and packages that rely on those don’t update: it’s a disaster. One such issue is Autoprefixer. You most likely arrived here searching Google for the error message: autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.

How I Avoid Front-end Developer Fatigue

For years now, bubbling underneath the surface there has been a proverbial sewer of Javascript frameworks and libraries flowing through the community. It got to the point where it just felt overwhelming for a lot of developers (myself included), around 2016 is when I started noticing people getting fed up. Looking back over the years, I can remember when jQuery was the new and shiny library. Then it was Backbone for a little while. I also remember when Angular was the developer darling.

Thoughts On VueJS

As many readers of this blog know, I have been quite actively involved in Aurelia for over two and a half years now, it’s actually almost three years. You could be forgiven for thinking that Aurelia is all I work with and while I do work with it a lot, I am not close minded. Before I worked with Aurelia, I was heavily into React. I will always have a soft spot for React, but its lack of opinion when it comes to things like routing and state management means you have to glue things together from numerous third parties until you have something that resembles a framework.