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

今日精选

HOT

最新资讯

共 33382 篇
第 1324/1670 页
AI 资讯 Reddit r/webdev

I almost fell for a fake job interview scam (remote USD role). I feel like an idiot.

I am Brazilian and I have been working in tech for 12 years, but right now I feel like the dumbest person on earth. A guy named Damian Gutierrez from a company called Ritual ( https://www.linkedin.com/company/ritualnet/ ) reached out to me on LinkedIn about a Senior Backend Engineer position paying $180k USD. During the interview, I was so focused on performing well that I almost got scammed. They asked me to clone their repository onto my machine and run it with npm start . Yeah, I know. I already feel stupid enough, no need to remind me. At the time, something felt off, but the salary clouded my judgment. After I launched the application, they asked me to connect my crypto wallet (MetaMask) to it. That's when things started feeling really suspicious. Luckily, I didn't have MetaMask installed on the machine I was using for the interview. I worked with crypto back in 2022, and connecting a wallet is pretty common in DeFi applications, so I wasn't immediately alarmed. They told me, "No problem, let's continue on Monday when you're on a machine that has MetaMask installed." Afterward, I ran the repository through Claude, and it flagged the project as malware. Even after hunting through cron jobs, startup tasks, and everything else I could think of, I decided to wipe and reinstall my entire system. That thing was executing remote code on my machine. Honestly, I feel like an idiot. But more importantly, I want to warn others that this kind of scam exists in our industry. These people looked completely legitimate. Well-dressed Americans, interviewing from a fancy office, professional setup, polished communication. The whole thing looked real. It wasn't. I'll post in the comments what Claude found in the repository. The company is called Ritual, and as far as I can tell, all of their job openings are fake: https://docs.google.com/document/d/1Q3GyiZmgbBOQoGSP_N0SoDsl7e6fgFTdoxzxnreigvQ/edit?tab=t.0 The recruiter who contacted me: https://www.linkedin.com/in/damian-gutierre

/u/puregoodnesss 2026-06-10 09:40 6 原文
AI 资讯 Dev.to

Stop sending every AI coding request to the expensive model

AI coding tools are powerful. But they’re also wasteful. A tiny helper-function question does not need Claude Sonnet. A huge architecture review probably does. That gap costs money. So I built Badgr Auto. It’s a local OpenAI-compatible proxy that routes each AI coding request to the cheapest model that can handle it. Point your coding tool at: http://localhost:8787/v1 Badgr Auto can route between: local models cheaper OSS cloud models premium models So instead of paying premium prices for every request, you can use: local for small tasks OSS cloud for normal coding work premium only when it actually matters It also tracks: actual cloud spend which route was used fallback events tokens safely removed estimated savings vs premium models The goal is simple: stop wasting premium tokens on cheap tasks. First launch is small: small task → local normal task → cheaper cloud hard task → premium provider fails → fallback duplicate code → safely removed receipts → clear spend trail AI coding is only going to get more expensive if every agent step goes to the top model. Badgr Auto is my attempt to make AI coding cheaper without making it worse.

Michael Manley 2026-06-10 08:50 15 原文
AI 资讯 Dev.to

Shipped my first open-source repo

I independently shipped my first open-source repo this week. The tool I built was a cli which accesses quickbooks online data. While Claude Code did speed up the build, it still took considerable effort shaping the entire user experience for the cli around the pre-existing public APIs! Major learnings during the entire process. Would also love additional feedback from open-source developers here.I'm currently looking for feedback from experienced open-source developers: Are there any improvements you'd suggest around project structure, documentation, testing, or contributor onboarding or the tool functionality? https://github.com/intuit/intuit-cli-for-quickbooks #

Soumiya M 2026-06-10 08:37 17 原文
AI 资讯 Dev.to

We Do Not Just Write Code Anymore. We Direct Agents.

Something changed in software engineering, and I do not think we have fully named it yet. For years, the job was mostly about writing code directly. Then autocomplete got better. Then chat-based coding assistants arrived. Now the workflow is shifting again: we describe goals, hand off chunks of work to agents, inspect their output, tighten the tests, and decide what gets merged. That is not the same job with a faster keyboard. It is a different shape of work. I would call it agentic engineering. The engineer is becoming a director Agentic engineering does not mean the engineer disappears. If anything, it makes the engineer's judgment more visible. A coding agent can read files, make changes, run commands, open pull requests, and iterate through errors. GitHub describes Copilot agent mode as a workflow where the agent can plan, edit, run terminal commands, and keep working until a task is complete. Google describes Jules as an asynchronous coding agent that can take a task, work in a virtual machine, and produce a pull request. Anthropic's Claude Code guidance talks openly about using multiple Claude sessions in parallel, giving agents clear context, and treating them like workers that need direction. That is the shift. The engineer is no longer only the person typing every line. The engineer is also the person deciding what should be built, what constraints matter, how to verify the result, and when the agent is wrong. Prompting is too small a word for this People often describe this work as prompting, but that undersells it. A prompt can be a single instruction. Agentic engineering is more like delegation. You define the task, provide the relevant context, set the boundaries, create checks, review the work, and decide the next move. If the agent goes in the wrong direction, the failure is not always the model's fault. Sometimes the task was too vague. Sometimes the repository had no tests. Sometimes the acceptance criteria lived only in someone's head. This is why

Jenuel Oras Ganawed 2026-06-10 08:33 10 原文
开发者 Dev.to

Implementing Protected Routes and Authentication in React (2026 Edition)

This is an updated rewrite of my 2021 article on protected routes . A lot has changed in the React ecosystem since then. React Router moved from v5 to v7, class components have faded out, and the patterns we use for authentication state have matured. This version reflects how protected routes are built in modern React applications. Almost every web application requires some form of authentication to prevent unauthorized users from accessing parts of the application meant for signed-in users only. In this tutorial, I'll show how to set up an authentication flow and protect routes from unauthorized access using modern React patterns: function components, hooks, React Router v6+, and the Context API. First things first Install the dependency: npm i react-router-dom That's it. React Router v6 and above ships as a single package, so you no longer need to install react-router and react-router-dom separately. It is worthy of note that we will not be using Redux for authentication state in this version. For something as simple as "is the user logged in?", React's built-in Context API is the standard approach today. Redux still has its place, but it is overkill here. The Auth Context Instead of writing to localStorage directly from components and reading it in random places, we centralize authentication state in a context. This gives us a single source of truth and a clean useAuth() hook we can call anywhere in the app. Create ./src/auth/AuthContext.jsx : import { createContext , useContext , useState } from " react " ; const AuthContext = createContext ( null ); export function AuthProvider ({ children }) { const [ user , setUser ] = useState (() => { // Rehydrate on page refresh const saved = localStorage . getItem ( " user " ); return saved ? JSON . parse ( saved ) : null ; }); const login = async ( username , password ) => { // In a real app, this is an API call to your backend. // We simulate it here with hardcoded credentials. if ( username . toLowerCase () === " admin

OlumideSamuel 2026-06-10 08:24 10 原文
AI 资讯 Dev.to

Scarab Field Test #021 — pnpm Self-Upgrade No-Manifest Boundary

Target: pnpm/pnpm Issue: pnpm/pnpm#12240 PR: pnpm/pnpm#12301 Public branch: https://github.com/scarab-systems/pnpm/tree/fix/deps-status-no-manifest Latest pushed commit: cb68ac1af0dcffbe4fb607a10b0df2046d2490ba This field test targeted a pnpm command-routing failure where pnpm self-upgrade could fail outside a project directory with: ERR_PNPM_NO_PKG_MANIFEST The issue looked simple at the surface: a global/self command should not require a project manifest just because the current working directory is not inside a package. But the repair boundary was more specific than “ignore missing manifest.” The problem was in the dependency-status verification path. When dependency status was unavailable because there was no project manifest, the command could fall through into the auto-install path. That made a self-upgrade/global-style command behave as if it needed a local project manifest. Failure shape The failing behavior was: pnpm self-upgrade run outside a project directory dependency status cannot be established from a project manifest the command path falls into install/manifest expectations result: ERR_PNPM_NO_PKG_MANIFEST That is the wrong ownership boundary. A self-upgrade command should not inherit project-manifest preconditions when there is no local project context. Boundary The boundary here is: global/self command execution versus project dependency-status verification Dependency-status verification can be useful when a command is operating inside a project. But when there is no project manifest and the command is not recursive/all-projects, “dependency status unavailable” should not automatically mean “try to auto-install project dependencies.” There are two different cases: Dependency status is unavailable because there is no project manifest. Dependency status is unexpectedly unavailable even though a root project manifest exists. Those cases should not behave the same. The repair preserves that distinction. What changed The patch updates: exec/commands/src

Scarab Systems 2026-06-10 08:18 15 原文
AI 资讯 Dev.to

Stop Guessing Your Meds: Building a Multi-Drug Conflict Scanner with GPT-4o & FDA API

Have you ever stared at two different medicine boxes, squinting at the tiny font of the active ingredients, wondering: "Can I actually take these together?" Modern healthcare is complex, and drug-drug interactions (DDI) are a leading cause of avoidable ER visits. In this tutorial, we’re going to leverage GPT-4o Vision , React Native , and the FDA OpenData API to build a "Drug Conflict Scanner." We will utilize multimodal AI to transform messy pill-box photos into structured data and cross-reference them against official medical databases for safety. By the end of this guide, you'll master GPT-4o OCR structuring and automated knowledge graph verification for real-world health tech applications. 🚀 The Architecture 🏗️ The logic flow involves capturing images of multiple medicine labels, using GPT-4o's multimodal capabilities to extract chemical compounds, and then querying the FDA's database for potential interactions. graph TD A[React Native App] -->|Capture Multi-Photo| B[Node.js Backend] B -->|Image Buffer| C[GPT-4o Vision API] C -->|Structured JSON: Ingredients| B B -->|Search Interactions| D[FDA OpenData API] D -->|Drug Labels & Warnings| B B -->|Safety Report| A A -->|UI Alert| E{Safe or Warning?} Prerequisites 🛠️ To follow along, you'll need: GPT-4o API Key (via OpenAI) Node.js (for our backend relay) React Native (Expo is recommended for camera access) An account at open.fda.gov (though the public API works for limited requests) Step 1: Extracting Ingredients with GPT-4o Vision Traditional OCR struggles with curved medicine bottles and shiny packaging. GPT-4o excels here because it understands context. We don't just want text; we want the Generic Name of the drug. The Backend Logic (Node.js) // backend/scanner.js import OpenAI from " openai " ; const openai = new OpenAI ({ apiKey : process . env . OPENAI_API_KEY }); async function analyzeMedicineLabels ( imageUrls ) { const response = await openai . chat . completions . create ({ model : " gpt-4o " , messages :

Beck_Moulton 2026-06-10 08:17 10 原文
AI 资讯 Dev.to

From Notion to MCP Server: I Rebuilt 4 Workflows in a Weekend

Migrated 4 of 7 Notion automations to an MCP server in one weekend Two workflows stayed in Notion because the database UI beat any tool call MCP scope rule: one tool does one verb, never a Swiss Army function Result: 12 manual steps collapsed into 3 Claude prompts per publish I spent a weekend pulling four automations out of Notion and rebuilding them as MCP tools. Three of them got faster and one got worse before it got better. The biggest lesson was not about code. It was about deciding which jobs should never leave Notion in the first place. Why I Moved Off Notion In The First Place My Notion setup was not broken. It was just slow in a specific way. I had seven automations stitched together with Notion buttons, formula properties, and two third-party connectors. Every blog publish meant clicking through four pages, copying a title here, pasting a tag list there, and triggering a sync that took 90 seconds to confirm. Multiply that by the 18 articles I push in a normal month and the clicking adds up. The breaking point was a Tuesday where I lost 40 minutes to a connector that silently stopped firing. No error, no log, just a row that never updated. I checked the connector dashboard and it told me everything was healthy. It was not healthy. That kind of invisible failure is the worst kind because you trust it until you do not. MCP changed the math for me. An MCP server lets Claude call my own functions directly. Instead of Claude writing text and me ferrying that text into Notion by hand, Claude can call a tool that does the writing into my systems. The model becomes the operator, not just the writer. If you want the deeper context on what MCP actually is and why it matters at scale, MCP: The 97 Million Agentic Foundation goes through the bigger picture. So I made a list. Seven automations, sorted by how much human judgment each one needed. The ones at the top were pure mechanical steps: format this, push that, fetch a status. The ones at the bottom needed me to loo

RAXXO Studios 2026-06-10 08:16 8 原文
AI 资讯 Dev.to

Cross-Cultural UX: Designing SaaS Interfaces for Global Users

A SaaS interface that works well for US users may confuse or alienate users in China, Germany, or Japan. Cultural differences affect everything from layout preferences to color meanings, form field expectations, and payment preferences. This guide covers the cross-cultural UX principles applied at tanstackship.com , a SaaS serving users across English, German, and Chinese markets. Cultural Dimensions and UI Impact Hofstede's Dimensions Applied to SaaS Design Dimension High vs Low UI Impact Power Distance Acceptance of hierarchy Navigation depth, permission displays Individualism vs Collectivism Personal vs group focus Social proof, testimonials Uncertainty Avoidance Tolerance for ambiguity Error messages, help text density Long-term Orientation Pragmatic vs normative Pricing display, trial periods By Market UX Element US (Low PD, High IND) DE (Low PD, High UA) CN (High PD, High COL) Navigation Flat, exploratory Structured, organized Hierarchical, guided Error handling Forgiving, "try again" Specific, detailed Authority-mediated Social proof Individual testimonials Expert reviews + data Group endorsement Pricing Monthly preferred Annual preference (trust) Discount attraction Help/Support Self-service docs Detailed documentation Chat + personal support Color meanings Green=success Green=environment Red=prosperity Color and Visual Design Color Meanings Across Cultures Color Western (US/EU) China Germany Japan Red Danger, passion Prosperity, luck Financial (deficit) Life, energy Blue Trust, technology Trust, immortality Trust, stability Trust, calm Green Success, nature Health, harmony Environment Youth, energy White Purity, clean Mourning Clean, efficiency Purity Yellow Warning, caution Imperial, power Jealousy Courage Practical Application // Adapt color scheme based on locale const colorSchemes = { en : { primary : " #2563EB " , // Blue — trust success : " #16A34A " , // Green — success danger : " #DC2626 " , // Red — danger warning : " #F59E0B " , // Yellow — warnin

sweet 2026-06-10 08:14 9 原文