SShortSingh.

Programming

0
ProgrammingDEV Community ·

How I drew a 4D tesseract in Three.js

The Tesseract is the Experiments world on this site: a glass hypercube floating Observatory. It isn't an animated 3D A square is a segment dragged in a new direction. A cube is a square dragged in W. Counting it is easy even if picturing it isn't. Every time you drag a shape, 16 vertices and 32 , with 24 square faces and 8 cubic cells.

0
ProgrammingDEV Community ·

How JavaScript Is Defined: From ECMAScript to Array.prototype.map

We use JavaScript every day through syntax such as: const numbers = [1, 2, 3]; const doubled = numbers.map(number => number * 2); We know what map() does, but there is a more interesting question underneath: Who decided that map() should behave this way? Why does it skip empty array slots? Why does its callback receive the value, index, and array? Why can Array.prototype.map even be used with objects that are not arrays? The answers are not specific to Chrome, Firefox, or Node.js.

0
ProgrammingDEV Community ·

PlacementPal: An AI Interview Partner Built for My Friend

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend I built PlacementPal, an AI-powered interview practice partner for my friend Divya, who is preparing for technical placement interviews. While preparing for placements, studying concepts and solving problems is only part of the process. Getting realistic interview practice is harder when you don't always have someone available to conduct a mock interview, ask follow-up questions, and point out gaps in your answers. I built PlacementPal to solve that problem. The user can choose an interview track: DSA JavaScript H

0
ProgrammingDEV Community ·

How I built a black hole in WebGL

Gargantua is the centre of this site: the black hole the six sections are Interstellar. In the Observatory you can see it full The first version was a five-layer trick: a disk, a halo and even an Einstein The current version does the opposite. For every pixel, a shader casts a ray The photon orbit equation, d²u/dφ² = −u + 1.5·rs·u², can be rewritten as a a = −1.5·rs·h²·r / |r|⁵, where h² = |r × v|² is computed once per ray. With that, each step is a two-line vec3 acc = -1.5 * uRs * h2 * pos / (r2 * r2 * r); vec3 nextPos = pos + dir * dt + 0.5 * acc * (dt * dt); float n2 = dot(nextPos, nextPos)

0
ProgrammingDEV Community ·

A new discovery

Hello everyone, I am starting a new series to document whatever I learn in this new path of my life. My name is Oluwademilade Ala and I’d like to consider myself a man of many interests (or young man lol) but I am not writing this to talk about my many interests. That could be for another time, I guess. This series would be about my newly found interest in Cloud engineering. I’ve been able to curate a roadmap and I’ll be following through with it.

0
ProgrammingDEV Community ·

Vector database showroom. Part 1 pgvector — The Station Wagon Already in Your Garage.

Welcome to the Vector Database Showroom — a guided tour through today's most popular vector databases, where we look past the marketing brochures and judge each one by its real cost of ownership. Up first: pgvector, the quiet contender that's probably already sitting in your garage. pgvector isn't a separate database. It's a Postgres extension: one CREATE EXTENSION later, your vectors live next to your regular data. Under the hood: the vector type, two index types (HNSW, IVFFlat), three core distance metrics (L2, cosine, inner product).

0
ProgrammingDEV Community ·

Self-hosted n8n for business: VPS cost, security, backups and GDPR

“Self-hosted n8n is free” is true only about the licence. This article is about the rest — the server, the backups, the updates, and how much time it actually takes. The n8n Community Edition carries no licence fee when self-hosted — the source code is public and deploying it on your own server costs nothing. Running it is not zero, though. Budget for a small VPS (on the order of single-digit to low tens of euros a month), time for updates and working backups.

0
ProgrammingDEV Community ·

🤖 Run AI Coding Models for FREE with OpenCode + OpenRouter

Hey guys, while everyone else keeps paying for ChatGPT's monthly subscription, we'll be getting AI to write code for us right here—for free. 😎 Today's plan is to set up OpenCode on our system and run it using OpenRouter's free models. Just have a little patience and keep your tea ready. ☕ 🧐 OpenCode: What & Why 💻 Install OpenCode 🔑 Configure OpenCode with OpenRouter 🔌 Connect it on your local system 🚀 Run the app and pray 🎬 Wrapping up OpenCode is an open-source AI coding agent that lives in your terminal. A chatbot answers your question and leaves the copy-pasting to you.

0
ProgrammingDEV Community ·

5 Speech-to-Text API Rate-Limit Checks — Node.js 429 Retry Queue Observability

A property manager needs a correctly routed maintenance ticket, not a retry loop that eventually returns some text. The least complex workable design is one durable queue, one shared admission gate, and one validator between transcription and triage. Honor Retry-After when a speech-to-text API returns 429, add bounded jitter when that signal is absent, and measure structured-output correctness separately from transport success. Short answer: treat 429 as a scheduling signal. Do not let every worker sleep and retry independently.

0
ProgrammingDEV Community ·

Build vs buy: buy the commodity, build your edge

Buy anything your competitor can also buy. Build only the thing they choose you for. That is the entire rule. Build or buy arguments run long because applying it honestly means admitting that your favourite internal project is a worse version of something you could rent this afternoon. We build custom software for a living, so weigh the next part accordingly: most of what a company runs should not be custom, and a good share of what gets built in-house is a CRM that could have been rented for the price of a fortnight of engineering time.

0
ProgrammingDEV Community ·

A Practical Method for Choosing the Right AI Work Boundary

Teams often talk about adopting AI as if the hard part were selecting a model. In practice, the harder decision is choosing the boundary around the work. A tool can draft, sort, compare, summarize, or recommend, but a useful implementation also defines what remains visible to a person. That boundary determines whether an experiment becomes a dependable workflow or a source of quiet rework. Start by describing the decision that the workflow supports.

0
ProgrammingDEV Community ·

Inspect Archive Contents Before Extracting with ZipMania

An archive can contain many files, but you may only want to check a photo or read a text file. ZipMania is a free, open-source archive manager for Windows 10 and 11 with previews for supported images and text files inside archives. Open an archive by double-clicking it or using the Windows Explorer context menu. Browse the folders and locate the files you need. Supported archive formats include ZIP, RAR, 7Z, EGG, ALZ, and ISO.

0
ProgrammingDEV Community ·

A CSV benchmark with two zero scores and a useful diagnostic

This is a submission for the Kaggle Benchmarking Challenge. Inventory reconciliation sounds straightforward: match a count to an exported product row and replace its new quantity. The difficult part is preserving everything else and recognizing when an update should be blocked. CSV Contract Integrity tests this with synthetic, offline inputs. Each model receives an export CSV, a count CSV, an explicit column mapping, and a reconciliation contract.

0
ProgrammingDEV Community ·

AI Workflow Automation: What Should Stay Deterministic and What AI Should Handle

Adding a model to a business process is easy. Turning that model call into a production workflow is the harder engineering problem. A model can classify a request, extract fields from a document, summarize a case, or suggest a response. But it does not automatically know: which user is allowed to initiate the action; which database record is authoritative; whether a missing field should block the process; who owns the next step; what should happen when two systems disagree; or whether an output is safe to accept without review. Those are application and workflow concerns.

0
ProgrammingDEV Community ·

Your Next.js build should not need your database

If a page reads from your database, render it on demand, not during the build. Prerendering it means your build container needs a route to Postgres, and on self-hosted infrastructure that route is the most host-specific thing you own. We learned this by paying for it. This site runs Next.js with Payload CMS in-process, on Postgres, in Docker, on a single VPS. Six service pages moved into the CMS.

0
ProgrammingDEV Community ·

Does `httpResource` cost you bundle size? I measured four Angular API generators

I maintain @constantant/openapi-resource-gen, InjectionToken per OpenAPI endpoint, each in its own file, so that Spec: the YouTube Data API v3 (76 endpoints). A minimal Angular 22 app that bootstraps and calls 1 endpoint, then 8 endpoints, built for production with the esbuild application builder. Contenders, each generating from the same spec with default-ish settings: this project (both its httpResource and its HttpClient flavours), Orval 8 (angular client, tags-split), ng-openapi-gen 1.1, Hey API's client-angular. Two controls, so every row can be read against what Angular itself costs: a p

← NewerPage 704 of 3156Older →