My Claude Code week started ending on Wednesday. I blamed the September 14 cut, like everyone on r/ClaudeAI did. Then I opened the usage screen and the biggest line was not me typing. It was the helpers I had told it to launch. So I read a month of my own logs before touching a single setting. 455 sessions, 63,000 requests, and a number next to every saving tip I had been told to apply. Which of the five fixes everyone lists gives a measurable share of the week back, and which one costs quality? Claude Code writes one JSONL file per session under ~/.claude/projects/, and one file per subagent run next to it. Every assistant line carries the usage of its request: input, output, cache reads, cache writes. The first trap is double counting. The log writes the same answer about twice (1.96 lines per request in my month), so summing every line gave 18.6 billion tokens. De-duplicated on message id and request id, it was 9.3 billion. Every number below is the de-duplicated one. The second limit is bigger. Anthropic publishes the weekly limit as percentages and plan multipliers, never as a token count. So everything here is tokens from one workload, not a share of your week. The order may change for you. The usage screen will tell you. The cut itself is simple arithmetic. Call the old weekly limit 100. The summer promotion made it 150. The permanent level since September 14 is 125. From 150 to 125 is the 17% people feel, and Anthropic's "+25%" is true at the same time. 2,631 subagent runs in the month. They took 48.1% of all tokens and wrote 64% of all output, which is the heaviest line on the meter. Each one pays an entry price. Before a subagent does anything, its opening request already carries a median of 47,117 tokens: the instructions, the tool list, the skill list, all sent again. Someone else measured 16 to 21k on a different machine with tiny agent prompts, and their line stuck with me: your agent file is a rounding error inside its own launch cost. The model is th
Quick follow-up to Zero GPU, zero dollars. My AI crew talks to one address on my laptop: a LiteLLM "brain switch". Every job (chat, think hard, code, look at pictures, read long documents) has a list of free AI services to try in order. If one is out of free uses, the next one answers. If the internet dies, the laptop's own Ollama models take over. Until today that list had 5 services: Groq, Gemini, Mistral, OpenRouter and Cloudflare Workers AI. Now it has 7. build.nvidia.com gives you a free API key for a big menu of open models. The limit is about 40 requests a minute for the whole account, which is plenty for one person. The star for me is Kimi K3. It now leads my "think hard" job: answers in about 3 seconds handles tool calls properly (a lot of free models fumble these) saves Gemini Pro's small free daily allowance for when I really need it GLM-5.3 from the same key backs up chat, thinking and coding. If you already use Ollama locally, the free cloud plan is the same app with bigger models running on their servers. The catch: the free plan only offers a few models (gpt-oss, gemma4:31b, nemotron-3-super), runs one request at a time, and has 5-hour and weekly limits they don't publish. So it's a backup, not a main brain. It sits at the bottom of the chat list, and Gemma 4 31B is the second choice for looking at pictures. Job Tries first Then Think hard Kimi K3 (NVIDIA) Gemini Pro, GLM-5.3, Nemotron, gpt-oss Chat gpt-oss on Groq Gemini Flash, Llama 3.3 on Cloudflare, Gemma 4, Mistral, GLM-5.3, Ollama Cloud Code Codestral (Mistral) GLM-5.3, Kimi K3, Groq, Gemini, OpenRouter, Cloudflare Pictures Gemini Flash Gemma 4 on Ollama Cloud, OpenRouter Long docs Gemini Flash Kimi K3, Nemotron Still no graphics card, still no credit card. The whole config is in my crew repo (bring your own keys, none are included). Zero GPU. Zero dollars. Zero excuses. 🦝
Many bug reports in open-source projects arrive as a screenshot and one line of text. Before anyone can fix them, a maintainer has to rewrite the report in the project's issue format and work out which file is responsible, and new contributors often get stuck at that step. BugLens takes a public GitHub repository, a screenshot of the bug and one sentence. It returns: An issue draft that follows the repository's own issue template and uses only its real labels. Details nobody stated are marked [please confirm] instead of being invented. The top suspected files, each with a reason, a confidence value and the code excerpt that search matched, linked to the exact lines. A plain-language brief for a first-time contributor. Similar existing issues, so duplicates are noticed before filing. Gemma 4 reads the screenshot, ranks the candidate files and writes the draft. Code search runs locally with an open-source embedding model and combines three signals: meaning, exact on-screen text, and file names seen in stack traces. The model can only choose among files that search found, so it cannot make up a path. In our demo on a real, already-fixed bug from the File Browser project, BugLens ranked first the one file that the maintainers' fix changed, out of 353 files. BugLens finds likely files. It does not fix the bug, and its output is a suggestion to verify before filing.
AI agents increasingly need to buy small things on their own: one API result, one lookup. x402 is a way to do that with plain HTTP and no signup. This post covers how the payment flow works, and where agents discover x402 services, using Tanod's endpoints as the worked example. Pay-per-call APIs let an AI agent buy one result at a time with no account or API key. Tanod does this with x402: an unpaid call gets a 402 with the price, and the client retries with a USDC payment on Base or Polygon. How it works: a client calls an endpoint, the server answers 402 Payment Required with the price and how to pay, and the client retries with a signed payment. There is no account or API key. Tanod endpoints use x402 v2 with the exact scheme, paid in USDC on Base or Polygon. This is a real response from a call to /v1/meta after the free pool for the day was used up (headers and body trimmed). Request: curl -s -i -X POST https://tanod.dev/v1/meta \ -H 'content-type: application/json' \ -d '{"url":"https://github.com/"}' Response (trimmed): HTTP/2 402 content-type: application/json payment-required: { "x402Version": 2, "error": "Payment required: ... Price: $0.002 USDC on base.", "accepts": [{ "scheme": "exact", "network": "eip155:8453", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "amount": "2000", "payTo": "0x593857A4a4F619543ea12394137C3004ce841720", "maxTimeoutSeconds": 300 }] } The requirements are in the PAYMENT-REQUIRED header and, identical, in the JSON body. amount is in USDC atomic units (6 decimals), so 2000 is USD 0.002. The asset is USDC on Base (eip155:8453) or Polygon (eip155:137); the client picks one of the listed accepts entries. An x402 client library signs a USDC transfer authorisation for the quoted amount and repeats the same request with it in the PAYMENT-SIGNATURE header (X-PAYMENT is also accepted). The receipt comes back in PAYMENT-RESPONSE. The input is checked first: a rejected input (422, 413 or 404) is never charged, and a payment for a diff
If you already have Spring Security in your application, with hasRole rules, @PreAuthorize on services and code reading SecurityContextHolder and you want to add an OpenID Connect login, while keeping that authorization code, you can use pac4j for that. Whatever the provider (Keycloak, Microsoft Entra ID, Okta, a CAS server, etc.), once pac4j has authenticated the user, it can make that user available to Spring Security. The spring-security-pac4j bridge does this. It transfers the pac4j profile into the Spring Security context; it does not perform authentication itself. Adding the bridge alone will not give you an OIDC login. For authentication, choose a pac4j implementation: jakartaee-pac4j, servlet filters that fit in any Spring Security filter chain, used in this guide spring-webmvc-pac4j, interceptors for Spring MVC spring-webflux-pac4j, for reactive applications. The implementation runs the OIDC flow and builds a profile. The bridge turns it into a Spring Security Authentication, with the pac4j roles as authorities. Your hasRole rules, method security and SecurityContextHolder can then use it. If you are starting from scratch, a pac4j implementation alone is simpler. Here, we're interested in connecting pac4j to an application that already relies on Spring Security. What you need: Java 17 or later and Maven Spring Boot v4.x, which brings Spring Security v7, or Spring Boot v3.x with Spring Security v6: the bridge supports both an OpenID Connect provider where you can register an application, or the public demo server used below. Create an empty Spring Boot project with Java 17: mkdir -p spring-security-oidc-app/src/main/java/org/pac4j/demo/spring mkdir -p spring-security-oidc-app/src/main/resources cd spring-security-oidc-app Create a pom.xml file at the project root. The Spring Boot parent manages the Spring dependencies, and its Maven plugin runs the application: 4.0.0 org.springframework.boot spring-boot-starter-parent 4.1.1 org.example spring-security-oidc-a
Cursor and Cline both let you plug Claude in with an Anthropic key. That's the simplest path if you're happy paying Anthropic directly. But plenty of people reach Claude through something else: a company LiteLLM proxy, OpenRouter, or a flat-rate gateway. In those cases the endpoint speaks the OpenAI wire format, and you have to wire it in through each tool's "custom OpenAI base URL" settings. I set this up for a lot of people (I build one of these gateways, so there's a disclosure at the end), and the same few mistakes come up every time. This guide covers the exact settings as of October 2026, plus a five-minute curl check that catches most problems before you open the editor. My examples use my own endpoint, https://apiclaw.biz/v1. Swap in your gateway's base URL, key and model IDs, and the steps are the same. A base URL that ends in /v1 (or whatever your gateway documents). It shouldn't end in /chat/completions, because the tools append that themselves. An API key for that gateway. This is not an Anthropic key. The exact model ID the gateway uses for Claude. Gateways name models differently, for example anthropic/claude-..., claude-..., or a prefixed alias. Copy it from the gateway's model list instead of guessing. If curl can't talk to the endpoint, neither can Cursor, and Cursor's error messages are a lot less helpful. Set two variables: export BASE_URL="https://apiclaw.biz/v1" export API_KEY="paste-your-key-here" 1. List models and find the Claude IDs: curl -s "$BASE_URL/models" \ -H "Authorization: Bearer $API_KEY" | jq -r '.data[].id' | grep -i claude If you get a 401 here, the key is wrong. If you get a 404, the base URL is wrong. 2. Send one chat completion: curl -s "$BASE_URL/chat/completions" \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-sonnet-5-5","messages":[{"role":"user","content":"Reply with the word ok"}]}' \ | jq -r '.choices[0].message.content' 3. Check streaming. Both editors stream, so you s
Most Laravel security tools look at your source code, config, and dependencies before you deploy. That is useful, but it answers one question: is my code safe? After a compromise, you need a different question answered: has anything on this server been added or changed that should not be there? That is the gap Laravel Scalpel was built for. It is an open-source intrusion evidence scanner that runs inside a Laravel app and inspects the deployed filesystem. A quick update first. Scalpel is now at v1.11.0 with 66 GitHub stars, and it was recently covered by Laravel News. More important to me, issues and pull requests are now coming from other developers, and the repo has contributors besides me. This post covers how the scanner works and one lesson from the Laravel News test that is worth knowing if you plan to run it in CI. php artisan scalpel:scan runs six scanners by default. Five look at the current files, and one compares them with a saved snapshot. Structural. Executable PHP files in places PHP should never live, by default public/ and storage/. This covers .php and less common extensions like .phtml and .phar, plus double extensions such as shell.php.jpg. Obfuscated code. Common backdoor patterns such as eval(base64_decode(...)), compressed payload execution, dynamic function calls, direct evaluation of request input, and long encoded strings. .htaccess and .user.ini. Handler mappings that let the web server run scripts, external redirects, and PHP directives like auto_prepend_file. That last one is a classic persistence trick, because it runs a hidden file on every request. Environment. A missing or unreadable .env, a .env under public/, an empty APP_KEY, keys that drift from .env.example, and APP_DEBUG=true in production. Baseline diff. Record a known-good state, then report added, modified, and deleted files later. php artisan scalpel:baseline # record SHA-256, size, and mtime php artisan scalpel:diff # compare the current files against it Create the baseline
Real-time applications have changed the expectations users have from modern web products. Chat messages should appear instantly, dashboards should update without refreshes, and collaboration tools should reflect changes as they happen. Node.js is a strong fit for these workloads because its event-driven architecture can efficiently handle many concurrent connections. Combined with WebSockets, developers can build persistent communication channels between browsers and servers without repeatedly polling an API. In this article, we will build a small real-time notification server using Node.js and WebSockets. Along the way, we will look at connection management, broadcasting events, handling disconnections, and structuring the server so it can evolve into a production application. Traditional HTTP APIs follow a request-response model: the client asks for data and the server responds. That approach works extremely well for CRUD applications, but it becomes inefficient when the server needs to proactively notify connected clients about new events. WebSockets solve this problem by creating a long-lived, bidirectional connection. After the initial handshake, both the client and server can send messages independently, which makes the protocol useful for chat applications, live dashboards, multiplayer experiences, notifications, and collaborative tools. The example below uses the popular ws package to create a WebSocket server on top of Node.js. Each connected client receives a unique identifier, can send messages to the server, and receives broadcast events from other clients. A useful pattern is to keep connection management separate from business logic. The server maintains a collection of connected clients, validates incoming messages, creates structured events, and broadcasts only the information that clients need. This makes the system easier to extend with authentication, persistence, rooms, rate limiting, or external message brokers later. For a production system, a
I maintain Aegis-DevOps, an open-source check that sits between an AI coding agent and the shell. Before Claude Code, Codex, Copilot, Cursor or Gemini CLI runs kubectl, terraform or a cloud CLI, Aegis turns the command into an intent (action, resource, namespace) and matches it against signed policy. Recently I asked three AI models to review the design for the next version. They also found four bugs in the version that was already shipped. None of them were in the policy engine. They were all in the step that decides what a command means. Disclosure: I drafted this article with help from an AI assistant and reviewed it myself. The bugs, the fixes and the command output below are from the project's own changelog and from running both versions. A rule like "no rollout restarts in prod" is written against a normalized intent: action rollout-restart, resource deployment/*, namespace prod. If the parser produces a different shape for the same command, the rule doesn't match. In most guards, including this one, "no rule matched" means allow. So a parser bug isn't a crash or a wrong answer you'd notice. It's a silent allow. kubectl accepts global flags almost anywhere, and agents put them anywhere. This is what 0.1.5 made of a perfectly ordinary command: $ aegis check kubectl --json -- kubectl -n prod rollout restart deploy/web 0.1.5: ALLOW rollout--n prod/* ALLOW rollout--n restart/* ALLOW rollout--n deployment/web (namespace lost) 0.2.1: ALLOW rollout-restart deployment/web ns=prod The parser took -n as the rollout subcommand, then read everything after it as resources. The namespace was gone, so a namespace-scoped rule about rollouts in prod could never match. The fix takes the subcommand before merging global options, and consumes global options that appear between rollout and restart too, because kubectl accepts that placement as well. --as changes who the API server thinks is making the request. Rules scoped to the agent's own identity stop applying server-side, whi
یک ابزار بازیابی را روی یک درایو اجرا میکنید. با عددی تمام میشود که بوی خبرِ خوب میدهد — ۳٬۱۴۸ فایل پیدا شد. بعد شروع میکنید به باز کردنشان. شاید نصفشان کار نکند. بعضی باز میشوند و یک مستطیل خاکستری نشان میدهند. بعضی را نمایشدهنده میپذیرد و عکسِ اشتباهی را نشان میدهد. بعضی ۴ مگابایت روی دیسکاند و اصلاً هیچی درونشان نیست. نرمافزار بازیابی به شما دروغ نمیگوید. مدخلِ فهرست را پیدا کرده: نام، اندازه، و جایی که فایل قبلاً اشغال میکرد. چیزی که نمیتواند بداند این است که آیا خوشههای پشتِ آن مدخل هنوز همان خوشههایی هستند که به آن تعلق دارند یا نه. پاک کردنِ یک فایل آن را محو نمیکند. در NTFS مدخل علامت میخورد و فضا آزاد اعلام میشود، و بایتها همانجا میمانند تا چیزی دیگر رویشان نوشته شود. یعنی سه چیزِ مستقل میتواند خراب شود، و ابزارهای بازیابی هر سه را با عنوان «پیدا شد» گزارش میکنند. روی داده نوشته شده. نام برگشته؛ محتوا حالا مالِ شخصِ دیگری است. رویِ بخشی از داده نوشته شده. N خوشهٔ اول برگشته، بقیه رفته. این همان موردِ بدجنس است — فایل اندازهای باورپذیر و سرآیندی درست دارد، و در بعضی نمایشدهندهها باز میشود در حالی که آشغال رندر میکند. داده اصلاً در فایلی که گرفتهاید وجود نداشته. ابزار میدانسته فایل قرار است ۴ مگابایت باشد، پس ۴ مگابایت برایتان نوشته. دو بایتِ اول و دو بایتِ آخر از قالب میآیند؛ هرچه میانشان است پُرکننده است. نمیتوانید از فایلسیستم بپرسید کدام حالت هستید. اما میتوانید از بایتها بپرسید. بیشتر قالبها یک امضای ثابت در ابتدا و یک تمامکننده در انتها میگذارند. اگر هرکدام نباشد، فایل بریده شده. قالب باید با این شروع شود باید با این تمام شود JPEG FF D8 FF FF D9 (EOI) PNG 89 50 4E 47 0D 0A 1A 0A IEND + CRC (49 45 4E 44 AE 42 60 82) PDF %PDF- %%EOF در دو کیلوبایتِ پایانی DOCX / XLSX / ZIP PK پایانِ فهرست مرکزی 50 4B 05 06 MP4 / MOV یک جعبهٔ ftyp یک نمایهٔ moov، در هر کدام از دو سر به نابرابری توجه کنید، چون اشتباه در اینجا فایلهای معتبر را خراب علامت میزند. EOIِ یک JPEG خودِ دو بایت آخر است، پس به یک پنجرهٔ ۲ بایتی نگاه میکنید. اما EOCD یک ZIP جایی در ۶۴ کیلوبایتِ آخر به علاوهٔ ۲۲ بایت است، چون یک توضیحِ آرشیو میتواند بعد
As previously promised , here's Anthropic's new fast, low cost model: Introducing Claude Haiku 5.5 . The previous Haiku, 4.5, was very much showing its age. It came out almost a year ago , and was priced at $1/million input and $5/million output - relatively expensive even back then, and a full 10x the price of OpenAI's GPT-6 Luna , released last month. The new Haiku exactly matches the price of GPT-6 Luna - $0.10/$0.50 - up to 100,000 tokens. Beyond 100,000 tokens the price increases 5x to $0.50/$2.50. Luna itself has a price increase at 272,000 tokens but only to $0.20/$0.75. Haiku 5.5 also uses a new, less generous tokenizer. My Claude Token Counter tool shows that the same long prompt uses around 1.25x as many tokens with Haiku 5.5 compared to Haiku 4.5, so there's a hidden price increase there. If your workloads fit in 100,000 tokens, Haiku is the same price as Luna and reports higher benchmark scores. Above 100,000 tokens, Luna looks like a much better deal. The most recent release of llm-anthropic finally fixed it so I don't need to ship a new version of that plugin for every new model. I tested the new model like this: llm install -U llm-anthropic llm anthropic refresh llm -m claude-haiku-5.5 "Generate an SVG of a pelican riding a bicycle" -o thinking_effort low Pelicans Here are pelicans for low, medium, high, xhigh, and max . The new Haiku doesn't let you disable reasoning, and defaults to medium . I got a good bicycle frame for everything beyond low . The low effort pelican cost 0.0936 cents and took 7 seconds. This max effort pelican took 5 minutes 9 seconds to generate, but still only cost me 3.3826 cents : For comparison, here's the pelican I got a year ago from Haiku 4.5 (for 0.7583 cents - Haiku 4.5 did not support reasoning levels). It sucked at drawing pelicans: And a generous API credit scheme for subscribers In addition to Haiku 5.5, Anthropic announced today that they are halving the price of cache reads for Sonnet 5.5. They've also added API cr
Most money and item exploits on FiveM servers come from the same mistake: a script trusts the client. A modder can trigger any network event with any arguments, so every server event has to assume the request might be fake. Here is a short checklist I run through on every script before it goes live. If a client event says "pay me 500", a modder will send "pay me 5000000". The server should decide the amount based on its own config. -- bad RegisterNetEvent('job:pay', function(amount) Bridge.AddMoney(source, amount) end) -- better (Bridge.AddMoney is a small wrapper around your QBCore or ESX money function) RegisterNetEvent('job:pay', function() local src = source Bridge.AddMoney(src, Config.Payout) end) Before rewarding anything, check on the server that the player has the right job, is near the right location (#(GetEntityCoords(GetPlayerPed(src)) - Config.Location) < 5.0) and has actually started the task. Store a timestamp per player and reject events that come in faster than a human could do the task. That stops looped triggers even if every other check passes. When a check fails, log the player identifier and event name. A few failed checks can be lag; hundreds per minute is someone injecting events. All of this is only possible to verify if you can open the code. With escrowed resources you have to trust the author got it right. Open source FiveM scripts let you check every event yourself before installing. xFiveM Shop publishes its QBCore, ESX and RedM resources unescrowed, and the setup steps are at xfivem.shop/help/installation. Decide amounts on the server, validate job, distance and state, add cooldowns, log failures, and only run code you can read.
If you're building a Power Apps Code App (React + TypeScript + Dataverse), there's Premium per-user license. Not a per-app license. Not a free tier. A Premium license, per person, for This sounds obvious once you say it out loud - but it's easy to miss during after an application was fully built, Power Apps Code Apps run on Dataverse, and Dataverse access via a custom app isn't covered by the free/basic tiers most organizations already have for Microsoft 365. The cost scales with headcount, not with app complexity. A simple five-screen app for 2,000 employees can be far more expensive to license than a complex app for 50 people. Procurement and budget approval for licensing often takes longer than building the app itself. Ask this question before writing the first line of code, not during UAT: "Who exactly will use this app, and do they already hold a Power Apps If the answer is "everyone in the company" or "we don't know yet," that's your Technical excellence doesn't protect a project from a licensing model nobody I work on Power Platform / Dataverse architecture (Code Apps, Power Automate,
The Quest Begins (The "Why") I still remember the first time our notification service started to feel like a dragon hoarding gold. We were pushing out real‑time alerts for a fledgling social app—likes, comments, follow requests—everything had to arrive within a second or users would think the app was broken. At first we just fired off a database write for every event, assuming our modest PostgreSQL could keep up. Spoiler: it couldn’t. During a peak hour, the write queue grew longer than a line at Comic‑Con, latency spiked to 12 seconds, and our monitoring lit up like a Christmas tree. Users started complaining that they missed important updates, and the support team was drowning in tickets. We needed a way to throttle the flood without losing the real‑time feel that made our product special. The quest was clear: design a system that could smooth out bursts, protect our backend, and still deliver notifications as fast as possible. After a few sleepless nights (and way too much coffee), the breakthrough hit me while I was re‑watching The Lord of the Rings: Gandalf doesn’t try to stop the flood; he guides the water. In other words, instead of trying to block every notification outright, we let a controlled amount through, store the excess for later, and release it smoothly when the system can handle it. The concrete shape of that idea is a token bucket rate limiter combined with a sliding‑window counter backed by Redis, with a tiny in‑memory fallback for sub‑millisecond bursts. Here’s why this beats the usual alternatives: Approach Pros Cons Global DB write per event Simple, strong consistency Overwhelms DB, high latency Fixed‑window counter (e.g., INCR + EXPIRE) Easy to implement Allows burst at window edge → thundering herd Pure token bucket (local) Low latency, smooth No shared state → limits per instance, not per service Token bucket + Redis + local fallback ✅ Shared, smooth rate ✅ Burst absorption ✅ Fast path via local cache ✅ Graceful degradation if Redis hiccups
Cohort retention tables look simple: group customers by the month they started, count how many are still around each month after, divide. Then the curve on the slide says retention falls off a cliff at month three, and it's not true. Most retention charts that lie do it in one of three ways. Here is a small pandas version that avoids all three, with the numbers each mistake would have produced instead. One row per customer per month in which they paid. Synthetic, small enough to check by hand: import pandas as pd payments = pd.DataFrame({ "customer_id": ["a", "a", "a", "a", "b", "b", "c", "c", "c", "d", "e", "e", "e", "f", "f", "g"], "paid_month": pd.to_datetime([ "2025-01-01", "2025-02-01", "2025-03-01", "2025-04-01", "2025-01-01", "2025-03-01", "2025-01-01", "2025-02-01", "2025-04-01", "2025-02-01", "2025-02-01", "2025-03-01", "2025-04-01", "2025-03-01", "2025-04-01", "2025-04-01", ]), }) last_complete_month = pd.Timestamp("2025-04-01") last_complete_month matters more than it looks. It's the last month you have full data for, and it decides which cells in the table are real. def months_between(later, earlier): return (later.year - earlier.year) * 12 + (later.month - earlier.month) # 1. Cohort = first paid month. payments["cohort"] = payments.groupby("customer_id")["paid_month"].transform("min") # 2. Period 0 is the cohort month itself. payments["period"] = months_between(payments["paid_month"].dt, payments["cohort"].dt) # 3. Distinct paying customers per cohort and period. counts = ( payments.drop_duplicates(["customer_id", "paid_month"]) .pivot_table(index="cohort", columns="period", values="customer_id", aggfunc="nunique") .fillna(0) ) # 4. Divide by cohort size. cohort_size = counts[0] retention = counts.div(cohort_size, axis=0) # 5. A cohort that hasn't reached a period yet is unknown, not zero. months_observed = months_between(last_complete_month, retention.index) observable = pd.DataFrame( {p: months_observed >= p for p in retention.columns}, index=retentio
A year ago, "open-source AI" mostly meant a hobbyist project you could run on a decent gaming PC, several steps behind whatever OpenAI or Anthropic had just shipped. That gap has closed faster than almost anyone predicted. By 2026, open-weight models are turning up in enterprise procurement conversations next to the big proprietary names, not as a cheaper fallback but as a genuine contender. A model is genuinely open source, in the strict sense, when it carries an OSI-approved license like Apache 2.0 or MIT, with no meaningful restrictions on commercial use. Mistral Large 3, Gemma 4, and the open Qwen line fall into this category. A lot of what gets called "open source AI" is more accurately open weight: the weights download freely, but the license attaches real conditions. Meta's Llama caps free commercial use at 700 million monthly active users and adds EU-specific restrictions in Llama 4. Qwen's actual flagship model, Qwen3.7-Max, is proprietary and API-only, only the smaller models in the line are genuinely open. Meta's Llama leads cumulative downloads at roughly 476 million, reflecting its early head start. But DeepSeek passed Mistral in downloads in January 2026, and on OpenRouter's token-processing data, DeepSeek served roughly 14.4 trillion tokens between late 2024 and late 2025, ahead of Qwen and Llama. Four of the five leading open-model families by adoption right now, Qwen, DeepSeek, GLM, and Kimi, come out of Chinese labs. A 2026 study tracking over 2,200 enterprise buyer discussions found cost and data sovereignty came up repeatedly as deciding factors, more than raw benchmark scores. A separate claim that 89% of enterprises use open-source AI traces back to a single vendor blog and deserves skepticism. Hugging Face's own developer data is more carefully sourced: 79% of developers report using open models, against 71% using closed ones, numbers that overlap since most developers use both. In 2026, the US government restricted DeepSeek's hosted chatbot a
Testing Non-Deterministic Software: A Practical QA Framework for AI Applications Was the response accurate? Was it relevant? Was it grounded in approved data? Did the model choose the correct action? Did the system behave safely? Would the result still be acceptable if generated differently? That requires a different QA mindset. Start by Separating Deterministic and AI Behavior One of the most useful testing decisions is identifying which parts of the system are deterministic and which are model-driven. For example, an AI support assistant may contain: Deterministic components authentication API calls database updates permission checks UI behavior workflow routing Non-deterministic components intent classification generated responses summarization tool selection document interpretation These two layers should not be tested the same way. Traditional automation is still the right choice for deterministic behavior. AI-specific evaluation should focus on the model-driven layer. Test the Application Before Testing the Model AI does not remove the need for conventional QA. Teams should still validate: authentication authorization APIs databases integrations user interfaces retries timeouts error handling If the surrounding application is unstable, model evaluation becomes much harder. For a broader look at why these supporting layers matter, this article on production-ready AI architecture covers the engineering foundation around modern AI systems. Build an Evaluation Dataset AI applications need representative test data. Instead of testing only a few manually written prompts, create a dataset containing realistic scenarios. Include: common user questions edge cases ambiguous prompts incomplete requests malformed inputs conflicting instructions unsupported requests Each scenario should define what acceptable behavior looks like. For example: Input: "Can I cancel my subscription after renewal?" Expected behavior: Use the current cancellation policy, avoid inventing refund
You add an AdMob banner to your Capacitor app, run it on a device, and the Ionic tab bar is gone, hidden under the ad. In this guide, we'll look at why the banner covers your content and fix it two ways: by letting the plugin shrink the web view, or by reserving the exact banner height in CSS. We'll also cover the Ionic CSS for tab bars, content and floating action buttons, and what changes if you come from @capacitor-community/admob. A Capacitor 8 app, ideally with Ionic Framework. Consent gathered and the Google Mobile Ads SDK initialized. The AdMob GDPR consent guide walks through that part. The Capacitor AdMob plugin. For setup, see the Installation section of the docs. Full transparency: we build this plugin at Capawesome, and it is part of Capawesome Insiders, a paid subscription. If you need a free option, @capacitor-community/admob is a maintained, MIT-licensed alternative, and the last section compares the two. The Google Mobile Ads SDK renders the banner as a native view on top of the Capacitor web view. Your HTML is laid out as if the banner did not exist, so the ion-tab-bar slides under a bottom banner, a floating action button ends up behind it, or the last list row never scrolls into view. This is an old problem. Issue #2 "Ad overlapping tabs" on the community plugin dates back to July 2020, and edge-to-edge layouts made it worse, as #390 from November 2025 shows for Android 15 and 16. Hardcoding padding-bottom: 50px doesn't work either, because the default adaptive banner has no fixed height. Google's iOS banner guide caps anchored adaptive banners at 20% of the screen height with a 150px maximum, and the Android guide describes a 50 to 150 dp range. The plugin defaults to BannerSize.AdaptiveBanner and leaves the height to the SDK, so the only reliable number is the one the SDK reports after it picks a size. The fix with zero CSS is mode: 'resize'. Pass it to showBanner(...) and the plugin shrinks the web view so the banner never overlaps your web con
Following one request through Inferock, from a provider response to a finding an engineer can actually inspect. Your agent needs to look up a customer’s account. It asks the model to call lookup_account, passing the account ID along with the other arguments. The provider returns HTTP 200. The response arrives. The JSON parses. Your dashboard logs another successful request. Meanwhile, your tool gets this: { "region": "eu", "include_history": false } No account_id. Congratulations. The braces match. The function would still like its arguments. This is an illustrative example, but the distinction matters: the model API completed the request. Your application got something it couldn’t use. Both can be true, even if your dashboard only has room for one green badge. At Inferock, we want you to be able to follow that gap. Which request produced the response? What was it supposed to return? What actually came back? Which check failed? “The model did something weird” is a perfectly reasonable opening line for a debugging session. It’s a lousy place to end one. Here’s the tool’s argument schema for our example: { "type": "object", "properties": { "account_id": { "type": "string" }, "region": { "type": "string" }, "include_history": { "type": "boolean" } }, "required": ["account_id", "region"] } The returned arguments are valid JSON. They’re not valid against this schema. That gives us something specific to point at: account_id is required, and it’s missing. No debate about whether the response seemed helpful. No adjudication by vibes. But the requirement has to be declared before the check means anything. If your application needs an account ID and never says so, an observer can’t reliably discover that expectation by staring harder at region and include_history. Your application also needs to enforce the contract. Reject invalid arguments before executing the tool. A failure record helps you investigate what happened; it doesn’t replace validation at the execution boundary.
A VIN form that only looks polished in a mouse-driven browser is unfinished. Screen reader users, keyboard-only users, and people who zoom text need the same clarity you give a sighted clicker: a real label, a predictable error, and a spoken confirmation when decode finishes. This post covers practical HTML and TypeScript patterns for a free VIN lookup field -- not a full WCAG audit, but the controls that prevent silent failure. Placeholders disappear on type and are easy to miss. Use a visible (or wrap the input) and keep placeholder text as an example only. Vehicle Identification Number (VIN) 17 characters. Letters I, O, and Q are not used. aria-describedby wires hint and error into the accessible name/description computation. Keep IDs stable so you do not break associations when React remounts. Red borders fail color-blind users and often fail screen readers if you never update text. When validation fails, set aria-invalid="true", reveal the alert node, and put the reason in words. export type VinFieldState = { value: string; error: string | null; decoding: boolean; }; export function applyVinError( input: HTMLInputElement, errorEl: HTMLElement, message: string | null, ): void { if (message) { input.setAttribute("aria-invalid", "true"); errorEl.hidden = false; errorEl.textContent = message; } else { input.setAttribute("aria-invalid", "false"); errorEl.hidden = true; errorEl.textContent = ""; } } export function validateVinCharset(raw: string): string | null { const v = raw.trim().toUpperCase(); if (v.length === 0) return "Enter a 17-character VIN."; if (v.length !== 17) return `VIN must be 17 characters (now ${v.length}).`; if (/[IOQ]/.test(v)) return "VIN cannot contain the letters I, O, or Q."; if (!/^[A-HJ-NPR-Z0-9]{17}$/.test(v)) { return "VIN may only use A-H, J-N, P, R-Z, and digits 0-9."; } return null; } Prefer specific messages ("16 characters") over "Invalid VIN." Specificity reduces repeat attempts and helps people who cannot see the counter glyph next
After 6+ years building automation systems, I’ve learned one hard truth: Most automations work great in demos… and fail in production. Here’s what actually matters when building reliable workflows with n8n (and similar tools): Error Handling is Not Optional Retries with backoff Clear error paths Idempotency (so workflows can safely re-run) Keep Business Logic Explicit Make the workflow readable for future you (or your teammates). Monitoring > Building Log key steps and set up alerts for failures. AI is Powerful — But Needs Guardrails I mainly work with n8n, Make, and Zapier, focusing on production-grade automation for finance and operations processes. What’s the biggest lesson you’ve learned while building automations?
How to Choose Between CSS, GSAP, Motion and Three.js for Website Animation A button changes color on hover. A card expands into a modal. A product story pins sections while images move through a sequence. A liquid surface reacts to the pointer. Calling all four of these things “website animation” hides the decision that actually matters. CSS, GSAP, Motion and Three.js can all participate in a website's motion system, but they operate at different layers. CSS is excellent when animation belongs to styling and interface state. Motion fits naturally when movement follows React state, layout or gestures. GSAP becomes attractive when timing and orchestration are the difficult parts. Three.js belongs to a different rendering model entirely: scenes, cameras, meshes, materials and shaders rather than ordinary DOM elements. The useful question is therefore: What kind of thing am I animating, and what is making the animation difficult? That question usually narrows the choice quickly. Choose When the problem is mainly CSS States, hover/focus feedback, simple entrances and self-contained transitions Motion React state, component enter/exit, layout changes, gestures and UI-oriented motion GSAP Precise sequences, scroll choreography, timelines, SVG or imperative multi-element animation Three.js WebGL scenes, shaders, particles, 3D objects and graphics that should not be DOM elements This is not a ladder from “basic” to “advanced.” A well-built marketing page might use all four. Its buttons could use CSS, its mobile navigation could use Motion, its scroll narrative could use GSAP and its hero canvas could use Three.js. The architecture should follow the interaction rather than forcing every effect through whichever package happens to be installed already. Suppose a button needs to move upward by two pixels and change background color on hover. Installing an animation library for that interaction does not make it more sophisticated. It gives a small state transition another runtim
I'm an engineer. Before I build anything, I want to know what I'm building, who it's for and why. So when AI tools showed up, I never just typed one line at them. I gave them what I'd give a new teammate: the full picture. What surprised me was how rarely other people did. I kept seeing the same thing: someone types one line into ChatGPT, gets something generic back, and decides AI just isn't that good. It is. It was just guessing. The people getting great results from AI aren't using secret tools. They're just better at explaining what they want. That skill has a fancy name now, context engineering, but the idea behind it is simple, and anyone can learn it. I want to help more people get good at it, so this post is about the prompt I use to turn a rough idea into a clear plan for a real product, and why it works. Take a request like “Build me a habit tracker with reminders.” The AI will happily come back with a full plan, a feature list and a pile of code. To get there, it fills every gap with the most likely answer. Who's the app for? It guesses. What's the most important feature? It guesses. Phone or website? Free or paid? Guess, guess, guess. The trouble is that it never tells you it's guessing. It answers in the same calm, confident voice it uses for everything. So you get something that looks finished but sits on a pile of assumptions you never agreed to. That's what “context” means here: everything the AI needs to know to stop guessing. Your goal, your users, your limits, what you've already decided. Give it that, and the answers change completely. There's a popular way of working with AI that people call vibe prompting. You type whatever comes to mind, see what comes back, and nudge it until it looks right. No plan, just vibes. For small things, it works fine. Rewriting an email, brainstorming names, explaining a confusing paragraph. (That's also what the Prompt Rulebook is for: quick copy-paste rules that make those everyday prompts better.) But try to vibe
The previous post covered why I chose pgvector for semantic search. But there was another question: When should a memory be embedded? At first, it might seem simple: Create memory ▼ Generate embedding ▼ Save embedding But this makes memory creation dependent on the embedding process. If the embedding provider is slow or unavailable, creating a memory could also fail or become slow. I wanted to separate these two operations. The architecture became: Memory Service ▼ PostgreSQL ▼ Outbox Table ▼ Queue / Job Runner ▼ Embedding Worker ▼ pgvector When a user creates a memory, the Memory Service writes the memory and an outbox event in the same database transaction. For example: Transaction ┌─────────────────────────────┐ │ INSERT memory │ │ INSERT outbox event │ └─────────────────────────────┘ The important part is that they succeed or fail together. This avoids a common problem with distributed systems: Memory saved ▼ Embedding event lost The outbox gives me a durable record of the work that needs to happen. The outbox is not the queue itself. It is a reliable bridge between the database transaction and asynchronous processing. A separate process reads pending outbox events and puts jobs onto a queue. Outbox ▼ Queue ▼ Embedding Worker This gives the embedding process some useful properties: asynchronous processing retries independent scaling failure isolation no need to block the memory API The user can save a memory without waiting for the embedding provider. The embedding worker has one main responsibility: turn memory text into an embedding and store it in pgvector. flowchart TD A[Get Memory] --> B[Generate embedding] B --> C[Store Vector] This keeps embedding-specific logic out of the Memory Service's synchronous request path. It also gives me a place to evolve the embedding pipeline later. For example, I could change: embedding models chunking strategy retry behaviour batch processing embedding dimensions without changing the API used to create a memory. There is an
A person can take thirty photos of the same face and still produce a timelapse that looks like camera shake. On Monday they stand closer to the mirror. On Tuesday they tilt their phone. By Friday they frame their eyes near the top of the image. For fitness, skincare, and haircut timelines, viewers need to see the change in the person without chasing their face around the screen. In Phases, the useful visual reference is the eye line: keep both eyes at the same output coordinates across the sequence. This article develops the React Native and Expo architecture for that workflow: detect landmarks on the device, compute a two-point transform, retain originals in local storage, and render a reel without a rendering server. Implementation scope: the public Phases site currently describes a browser app that users can add to their home screen. It also describes consent-based analytics. The native Expo architecture and zero-telemetry policy below describe the reference design for this article, rather than a verified description of that deployed browser build. The project link is github.com/Ishannaik/phases; the implementation examples below stand on their own. A capture guide helps the user repeat their pose, but it cannot guarantee matching camera distance or roll. I would keep the original photo and store its alignment metadata beside it. That lets the user change the reel's framing without reshooting or accumulating JPEG compression from repeated edits. flowchart TD A[Camera capture] --> B[Normalize orientation and mirroring] B --> C[On-device facial landmark detection] C --> D{Usable eye anchors?} D -->|Yes| E[Compute affine matrix] D -->|No| F[Ask user to retake or mark anchors] B --> G[Original photo in app filesystem] E --> H[SQLite metadata and transform] G --> I[Local Canvas or WebGL composite] H --> I I --> J[On-device video encoder] J --> K[Timelapse reel on device] G -. Optional user-enabled backup .-> L[Cloud backup] The engineer should treat capture, detection
Finding WordPress Click2Shell Exposure Starts With Knowing Where WordPress Runs On September 21, 2026, security researchers disclosed Click2Shell, an unauthenticated remote code execution chain in WordPress Core. An attacker needs no WordPress account. A single visit by a logged-in administrator to a crafted link is enough: the browser installs a catalog theme on its own, and the theme's unprotected AJAX endpoint downloads and executes attacker-controlled PHP. WordPress fixed the core parser flaw in version 7.1.1. No CVE identifier has been published yet, and researchers confirmed no exploitation in the wild at disclosure time. WordPress is famously large. A ZoomEye query for app="WordPress", executed on September 22, 2026 (UTC), returned 7,945,496 matching assets worldwide. That number counts indexed WordPress product assets. It does not mean those hosts are vulnerable, and it does not mean they were attacked. What it does show is scale: any WordPress Core flaw touches an asset population too large to handle by memory or spreadsheet. ZoomEye's role in this event is verifiable asset discovery, not vulnerability confirmation. The fingerprint query app="WordPress" identifies hosts presenting WordPress signals. Teams can narrow it with geographic or network filters that match their own scope, for example combining the product fingerprint with a known ASN or CIDR to spot instances registered to their address space that never entered the CMDB. A matching asset is not a confirmed vulnerable asset. The core parser weakness affects versions before 7.1.1, but ZoomEye's product fingerprint does not, by itself, prove a specific patch level. The count is a point-in-time observation. The 7.9 million figure was collected on 2026-09-22 and will drift as indexing continues. The theme-side flaw (Mobile Repair Zone 2.5.4 and over 40 other catalog themes) lives inside third-party packages that a product-level fingerprint cannot see. For the Click2Shell event, asset identification is t
Usage telemetry is genuinely useful. Knowing which commands people actually run, where the errors cluster, whether anyone ever touched the feature you spent a fortnight on... that's the stuff that makes you a better maintainer. Wanting it is completely legitimate. The trouble is that the usual way of getting it, on by default and quietly hoovering up everything, is a small betrayal of the people who installed your tool to get a job done. I wasn't willing to build that, so go-tool-base's telemetry starts from a different question. If you maintain a tool, you want to know how it's actually used. Which commands matter and which are dead weight. Where the error rate spikes. Whether anyone touched the feature you spent that fortnight on. That information makes you a better maintainer, and, to say it again, wanting it is completely legitimate. The trouble is the standard way of getting it. Telemetry on by default. An opt-out buried three levels down in a settings file nobody reads. And once it's running, it quietly collects far more than it ever admitted to: the arguments people passed, the paths they were working in, an IP address for good measure. Every one of those is a small betrayal of someone who installed your tool to get a job done, not to become a data point. And the cost when users notice isn't a slap on the wrist. It's trust, and trust in a developer tool does not grow back quickly. A tool that surprises you once with what it was quietly collecting is a tool you uninstall and warn your colleagues about. So go-tool-base's telemetry started from a different question. Not "how do we collect the most data" but "how do we collect useful data without ever putting the user in a position they didn't choose". The foundation is the simplest possible rule, and it's absolute. Telemetry is never enabled by default. A freshly installed tool built on go-tool-base sends nothing. Not a heartbeat, not a ping, nothing at all. It only starts collecting when the user makes an expli
Short answer: LangChain gives you high-level building blocks and a ready-made agent. LangGraph is the low-level orchestration runtime for stateful, controllable workflows. LangChain's agent runs on LangGraph under the hood. Let's see the difference in code. from langchain.agents import create_agent from langchain.tools import tool @tool def get_policy_limit(policy_id: str) -> str: """Return the claim limit for a policy.""" return "Limit for " + policy_id + " is ₹5,00,000" agent = create_agent( model="openai:gpt-4.1-mini", tools=[get_policy_limit], system_prompt="You are a helpful insurance assistant.", ) result = agent.invoke( {"messages": [{"role": "user", "content": "What is the limit on policy P-1029?"}]} ) print(result["messages"][-1].content) The model decides which tools to call and when to stop. Perfect for assistants and simple tool use. Now a claims workflow: classify the claim, route it, and pause for human approval on large amounts. from typing import TypedDict from langgraph.graph import StateGraph, START, END from langgraph.checkpoint.memory import InMemorySaver from langgraph.types import interrupt, Command class ClaimState(TypedDict): claim_text: str amount: float approved: bool def assess(state: ClaimState): # call an LLM or a decision model here to extract the amount return {"amount": 75000.0} def route(state: ClaimState) -> str: return "human_review" if state["amount"] > 50000 else "auto_approve" def human_review(state: ClaimState): decision = interrupt({"question": "Approve this claim?", "amount": state["amount"]}) return {"approved": decision == "yes"} def auto_approve(state: ClaimState): return {"approved": True} builder = StateGraph(ClaimState) builder.add_node("assess", assess) builder.add_node("human_review", human_review) builder.add_node("auto_approve", auto_approve) builder.add_edge(START, "assess") builder.add_conditional_edges("assess", route, ["human_review", "auto_approve"]) builder.add_edge("human_review", END) builder.add_edge("auto_