Account

Posts of Web Development

newest first

#1077Text

PostgreSQL things backend engineers learn too late Postgres is not just “the database” Used well, it can delay your need for Redis, Elasticsearch, and extra services. Let's checkout what actually matters: 1. EXPLAIN ANALYZE is the first debugging tool - Don’t guess why a query is slow. Look at the plan. - Seq Scan on a large table usually means a missing or unused index. 2. Indexes are not free - They speed up reads and slow down writes. - Add them for real query patterns, not for every column that “might be filtered someday.” 3. MVCC explains a lot of weirdness - Updates don’t overwrite the old row in place. - Postgres keeps versions. - That’s why you get table bloat and need VACUUM. 4. VACUUM is maintenance, not optional - Dead rows pile up. - Queries get slower. - Disk usage grows. If autovacuum is falling behind, the database will feel “mysteriously” heavy. 5. Connection pooling belongs in front of Postgres - Postgres does not enjoy 2,000 app connections. - Use a pooler. - Set max connections based on what the database can actually handle, not what the app can open. 6. Use the features you already have - Partial indexes for common filters - JSONB for flexible fields - UPSERT for retries - LISTEN/NOTIFY for simple events - Generated columns and constraints for data integrity Don’t add a new system before checking whether Postgres can do it. 7. Transactions should be short - Open transaction. - Do the write. - Commit. - Don’t hold a transaction open while calling another API. 8. The slow query log is a gift - Turn it on. - Read it weekly. - A few bad queries usually cause more pain than the rest of the schema. Postgres rewards teams that treat it like a system, not a dump for objects.

Open in Telegram
Views496+14%vs avg
Forwards—
Reactions1
Comments—
#1075Text

🚀 30 Days × 3 Web Development Projects 💻🔥 Do you want to improve your web development skills and build projects worth showcasing on your resume? Stop watching endless tutorials. Start building! 💪 Follow this 30-day roadmap to go from basic web development to building and deploying real projects. 🟢 WEEK 1: Build Your Foundation Day 1: Build a Personal Profile Card using HTML and CSS. Day 2: Build a Responsive Landing Page. Day 3: Create a Login and Signup UI. Day 4: Build a Responsive Navigation Bar. Day 5: Create a Pricing Table with multiple plans. Day 6: Build a Portfolio Homepage. Day 7: Make your projects responsive and upload them to GitHub. 🟡 WEEK 2: Master JavaScript Day 8: Build a Calculator. Day 9: Create a To-Do List with add and delete functionality. Day 10: Build a Digital Clock and Stopwatch. Day 11: Create a Quiz App with a score counter. Day 12: Build a Weather App using a weather API. Day 13: Create a Notes App using Local Storage. Day 14: Improve the UI, fix bugs, and deploy your best project. 🟠 WEEK 3: Build Real-World Applications Day 15: Build a Product Listing Page with search and filters. Day 16: Create a Shopping Cart with quantity controls. Day 17: Build an Expense Tracker. Day 18: Create a Movie Search App using a public API. Day 19: Build a GitHub Profile Finder using the GitHub API. Day 20: Create a Blog UI with categories and search. Day 21: Make your applications responsive and handle loading and error states. 🔵 WEEK 4: Backend and Full-Stack Development Day 22: Learn the basics of Node.js and Express. Day 23: Create your first REST API. Day 24: Connect an application to a database. Day 25: Build CRUD functionality: Create, Read, Update, and Delete. Day 26: Add authentication to a small application. Day 27: Build a full-stack URL Shortener. Day 28: Test your APIs and handle errors properly. Day 29: Deploy your full-stack project. Day 30: Polish your projects, update your GitHub README files, and add live demo links to your portfolio. 📌 How to Follow This Challenge ✅ Write the code yourself instead of blindly copying tutorials. ✅ Push your work to GitHub regularly. ✅ Make each project responsive. ✅ Write a README explaining the features and technologies used. ✅ Deploy projects whenever practical. 📊 Track Your Progress Day | Project | GitHub Link | Live Demo | Status 🎯 Your Goal After 30 Days • Build a collection of web development projects. • Strengthen your HTML, CSS, JavaScript, API, and backend skills. • Learn GitHub and deployment workflows. • Create projects you can confidently explain in interviews. 💡 Remember: A project is not complete just because it runs on your laptop. Make it usable, test it, document it, and deploy it. 💾 Save this roadmap and start Day 1 today!

Open in Telegram
Views4350%vs avg
Forwards—
Reactions3
Comments—
#1073Text

90% of React in 2026 comes down to mastering these 10 concepts: 1) Render model + re-renders: React reruns your component; make render pure and cheap or you’ll chase phantom bugs. 2) State vs Server state: local UI state is fine; fetched data needs caching, invalidation, and dedupe (React Query/SWR) or you’ll refetch storms. 3) Effects are for Syncing, not deriving: useEffect is for IO and subscriptions; derived values belong in render, useMemo, or selectors. 4) Keys + Identity: wrong keys cause state to jump between rows; never use array index when the list can reorder or paginate. 5) Concurrency + Transitions: useTransition/useDeferredValue to keep inputs responsive; accept stale UI briefly instead of blocking the main thread. 6) Performance Tradeoffs: measure before memoizing; prefer windowing for 10k rows, splitting bundles, and avoiding expensive context updates. 7) Tooling Pipeline: TypeScript + lint rules + bundler constraints (Vite/Next) catch 80% early; mismatch between dev/prod builds hides bugs. 8) Debugging Discipline: React DevTools + profiler, log render counts, and inspect network waterfalls; most “React bugs” are stale closures + effect timing. 9) Security at the Edges: XSS comes from rendering untrusted HTML and unsafe URL handling; add CSP, sanitize, and treat tokens as httpOnly cookies. 10) Observability in the Browser: add Web Vitals, route-level traces, and error boundaries with correlation IDs; otherwise Sentry says “something broke” with no repro path

Open in Telegram
Views387−11%vs avg
Forwards—
Reactions—
Comments—
#1070Text
Views477+9%vs avg
Forwards—
Reactions1
Comments—
#1067Photo
Views487+11%vs avg
Forwards—
Reactions1
Comments—
#1065Video
Views601+38%vs avg
Forwards—
Reactions2
Comments—
#1064Text
Views547+25%vs avg
Forwards—
Reactions1
Comments—
#1063Text
Views537+23%vs avg
Forwards—
Reactions2
Comments—
#1060Text
Views515+18%vs avg
Forwards—
Reactions5
Comments—
#1058Text

Strong opinion: You shouldn't write Server Actions that take FormData as an argument. They should take normal typed args instead. The whole point of Server Actions is that they let us use TypeScript functions to call server code from the client. The reason we want to use typed functions instead of fetch() is exactly the same as why we want to use Prisma or Drizzle to query our databases: they give us feedback directly in our editor when we write incorrect code. If we write const sql = "INSERT INTO users (namee) VALUES ('sam')" We won't know we've made a mistake until we execute the query. The SQL statement is actually a data structure, but that structure is hidden behind an opaque string. Tools like Prisma and Drizzle make that structure comprehensible by TypeScript, so that when we write prisma.users.create({ data: { namee: 'sam' }}) we know right away we've made a typo, and can fix it without needing to run the code. The same is true for Server Actions. If we write an action that takes formData: "use server" async function createUser(formData: FormData) { const name = formData.get('name') await prisma.users.create({ data: { name }}) } then call it from the client <form action={createUser}> <input type='text' name='namee' /> </form> we'll get zero feedback that our HTML has a typo, until we run the code. The HTML `name` attribute is an opaque string, and like the SQL example, it has obscured the data structure underneath. Compare that to this version, that accepts a normal name prop typed as a string: "use server" async function createUser(name: string) { await prisma.users.create({ data: { name }}) } Now in the client, if we make a mistake: const [name, setName] = useState('') <form action={() => createUser(namee)}> <input type='text' value={name} onChange={e => setName(e​.target.value)} /> </form> we'll know right away, thanks to createUser using the specific type we expect, rather than taking an opaque FormData object. Note that this is exactly how we normally write event handlers in React: <button onClick={() => setCount(count + 1)} /> You wouldn't use an opaque data structure to pull this off... <button onClick={() => exec("increment 'count' by 1"} /> ...because you don't have to. You're working in JavaScript, and you get to use all the features and data structures the language gives you to help you write your code. API calls and DB queries cross a serialization boundary, so traditionally that's where we've had to leave the safety of the language. But where tools like Prisma brought us back to the language to write our db queries, Server Functions have now done exactly the same thing for our API calls. Using FormData effectively breaks us out of the language again, taking our data structures and type safety right along with it.

Open in Telegram
Views527+21%vs avg
Forwards—
Reactions—
Comments—