今日已更新 38 条资讯 | 累计 21257 条内容
关于我们

标签:#webdev

找到 1584 篇相关文章

AI 资讯

Streaming an LLM response, in 4 GIFs

We have watched tokens stream in from an LLM before where they appeared one at a time, like the model was typing. If you used the Anthropic SDK's .stream() method, it just worked and you probably never saw what was on the wire. This post will majorly focus on how a stream response works and how bugs are handled by SDK behind the hood. 1. Why Streaming exists To enable the streaming option we would need to make one change in the post request that is a single field "stream": true and it will change the response experience. Here are the pointers we take from the gif. The left side shows no streaming as the cursor blinks for 4 seconds then the whole response lands at once. The right side shows the streaming where the first word shows up in about 300 milliseconds. Words flow in as the model generates them. Both the sides have same model, same prompt, same total time it is just the right side started giving response almost 4 seconds earlier. The 4 seconds wait time for a full reply feels broken. A streamed reply that finishes in four seconds feels fast. Streaming doesn't make the model faster it makes the wait disappear. 2. What's on the wire When you set stream: true , the API stops sending a single JSON blob. It opens a persistent HTTP connection and pushes events down the line as the model generates them. The format is Server-Sent Events (SSE) a web standard. Any SSE debugger will read this stream. Here's what comes through: A few things to notice: The text lives in delta.text , nested inside content_block_delta events. Those are the events we should look after. stop_reason moved. In post 1 , we saw it right there in the response JSON. Here, it arrives at the very end inside a message_delta event, just before message_stop . If the loop bails out as soon as the text stops arriving we will never see it. Chunks don't line up with tokens or words. You might get "Hello" in one chunk and " world" in the next, or both in one. The network decides where the cuts happens and it

2026-05-31 原文 →
AI 资讯

how to handle patch requests

so here is a problem i am trying to solve: context: restful or restlike api design partial update of entity through patch request. for this example let’s say client model. the problem is that different fields can be updated but result in different business logics to be triggered. for example change to client.name is a simple update but client.status can result in an email to go to users about the client being offboarded. or changes to client.ownerId require extra validation and verification of the assigned user. or changes to client.logo_url and client.website must happen together. what is the most ideal way to code it where one path can trigger different logics depending on body schema? I want an approach that is simple to work on many routes to develop business logic. AND, simple enough for others to read and debug as needed. please assume I am using a flexible framework that top engineers will implement whatever I ask them, so I am not limited to a given framework or a solution that exists. It can be an approach that does not exist but you hope it did. submitted by /u/farzad_meow [link] [留言]

2026-05-31 原文 →
AI 资讯

Best practice for prospective new customer?

Hey folks, I create Wordpress websites almost entirely in code and CSS for speed. Up to now, I’ve only ever built websites from scratch for customers. However I’ve recently had an enquiry from a local company asking me to rebuild their extremely slow(like snail mail slow) and outdated website - I don’t really delve into the Google side of things as the websites I build tend to rank pretty well organically, however the customer is concerned about building a new website as they already show up pretty high up on Google search pages - I’ve been reading some mixed opinions and got some less than helpful advice from the website I prefer to use for hosting. Some think, as the domain name is staying the same, it shouldn’t make a difference, however, others are saying otherwise. As I’ve never actually done a migration to a new site I’ve built before, what’s the best way to go about this? submitted by /u/PhantomNate [link] [留言]

2026-05-31 原文 →
开发者

Are guest books on personal websites making a comeback?

I've noticed more and more people, usually developers and tech nerds, adding a guestbook to their personal websites. First, if building a personal website is becoming more common, that would be amazing. I love that "small web" vibe. Second, the guestbook idea is awesome. I really hope it's a thing. submitted by /u/kixxauth [link] [留言]

2026-05-31 原文 →
AI 资讯

My portfolio, themed around imposter syndrome

Had a lot of fun building this one. The kitty is Sphinx; he's a feral that likes to hang out on our porch 😃 Stack is boring next.js, typescript and tailwinds. Been running the core stack for a good while now. I just build locally and upload though, because fuck Vercel 🤣 submitted by /u/classicwfl [link] [留言]

2026-05-31 原文 →
AI 资讯

I built an API that extracts brand/company data from any URL.

Built a small API that turns any URL into structured brand data (logos, colors, fonts, screenshots, company info, etc). Originally made it for onboarding + AI workflows, but wondering if it’s actually useful beyond my own use cases or just “cool but unnecessary”. Curious what you think: Would you use this in anything real? If yes, where? submitted by /u/Quiet-Ad2219 [link] [留言]

2026-05-31 原文 →
开发者

If any of you order cheap glasses from Zenni, it's really fun to look at the network tab of your myOrders page to see how not to do website design / architecture.

If you've ordered glasses from them, you can go to: https://www.zennioptical.com/myAccount/myOrders My page just spins. I was curious where my glasses order was after a couple weeks of not receiving them. The network tab shows 30+ css files being downloaded for a very simple website, 10+ trackers and advertising js scripts, and the page still won't load. How about this: SELECT * FROM orders WHERE customer_id = :id ORDER BY order_date Then you can render my most recent orders on the server and at least render some HTML with relevant data. Ok, at scale that might now work. I understand that. Zenni isn't Amazon or Google, but they probably get many requests. In that case we could set up 1+ load balancers that simply forward the request to a sharded server based on userid to balance the load. It's absolutely crazy that we could handle thousands of requests per second in the early 2000s with a few servers in a colo facility and these days everyone has to pretend their facebook or myspace that needs to analyze complex graph connections between people. I just want to see what the status of my order is. It's not that hard. submitted by /u/DrAwesomeClaws [link] [留言]

2026-05-31 原文 →
AI 资讯

I built a detention-pay calculator for truckers in a day — unglamourous niches beat another AI wrapper

Every "what should I build" thread on here is full of AI wrappers fighting over the same five SaaS founders. Meanwhile there's a guy sitting at a loading dock right now, doing arithmetic in his head, who is about to undercharge his broker by a few hundred bucks because nobody built him a 30-second tool. I built that tool. It's a free detention-pay calculator for truck drivers. This is the build log — the niche-selection, the single-file stack, and two decisions (an SVG gauge and a no-mail-service auth scheme) that were more interesting than the app deserves. I'm not a trucker. I build small free web tools for industries other may find unglamourous or not enticing enough. That honesty matters later. The problem (worth $2–6k/yr to one user) Truckers get a "free time" window at a dock — usually 2 hours. Past that, the broker owes detention pay (~$50–100/hr). Drivers leave an estimated $2,000–6,000/year of it unclaimed, mostly because the math + the paperwork is annoying enough to skip. So the spec wrote itself: In/out times + free hours + rate → dollars owed. Export a dispute-ready PDF they can email the broker. Work on a phone, no login, instant. Validating before writing a line The mistake I almost made: assume the niche is empty because I'd never heard of it. I checked. It is not empty — DockClaim ($49/mo, GPS tracking), Detention Buddy, a couple of $9.99/mo App Store apps, even a free email-gated web calculator or two. That killed my first instinct ("be the only one") but clarified the real wedge: everything is a paid app download or email-gated. The opening was a genuinely free, no-signup, instant web version that also generates the claim PDF. Not "the only detention tool" — the one with the least friction. I'll say more on why I'm careful about that claim at the end. Lesson: validate to find your angle , not just a go/no-go. "Crowded but all friction-heavy" is a fine market. The stack: one HTML file No framework. The whole app is a single self-contained .html — m

2026-05-31 原文 →
AI 资讯

2 years later, anyone using PandaCSS? Like it?

I have been using PandaCSS + Ark UI to build out my components on my app. I kind of like it, I mean really its an alternative to Tailwind basically using CSS in JS, but with full types so you don't need an extension to get auto-complete. Where it gets clunky for me though is the build tooling having to build the styled-system directory with everything...but I mean I guess Tailwind has its own building configuration. I'm just curious cause I've kind of liked it, but really see it used much. Most I can find on info is like videos and stuff when it first came out. submitted by /u/k032 [link] [留言]

2026-05-31 原文 →
AI 资讯

[Showoff Saturday] Prose reader, a reading system engine

Hey everyone, I’m the author of prose, an MIT-licensed SDK/engine for building reading apps: https://prose-reader.com/ It’s a TypeScript, web-based reader engine that can be used to build anything from a simple image/archive-based comic or manga reader to a more complex EPUB reader with navigation, search, annotations, gestures, zoom, pagination, and custom reading behavior. It supports EPUB and archive-style formats like ZIP/CBZ/CBR, and can run in the browser or inside mobile apps through WebView/React Native. One of the main ideas behind Prose is its enhancer system , which works like a plugin system. Enhancers let you add or modify reader capabilities without changing the core engine, so apps can build their own UX and features on top. The project has been around for about 6 years, but I haven’t promoted it much. It’s also used in Oboku , an open-source reading app I’ve been building: https://oboku.me/ AI disclaimer: I have about 15 years of experience as a developer, and I use AI as a tool to help me iterate faster and improve quality, not as “vibe coding” or a replacement for my own judgment. It has helped me deal with many small problems and move the project forward faster. I’m looking for developers who might be interested in trying it, giving ideas, or providing feedback to help improve it. GitHub: https://github.com/mbret/prose-reader Docs: https://doc.prose-reader.com/ Demo: https://demo.prose-reader.com/ Discord: https://discord.com/invite/dffDEgwNc5 Would love to hear what you think. submitted by /u/yabai90 [link] [留言]

2026-05-31 原文 →
AI 资讯

I built a web app where you generate 3D objects made up of separate, logically connected parts (instead of monolithic blobs generated by standard AI generators)

Link: https://nova3d.xyz It's free but you'll need to bring your own API Key (BYOK). For open source enthusiasts, check out the github repo at: https://github.com/RareSense/Nova3D This project is a big deal if you see limitations of current AI 3D generators (like Meshy or Tripo). They produce solid, monolithic 3D objects that look good but are practically useless, because: - Want to change the arm of a robot you generated? Regenerate the entire asset. - Want to edit something manually? The whole thing collapses because it's not actually structured. - Want to rig or animate it for a game? Can't easily do that, because it’s a dead, monolithic blob instead of a functional, modular asset. This is a flutter front-end with a python, fastAPI and headless blender back-end. Would love to get community feedback! submitted by /u/mhb-11 [link] [留言]

2026-05-31 原文 →
AI 资讯

I've been QA-testing indie and AI-built sites this week — the same handful of things are broken on almost all of them

The same issues keep showing up — the kind that look fine but quietly cost signups or search ranking. Sharing in case it helps your own site: Forms with placeholder text instead of real labels. "Email"/"Password" shown inside the box looks labeled, but it isn't — the text vanishes when you type, and screen readers + browser autofill don't read it. Quiet signup killer. Heading levels that skip. Jumping from an H1 straight to an H3 with no H2. Invisible to the eye (it's in the markup), but it confuses screen readers and how Google reads your page. A main CTA that doesn't actually go anywhere. More common than you'd think — the button looks fine but the click loops or dead-ends. Worth literally clicking your own "Get started" and following it through. Missing title / meta description. Google then writes its own (usually worse) snippet for you, costing click-throughs. No social preview tags (Open Graph). Share your link on X or Reddit and it shows a blank, ugly preview instead of a title + image. Founders share links constantly, so this one stings. Most take 5 minutes to fix once you know they're there. Full disclosure: I built a tool that checks for this ([Sweep]( http://www.usesweep.app) ) — happy to run yours and send the report if you drop a URL below. But honestly, just checking these five by hand is worth an afternoon. submitted by /u/Hairy_Wash_9086 [link] [留言]

2026-05-31 原文 →
AI 资讯

You Have a Free AI Model Sitting in Chrome Right Now

Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is free and source-available on Github. Star git-lrc to help devs discover the project. Do give it a try and share your feedback for improving the project. You might not have noticed, but Chrome quietly started shipping a local AI model called Gemini Nano bundled right into the browser. No API keys. No cloud round-trips. No per-token cost. It just runs on your machine. The interface to talk to it is called the Prompt API , and it landed in Chrome 138. I spent some time going through the full API surface and built a playground that lets you experiment with every feature session management, streaming, structured output, multimodal input, response prefixing, and more in one page. This post walks you through all of it. Why does this matter? On-device AI flips the usual tradeoffs: Free at runtime — the model runs on the user's hardware, not your servers Private by default — no data leaves the device once the model is downloaded Works offline — after the initial download, no network required Low latency — no round-trip to a data centre The catch is that Gemini Nano is a small model. It's great for classification, summarization, Q&A on focused content, and structured extraction. It won't replace GPT-4 for complex reasoning. Think of it as a smart, free, always-available layer you can add on top of your existing product. Enabling the API The Prompt API isn't on by default in all Chrome builds. Enable two flags: Step 1 — Go to chrome://flags/#optimization-guide-on-device-model and set it to Enabled BypassPerfRequirement . Step 2 — Go to chrome://flags/#prompt-api-for-gemini-nano and enable both the base API and the multimodal option. Relaunch Chrome. Then visit chrome://on-device-internals to check the model download status. First use will trigger a download — Gemini Nano is a few gigabytes. The Playground I put together a single-file HTML playground that covers the entire API

2026-05-31 原文 →
AI 资讯

6 Advanced JavaScript Questions That Separate Seniors from Mid-Levels

1. Stale closure & primitive capture What is the output of the following code? function createIncrement () { let count = 0 ; const message = `Count is ${ count } ` ; function increment () { count ++ ; } function log () { console . log ( message ); } return { increment , log }; } const { increment , log } = createIncrement (); increment (); increment (); log (); Test your understanding of closures, lexical scope, and primitive value capture. ✅ Output Count is 0 🧠 Explanation This is a classic stale closure trap — but not in the way most developers expect. Step-by-step execution: createIncrement() is invoked → new lexical environment created: count = 0 (mutable binding) message = "Count is 0" (primitive string, interpolated immediately at assignment) Inner functions increment and log are defined. Both close over the same lexical environment. increment() is called twice: count mutates: 0 → 1 → 2 ✓ This works as expected. log() is called: It references the variable message message still holds the original string value "Count is 0" The template literal was evaluated once, at the moment of assignment — not re-evaluated when log() runs. 🔑 Core Concept > Closures capture variables , not expressions . > But if a variable holds a primitive value (string, number, boolean), that value is fixed at assignment time. message is not a live reference to count . It is a snapshot . 🛠 How to fix it (if dynamic output is desired) Re-evaluate the template literal inside log() : function log () { console . log ( `Count is ${ count } ` ); } 🎯 What this question tests Concept Why it matters Template literal evaluation timing They run at assignment, not at access Primitive vs reference types Primitives are copied by value; objects/arrays are referenced Closure capture semantics Closures close over bindings, but the value of a primitive is immutable once assigned Mental model of "live" variables Not all variables in a closure are "live views" — only the bindings themselves are 2. JavaScript co

2026-05-31 原文 →
AI 资讯

How to build your professional network as a developer — authentic strategies

How to build your professional network as a developer — authentic strategies Building a Genuine Professional Network in Tech: A Practical Guide for Introverts and Extroverts Networking in tech isn’t about collecting business cards or forcing yourself to “work the room.” It’s about building real relationships with people you can learn from, collaborate with, and support over the long term. Whether you’re an introvert who prefers deep one-on-one conversations or an extrovert who thrives in crowds, you can build an authentic network that opens doors to mentorship,Jobs, collaborations, and career growth. Redefine Networking: It’s About Relationships, Not Transactions Forget the image of awkward name tags and empty promises to “grab coffee sometime.” Real networking is: Swapping war stories about debugging nightmares Sharing a job posting with someone who’d be a great fit DMing a speaker to say their talk inspired you Helping someone solve a problem without expecting anything back Quality over quantity isn’t just a buzzword-it’s your career strategy. You need 5-10 real connections, not hundreds of superficial contacts. Leverage Twitter (X), LinkedIn, and Dev Communities Effectively Twitter/X for Developer Networking Dev Twitter is alive and vibrant. Use it to: Share what you’re learning (builds credibility) Comment thoughtfully on others’ posts (starts conversations) DM speakers after webinars to say you enjoyed their talk Join tech conversations using relevant hashtags (#100DaysOfCode, #BuildInPublic) LinkedIn Profile Optimization Write a clear headline that explains what you do and what you’re curious about Share project updates, lessons learned, or thoughtful commentary on industry trends Join niche developer groups related to your tech stack Send personalized connection requests mentioning something specific you admired about their work Developer Communities (Discord, GitHub, Open Source) Join Discord servers for your favorite languages/frameworks Contribute to open

2026-05-31 原文 →
AI 资讯

I made a game where you draw country borders from memory

Hi r/webdev ! I've been building my geography games site for a while now, and I just added a new game I wanted to share with you called Draw the Country . The idea is simple: you get a country name and a blank canvas, you sketch the border, and then the real outline slides over your drawing so you can see how close you got. You can play freehand, or draw with border anchors guiding you if you want it easier or you just want to learn. There's also a daily freehand challenge same country for everyone, every day. It's completely free. No ads, no sign-up. It's built with Nuxt, Vue, Tailwind, and Supabase. Check it out: https://www.geographygames.net/draw-country Any feedback is appreciated and I hope you enjoy it! PS: The video is recorded on my laptop so drawing with the trackpad is a bit tricky. submitted by /u/ExtremeMotor3772 [link] [留言]

2026-05-31 原文 →
AI 资讯

A tool for developers

Hello. I have launched https://devtools.aarushnaik.co.uk , a tool for developers to minimise the amount of tabs devs have open. It has a lot of frequently used tools like Regex Checker, JSON Formatters and lots more. It is completely free with no hidden costs (if you would like to support me, there is a Buy Me A Coffee button on the website). If you have any suggestions, please use the google form on the website to report bugs, give feature suggestions and more! Thanks, Aarush. submitted by /u/Extreme_Insurance334 [link] [留言]

2026-05-31 原文 →
AI 资讯

[Showoff Saturday]I rebuilt AOL Instant Messenger in the browser with real-time messaging

I built WebAIM — a fully browser-based recreation of AOL Instant Messenger, the chat app that defined the internet for a whole generation. Sign in with a screen name, build your buddy list, blast someone with a "lol brb," set a cryptic away message quoting your favorite band, pick a buddy icon, join a chat room, and actually talk to real people in real time — all with the authentic Windows 98 look, classic door-knock sounds, and every bit of the nostalgia. What's under the hood: - Real-time messaging powered by Firebase - Buddy lists, groups & online presence - Away messages with auto-reply (and the classic %n, %d, %t variables) - Buddy icons & editable profiles - Group chat rooms - The actual AIM sounds - Full Windows 98 desktop UI — taskbar, desktop icons, start menu, the works submitted by /u/RancidMilkMan [link] [留言]

2026-05-31 原文 →
AI 资讯

I made a tiny website about stuff my dog loves

Hey guys For my dog Viggo's 6th birthday, I got the idea to make a website as a celebration of him. It started with a couple of short animations, and then I just kept going because it was so much fun. The site is intentionally simple. No accounts, AI, or endless scrolling. Just a bunch of tiny looping moments. Tech-wise it's built with React, Next.js, SQLite, CSS Modules, and pixel art created in Aseprite. I'd love to hear what you think! submitted by /u/Individual_Health1 [link] [留言]

2026-05-31 原文 →
AI 资讯

PostPilot 1.5.6 - Sequence Flow, Command Palette, Collection Search & More

Sequence Flow Hi r/webdev , I've been shipping a series of updates to PostPilot over the last few releases (1.5.1 → 1.5.6). Main additions: Sequence Flow Build multi-request workflows from any collection Reorder execution steps Execute the entire flow with one run Useful for auth flows, setup requests, API testing, and repeated debugging workflows Command Palette Quick access to actions and navigation from anywhere in the workspace Collection Search Search kits, folders, and collections from the sidebar Supports method + name matching (e.g. get user ) Variable Extraction Extract values directly from JSON responses into workspace variables Automatically generates the JSONPath Desktop Improvements Auto Update support Close-app confirmation dialog Smarter table column width estimation Improved Sequence Flow collection loading Better responsive behavior in smaller windows Recent additions from earlier releases: MongoDB write operations JSON comparison mode SSL support for self-signed certificates Collection organization improvements PostPilot is a local-first API client, database client, and JSON inspector. Project: https://www.postpilot.dev Changelog: https://www.postpilot.dev/changelog Feedback is welcome, especially around Sequence Flow workflows and API testing use cases. submitted by /u/lactranandev [link] [留言]

2026-05-31 原文 →