webdev

JavaScript Execution Context!

JavaScript Execution Context!

In JavaScript, when a function is defined and later invoked, it creates an abstract container known as an execution context. This execution context holds several key components: the variables declared within the function, any nested functions, and the lexical environment. Together, these elements define the operational environment for the function's execution. Source link lol
Read More
Why we use snake_case for variables and camelCase for functions

Why we use snake_case for variables and camelCase for functions

To be less stressed, and therefor better programmers, we have to do our best to free our code from bullshit that makes it a hard to maintain, and onboard new devs-to. We use the same name for database fields, JSON property names returned from an API, the HTML form field name attributes, and finally, the Javascript variable names that contain those database-originating values. Naming your data exactly the same in all layers of the stack frees you from having to keep a mental mapping of what is what. Discipline yourself to enforce this rule, and you will be a less…
Read More
Building a RAG Chatbot with LlamaIndex and eBay API Integration

Building a RAG Chatbot with LlamaIndex and eBay API Integration

RAG (Retrieval-Augmented Generation) is all the rage. And there's a good reason why. Like so many others, I instinctively felt an air of excitement at the beginning of the internet. The Browser Wars, Java vs Mocha. And then again in 2007 when the iPhone led a paradigm shift to how, where, and when we consume media. Just as I do now, In the rapidly advancing field of AI, Retrieval-Augmented Generation (RAG) has become a crucial technique, enhancing the capabilities of large language models by integrating external knowledge sources. By leveraging RAG, you can build chatbots that generate responses informed by…
Read More
JWT at a Glance

JWT at a Glance

Many of us heard about JWT and while JWT has become a buzzword in tech circles, it's frequently misunderstood or confused with OAuth 2.0 and OIDC, particularly among those who use it without fully grasping its intricacies. Mixing up JWT with OAuth 2.0 and OIDC is like tossing different fruits into a blender and calling it all "smoothie." It's especially messy when folks treat these tech tools like magic wands, waving them around without peeking under the hood. What is JWT? By itself is a small piece of data that contains information about someone or something. It's like a small…
Read More
PgQueuer: Transform Your PostgreSQL into a Powerful Job Queue

PgQueuer: Transform Your PostgreSQL into a Powerful Job Queue

Introducing PgQueuer: Efficient Job Queuing with PostgreSQL Hello Dev.to community! I’m excited to share a project that I believe can significantly streamline how developers handle job queues when working with PostgreSQL databases. Meet PgQueuer, a Python library crafted to utilize PostgreSQL’s robust features for efficient job management. Let’s dive into what makes PgQueuer not just another queuing solution. What is PgQueuer? PgQueuer is a lean Python library designed specifically to manage job queues using PostgreSQL. By leveraging PostgreSQL's native LISTEN/NOTIFY capabilities and advanced locking mechanisms, PgQueuer facilitates real-time job processing, high concurrency, and reliable task execution. This is all achieved…
Read More
Unlocking the Power of React 19: Grasp the New ‘use’ API

Unlocking the Power of React 19: Grasp the New ‘use’ API

React, the beloved library that has revolutionized front-end development, is about to take another leap forward. With the upcoming release of React 19, developers are buzzing with excitement about the new 'use' API. But what exactly is this new feature, and how can it supercharge your React applications? Let's dive deep into this game-changing addition to the React ecosystem! What's the Buzz About 'use'? Imagine writing React components where fetching data is as simple as, well, using it. That's the promise of the new 'use' API. It's designed to make working with asynchronous resources feel like a breeze, right within…
Read More
Understanding the CSS Box Model: content-box vs border-box, inline vs. block elements

Understanding the CSS Box Model: content-box vs border-box, inline vs. block elements

As a frontend developer, understanding the CSS box model is make-or-break for being able to deliver pixel-perfect layouts. Let's dive right in and discuss how both inline and block elements behave differently in the context of the two box model types—content-box and border-box. The Basics: What’s in the Box? Before we go into the details, it's worth it to recap what the box model even is. Every single element on your page is a box (yes, even the ones that don't actually seem boxy in shape). Boxes may be within, containing, and/or alongside other boxes. The box model applies to…
Read More
Coding Bootcamp Chronicles: Week 4 Highlights and Learnings

Coding Bootcamp Chronicles: Week 4 Highlights and Learnings

Hi there,I am Mukarram.As I entered Week 4, I went more deep into HTML, CSS, and JavaScript. One of the highlights of this week was creating a memory game. It was my first real project where I got to combine HTML, CSS, and JavaScript practically. This game was to match the same colour cards and if the cards don't match colour it goes back into its original state. I learned how to manipulate the DOM and add event listeners in HTML. It was rewarding to see everything come together and work fine. This week we also had Independence Day. To…
Read More
CSS Layout Techniques – Floats, Clears, and Legacy Layouts: The Old School Cool

CSS Layout Techniques – Floats, Clears, and Legacy Layouts: The Old School Cool

✨This article is part of a larger series that is available on my own website. Click here to know more about CSS 101: The Series. It's completely free! Welcome to a blast from the past! Before Flexbox and Grid swept in like the superheroes of modern web design, there was a time when floats and clears ruled the CSS universe. If you're a web design newbie, you might be wondering, "What on earth are floats and clears, and why should I care?" Well, buckle up, because we're about to take a nostalgic trip through CSS history. Spoiler: you might find…
Read More
Google Sheets: SUMIFS para durações (horas), parte 2

Google Sheets: SUMIFS para durações (horas), parte 2

Esses dias fiz um post mostrando como criar duas fórmulas personalizadas para o Google sheets para somar horas com base em critérios (aqui). O problema delas na minha opinião é que elas não eram flexiveis. E se eu quiser N critérios? Bom, agora você pode! Agora a fórmula toma 3 conjuntos de dados: as durações, os critérios, e as instruções para filtrar. Vamos de novo a planilha de testes: Título Duração Categoria Status Curti Perdido em Marte 01:00:00 Filme Já assisti Sim Interestelar 02:49:00 Filme Já assisti Não John Wick 01:30:00 Filme Já assisti Não Vingadores: Ultimato 03:00:00 Filme Quero…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.