Questions
Why should I store timestamps in UTC instead of local time?
My application serves users in several timezones, and timestamps become confusing around daylight saving changes. Should everything be stored in UTC, including future appointments?
1 answer3d agoby IT-QAtimezonesdatabasepythonbasicsJavaScript: how do I debounce a function (e.g. on input/scroll)?
My search fires an API call on every keystroke. I want to wait until the user stops typing. How do I debounce?
1 answer3d agoby IT-QAjavascriptperformanceeventsWhat is dependency injection?
Dependency injection sounds fancy. What is it really and why does it help testing?
1 answer4d agoby IT-QAglossarydesign-patternsarchitecturetestingWhy does UTF-8 text turn into garbled characters, and how do I fix it?
Text looks correct in one application but becomes mojibake such as `café` in another. How do I find the encoding mismatch without damaging the original data?
1 answer4d agoby IT-QAencodingunicodestringsdebuggingWhy do my Tailwind classes work locally but disappear in the production build?
Some Tailwind classes render fine in dev but are missing after a production build — the styles just aren't there. Classes I build dynamically seem most affected. What's happening?
1 answer4d agoby IT-QAtailwindcssfrontendbuildSQL: how do I write an upsert (insert or update if exists)?
I want to insert a row, but if a row with the same key already exists, update it instead. One statement?
1 answer4d agoby IT-QAsqlpostgresdatabaseWhat is a design pattern, and are they still relevant?
What is a 'design pattern' and do the classic Gang of Four patterns still matter?
1 answer5d agoby IT-QAglossarydesign-patternsarchitectureHow can git reflog recover a commit after a reset or rebase?
I reset or rebased my branch and a commit no longer appears in `git log`. Can I recover it without undoing my current work?
1 answer5d agoby IT-QAgitversion-controldebuggingHow do I fix 'JavaScript heap out of memory' in a Node build?
My build (webpack/next build/jest) crashes with 'FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory'. The machine has plenty of RAM. How do I fix it?
1 answer5d agoby IT-QAnodejsmemorybuildwebpackHow do I generate an SSH key and add it to GitHub?
I want to push over SSH instead of typing my password. How do I set up the key correctly?
1 answer5d agoby IT-QAsshgitgithubWhat is a linter and how is it different from a formatter?
What's the difference between a linter like ESLint and a formatter like Prettier? Do I need both?
1 answer6d agoby IT-QAglossarytoolingcode-qualityHow do I use git bisect to find the commit that introduced a bug?
A feature used to work, but it is broken on my current branch and hundreds of commits have landed. How can I find the first bad commit without checking every revision?
1 answer6d agoby IT-QAgitdebuggingversion-controlWhat does 'detached HEAD' mean in Git and how do I get out of it safely?
I ran `git checkout <some-commit-hash>` to look at old code and now Git says I'm in 'detached HEAD state'. I made a couple of commits here. How do I keep them and get back to a normal branch?
1 answer6d agoby IT-QAgitversion-controlPython: how do I format a number with commas / as currency / percentage?
I want '1,234,567', '$1,234.50', and '12.3%' from raw numbers. What's the clean f-string syntax?
1 answer6d agoby IT-QApythonstringsformattingWhat is the difference between == and === beyond JavaScript — value vs reference equality?
Across languages, what's the difference between value equality and reference (identity) equality?
1 answer7d agoby IT-QAglossarybasicsprogrammingWhat should I do immediately after committing an API key to Git?
I accidentally committed a working API key and may have pushed it to a shared repository. What should I do first, and is deleting the file enough?
1 answer7d agoby IT-QAgitsecurityversion-controlPython requests: how do I retry a failing HTTP request with backoff?
My script hits a flaky API that occasionally returns 503 or times out. I want it to retry a few times with increasing delay instead of failing on the first hiccup. What's the clean way with the reque…
1 answer7d agoby IT-QApythonhttprequestsresilienceReact: why does my input lose focus / reset on every keystroke?
A controlled text input in my component loses focus after each character, or the cursor jumps. What causes this?
1 answer7d agoby IT-QAreactformsperformanceWhat is an ORM and should I use one?
What is an ORM, and what are the downsides people warn about?
1 answer8d agoby IT-QAglossaryormdatabasesqlHow do CSRF tokens and SameSite cookies prevent forged requests?
My API authenticates users with a session cookie. Why do I need CSRF protection, and is setting `SameSite` enough?
1 answer8d agoby IT-QAsecuritycsrfauthwebHow do I center a div both horizontally and vertically in CSS?
The eternal question. I want a box perfectly centered inside its parent, both axes. What's the cleanest modern way in 2026?
1 answer8d agoby IT-QAcsswebfrontendHow do I compress and extract .tar.gz archives from the command line?
I always forget the tar flags. What are the commands to create and extract a .tar.gz?
1 answer8d agoby IT-QAlinuxbasharchivesWhat is Redis and what is it used for?
What is Redis and when would I add it to my stack?
1 answer9d agoby IT-QAglossaryredisdatabasecachingperformanceHow do I prevent XSS when displaying user-generated content?
My application displays comments and profile fields submitted by users. Is removing script tags enough to prevent cross-site scripting?
1 answer9d agoby IT-QAsecuritywebjavascriptxssWhy is my environment variable undefined in my Node.js app?
I set `API_KEY` in a .env file but `process.env.API_KEY` is undefined at runtime. I'm using a recent Node version. What's the missing piece?
1 answer9d agoby IT-QAnodejsenvironmentconfigurationCSS: how do I make a full-height layout that fills the viewport?
I set `height: 100%` on my container but it collapses. I want a footer pinned to the bottom of the screen.
1 answer9d agoby IT-QAcsslayoutWhat is a compiler versus an interpreter?
What's the real difference between compiled and interpreted languages, and where do JIT and bytecode fit?
1 answer10d agoby IT-QAglossarylanguagesbasicsHow do parameterized queries prevent SQL injection?
I build SQL queries using strings from a search form. Why is that unsafe, and what does using parameters change?
1 answer10d agoby IT-QAsqlsecuritydatabasepythonHow do I remove a file from git history that I accidentally committed?
I committed a file with secrets (an .env) and pushed it. Deleting it in a new commit isn't enough — it's still in history. How do I purge it completely?
1 answer10d agoby IT-QAgitsecurityversion-controlWhy does my Node.js app work locally but crash on the server with a different port?
Locally I hardcode port 3000 and it's fine, but on my host (Heroku/Render/etc.) it fails to bind. Why?
1 answer10d agoby IT-QAnodedeploymentenvWhat is serverless computing?
What does 'serverless' actually mean — there's obviously still a server somewhere?
1 answer11d agoby IT-QAglossaryserverlessclouddevopsWhy does my browser send an OPTIONS request before my API request?
My frontend sends a POST request, but the network panel shows an OPTIONS request first. What triggers this CORS preflight, and how should my server respond?
1 answer11d agoby IT-QAcorshttpwebapiMy cron job works when I run it manually but not from crontab — why?
My script runs fine when I execute it by hand, but cron never seems to run it (or it fails silently). The crontab entry looks correct. What's different about the cron environment?
1 answer11d agoby IT-QAcronlinuxbashGit: how do I see what changed in a specific commit?
I have a commit hash and want to see exactly what it changed — the diff and the files.
1 answer11d agoby IT-QAgitversion-controlWhat is a rate limit and why do APIs enforce one?
I got a 429 error from an API. What is rate limiting and how do I work with it properly?
1 answer12d agoby IT-QAglossaryapihttpsecurityWhen should I use cookies, localStorage, or sessionStorage?
I need to store login state and browser preferences. How do cookies, `localStorage`, and `sessionStorage` differ, especially for security?
1 answer12d agoby IT-QAwebjavascriptsecurityauthHow do I properly handle errors in async/await without wrapping everything in try/catch?
Every async function ends up buried in try/catch and it's ugly. Is there a cleaner pattern for handling errors from awaited calls?
1 answer12d agoby IT-QAjavascriptasyncerror-handlingPython: how do I catch a specific exception but re-raise others?
I want to handle only a FileNotFoundError and let any other exception propagate normally. Is a bare `except` okay?
1 answer12d agoby IT-QApythonexceptionsWhat is technical debt and how should teams manage it?
My lead keeps mentioning 'technical debt'. Is it just bad code, and how do we deal with it?
1 answer13d agoby IT-QAglossaryengineeringprocessWhy does my test pass sometimes and fail other times?
One of my tests passes locally but intermittently fails in CI without code changes. How do I identify the source of the flakiness instead of adding retries?
1 answer13d agoby IT-QAtestingdebuggingci-cdTypeScript: what's the difference between 'interface' and 'type'?
I see both `interface Foo {}` and `type Foo = {}` in codebases. They seem interchangeable. When should I use each?
1 answer13d agoby IT-QAtypescriptjavascriptHow do I schedule a one-time task to run later on macOS/Linux?
Not a recurring cron job — I just want a command to run once, at a specific future time.
1 answer13d agoby IT-QAlinuxmacoscronopsWhat is a load balancer and what does it do?
What is a load balancer and why do I need one to scale?
1 answer14d agoby IT-QAglossarynetworkingopsscalabilityHow do I mock an external API call in Jest or pytest?
My unit tests call a real external API and fail when the network is unavailable. How do I replace that call while still checking my application's behavior?
1 answer14d agoby IT-QAtestingjestpytestapiHow do I fix 'port already in use' (EADDRINUSE) when starting my server?
Starting my dev server fails with `Error: listen EADDRINUSE: address already in use :::3000`. A previous run probably didn't shut down. How do I find and kill whatever is holding the port?
1 answer14d agoby IT-QAnodejsnetworkinglinuxTypeScript: how do I narrow a union type safely?
I have `type Shape = Circle | Square` and TS complains when I access `.radius`. How do I tell it which one I have?
1 answer14d agoby IT-QAtypescripttypesWhat is the difference between HTTP and HTTPS?
Beyond 'HTTPS is secure', what's actually different, and what does the padlock mean?
1 answer15d agoby IT-QAglossaryhttpsecuritywebnetworkingWhat does package-lock.json do, and should I commit it to Git?
Running `npm install` creates or changes `package-lock.json`. Should I commit this generated file, and how is it different from `package.json`?
1 answer15d agoby IT-QAnpmgitpackagingWhy does 'git push' say 'rejected — non-fast-forward'?
My `git push` is rejected with '! [rejected] main -> main (non-fast-forward)' and a hint about fetching first. I haven't done anything unusual. What happened and how do I fix it safely?
1 answer15d agoby IT-QAgitversion-controlLinux: how do I find which directory is using all my disk space?
My disk is nearly full. How do I quickly find the biggest directories?
1 answer15d agoby IT-QAlinuxdiskops