Beginners

Benchmarking String Literal (“”) vs Template Literal (“) – using Performance.now()

Let’s talk about String in JavaScript. There are 2 ways developers can define a string: a. Using String Literal const str = "Hello " + "world!"; b. Using Template Literal const worldText = "world!" const str = `Hello ${worldText}`; So, have you ever wondered what the difference between the tow? Which one do you usually use? Is the one you’re using better? Let’s find out by doing ... »

How we made the new report feature of sls-mentor

TLDR In this feature insight, we explain how we generate the new reporting feature from sls-mentor, getting inspiration from jest-html-reporter. And we show you how to code your own report tool using react. Getting a fresh new report for sls-mentor ? With my team we have been building sls-mentor, a free and open source tool to audit your serverless stack on AWSand to give you tips to improve it! T... »

Soft Delete: Dealing With Unique Constraint in Real-World Case

ntroduced how to achieve soft delete in ZenStack in the previous post. The solution appears quite elegant with the help of the access policy in the schema. model Post { ... deleted Boolean @default(false) @omit @@deny(‘read’, deleted) ... } There are users who come to ZenStack specifically for the soft delete feature after reading the post: This was an “aha” moment in building ZenStack for me to b... »

LLMs for Schema Augmentation

I have recently been experimenting with the use of large language models (LLMs) to augment JSON Schemas with useful features. While ChatGPT gets most of the press, there are many other LLMs that are specifically designed to work with code. The idea is that these LLMs can be used to augment incomplete schemas with additional useful information. Consider an example schema such as the one below. This... »

Understanding TypeScript Types: Primitives, Objects, and Type Manipulations

TypeScript Types TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale. TypeScript types are categorized into primitive types and object types. The basic types in TypeScript include string, boolean, number, array, tuple, and enum. TypeScript’s type system allows you to build new types out of existing ones using a large variety o... »

The Moon in 10241 Dots — Re-creating a 1969 Masterpiece

In 1969, German artist Max Ernst created a beautiful painting in celebration of the Moon-landing: Entitled Naissance d’une Galaxie (Birth of a Galaxy), I can imagine it must’ve taken months to complete, using stencils for all the dots. Luckily, we can code it much faster! Radial Gradient First, we need a background-layer with a radial background: main { background: #06101D radial-gradi... »

A Comprehensive Guide to TypeScript: Introduction, Installation, and Running Code

What is TypeScript? TypeScript is an object-oriented programming language created and maintained by Microsoft Corporation. It is a free and open-source high-level programming language that adds static typing with optional type annotations to JavaScript. TypeScript is a strict superset of ECMAScript 2015, commonly referred to as JavaScript. Being a “Syntactic Superset,” TypeScript share... »

🚀 7 open-source projects you should contribute to in 2023 ⭐️⭐️

I love seeing so much innovation in open-source. There are a few raising libraries I thought I should share. 1. Snapify Snapify allows you to record and share recordings asynchronously Make unlimited recordings of your tab, desktop, and any application Share recordings with anyone using a public link Delete or un-list recordings after a specific timeframe Upload and share existing videos to Snapif... »

Dockerizing a Node.js App: A Comprehensive Guide for Easy Deployment🐋

Dockerizing a Node.js app is a useful technique that allows you to package your application and its dependencies into a container, making it easier to deploy and run consistently across different environments. In this blog post, we’ll walk through the steps to dockerize a Node.js app. Let’s get started! Prerequisites Before we begin, make sure you have the following installed on your m... »

Building a ChatGPT custom plugin for API Gateway

ChatGPT Plugins serve as bridges linking ChatGPT to external APIs to use these APIs’ data intelligently. These plugins let ChatGPT undertake a range of tasks, such as retrieving up-to-date information from other APIs including sports results, stock market data, or breaking news, and assisting users in performing actions like flight booking or food ordering. Meanwhile, API Gateway is a powerful too... »