AI 资讯
Injecting WorkManager into ViewModels with Dagger Hilt. No Context, No Boilerplate, Always a WorkQuery Back
WorkManager is the right tool for deferrable, guaranteed background work in Android. But the default setup pushes you toward boilerplate fast: you end up calling WorkManager.getInstance(context) inside ViewModels, "passing Context where it doesn't belong", re-registering observers scattered across the codebase, and getting no consistent way to query the state of your enqueued work. This tutorial shows how to build a clean, injectable WorkManagerHandler using Dagger Hilt, a single interface that any ViewModel can receive through constructor injection, with zero Context and a guaranteed WorkQuery callback on every call so you always know what to observe. By the end, you'll have: A WorkManager singleton provided through Hilt A custom Configuration.Provider that plugs Hilt's HiltWorkerFactory into WorkManager at initialization A WorkManagerHandler interface with a WorkManagerHandlerImpl that encapsulates enqueueing, chaining, and query registration ViewModels that declare WorkManagerHandler as a plain constructor dependency The pattern scales cleanly as you add workers: each new worker is one method on the handler, and the ViewModel never knows or cares how work is scheduled underneath. Prerequisites : familiarity with Dagger Hilt basics, Jetpack WorkManager fundamentals, and Kotlin coroutines. A working Android project with Hilt already configured is assumed. Part 1: Application Setup and Custom Configuration.Provider By default, WorkManager initializes itself automatically using its own internal factory. The problem is that Hilt-injected workers need Hilt's factory HiltWorkerFactory to resolve their @Inject constructor dependencies. If you let WorkManager self-initialize, your workers won't have access to any of your Hilt bindings. The fix is to disable auto-initialization and take manual control via Configuration.Provider and AndroidManifest.xml 1. Disable auto-initialization In your AndroidManifest.xml , remove WorkManager's default initializer: <application ... > <
AI 资讯
The “steroid olympics” were a circus—and a window into our culture
Testosterone. Methenolone. Nandrolone. Human growth hormone and EPO. Meldonium, modafinil, and mixed amphetamine salts. Clomiphene, anastrozole, levothyroxine, and liothyronine. Patches and capsules, creams and pills. A whole galaxy of steroids, metabolic modulators, and synthetic hormones coursing through the blood of a few dozen swimmers, sprinters, and weightlifters. And millions of dollars up for grabs for athletes…
AI 资讯
Waymo built a virtual driver to study how humans react to surprises on the road
Waymo has a lot of experience building virtual systems to help its autonomous vehicles better understand the real world. It built realistic 3D worlds to better anticipate natural disasters and unpredictable edge cases. It created a virtual representation of a hyperattentive driver to test against its own autonomous vehicles in a series of simulated scenarios […]
AI 资讯
Waymo says it built a better benchmark for comparing robotaxis to humans
Waymo created a new computer model to help it better understand how humans behave in crash scenarios that its robotaxis encounter.
AI 资讯
WhatsApp ordered to host rival AI assistants for free
Meta has been ordered by the European Commission to restore free WhatsApp access for chatbots made by rival AI providers while the regulator finishes its antitrust investigation. The rare interim measure announced on Tuesday was deemed necessary "to prevent serious and irreparable damage to competition" in the general-purpose AI assistant market. This is only the […]
开发者
Why Checkout Flows Break More Than Anything Else in Delivery Apps
Every QA team knows the feeling. The home screen works. Browse works. Search works. Cart works. And...
AI 资讯
Meta signs first AI data center deal in India with Reliance
The 168-megawatt facility will support Meta's global AI computing needs and can be expanded over time.
AI 资讯
Logitech’s new Mobi Fold squeezes a lot of functionality into a tiny folding mouse
Logitech finally announced its new ultraportable travel mouse following leaked marketing images that spoiled the surprise last month. As the name implies, the Mobi Fold is a compact mouse that can fold in half using a hinge that can pivot about 130 degrees. At $79.99 in graphite, off-white, lilac, and sand color options, the Mobi […]
AI 资讯
Cache Deep Dive IV — TLB, Huge Pages, and Memory-Level Parallelism
Earlier parts examined the performance characteristics of sequential and random access under single-threaded execution, and noted in passing the destructive effect of random access on the TLB. This part devotes full attention to the TLB: what it is, why a TLB miss is more severe than a cache miss, why a page table walk constitutes one of the longest dependency chains a CPU can encounter, how huge pages fundamentally alter TLB reach, and where memory-level parallelism falters in the face of TLB misses. Page Boundaries: Where the Prefetcher Halts Part III, in its discussion of prefetchers, noted a hard constraint: a prefetcher must not cross page boundaries on its own authority. The operating system manages virtual memory in units of pages (typically 4 KB, i.e., 64 cache lines). When a program reaches the end of one page and is about to step into the next, the prefetcher cannot proceed. The reason is that the next page may not reside in physical memory (it may have been swapped out to disk), or it may be an entirely invalid virtual address — if the prefetcher were to speculatively initiate an access to the next page, it would trigger a page fault: the OS would have to suspend the process and swap the page in from disk; in the case of an invalid address, the OS would terminate the process outright. From a security standpoint, the prefetcher neither can nor is permitted to autonomously cross page boundaries without TLB approval. Hence a performance brake appears every 4 KB — even when traversing an array sequentially, after every 64 cache line accesses the prefetch pipeline must pause and await confirmation of an address translation. This is not to say that modern CPU prefetchers are completely unable to cross pages. Intel's Next Page Prefetcher and AMD's equivalent mechanism can consult the TLB when approaching a page boundary — if the address mapping for the next page is already registered in the TLB, the prefetcher receives clearance to continue prefetching across th
AI 资讯
How to Transcribe a YouTube Video (Free, in Under a Minute)
Building a "paste a YouTube link, get a transcript" feature sounds trivial until you deploy it to a server. The moment your request comes from a datacenter IP instead of a residential one, YouTube responds with LOGIN_REQUIRED or quietly serves nothing. Here's how VidTranscriber handles it. The problem There are two ways to get text from a YouTube video: Existing captions — if the uploader (or YouTube's auto-caption) provides them, you can fetch the caption track directly. Fast, free, no transcription needed. Transcribe the audio — pull the audio stream and run it through a speech-to-text model (Whisper-family). Works for any video, but costs compute. Both start with talking to YouTube from your server — and that's where it breaks. YouTube aggressively gates datacenter traffic: the watch page and InnerTube API return LOGIN_REQUIRED , and naive audio fetching gets reCAPTCHA'd. The approach The fix is to separate where the request originates from where the work happens : A Cloudflare Worker handles the user request and orchestration. Caption/audio fetching is routed through a path whose egress isn't treated as a bot — so the LOGIN_REQUIRED wall doesn't trigger. Captions, when available, become the primary path (no transcription cost). Only when there are no usable captions do we fall back to downloading audio and running Whisper. Long jobs go onto a queue (Cloudflare Queues) so the request returns immediately and the transcript streams in as it completes. Why captions-first matters Most "transcript generator" traffic is for videos that already have captions — talks, tutorials, news. Serving those from the caption track is instant and free, which means the expensive Whisper path is reserved for the minority of videos that actually need it. That's the difference between a tool that's cheap to run and one that isn't. What's still hard IP reputation drifts — what works today can get throttled tomorrow, so the extraction path needs monitoring and fallbacks. Caption quality
AI 资讯
Headless CMS Security: Why Decoupled Is Safer
📝 Originally published on unfoldcms.com — reposted here for the DEV community. (I work on UnfoldCMS.) A coupled CMS puts the admin login on the same hostname visitors reach. A headless CMS puts it on a different hostname behind auth. That single architectural difference is why headless CMS security is meaningfully better than traditional coupled-CMS security on most real-world dimensions — and it's also why the comparison gets oversimplified into "headless is more secure" when the truth is more interesting. This post is the architectural take on headless CMS security : why decoupled is safer on most dimensions, where it can be less safe if you don't handle API hygiene properly, and what the honest comparison looks like in 2026. TL;DR : headless wins on attack-surface reduction (admin off the public hostname, smaller plugin attack surface, API-first auth model) but loses on dimensions teams typically don't think about (exposed APIs without rate limits, JWT misuse, secrets in frontend code, draft preview tokens leaking). A well-built headless CMS is meaningfully more secure than a typical WordPress site; a poorly-configured headless CMS can be worse than a maintained WordPress site. The architecture biases toward safer; the implementation determines actual outcomes. The audience: technical decision-makers and security-conscious teams comparing CMS architectures with security as a deciding factor. If you're earlier in the architectural decision, see headless CMS vs traditional CMS: key differences . For the WordPress-specific security picture this post compares against, WordPress security problems in 2026 . The Attack Surface Difference The single biggest architectural difference between coupled and headless CMS security is where the admin lives . A traditional WordPress site puts the admin login at yourdomain.com/wp-admin . The same hostname your visitors reach. The same SSL cert. The same Cloudflare config. Every brute-force attempt, every credential-stuffing bot, ev
AI 资讯
⚡ Proof Compounds. Claims Decay. — Why Delivery Is Your Next Marketing Asset
Here is the move most technical service providers miss: Every project you deliver quietly dies inside a private folder. Every project you deliver with receipts becomes a trust asset that sells the next sprint without you lifting a finger. The Insight Almost No One Acts On Delivery is not the end of marketing. Delivery is where the next marketing asset is born. The before/after screenshot. The launch-readiness report excerpt. The workflow map. The metric improvement. The buyer quote. All of that is proof. And proof is the compound interest of service work. Claims decay. Proof compounds. 1️⃣ What Proof Actually Looks Like This is the proof asset menu. Every sprint should produce at least 1 item from this list: Before/after screenshot — the most shareable format Launch-readiness report excerpt — shows rigor and standard Workflow map — visual, specific, credibility-dense Dashboard screenshot — metrics that moved Test checklist — shows what was verified, not just what was built Client quote — even 1 sentence is worth 1,000 words of claims Metric improvement — "response time dropped from 24 hours to 4 minutes" Public teardown — anonymous version of the diagnosis Case study — structured story: context → pain → fix → result One-minute walkthrough video — screen-recorded, narrated, personal You do not need all of them. You need 1 per sprint. 2️⃣ The Case Study Structure That Sells A case study is not a trophy. It is a reusable trust asset. Use this structure every time: 1️⃣ Context — who had the problem? (anonymized if needed) 2️⃣ Pain — what was it costing them? 3️⃣ Hidden cause — what was really broken underneath? 4️⃣ Fix — what did you change, specifically? 5️⃣ Result — what improved? With a number. 6️⃣ Proof — what artifact backs it up? 7️⃣ Lesson — what should similar buyers do next? That is 7 steps. The whole thing can fit in a LinkedIn post or a page section. And here is the thing most people are not talking about: a case study with a specific number outperforms 10 po
AI 资讯
🔥 The Sales Call Is Not a Performance — It's a Diagnosis
I have watched founders lose sales calls they should have won. Not because they lacked skill. Not because the offer was wrong. Because they walked in to prove they were smart — instead of finding out whether the pain was real. Sales Is Diagnosis Plus Decision The call is not there for you to pitch. The call is there to find out: Is the pain real? Does the buyer have urgency? Does the budget exist? Can a fixed-scope sprint create a clear win? That is it. Four questions. Everything else follows from those. Sales is not pressure. Sales is diagnosis plus decision. 1️⃣ The Call Structure That Works Frame the call in the first 60 seconds: "I'll understand the current state, ask what is costing you, then tell you whether a sprint makes sense. If it doesn't, I'll say so." That sentence does 3 things: Sets expectations — no pressure, no hard close Signals competence — you have done this before Removes the buyer's guard — they can be honest about what is broken Then run this flow: 1️⃣ Current state — what exists now? 2️⃣ Pain — what is broken or slow? 3️⃣ Cost — what does it cost in time, money, trust, or delay? 4️⃣ Urgency — why now? 5️⃣ Decision — who approves? 6️⃣ Success — what would make this worth paying for? 7️⃣ Close — recommend the sprint or walk away 2️⃣ The Questions That Reveal Money These are the 6 questions I use to find whether a sprint is worth recommending: "What happens if this stays broken for another 30 days?" — reveals urgency and cost "What have you already tried?" — reveals how serious they are "Where does the current process lose leads, users, time, or trust?" — reveals the money leak "Who feels this pain most inside the business?" — reveals whether the buyer is also the decision-maker "What would make this an obvious win?" — reveals success criteria before you price "If we fixed only one thing first, what would matter most?" — reveals scope Listen for the answer with the money in it. That is the thing you fix. That is what you price. That is the sprin
AI 资讯
🧠 The Million-Dollar Math Is Boring — And That's the Point
A million dollars is emotional as a dream. As math, it is boring. And that is exactly why most people never get close. Break It Down Here is the thing: $1M/year is not one big bet. It is a machine. And machines are built from boring, repeatable components. 20 clients at $50,000? That is $1M. 100 clients at $10,000? That is $1M. 12 retainers at $4,000/month? That is $576k — plus 4 sprints at $10,000 each gets you to $616k. The question is not whether the number is possible. The question is which machine can realistically produce it — from where you actually stand today. 1️⃣ The Practical Ladder Here is how the staged path actually works for an AI service business: Stage What You Are Doing Why It Matters Stage 1 Sell fixed-scope sprints Creates cash and proof Stage 2 Turn repeated sprint work into templates, SOPs, automations Reduces delivery time, increases margin Stage 3 Sell retainers around highest-demand system Predictable monthly cash Stage 4 Productize repeated workflow into software or toolkit Scalable without more hours Stage 5 Scale the thing the market already proved it wants Compound the machine Notice what is missing from Stage 1. There is no SaaS. No product. No cold paid traffic. No team. Just skill, packaged cleanly, sold to people with money and a painful problem. That is the fastest path — not the most glamorous one. 2️⃣ The Proof-of-Force Line The first mission is not $1M. The first mission is $10k/month — reliably, from sprint work. Here is what that actually looks like: 2 × $1,500 teardown/audit packages = $3,000 2 × $3,500 implementation sprints = $7,000 2 × $5,000 launch/GTM sprints = $10,000 3 × $2,000 retainers = $6,000/month That is not the finish line. It is the proof-of-force line. It proves the machine works. It funds the next iteration. It creates the case studies that make the next sprint easier to sell. Then you go from $10k/month to $25k. Then $50k. Then you make the productization decision from a position of demand — not hope. 3️⃣ The
AI 资讯
📊 Distribution Is the Moat — And Most Technical Founders Have None
Products are easier to build. Workflows are easier to automate. Content is easier to generate. But trust is not easier. Attention is not easier. Buyer memory is not easier. The Hard Truth Here is the thing most people are not talking about in 2026: The bottleneck is no longer the product. The bottleneck is whether the right buyer has seen your diagnosis 3 times in 2 weeks. Because that is how trust is built. Not with one perfect post. With repeated, useful presence in the right feed. Distribution is the moat. 1️⃣ Why "Staying Active" Is the Wrong Goal Most founders post to stay active. That is not a content strategy. That is anxiety dressed up as marketing. Every post should do one of 3 things: Make the buyer understand a pain they already have Make the buyer trust your diagnosis of that pain Move the buyer closer to a conversation A post about your tech stack? Probably none of those. A post that says "Your AI app is not launch-ready until auth, payments, logging, and rollback are boring" — that does all 3. 2️⃣ The Five Content Pillars That Build Pipeline Here is the system I use. 5 pillars. Everything maps to one of them: Pillar What It Signals Launch risk Why AI-built products break before production GTM systems How founders turn expertise into pipeline Workflow automation How businesses leak time and revenue Proof and case studies What changed before/after — with receipts Founder operating lessons The discipline behind building for money Every post I write maps to one of these. Not because it is tidy. Because each pillar speaks directly to a buyer who has a specific pain — and positions me as the operator who sees it clearly. 3️⃣ The Daily Format That Creates Pipeline This is the actual weekly posting structure that works: Monday — mistake post: a painful thing technical founders do wrong Tuesday — teardown post: a real example dissected publicly Wednesday — checklist: the 10-item audit your buyer needs Thursday — before/after: what changed after a sprint, with s
AI 资讯
🎯 "I Build AI Automations" Is Killing Your Close Rate
The conversation I keep having with AI founders goes like this: "I've sent 50 DMs. No one is biting." Then I look at the offer. "I build AI automations for businesses." There is the problem. Bad, Better, Best — The Offer Anatomy Breakdown Most technical people sell their skill. Buyers do not buy skill. They buy a removed headache. Let me break down the bad/better/best framework I use for every offer I build: Bad: I build AI automations for businesses. Better: I help service businesses automate lead follow-up so no enquiry gets ignored. Best: I install a 7-day lead recovery system that captures, qualifies, follows up, and tracks every new enquiry — so missed leads stop disappearing into WhatsApp, email, and memory. The best version does 4 things in one sentence: Names the buyer — service businesses Names the painful outcome — missed leads disappearing Names the mechanism — a 7-day lead recovery system Names the specific result — follows up, tracks, captures That is not wordsmithing. That is the difference between getting ignored and starting a conversation. 1️⃣ The Eight-Part Offer Anatomy Every offer worth selling should answer all 8 of these: Part What It Does Buyer Who exactly has this pain? Pain What expensive thing is broken? Outcome What changes after the sprint? Mechanism What system creates the outcome? Timeline How quickly does the buyer see progress? Deliverables What exactly is included? Proof Why should the buyer believe it? CTA What is the next small step? If any row in that table is blank for your current offer — you are leaving money in the explanation gap. 2️⃣ The Offers That Actually Sell Here is what the strongest AI service offers look like right now. Not vague consulting. Fixed-scope sprints with outcomes. "I turn your AI-built app from fragile demo into launch-ready product" — auth, payments, logging, analytics, deployment, launch-readiness report — in 7–14 days. Price: $2,500–$7,500. "I build your founder-led GTM system" — content engine, lead c
AI 资讯
⚡ Your AI Demo Is Not a Product — Here's the Checklist That Proves It
The demo worked perfectly. ✅ Production? First real users. 50% failure rate. ❌ The Gap Nobody Warns You About I see this pattern every week — a founder launches, pushes traffic, and watches their app fall apart in real conditions. Not because the core idea was wrong. Because "it works on my machine" is not a launch-readiness standard. AI-built apps in 2026 ship fast. That is the superpower. But fast shipping without hardening means you are presenting a demo as a product — and real users will find every crack within 48 hours. 1️⃣ What "Launch-Ready" Actually Means Launch-ready is not "the feature works." Launch-ready is when auth, payments, logging, analytics, database permissions, and rollback are boring — because they have already been thought through and tested. Here is the difference: Demo State Launch-Ready State Auth works for happy path Auth handles edge cases, token expiry, role conflicts Payments go through in test mode Webhooks confirmed, retries handled, failures logged Console.log for debugging Structured logging with alerts on errors No analytics Core events tracked from day 1 Manual deploy Automated deploy + rollback path exists No onboarding flow User activation measured from first session If your app is in column one — you are not ready. 2️⃣ The Launch-Readiness Checklist Copy this. Run it before you push traffic. Authentication and authorization — roles, permissions, token handling, session expiry Environment variables — nothing sensitive exposed, prod secrets separate from dev Database permissions — row-level security, no open-read tables, no admin keys in frontend Payment webhooks — test confirmed, failure logged, retry logic exists Error logging — uncaught exceptions surfaced somewhere you will actually see them Analytics events — signup, activation, key action, churn signal — all firing Rate limits — LLM calls protected, API routes guarded Backups and rollback — you have a path back if something breaks Onboarding flow — first session gets the use
产品设计
Building a Liquidity Monitoring Engine for a Polymarket Trading bot: Architecture, Strategy, and Real-Time Market Intelligence
In every successful Polymarket Trading bot, liquidity monitoring is one of the most overlooked yet...
产品设计
FluidDocs Deck Builder
Turn a prompt into a real HTML deck Discussion | Link
AI 资讯
The real Fable 5 story is the data retention clause
Something worth paying attention to in the Fable 5 launch that I think will get buried under benchmark comparisons. The most consequential line in the AWS announcement wasn’t about context windows or coding performance, it was tucked into the infrastructure section: “Once you opt into data retention, your data will leave AWS’s data and security boundary.” That’s not a model feature, that’s an enterprise architecture constraint. For a lot of companies that sentence alone disqualifies Fable 5 from touching certain workloads no matter how good the model is. The Fable vs Mythos split is also worth sitting with. Same underlying capability apparently, but Mythos is gated behind Project Glasswing and vetted partners only. Anthropic is essentially saying some capability is too sensitive for flat API access, which is a pretty different philosophy than “here’s our best model, go build.” Does the Fable/Mythos split read as responsible deployment to people here or more like managed scarcity? And anyone in enterprise AI already hitting the retention requirement as an actual blocker? submitted by /u/Old_Cap4710 [link] [留言]