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

今日精选

HOT

最新资讯

共 21034 篇
第 98/1052 页
AI 资讯 Dev.to

I Tested Direct Provider APIs vs Aggregators — Here's the Truth

I Tested Direct Provider APIs vs Aggregators — Here's the Truth Six months ago I was staring at a $48,000 invoice from an AI provider that shall not be named. We had committed to a six-month contract because the sales rep promised "priority routing" and "negotiated rates." What we got instead was a rate hike, an outage during our biggest product launch, and a support team that took 72 hours to respond. That was the moment I decided to stop signing contracts with AI providers entirely. This is the playbook I wish someone had handed me on day one — the architecture decisions, the math, and the code that lets a small team punch way above its weight class without betting the company on a single vendor. The Trap Most Startups Fall Into When I started my last company, I did what every founder does. I read the docs, got an API key, shipped a feature. The model worked, the demo went well, the investors nodded. Then we hit production traffic and the bills started arriving like clockwork. Here's what nobody tells you about going direct to a model provider as a startup: The pricing page you see on the website is the retail price. The actual cost of running production workloads includes rate limits you didn't anticipate, caching you forgot to implement, context windows that blow up your token count, and prompt engineering iterations that look cheap per call but compound fast. I watched one team burn $20K in a single weekend because they were streaming completions without setting a max_tokens guardrail. Direct providers also lock you into their ecosystem. Their SDK, their tools, their prompt format, their authentication scheme. The moment you want to A/B test a different model — which you will, probably next quarter — you're rewriting integration code instead of shipping features. And then there's the geopolitical mess. Some of the best models in 2026 come from providers that don't accept US credit cards. I've personally lost an afternoon trying to sign up for an account that re

purecast 2026-07-13 08:39 6 原文
AI 资讯 Dev.to

Tifo Forge: Turning Football Passion Into a Stadium Tifo

This is a submission for Weekend Challenge: Passion Edition . During the World Cup , millions of people can watch the same match. But every stadium tries to say something different before kickoff. Sometimes it is belief. Sometimes defiance. Sometimes memory. Sometimes unity. I follow football closely, and some of the moments I remember most are not goals. They are the few seconds before kickoff when the camera pulls wide and an entire stand reveals one message at once. That was the idea behind Tifo Forge . It is an interactive experience that turns a team, a supporter emotion, and a symbol into an animated stadium tifo. Not another match tracker. Not another football chatbot. Tifo Forge turns supporter emotion into a stadium moment. What I Built Tifo Forge asks the user to make three choices: A national team A supporter emotion A visual symbol The emotions are simple on purpose: Believe Defy Unite Remember The symbols include ideas such as lightning, a phoenix, wings, a heart, and dawn. Once those choices are made, Gemini creates a structured design plan. The browser then turns that plan into an animated stadium display. I deliberately avoided uploads, accounts, and long setup screens. I wanted someone to open the page and reach the reveal in under a minute. Three choices are enough to raise the stand. The final result can be replayed, reset, or saved as an SVG poster. Demo Try Tifo Forge: https://tifo-forge.vercel.app/ I kept thinking about those few seconds before kickoff when everyone in the stadium knows something is about to happen, but nobody has seen the full picture yet. That became the interaction: Choose the team ↓ Choose the feeling ↓ Choose the symbol ↓ Raise the tifo When the user clicks Raise the Tifo , the stadium darkens. Rows of cards flip into place. The pattern spreads across the curved stand. The central symbol appears, and the chant locks into position. The user is not asking for a random poster. They are deciding what the stand believes, how it

Michael Neang 2026-07-13 08:35 3 原文
AI 资讯 Dev.to

5 Emotion Triggers of Viral Titles: Engineer CTR With AI

You spent the afternoon writing that piece. Every claim sourced, every argument tight. You hit publish and watched the numbers. Twenty-four hours later: 41 views. Meanwhile, someone else posted a single sentence — "I quit coffee for 90 days and found something uncomfortable" — and collected 120,000 impressions before lunch. The difference was not effort. It was not even quality. It was a single decision made in the first three words of the title: which emotional circuit to activate. Viral content is not liked into existence. It is clicked into existence. And clicks are not rational — they are reflexive. Understanding the five neural mechanisms that drive that reflex, and knowing how to engineer them deliberately with AI, is the most asymmetric skill advantage available to content creators right now. TL;DR: Every high-CTR title activates one of five hardwired emotional responses. This guide decodes the neuroscience behind each, shows you before/after title rewrites, and demonstrates how a single AI prompt can generate all five variants from any content idea — so you stop guessing which trigger to use and start testing them systematically. Why "Good Writing" and "High CTR" Are Different Problems Before getting into the triggers, it is worth being precise about why these are separate problems — because conflating them is the source of most content creators' frustration. Content quality governs retention : how long someone stays, whether they finish, whether they return. CTR governs distribution : whether the platform's algorithm decides to show your content to more people at all. From a quantitative perspective, these are two entirely separate conditional probabilities that multiply together to determine your content's actual reach: P(Reach) = P(Click)P(Retention|Click) Most creators obsess over P(Retention|Click) — the quality of the experience after the click. But platform distribution algorithms gate on P(Click) first. A piece of content with a retention rate of 0.9

Yao Xiao 2026-07-13 08:31 4 原文
AI 资讯 Dev.to

Building a Bridge Desktop App for Windows

This is a submission for Weekend Challenge: Passion Edition What I Built Hi! My name is Dave and my background is webmaster/front-end web developer. I have long been curious about creating desktop apps, and I figured this was the perfect opportunity to build one. I also am a novice player of contract bridge, also known as just "bridge", so I figured I would make a bridge app since I am passionate about it. In bridge, many people like to do a double dummy simulation where all 52 cards are visible between the four positions (North, South, East, and West). This allows them to see how many tricks are possible with a given contract and deal. This allows them to improve their declarer (offensive) play as well as their defensive play and improves analytical decision-making. It also allows them to perform an effective post-mortem analysis (i.e., what went wrong). Since this is a weekend challenge, I didn't get the chance to add some more functionality like I wanted. In addition to improving the UI, I'd also like to actually be able to play through different hands and add a scoring mechanism that you see on bridge score calculators online. I think combining that with a way to play full hands would be where I would want to go from here. Demo Code DaveH1981 / double-dummy-bridge-calculator An app for contract bridge players that uses the double dummy method to find the best card play sequence. double-dummy-bridge-calculator An app for contract bridge players that uses the double dummy method to find the best card play sequence. Front end, C++ wrappers, and engine callers are mine. This app connects to the DDS bridge solver written by Bo Haglund, Soren Hein, and Martin Nygren. They reserve all rights as per the Apache 2.0 license. View on GitHub How I Built It My background is mostly front end, so that was pretty straightforward for me. The most difficult part was figuring out how to link to the DDS double dummy bridge engine. I went with Electron and GYP as a wrapper, linking

David Hunsdon 2026-07-13 08:20 7 原文
AI 资讯 Dev.to

Your AI agent's smallest diffs are its most dangerous

Last month, an AI coding agent handed me a beautiful fix. Five lines. Elegant. It reused an existing helper, matched the codebase style, compiled on the first try. Exactly the kind of diff we've all learned to praise since "make the agent write less code" became the standard advice. It was also completely untested, and it sat on a password-recovery path. That diff taught me something I now consider the central problem of AI-assisted coding in 2026: we've spent a year teaching agents to write less code, and almost no time teaching them to prove the code they kept actually holds. The two failure modes Every AI coding agent fails in one of two directions. Failure mode #1: the over-build. You ask for a date comparison; you get a new dependency, a ValidationService class, and a config layer. This one is well known — it's why minimal-code prompts and skills became popular, and they genuinely work on it. Failure mode #2: the confidently small diff. Minimal, clean, written after reading half the flow, verified never — dropped onto a path that handles money, auth, or user data. It compiles. It demos. It detonates in week three. Here's the uncomfortable part: fixing #1 aggressively makes #2 more likely. When the objective function is "shortest diff," the first things to quietly disappear are edge-case handling, failure-path tests, and the guard clause that looked optional. The diff gets smaller. The blast radius doesn't. A five-line change to a payment path is more dangerous than a four-hundred-line internal script that runs once. Code size is not risk. Blast radius is risk. Yet almost every skill and prompt in this category optimizes for size alone. What a guard does differently This is why I built Guardsman 💂 — an open-source skill that behaves less like a minimalist and more like the royal guard in front of the palace: nothing passes the post unchallenged, and the level of challenge depends on what's behind the gate. Three duties, on every task: 1. Read the standing orders

Hedi Manai 2026-07-13 08:18 4 原文
开发者 Dev.to

We rewrote a Go service in Rust and our velocity tanked for a quarter.

For a full quarter, our feature velocity significantly dropped after we re-implemented a Go service using Rust. The performance improvements actually happened. Why we did it in the first place We are a small startup. Each engineer is important, and each week is even more important. Our backend was built using Go, which was performing well. It was fast, reliable, and we could easily find resources to hire. However, we became infected with that fever. The phrase "Rewrite it in Rust" was being used in all kinds of situations, and it sounded very appealing with its promises of memory safety, no garbage collector pauses, and blazing speed. We told ourselves it was an investment in the future. What we actually bought was a quarter of silence. The numbers nobody warns you about I may not have the exact metrics we use internally, but I can direct you to an individual who shared accurate calculations transparently. In a retrospective from November 2025, engineering manager Noah Byteforge wrote that a Node.js-to-Rust backend rewrite "dropped API response times from 340ms to 28ms. That's 12.1x faster." And the other metric. A 65% decrease in sprint velocity. They didn't deliver a single story point for three weeks. The time it took to send out new features increased by 185%. The time it took for pull requests to be processed increased by 320%. Additionally, scores from the "I feel productive" survey dropped from 8.2 to 4.1. Most importantly, the kicker is what he says in his own words: "We'd won the technical battle and lost the war that actually mattered." He also admits that if he had been forthright about the 6-12 month per engineer ramp, "the business case would've fallen apart immediately." That retrospective was so relatable, it read like our own diary. The battles with the borrow checker and the compile times just snuck entire weeks away from us. The wins were real. That's the trap. I must give credit to Rust because the safety benefits are not exaggerated. The rewrite

Aditya Agarwal 2026-07-13 08:15 4 原文
AI 资讯 Dev.to

SQL: Data Constraints

Introdução Validar dados é uma responsabilidade que pode ficar na aplicação, no banco de dados, ou em ambos. Deixar tudo na aplicação é arriscado: diferentes sistemas podem acessar o mesmo banco, migrações podem rodar diretamente, um bug pode deixar passar um valor inválido. Constraints são regras definidas no próprio banco de dados — uma camada de proteção que age independente de quem está escrevendo os dados. PRIMARY KEY A chave primária identifica cada linha de forma única. Ela combina duas restrições implicitamente: NOT NULL e UNIQUE . Nenhuma linha pode ter o mesmo valor de chave primária, e nenhuma pode tê-la nula. CREATE TABLE clientes ( id INT PRIMARY KEY , nome VARCHAR ( 100 ) NOT NULL ); Quando a chave primária envolve mais de uma coluna, ela é declarada separadamente: CREATE TABLE matriculas ( aluno_id INT , curso_id INT , PRIMARY KEY ( aluno_id , curso_id ) ); Na maioria dos bancos, é comum usar uma chave primária auto-incremental para não precisar gerenciar os IDs manualmente: -- PostgreSQL id SERIAL PRIMARY KEY -- MySQL id INT AUTO_INCREMENTPRIMARY KEY -- SQL padrão (suportado por ambos) id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY FOREIGN KEY A chave estrangeira garante integridade referencial : um valor só pode existir numa coluna se ele existir como chave primária na tabela referenciada. É o que torna os relacionamentos entre tabelas confiáveis. CREATE TABLE pedidos ( id INT PRIMARY KEY , cliente_idINT REFERENCES clientes ( id ) ); Tentar inserir um pedido com cliente_id = 99 quando não existe cliente com esse id resulta em erro imediato. O banco rejeita a operação antes mesmo de ela chegar ao disco. O comportamento quando o registro referenciado é deletado pode ser configurado: CREATE TABLE pedidos ( id INT PRIMARY KEY , cliente_id INT REFERENCES clientes ( id ) ON DELETE CASCADE -- deleta os pedidos junto com o cliente ON UPDATE CASCADE -- atualiza o cliente_id se o id do cliente mudar ); As opções disponíveis são: Opção Comportamento RESTRICT

Yuri Peixinho 2026-07-13 08:13 5 原文
AI 资讯 Dev.to

the Weekend Challenge: Passion Edition-(Passion-Roast)

This is a submission for Weekend Challenge: Passion Edition What I Built Passion Roast is an AI "Passion Judge" that looks at a photo of your fan setup, collection, or hobby corner — plus the name of whatever you're obsessed with — and roasts you for it, scores your devotion out of 100, and hands you a mock diploma for your dedication. The goal was simple: capture the universal feeling of being a little too into something you love, and let an AI genuinely react to real, specific details in your photo instead of giving generic responses. Demo 🔗 Live app: https://passion-roast-production.up.railway.app 🎥 Demo video / GIF: <link here> Try it with a photo of anything you're passionate about — a jersey collection, a gaming setup, houseplants, vinyl records, whatever. Each roast is generated fresh from what's actually in the picture. Code https://github.com/NOVA-X-Code/passion-roast How I Built It Backend: Node.js + Express, with Multer handling in-memory image uploads (no files ever touch disk). Google AI (Gemini API): the entire app is built around a single multimodal call — the uploaded photo (as inlineData ) and the declared passion are sent together to Gemini with a system prompt defining "The Passion Judge" persona. Gemini is instructed to return strict JSON (passion score, mock diploma title, roast, verdict), which the backend parses and validates before sending it to the frontend. Frontend: vanilla HTML/CSS/JS with drag-and-drop upload and a shareable-style result card — no frameworks, no build step. I deliberately kept the stack to a single external API. Rather than chaining multiple services, I focused on getting real value out of Gemini's multimodal reasoning: the roast has to reference actual details Gemini sees in the image, not just repeat the passion name back with generic flattery/insults. Prize Categories Best Use of Google AI weekendchallenge

NOSTRA 2026-07-13 08:11 3 原文
AI 资讯 Dev.to

Your SaaS Mascot Should Do More Than Just Sit There

Interactive Rive mascots can react, think, talk, and connect to real AI, SaaS, web, and mobile products. Your SaaS Mascot Should Do More Than Just Sit There 👀 A lot of products have mascots. They look great on landing pages. Maybe they wave. Maybe they blink. Maybe there is a small looping animation. And that's it. But I think a product mascot can do much more. What if your mascot actually knew what was happening inside your product? That's the idea I've been exploring with Mascot Engine . I don't just want to animate characters. I want to build interactive mascot systems that connect to real products . From a mascot animation to a product system Imagine you're building an AI app. A user opens the app. The mascot is idle . The user sends a message. The mascot starts thinking . The AI begins responding. The mascot switches to talking . The task completes. The mascot celebrates . Something goes wrong? The mascot reacts to the error . The flow could look like this: User Action ↓ Product State ↓ Runtime Input ↓ Rive State Machine ↓ Mascot Reaction This isn't a video. It isn't a GIF. It isn't a pre-rendered animation playing randomly. The product controls the mascot at runtime. That's where things become interesting. A mascot can understand product states Well... not literally understand them 😄 The application still owns the logic. But we can expose a small runtime contract from the Rive file. For example: emotion = 2 isTalking = true lookX = 40 lookY = -10 celebrate = trigger error = false The developer controls these values from the application. The Rive State Machine handles the character behavior. The application controls what happened . The mascot system controls how the character reacts . I really like this separation. Why I use Rive for interactive mascots Traditional animation tools are great for videos and motion design. But product animation has different requirements. The character needs to react to application events. The animation may need runtime values. De

Mascot Engine 2026-07-13 08:11 5 原文
AI 资讯 Dev.to

SQL: Aggregate Queries

Introdução Consultas individuais respondem perguntas como "qual o email do cliente 42?". Mas as perguntas mais valiosas em qualquer sistema são de outro tipo: "qual o produto mais vendido?", "qual a receita média por pedido?", "quantos clientes se cadastraram esse mês?". Para responder isso, o SQL oferece as funções de agregação — operações que recebem um conjunto de linhas e devolvem um único valor resumido. Para os exemplos a seguir, considere esta tabela: pedidos: | id | cliente | produto | categoria | quantidade | valor | |----|------------|-------------|--------------|------------|--------| | 1 | Ana Lima | Notebook | Eletrônicos | 1 | 3500.00| | 2 | Ana Lima | Mouse | Periféricos | 2 | 80.00| | 3 | Bruno Melo | Teclado | Periféricos | 1 | 150.00| | 4 | Bruno Melo | Notebook | Eletrônicos | 1 | 3500.00| | 5 | Carla Nunes| Monitor | Eletrônicos | 2 | 1200.00| | 6 | Carla Nunes| Mouse | Periféricos | 1 | 80.00| As Funções de Agregação COUNT Conta o número de linhas — ou de valores não nulos em uma coluna específica. -- Total de pedidos SELECT COUNT ( * ) AS total_pedidosFROM pedidos ; -- Resultado: 6 -- Clientes distintos que fizeram pedidos SELECT COUNT ( DISTINCT cliente ) AS clientes_unicosFROM pedidos ; -- Resultado: 3 COUNT(*) conta todas as linhas, incluindo as que têm nulos. COUNT(coluna) conta apenas as linhas onde aquela coluna não é nula. COUNT(DISTINCT coluna) conta valores únicos — útil para saber quantos clientes, produtos ou categorias distintos aparecem no resultado. SUM Soma os valores de uma coluna numérica. -- Receita total SELECT SUM ( valor ) AS receita_total FROM pedidos ; -- Resultado: 8510.00 -- Total de itens vendidos SELECT SUM ( quantidade ) AS itens_vendidos FROM pedidos ; -- Resultado: 8 AVG Calcula a média aritmética dos valores. -- Valor médio por pedido SELECT AVG ( valor ) AS ticket_medio FROM pedidos ; -- Resultado: 1418.33 AVG ignora valores nulos automaticamente — calcula a média apenas sobre os registros que têm valor preenchid

Yuri Peixinho 2026-07-13 08:07 4 原文
AI 资讯 Dev.to

HahaNotes: Banishing Developer Burnout with AI Banter Podcasts & Short Videos

This is a submission for Weekend Challenge: Passion Edition What I Built HahaNotes is an interactive web application designed to help developers, office workers, and students vent their daily stress by transforming real-world struggles (legacy code at 3 AM, unpaid overtime, sếp hãm, or exam stress) into hilarious, sarcastic AI-voiced banters, complete podcasts, and ready-to-share short videos. The application features a dynamic dialogue between two contrasting AI hosts: Rookie (The Naive Optimist): A starry-eyed beginner who sees the world through rose-colored glasses and speaks in trendy buzzwords. Cynic (The Sarcastic Senior): A battle-hardened veteran who gently (or not so gently) pops Rookie's bubble with witty, dry, and highly relatable tech sarcasm. Users can input their struggles, choose their favorite voices for the hosts, generate structured comedy scripts, chat continuously with the hosts to extend the banter, listen to fully produced podcasts with ambient lo-fi background music/laugh tracks, and export 9:16 vertical short videos with synchronized karaoke captions and visual memes. Demo Video Demo: Website Demo: https://hahanotes.vercel.app/ Code omlttg / hahanotes 🎙️ HahaNotes Banishing Developer Burnout with AI Banter Podcasts & Short Videos Live Demo: hahanotes.vercel.app Weekend Challenge: Submitted for Weekend Challenge: Passion Edition 🌟 Introduction HahaNotes is an interactive web application designed to help developers, office workers, and students vent their daily stress by transforming real-world struggles (e.g. legacy bugs at 3 AM, unpaid overtime, or exam anxiety) into hilarious, sarcastic AI-voiced banters, complete podcasts, and ready-to-share short videos. The application features a dialogue between two contrasting AI hosts: Rookie (The Naive Optimist): A starry-eyed beginner who sees the world through rose-colored glasses, uses corporate buzzwords, and believes completely in hustle culture. Cynic (The Sarcastic Senior): A battle-hardened ve

Code Minimalism 2026-07-13 08:02 3 原文