DEV Community

Dev.to is a community-driven website focused on software development, programming, and technology. It was launched in 2016 by Ben Halpern, and its main goal is to provide a platform for developers to share knowledge, learn from others, and build a community. The website features a blog-like format, where users can create and share articles on various topics, including coding tutorials, project showcases, industry insights, and more. Dev.to allows users to create accounts, follow other users, and engage with their content through comments and reactions. Dev.to has a strong focus on community engagement, with features like discussion forums, podcasts, and live streams. It also hosts a series of community-driven projects, such as coding challenges and hackathons, to encourage collaboration and innovation. In addition to user-generated content, Dev.to features a job board, where companies can post job openings and developers can search for employment opportunities. The website also offers a newsletter, which provides updates on the latest articles, news, and events. Overall, Dev.to has become a popular platform for developers to connect, share knowledge, and stay up-to-date with the latest trends and technologies in the software development industry.

Thread Of Notes

This article details the server-side setup for a Claude-based chatbot named Claudius, focusing on its identity system, service connectivity, and deployment realities. The identity system ensures that user roles, such as admin, member, or guest, are determined solely on the server and cannot be manipulated by the client. This is achieved using Auth.js with the Google provider and a MongoDB adapter, where roles are resolved based on admin email, an allowlist, or defaulting to guest. The resolved role is then embedded in a JWT for efficient access within the application. The provisioning process also sets default values for user-specific fields and ensures the role is recomputed each sign-in.Connectivity is validated through a health check route that pings MongoDB Atlas and, optionally, makes a small call to Bedrock's Claude Haiku model. This probe verifies that the application can successfully interact with its AI backend and token usage metadata is returned. The application also defines a catalog of AI models with their respective inference profile IDs and pricing information. Environment variables are validated iteratively as needed for each development phase, with the current set including authentication, database, and Bedrock credentials.Several critical issues, or "gotchas," were encountered and resolved during this setup phase. A significant problem involved ensuring the correct database was targeted by both the Auth.js adapter and the application's database helper, as a missing database path in the connection string defaulted to an inaccessible "test" database. Connection pooling was optimized by caching the MongoDB client globally. Dependency management within a monorepo required careful attention to runtime dependencies and the inclusion of platform-specific binaries in optional dependencies for deployment. The foundation for user identity and service interaction is now established, although the core chat functionality is yet to be implemented.
Modern AI systems can now perform complex tasks by interacting with external tools, databases, and services, giving rise to AI agents. A significant challenge arises because each application and API exposes its capabilities uniquely, necessitating custom integrations for every AI platform. The Model Context Protocol (MCP) addresses this by providing a standard way for AI models to discover, understand, and use external resources. MCP acts as a common language, allowing AI clients to discover tools, understand their functions, receive structured input, execute them, and get structured results. This protocol is crucial for AI agents that need to perform actions beyond text generation, such as interacting with GitHub, Slack, or databases. MCP involves an MCP client (the AI application), an MCP server (exposing capabilities), and the tools themselves. The process entails the AI client connecting to a server, discovering available tools, invoking a selected tool based on the user's request, and receiving a structured result. For developers, MCP offers standardized integrations, better maintainability, and improved discoverability of tools. Unlike traditional APIs that expose raw endpoints, MCP describes capabilities understandable by AI models at a higher level. While function calling allows AI to invoke predefined functions within an application, MCP provides a broader ecosystem for sharing capabilities across different AI clients. Security is paramount, with MCP servers requiring robust authentication, authorization, and validation. MCP is suitable for various use cases, including coding assistants, enterprise search, and DevOps workflows, and it complements existing APIs rather than replacing them.
CdXz5zHNQW_EPwVFzBOM1.webp
A competitive CRS score is crucial for Canada PR, with language proficiency being a significant factor. Initially, IELTS and CELPIP were the main English tests, but resources lacked clear guidance on achieving high scores. The launch of PTE Core in 2024 offered a machine-scored alternative, appealing to those who prefer measurable practice. However, the PTE Core preparation landscape was underdeveloped, with most resources catering to PTE Academic and not fully relevant for immigration candidates. Recognizing this gap, the founder created Phrasel, a platform and community specifically for Canadian immigration aspirants.Phrasel focuses on PTE Core, understanding the unique goals and score thresholds for immigration, unlike generic English exams. The platform prioritizes clarity over an overwhelming volume of practice materials, aiming to identify specific areas for improvement. Its core philosophy is that learners need diagnostic feedback to guide their next steps, rather than just more questions or rigid templates. Phrasel integrates Canada PR specific tools, such as CLB conversion and CRS points, directly into its practice workflow.The platform offers exam-style practice across all four skills, with AI scoring for speaking and writing providing detailed feedback. Full-length mock tests are available, designed to pinpoint strengths and weaknesses for targeted study. Phrasel emphasizes building real language ability over relying on shortcuts or memorized templates, believing that genuine skill development leads to lasting scores. The AI scoring, while a valuable training signal, is presented honestly as a refinement tool rather than a guaranteed predictor of official Pearson scores. Phrasel's development stack includes Next.js, React, Vite, Flask, and AI services for scoring. The founder believes that clear feedback and understanding which skill is hindering progress are key to effective preparation.
The author recently published a full architecture retrospective on building ToolHub, a suite of 138 in-browser web utilities that prioritize cleanliness, privacy, and zero bloat. The site is designed to be sub-second fast and fully offline-capable, with key engineering tradeoffs and technical decisions that enable these features. One of the key architectural highlights is the use of Next.js Static Export, which allows for a 100% static export model hosted on edge CDN, resulting in zero server maintenance and ultra-low time to first byte. This approach also enables infinite scaling, but requires that all dynamic content execute strictly on the client side in browser memory. The author also implemented a custom Service Worker caching strategy, which includes stale-while-revalidate for static assets and network-first for HTML document navigations, ensuring complete offline capability across all tools once cached. Additionally, the author developed a programmatic SEO engine that generates static tool pages with full JSON-LD structured data and automated internal linking meshes, all baked into static HTML at build time. The site also features a zero-CLS ad strategy, which prevents layout shifts by reserving explicit fixed-height layout slots for ad units before they load. The author has made the ToolHub site available for users to try, and has also published a full engineering deep-dive on their blog, where they share more details about the technical decisions and tradeoffs that went into building the site. The author is seeking feedback and suggestions from users, and is open to hearing thoughts on the architecture and ideas for new tools. Overall, the ToolHub project demonstrates a range of innovative technical approaches to building fast, offline-capable, and privacy-first web applications.
Redacting PII effectively requires careful pipeline design, as models often fail silently. Initializing with a rule-based pass before involving a model can worsen outcomes by creating unnatural token patterns that confuse the model. Instead, run both semantic and structural passes independently on the original text, then reconcile the results, ensuring structural offsets remain valid and filtering out low-confidence date detections from the structural pass.Markup in enterprise documents can garble model outputs; extract plain text, redact, and then re-insert into the original structure to improve recall significantly. Implement refusal detection for models that decline redaction, falling back to structural passes and logging these instances to inform prompt adjustments.Crucially, design the system to "fail closed" rather than "fail open" to prevent data leaks when redaction calls time out, treating structural passes as a degraded path and alerting on such events. Version control prompts by logging model ID and prompt hash with every redaction to track performance changes over time.For co-reference in redacted text, use numbered placeholders instead of generic tags, but be aware that the resulting mapping table is also PII and requires appropriate security, or discard if reversibility is not needed. To measure precision, create a canary set of PII-free documents and run it with every change; any redactions in this set signal regressions.When scaling, move beyond a single model by building a routing interface that directs requests to different models based on caller constraints like latency, residency, or language, with the structural pass always serving as a universal fallback. Implement careful caching strategies for prompts longer than 1,024 tokens to optimize cost and throughput. The recommended build order involves extracting text, running independent semantic and structural passes, filtering dates, injecting structural findings, substituting back into markup, detecting refusals, and logging essential metadata, all while continuously testing with a canary set.
CdXz5zHNQW_YNDXntIFNX.webp
When building a React app, developers often encounter a CORS error when making API requests. This error occurs because the browser's security policy prevents requests from one origin to another without proper authorization. The most robust solution is to configure the backend application to send the Access-Control-Allow-Origin header. This header specifies which frontend domains are allowed to access the API.For Node.js with Express, this involves using the cors middleware and configuring it to accept specific origins. Similarly, Laravel and Python with Flask offer ways to set these headers directly or through libraries like flask-cors. If direct backend modification is not possible, a proxy can be used during local development. By adding a "proxy" field to the package.json file, the React development server can forward requests to the API. This bypasses CORS restrictions because the browser perceives the request as same-origin.However, this proxy solution is only effective in development and will not work in production. A temporary, less-recommended workaround involves using a public CORS proxy service, but this introduces latency, potential rate limits, and security concerns. If the API requires authentication, such as cookies or JWT tokens, both the frontend fetch request and the backend configuration must be updated to include credentials. Frontend requests need credentials: 'include', and the backend needs credentials: true.Debugging CORS issues involves checking for the presence and correctness of the Access-Control-Allow-Origin header in the network tab of browser developer tools. If preflight requests (OPTIONS) are failing, the backend may not be properly configured to handle them. Ultimately, most CORS errors stem from backend configuration issues, not frontend code. Understanding the environment, frontend, and backend frameworks is crucial for effective debugging.
Microsoft's Build 2026 announcement focuses on their Agent Harness and Foundry Hosted Agents, now in General Availability. This signifies a shift in how AI agents are perceived and built for production. Research indicates that approximately 98.4% of an agent system is infrastructure, not the AI model itself. The Agent Harness provides this crucial operational core, handling tasks like function invocation, context management, and tool routing. Foundry Hosted Agents offers this harness as a managed, consumption-billed service, simplifying deployment.The Agent Harness addresses common production bottlenecks like wiring agents to tools and persisting conversation history. Microsoft's core bet is that this harness infrastructure, not the interchangeable AI model, is the true product. The harness includes features like function invocation with history, context compaction, a plan-and-execute todo list, file memory, and built-in OpenTelemetry for observability. This ensures that every action, from tool calls to approval decisions, is traceable.Foundry Hosted Agents eliminates the need for complex YAML configurations by providing a managed deployment where users supply only the chat client, instructions, and tools. This managed service shares the same core logic as the locally runnable harness, ensuring consistent behavior across development and production environments. The framework also introduces connectors for GitHub Copilot and the Claude Agent SDK, allowing for model swaps without altering the harness. This unified governance policy plane ensures consistent approval rules and audit trails across different underlying AI models. The durable layer of the agent system, encompassing approval gates, history, and policy enforcement, is highlighted as the key area for engineering investment. Microsoft's offering positions the harness as a stable, supported product, enabling developers to focus on building adaptable applications.
This section focuses on controlling costs associated with output, conversation history, and repeated static content in AI models. Output and reasoning tokens are significantly more expensive than input tokens, with some models costing up to eight times more for output. Reasoning processes can generate hidden "thinking" tokens that also incur higher output rates. Spring AI offers controls like maxTokens for provider-independent length limits and provider-specific settings to manage reasoning effort. Conversation history, which involves resending the entire chat log with each request, drives up input token costs rapidly. Storing and resending history means even small conversations can lead to substantial token usage over time. Spring AI provides MessageWindowChatMemory to manage conversation history by using a sliding window of a specified number of messages. For very long sessions, VectorStoreChatMemoryAdvisor offers an alternative by storing history in a vector store and only retrieving relevant messages. Repeated static content, such as system prompts or tool definitions, is charged on every request without caching. Prompt caching reduces these costs by storing processed prompt prefixes for reuse. Anthropic and AWS Bedrock allow users to specify caching strategies, while OpenAI caches prompts automatically for requests over a certain token count, though cache writes now incur a fee. Local models like Ollama use caching to improve speed by saving GPU processing time, but there are no per-token charges to reduce. Explicit planning for caching and managing cache keys is crucial for cost optimization with these models.
Six weeks ago, the author noted that only 4 out of 122 pages on their new domain, tamethebot.com, were indexed by Google. They attributed this to a crawl-budget limitation on a young domain lacking backlinks, rather than technical issues. A recent update shows a significant improvement, with 115 pages now indexed and only 14 remaining unindexed. The author's initial prediction about the crawl-budget issue proved correct, as the "Discovered - currently not indexed" category dropped to zero.Crucially, almost no changes were made to the website's content during this period; new pages were added at the same rate, and a single experimental "deep" page performed no better than average. The key change that coincided with increased indexing was the publication of the author's previous post, which successfully garnered two dofollow backlinks to the homepage and sitemap. While not definitively provable, this backlink, along with domain aging and regular recrawling, provided Google with a reason to allocate more budget.The author did admit to one technical error: their IndexNow deployment hook was silently failing for weeks, though this did not affect Google's indexing as IndexNow primarily serves Bing and Yandex. The increase in indexed pages has translated into a substantial rise in organic Google sessions, from a small baseline. However, the author cautions that some tracked "active users" are actually data centers, not real humans.In an unexpected turn, while Google's indexer approved the pages, Google AdSense rejected the same content for "low value content" twice. The author acknowledges that the indexer's criteria (is this a real page a searcher might want?) differ from AdSense's (is this a site with enough depth and traffic for an ad business?). The author's next steps involve continuing to write publicly to gain approval from both Google's indexer and AdSense.
This text compares various Web Application Firewall (WAF) solutions, categorizing them by type and deployment method. SafeLine Community is a self-hosted reverse proxy deployed via Docker. Cloudflare Free is a cloud-based edge proxy requiring DNS changes. CrowdSec WAF is a module-based self-hosted option, and ModSecurity integrates as a server module. BunkerWeb is an NGINX-based self-hosted solution.In terms of detection, SafeLine and ModSecurity show comparable rates, but ModSecurity has significantly more false positives. Cloudflare Free's detection rate is very low, functioning more as a CDN. CrowdSec and BunkerWeb's performance depends on their underlying rule sets.Several free WAFs offer unlimited custom rules, unlike Cloudflare's restrictive free tier. Bot protection and country blocking are generally stronger in self-hosted options. SafeLine stands out for its simple one-command setup and out-of-the-box functionality. Cloudflare is easy but offers less detection and collects user data.CrowdSec and ModSecurity require more complex setup, with ModSecurity needing extensive tuning. A WAF is recommended for any public-facing website or API. Free WAFs are generally sufficient for personal projects and small businesses, especially when paired with other services.For production environments requiring SLAs and advanced features, paid WAFs are necessary. Free tiers typically lack dedicated support and advanced logging, though detection quality can be similar to paid versions. SafeLine Community and CrowdSec are highlighted as genuinely free options with no hidden costs. Plugin WAFs are less effective than reverse-proxy WAFs as they inspect traffic later. Regular updates are crucial for maintaining WAF effectiveness.
A wildcard DNS record enables easy service publishing by automatically resolving any subdomain to a single IP address. Nginx Proxy Manager (NPM) simplifies publishing further, requiring only a few fields to expose services securely with HTTPS. This automation led to the creation of nineteen proxy hosts, all running self-hosted software with varying authentication methods. The core problem identified is that the ease of publishing bypasses critical security decisions about access control.The author's goal was not to hide services entirely but to make them accessible only from a private network built on public infrastructure. The wildcard DNS record, while simplifying setup, does not inherently provide security. NPM uses HTTP-01 challenges for Let's Encrypt certificates, necessitating port 80 to remain open, which is a security vulnerability. A wildcard certificate via DNS-01 would allow port 80 to close but requires granting write access to the DNS zone.Services are published by placing their containers on a shared Docker network, allowing NPM to proxy requests internally. This means services do not need to expose ports directly to the host, enhancing security. A self-hosted proxy gateway on the same VPS routes traffic back to NPM, appearing as inbound HTTPS from the VPS’s public IP. This gateway's behavior, initially mistaken for a routing fault, is integral to the security design.NPM enforces access control using Nginx configuration blocks that allow requests only from the gateway's internal Docker IP or the VPS's public IP, followed by basic HTTP authentication. This ensures that even though services are publicly resolvable and have valid certificates, access is restricted. A specific location for Let's Encrypt challenges remains open to the internet, as required for certificate validation. Two critical hosts, the gateway's admin panel and a config distribution endpoint, are exceptions to the strict access control, as they need to be accessible before full gateway integration.A significant issue arose when a service, which baked its server address into user connection profiles, mistakenly advertised the wrong address. Because NPM forwards the real client IP via the X-Forwarded-For header, the service interpreted this header as its own public address, leading clients to connect to the wrong server. This bug was hidden because the author's own testing, using the gateway, always presented the correct expected address. TLS termination occurs at NPM, with traffic between NPM and backend containers transmitted as unencrypted HTTP over the Docker network.
You can connect AI agents to Telegram using an MCP server, but there are two distinct setups with significant security implications. The first type uses a Bot API token, authenticating as a bot. This bot can only access chats it's explicitly added to, and its access is limited and easily revoked. It cannot see private messages or chats where it hasn't been invited.The second type uses an MTProto server, which authenticates with your phone number and logs in as you. This grants the agent access to all your Telegram data, including private messages, groups, saved messages, and contacts. This is achieved by creating a session file that represents a live login.Setting up the Bot API or notifier involves providing a bot token and potentially a chat ID. The MTProto setup requires installation and an interactive login using your API ID and API hash. The location of the configuration file varies significantly depending on the AI client being used, and some clients, like Codex CLI, use a different configuration format (TOML).The primary concern with MTProto servers is that the session file provides full access to your account. This session file should never be stored in synced folders or committed to code repositories. Furthermore, because AI agents treat both data and instructions as text, a malicious message could be crafted to exploit the agent's ability to send messages, posing a security risk.The blast radius of a Bot API token is limited to the chats the bot is in, while an MTProto session file compromises your entire account. MTProto servers are not inherently unusable but require deliberate consideration and should ideally be used with a secondary account to mitigate risks. It is crucial to review the code of these community-developed MCP servers before connecting them to important accounts.
To control RAG costs for a semantic search app, batch document indexing and estimate token spend before rollout. Only send the top retrieved chunks to the chat model for answer generation. A useful token cost estimate should separate embedding input during indexing, retrieval-time operations, and answer generation input and output. Estimating goes beyond simple token counts; it involves evaluating chunk size, overlap, and the top-k setting, as these directly impact prompt length and cost. Practical estimation begins with representative documents and real user questions to calculate token totals for various chunking strategies. Recall is crucial; a lower chunk count is only beneficial if the most relevant passage is still retrieved. Reranking can improve context ordering, allowing fewer chunks to be sent to the chat model.Indexing should be treated as a separate batch job from the user-facing request path. This prevents high ingestion volumes from leading to unexpected prompt bills. Retries during document indexing require idempotency keys or client-supplied identifiers to avoid duplicate data. Before optimizing prompts or models, it is essential to make the document distribution visible and identify oversized chunks. Using provider-specific token counting calls with appropriate backoff and retry strategies is key for accurate estimates.Batch indexing offers benefits for large backfills by allowing for job monitoring and audit trails, keeping uploads separate from embedding creation. It is important not to blur retry policies between polling batch jobs and idempotent write operations. While batch indexing isn't ideal for immediate searchability, a small synchronous path can handle that need. The choice of RAG stack components, like OpenAI, Anthropic, Google Gemini, Pinecone, Weaviate, or Infrai, depends on existing workflows and team priorities. Migration should only occur if it genuinely improves the system, not just for marginal cost savings. Ultimately, the code must deliver grounded answers, and a clean cost estimate is meaningless with weak retrieval.
This post addresses the distribution constraint for autonomous AI companies, arguing it's a significant hurdle without a clear roadmap. Paid acquisition through platforms like Meta Ads is prohibitively expensive for SMBs, with customer acquisition costs vastly exceeding customer lifetime value when factoring in inference and data expenses. The math simply does not close for autonomous agents at typical SMB subscription rates.Cold outreach channels, once a workaround, are increasingly closing to automated, high-volume messaging. Social media platforms are implementing stricter policies against AI-generated spam, making it difficult for agents to send outbound messages programmatically. LinkedIn and Reddit have TOS and behavioral filters that actively penalize automated outreach. Cold email deliverability also suffers due to shared domains and potential blacklisting from a single customer's misuse.The remaining viable distribution channels require human involvement, including content marketing, SEO, community building, founder-led branding, and partnerships. These methods demand consistent effort, judgment, taste, and relationship-building over extended periods. Autonomous agents, by their nature, struggle to execute these inherently human-centric strategies, especially at the early stages of a company's growth.The author contends that while inference costs are decreasing and data acquisition methods are improving, distribution remains a fundamental challenge for autonomous AI. There is no easy "build" or "wait" solution for scaling distribution autonomously. The thesis holds true for specific niches like consumer apps with established paid acquisition or embedded solutions, but not for the general "AI runs your company" vision.Ultimately, true leverage in AI for SMBs lies not in full automation, but in automating the repetitive "grind" of distribution while human judgment guides the process. The author's company, Thread Otter, aims to provide an autopilot that assists in finding and engaging with existing demand, drafting responses in the user's voice, and automating the laborious aspects of outreach, allowing humans to focus on the compounding input of judgment. This approach acknowledges that distribution cannot be manufactured autonomously but can be discovered and managed with human oversight.
This piece describes Penny, a simple command-line expense tracker built with Python and the Click library. Penny allows users to add, list, summarize, and clear expenses directly from their terminal without needing a web interface or database. The author chose Click over Python's built-in argparse for its more intuitive, decorator-based approach to defining commands and options.The project is structured into three main files: commands.py for individual command logic, penny.py to group these commands into a single CLI tool, and pyproject.toml for packaging and defining the entry point. Penny stores expense data in a plain JSON file named expenses.json, reading and writing to it for each operation. The add command creates the JSON file if it doesn't exist, appends new expenses, and saves the updated list, providing colored confirmation.The list command displays saved expenses in a tabular format, offering a warning if no expenses are found. The summary command calculates and prints spending totals by category and a grand total, outputting the results as formatted JSON. The clear command includes a confirmation prompt before overwriting the expenses.json file with an empty list.The penny.py file uses Click's group functionality to consolidate all commands under a single penny executable. The pyproject.toml file configures this grouping, making Penny a globally installable command-line tool via pip install .. The author highlights the benefits of Click's declarative style, the suitability of JSON for simple data storage, the importance of small user experience details, and how command grouping elevates a script into a polished CLI application.
Writing is an integral part of a software engineer's career, extending beyond just code. Every developer writes commit messages, variable names, bug reports, and documentation, making it a fundamental skill. The true benefit of writing, particularly technical articles, lies not in external readership but in personal growth and improved engineering abilities. Writing forces structured thinking, thereby exposing gaps in one's understanding and acting as a rigorous test of knowledge. Documenting experiences transforms fleeting lessons into enduring knowledge, acting as the highest form of learning.Experienced engineers recognize that excellent documentation accelerates progress and reduces technical debt, creating maintainable knowledge for teams. Platforms like LinkedIn and personal blogs offer opportunities to showcase professional growth and build a durable, searchable knowledge base. This practice of writing creates a "second brain," an external memory that aids future problem-solving and makes technical interviews more natural. Developing a personal brand through writing demonstrates expertise and trustworthiness, proving invisible expertise through visible proof.It is crucial to start writing early, even without expertise or an audience, as growth precedes recognition. The compound effect of consistent writing builds a valuable professional legacy over time. Ultimately, while code builds products, writing builds the engineer behind them, fostering a career that is remembered for both technical skill and thoughtful communication.
The use of autonomous agents in business processes can be unpredictable and lead to chaotic execution loops, which can be problematic when dealing with high-stakes operations such as commercial contracts or regulatory compliance filings. To address this issue, a structured framework that enforces rigid rules while preserving cognitive flexibility is necessary. LangGraph is an orchestration framework that enables the building of deterministic multi-agent workflows, which can turn unpredictable AI behavior into reliable, state-machine-driven business processes. LangGraph models agent interactions as nodes and transitions as edges, allowing for the implementation of cyclic paths and self-correction. This architecture ensures that every node has access to the accumulated context, and any modifications to the state are explicitly tracked and validated. By using LangGraph, enterprises can build resilient, self-correcting systems that behave predictably even when dealing with highly variable LLM outputs. LangGraph is particularly useful for building strict, auditable business workflows, and its state-first approach ensures that developer-defined rules always take precedence over agent autonomy. Implementing deterministic agent workflows can directly impact operational efficiency, risk profiles, and bottom-line growth, as seen in examples such as commercial insurance underwriting, healthcare revenue cycle management, and supply chain customs brokerage. By using LangGraph, businesses can reduce the risk of errors, improve efficiency, and increase productivity, ultimately leading to cost savings and revenue growth. Overall, LangGraph provides a robust solution for building deterministic multi-agent workflows, enabling businesses to automate complex processes while maintaining control and predictability.
Alibaba has released Qwen3.8-Max, a powerful 2.4 trillion parameter Mixture-of-Experts model. This model features a 1 million token context window and supports text, image, and video inputs. Its API is compatible with OpenAI and Anthropic protocols, easing integration for developers. Pricing is set at $2 per million input tokens and $6 per million output tokens. A significant cost-saving factor is the reduced price of cached input tokens, emphasizing the importance of stable prefixes in prompts.The model's naming convention distinguishes generations from point releases, with Qwen3.8-Max being the latest flagship. While it boasts 2.4 trillion total parameters, only approximately 95 billion are active per token, making inference more efficient. The effective context window is around 991K tokens, with a maximum output token limit of 131K. Developers can utilize its OpenAI-compatible API by updating the base URL and model name.Alibaba's DashScope SDK provides an example of its multimodal capabilities with a code snippet. The model supports various features including function calling and structured outputs, and comes with five built-in tools. Benchmarks show strong performance in multimodal and agentic tasks, though some areas lag behind competitors like Claude 3.5. Open weights are expected to be released soon, along with a smaller 27B parameter version.Currently, a formal model card with detailed training data and safety evaluations is missing. The licensing terms for commercial use will only be clear once the open weights are released. The active parameter count is reported but not yet officially confirmed by Alibaba. Despite these missing pieces, Qwen3.8-Max is recommended for multimodal applications, long-context tasks, and existing OpenAI/Anthropic protocol users.
A colleague's poor experience with a random Chinese name generator inspired the author to build a superior one. Existing generators focus solely on sound, neglecting crucial elements like meaning, tone, and cultural significance, which can lead to comical or inappropriate name pairings. Chinese naming traditions incorporate factors beyond phonetics, including stroke count, elemental classifications, and historical usage, all of which are vital for a name to be well-received. Research indicates that a significant portion of people still consider stroke count numerology when choosing names, a practice largely ignored by current tools. The author's project prioritized accuracy by creating a meticulously verified database of Chinese characters. Each character underwent rigorous checks, including cross-referencing with the Kangxi Dictionary for definitions, verifying legitimacy against the Hundred Family Surnames, and consulting onomastic research. This verification process, rather than simple character combination, constitutes the core of the project. The author emphasizes that preventing accidental clashes in meaning or cultural weight is the true challenge in Chinese name generation. The developed tool provides seven verified data points for each generated name. These data points include the characters themselves, their Pinyin pronunciation, stroke count, elemental classification, lucky number, lucky color, and a harmony score. This score is derived from the established sāncái wǔgé framework, a traditional Chinese naming system.
CdXz5zHNQW_UgBCzhzMEb.webp
The A2A protocol currently lacks a mechanism to verify the authenticity of an Agent Card. When one agent retrieves another's Agent Card, it only reads metadata without any cryptographic proof of identity. This leaves agents vulnerable to impersonation, as anyone can create a fake Agent Card claiming a specific role. The protocol delegates identity verification to external, often manual, processes. While transport-layer security like mTLS secures the communication channel, it doesn't authenticate the agents themselves.To address this, a public key needs to be bound to the Agent Card, and critical fields must be signed. A verification step, similar to how HTTPS operates, is essential before any agent interactions occur. A manual workaround involves storing a public key in the extensions field and manually verifying message signatures. However, this approach is fragile, relies on inconsistent conventions, and can be exploited by malicious actors.The A2A specification requires a dedicated identity field in the Agent Card. This field should include a public key and a reference to its issuer, such as a Decentralized Identifier (DID). A signature scheme should be defined for the canonical JSON representation of the card. Crucially, verification of this identity must be a mandatory part of the A2A handshake.This proposed solution involves fetching the issuer's public key, verifying the card's signature, and checking for revocation status. This process ensures that the agent's card is trusted by a verifiable issuer and has not been compromised. Without this standardized solution, the current trust model in agent-to-agent communication remains a significant vulnerability, especially as agents begin to handle sensitive data and transactions.
CdXz5zHNQW_cG6jtXNdCV.webp
An automated content pipeline failed to detect that video descriptions lacked clickable calls-to-action. The system's check for the presence of a domain string was insufficient because bare URLs without "http://" or "https://" are not automatically linked by platforms like YouTube. This meant that while the descriptions mentioned the offer's domain, viewers could not directly access it. The initial audit incorrectly reported the check as passing, leading to zero conversions despite the presence of the URL text.The solution involved updating the audit to specifically look for a clickable link format, including the necessary URL scheme. This was achieved by using a regular expression that targets "https?://". A more robust and generalized fix was then implemented: a central process that automatically upgrades any bare domain mentions to actual, clickable links before content is published. This function ensures that existing markdown links and full URLs are preserved.The linkifying function uses alternation to prioritize existing links, preventing accidental modification of already functional URLs. This prevented a secondary bug where the naive approach would corrupt existing links. The core lesson is that automated checks for mere presence are deceptive when usability is the actual requirement. A check confirming a link exists is not the same as confirming a human can use it. If automated processes are not yielding results, it's crucial to verify if the tools are assessing the correct, functional criterion.
The advice "just put it behind an autoscaling group" is commonly used for scaling stateless applications like web servers. It works well because replicas are interchangeable and can be added or removed with minimal impact. However, this approach doesn't suit all workloads, particularly those with specific properties that violate interchangeability.One such property is session affinity, where a session is tied to a particular instance and cannot be easily transferred. Another is slow startup times for new instances, making reactive scaling ineffective if instances aren't ready when needed. For workloads with these characteristics, standard reactive autoscaling is the wrong solution.Instead of immediate reaction, scaling out should use slower, trend-based triggers. This allows new instances sufficient time to become fully operational before they are critically needed. Safely scaling in is also crucial, as simply terminating instances can disrupt ongoing work.Industry solutions like AWS lifecycle hooks enable graceful draining of sessions before an instance is terminated. This pattern involves stopping new work, waiting for existing sessions to complete, and then removing the instance. Large-scale systems, such as video conferencing platforms, already employ these more sophisticated scaling strategies.The key takeaway is to assess instance interchangeability. If any instance can handle any task instantly, autoscaling is appropriate. Otherwise, a slower scaling-out mechanism and proper scaling-in drain logic are necessary to effectively manage session-affine or slow-starting workloads. Forcing such workloads into a reactive, interchangeable model leads to significant failures.
The author discusses the increasing use of AI on the dev.to platform and its implications. A common sentiment is that content quality matters more than AI usage, but the author questions how to define "good" content in this context. AI can easily generate useful and insightful material, making it difficult to discern genuine understanding. The author draws a parallel to developers using AI for projects, noting that while impressive on paper, they often struggle to explain their work in real-time. This highlights a potential flaw in relying too heavily on AI, hindering true learning and skill development. The author expresses personal concern about over-reliance on AI, fearing it compromises their ability to learn and confidently explain their own work. True expertise, they argue, comes from understanding and being able to articulate one's creations. The author suggests that the purpose of platforms like dev.to is to foster genuine learning and sharing, not to present AI-generated content as personal expertise. They propose two key recommendations for using AI constructively: asking expanding questions instead of simply reciting information, and using AI as a supplementary tool that aids learning rather than replaces it. This balanced approach ensures personal growth and facilitates meaningful interactions within the community. The core theme is learning by doing and avoiding over-reliance on AI. Ultimately, good content on dev.to should foster mutual learning between authors and readers, regardless of the topic.
CdXz5zHNQW_x1mHmRWPT1.webp
Gemini Spark is Google's 24/7 autonomous AI agent designed to automate complex workflows across Google Workspace. While it offers robust native integrations with applications like Gmail, Drive, and Docs, connecting to external APIs requires additional configuration. Google Apps Script (GAS) serves as a crucial bridge, enabling enterprises to extend Gemini Spark's capabilities significantly. By deploying GAS as a Model Context Protocol (MCP) server or a webhook endpoint, users can grant Gemini Spark access to specialized APIs and custom business logic.The article demonstrates five representative prompts showcasing Gemini Spark's native functionalities. These include autonomously creating spreadsheets with dynamic formulas, intelligently searching for files within Google Drive, and orchestrating cross-domain workflows like web scraping to document generation. It also highlights Gemini Spark's ability to autonomously set up background event listeners for tasks such as processing incoming emails. However, a test prompt involving direct access to the Google Analytics Data API revealed a current limitation in native connectivity to specialized Google APIs.To overcome these native boundaries, the article details the integration of Gemini Spark with Google Apps Script via custom MCP servers and webhook triggers. It explains how to deploy a GAS Web App as an MCP server, leveraging the GASADK and GoogleApiApp libraries to facilitate JSON-RPC communication. This integration allows Gemini Spark to interact securely with APIs like Google Analytics 4, custom databases, and other complex business logic. By using GAS as an intermediary MCP server, developers can encapsulate secure authentication and data extraction logic. The ultimate goal is to enable Gemini Spark to perform enterprise-grade workflow automation by accessing a wider range of data sources and services.
CdXz5zHNQW_EaBgJiSslu.webp
LINE MINI Apps do not automatically require verification, but certain features mandate it for publication. If verification is necessary, LINE meticulously reviews identity consistency, policy compliance, channel configuration, and user flows. To avoid delays, it's crucial to audit the submission thoroughly before requesting a review. Key features requiring verification include production service messages, custom paths, home-screen shortcuts, common profile quick-fill, and verified badges.Before submitting, align organizational identity across the LINE Developers Console, channel information, privacy policy, and channel description. Ensure the company name is consistent in all these locations and languages. Clearly describe the MINI App's workflow, identifying the primary user, core functions, and expected outcomes. Confirm that the Review channel accurately reflects the Published channel's features, transitions, data, authentication, and error states.Prepare comprehensive test scenarios for payments, reservations, and orders, including registration, successful and failed transactions, and data management. Thoroughly check privacy and terms pages for public accessibility, consistent company and service names, and accurate contact information. Verify that the MINI App's business category and content comply with LINE's policies, avoiding restricted categories and prohibited content.Request only necessary API scopes and document their usage. Service messages require a separate approval process and are strictly for confirmations or responses to user actions, not promotions. After verification, many settings become re-review sensitive, so freeze critical configurations like channel identity, legal URLs, and scopes before the initial submission. Plan for the verification timeline, which typically takes one to two weeks, and include a buffer for potential re-reviews. Finally, remember that MINI App verification is distinct from handling inbound customer messages.