开源项目
What are git worktrees, and why should I use them?
Git worktrees have been around since 2015, but it wasn't until recently they became popular. Learn what they are, how to use them, and why you might. The post What are git worktrees, and why should I use them? appeared first on The GitHub Blog .
AI 资讯
Prop For That
Props for That creates live props based things CSS can't normally see in the browser. Things like cursor position, progress values, certain form states, current time, scroll velocity. Prop For That originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
开发者
How we became the first Indian hosting company to deploy Cloudflare Magic Transit
I run a hosting company. I'm also a BCA student. These two things coexist somehow. GigaNodes started in 2022 as a game server hosting brand — Minecraft, FiveM, ARK, the usual. Over time it grew into a proper VPS and dedicated server operation under GigaNode Technologies Private Limited, with AMD EPYC 7C13 hardware co-located at Yotta DC Noida. Earlier this year we did something I haven't seen any other Indian hosting provider do: we deployed Cloudflare Magic Transit across our entire network. What that actually means Magic Transit is not Cloudflare CDN. It is not a proxy. It is Cloudflare's enterprise network product where your IP prefixes get announced via BGP into Cloudflare's global backbone. All traffic destined for your servers enters Cloudflare's network first, gets scrubbed for attack traffic, and clean packets get forwarded to your data center via GRE tunnel. To deploy it, your infrastructure partner needs to have BGP-level integration with Cloudflare. Individual companies can't just sign up for it. We made it work through our partnership with Advika Datacenters Private Limited (AS135682) at Yotta DC Noida. The result: DDoS traffic never reaches our hardware. Our servers don't see the attack at all. Why no other Indian provider had done this Most Indian hosting providers use blackholing. When an attack comes in, they null-route your IP. Server goes offline. Attack stops eventually. Server comes back. That is the standard. That is what "DDoS protection included" usually means in India. The difference with Magic Transit is that legitimate traffic keeps flowing while attack traffic gets dropped. Your server stays online. Players stay connected. Trades don't get interrupted. We found out pretty quickly this actually works. We took a 1.7 Tbps attack after deployment. The servers didn't notice. A 1.7 Tbps volumetric attack hit our network in May 2026. Cloudflare absorbed it at the edge. No downtime. No support tickets from customers. We found out from the Cloudfla
AI 资讯
Accessibility-First Web Development: A Practical Framework
Here's a question most businesses never think to ask when they're building a website: can everyone actually use this? Not just the people on a fast laptop with perfect vision and a reliable internet connection. Everyone. The person navigating your site with a screen reader because they're visually impaired. The user who can't use a mouse and relies entirely on a keyboard. The individual with a cognitive disability who needs clear, consistent layouts to make sense of what they're looking at. If your website doesn't work for these people, it doesn't work full stop. And yet, accessibility is almost always the last thing discussed in a web development project, usually buried somewhere at the bottom of a checklist, treated as a nice-to-have instead of a requirement. That needs to change. Not because of legal compliance (though that's a real consideration too), but because accessibility-first web development simply produces better websites. Faster load times, cleaner code, better SEO, higher user retention accessible design delivers all of that. The framework isn't complicated. It just requires thinking about it from the start instead of trying to bolt it on at the end. This is that framework. What Accessibility-First Web Development Actually Means Accessibility-first is a mindset, not a checklist. It means building with the full range of human experience in mind from day one not auditing for compliance after the site is already live. It's Not the Same as Compliance WCAG (Web Content Accessibility Guidelines) is the global standard for web accessibility. Most businesses know it exists. Very few understand what it actually requires or that meeting WCAG 2.1 AA standards isn't a ceiling, it's a floor. Compliance means you passed the audit. Accessibility-first means you thought about disabled users during architecture decisions, during design reviews, during content writing, and during QA. Compliance is a document. Accessibility-first is a process. The gap between the two mat
开发者
YouTube字幕突然消失?原来是节点的锅——一次极其小众的排障经历
问题降临:毫无征兆 那天和往常一样,打开YouTube准备看一个英文视频。习惯性地点开字幕按钮—— 没反应。 不是字幕延迟,不是字幕错位,而是整个字幕功能像是从这个世界上蒸发了一样。原始语言的字幕不可用,点进字幕设置一看,连翻译选项都是灰的。没有原始字幕,自然也就没有任何语言的翻译字幕。 一整个功能链,从根部断裂。 第一反应:一定是扩展插件搞的鬼 作为一个浏览器里装了不少扩展和油猴脚本的用户,我的第一直觉非常明确—— 肯定是哪个插件冲突了。 这个判断合情合理。浏览器扩展劫持页面元素、油猴脚本注入自定义代码,这些操作干扰YouTube的正常功能,实在是太常见了。之前遇到过播放器界面异常、按钮消失之类的问题,十次有八次都是扩展惹的祸。 于是我开始了标准排障流程: 禁用所有油猴脚本 → 刷新 → 字幕依然不可用 禁用所有浏览器扩展 → 刷新 → 字幕依然不可用 开无痕模式 (彻底排除扩展和缓存影响)→ 字幕依然不可用 三轮操作下来,扩展插件的嫌疑被彻底洗清。 但这还不是最让人困惑的部分。 真正的诡异之处:薛定谔的字幕 在反复测试的过程中,我发现了一个极其反直觉的现象: 字幕的可用性是随机的。 开着所有扩展 → 有时候字幕 有 ,有时候 没有 关掉所有扩展 → 有时候字幕 有 ,有时候 没有 这完全打破了因果逻辑。如果问题出在扩展上,那么"关掉扩展"就应该稳定地解决问题。但现实是,开和关都呈现随机状态,说明扩展根本不是变量—— 真正的变量藏在别的地方。 这种"薛定谔的字幕"状态让我一度非常迷茫。你没办法用常规的控制变量法去定位一个表现为随机的问题,除非你能找到那个真正在变化的隐藏变量。 灵光一闪:换个节点试试? 在排除了浏览器层面的所有可能之后,我突然想到了一个平时根本不会和"字幕"联系在一起的东西—— 网络节点。 抱着试一试的心态,我切换了代理节点,选了一个不同地区的服务器。 刷新页面。 字幕回来了。 原始字幕、自动翻译、多语言选项——一切恢复正常,仿佛之前的问题从未发生过。 我又切回原来的节点——字幕消失了。再切到新节点——字幕回来了。反复测试了好几次,结果完全一致。 真相大白:问题出在节点上。 恍然大悟:视频和字幕,原来是两套系统 这次经历让我意识到一个之前从未注意到的事实: YouTube的视频流和字幕数据,很可能是由不同的服务器(或CDN节点)分别提供的。 这意味着: 视频能正常播放 ≠ 字幕能正常加载 你的网络可以顺畅地连接到视频服务器,但与此同时,字幕服务器可能对你当前的IP/地区/节点不可达或响应异常 不同的代理节点连接到的Google后端服务器不同,某些节点恰好无法正常获取字幕数据 这也完美解释了之前"随机可用"的现象。我在测试扩展的过程中,代理工具可能在后台自动切换了节点(很多代理工具有负载均衡或自动切换功能),导致有时碰巧连上了能提供字幕的服务器,有时则没有。我一直以为变量是"扩展的开关",实际上真正在暗中变化的是"网络节点"。 技术推测 虽然Google没有公开YouTube的完整架构细节,但根据这次经历可以合理推测: YouTube使用分布式CDN架构 ,视频内容、字幕数据、评论、推荐信息等可能分布在不同的微服务和服务器集群上 字幕API的端点 可能与视频流的端点不同,它们的可用性、地理限制、负载状况都是独立的 某些地区的某些IP段可能因为各种原因(服务器维护、区域限制、DNS解析差异、临时故障)无法正常访问字幕服务 这种问题具有 高度的偶发性和地域性 ,这也是为什么它如此小众,在网上几乎搜不到相关讨论 写在最后 这大概是我遇到过的最小众、最反直觉的技术问题之一。 它小众到什么程度呢?你去搜索"YouTube字幕不可用",得到的答案几乎都是:清除缓存、禁用扩展、检查字幕是否被上传者关闭、换个浏览器试试。 没有人会告诉你"换个代理节点"。 因为在绝大多数人的认知里,"视频都能看"就等于"网络没问题",不会有人把字幕缺失和网络节点联系在一起。 但事实就是这么奇怪: 视频能播放,不代表字幕能加载,因为它们根本就不在同一条路上。 这次经历也给了我一个教训:当排障陷入死胡同的时候,不要只盯着最明显的嫌疑犯。真正的问题,有时候藏在你认为"完全不可能"的地方。 下次再遇到YouTube的某个功能莫名其妙消失,而视频本身却能正常播放的时候——先换个节点试试。说不定,答案就在那里。
AI 资讯
My weekly review clocked 14 minutes median — here's the one structural change that made it stick
Obsidian prompts beat open-ended reflection every time: median review time across 6 weeks was 14 minutes, fastest was 9, slowest was 22 (and that week genuinely deserved 22). I ran the GTD-adjacent version faithfully for six weeks — 90 minutes, full capture sweep, energy audit, the works. Then less faithfully for two months. Then I stopped entirely and didn't notice for three weeks. That last part is the failure mode nobody writes about. The format wasn't wrong; it was sized for a version of my week that rarely existed. The fix wasn't a better framework. It was shorter, closed questions. My Obsidian template has seven prompts, none of them open-ended: what shipped, what didn't, what I avoided and why, one thing to drop, one thing to protect. One-to-three sentence answer ceiling per prompt, hard stop. Open questions like "how was your week?" generate rumination. Closed questions generate decisions. That distinction is doing almost all the work. The Notion version I ran before this taught me something useful about tool selection too. I built rollups — tasks closed this week, open tasks by project, inbox count, stalled for 7+ days — and they worked exactly as designed. What Notion couldn't do was get out of its own way during actual reflection. Every time I tried to think through what went wrong, I'd end up reorganizing a database instead. Forty minutes later, new linked database, zero review completed. The same flexibility that makes Notion a good data layer makes it a bad "close the loop and move on" environment. Obsidian's plain-file simplicity is the right call for the thinking layer — and completely wrong for the data layer. Neither tool alone is the honest answer. There's also a cautionary note from my automation setup: a Zapier zap that pushed completed tasks into Notion for weekly rollup ran cleanly for two months, then silently broke when my task manager updated their API response format. Modified tasks started logging as completed. My rollup became noise befo
AI 资讯
Turn any PHP host into a gateway to your local network with host2gateway
Ever wanted to turn a simple PHP host into a gateway for your local network? I built host2gateway to do exactly that. ProfiDE / host2gateway Uses a PHP host or web server to create a gateway that securely allows access to clients through it. host2gateway host2gateway is a tool designed to provide access from a web server (Gateway) to a client without requiring static IP addresses, port forwarding, changing firewall rules, or other complex configurations . It is written in PHP and can be deployed on most hosting provider environments. Features No need for static IP or port forwarding: There is no requirement to modify your firewall or router settings. Platform-independent: Works anywhere PHP 8.2 or higher is supported, making it suitable for most shared hosting services. Lightweight and simple: Minimal dependencies and easy deployment. Strong encryption built-in: Uses a powerful encryption mechanism that secures all communication, even if SSL/TLS is not available on the hosting provider. Your data is protected at all times, regardless of your environment. How It Works The client establishes an outbound connection to a Gateway server that is accessible from the internet (a PHP-enabled web host). Both sides communicate… View on GitHub 🔥 What is host2gateway? It's a lightweight tool that transforms any server running PHP into a gateway that can route traffic, manage requests, and act as a bridge between your local network and external services. No heavy dependencies. No complex configs. Just PHP, Cron and a network interface. 🧠 Why I built this Most gateway solutions are bulky, written in Go or Rust, and require root access and system-level changes. But what if you only have: A shared hosting account A basic VPS with PHP enabled A Raspberry Pi running a PHP server host2gateway fills that gap. It gives you gateway-like capabilities using the tools you already have. 🛡️ Use cases Use Case Description Local network bridge Connect isolated parts of your network Traffic inspe
AI 资讯
How the Web Actually Works: HTTP from the Ground Up
I've been going through Jim Kurose's networking lectures lately, and I kept finding myself pausing to re-read the same sections. Not because they were confusing - because things I'd been using for years were finally clicking into place. This post is me writing down what I learned, in the order it started making sense. Before HTTP, there's a webpage A webpage isn't one file. When you open a URL, your browser fetches a base HTML file - and that file references other objects. Images. Scripts. Stylesheets. Each one lives at its own URL. Each one has to be fetched separately. So loading a single "page" might mean firing off 20+ individual requests. This detail matters because the entire evolution of HTTP - from 1.0 to 3 - is basically the story of making those 20 fetches faster. HTTP runs on TCP. That has consequences. HTTP doesn't manage its own connections. It hands that job to TCP. When your browser wants something, it first opens a TCP connection to the server (port 80 for HTTP, 443 for HTTPS), and then asks for the object. Opening a TCP connection isn't free. It takes a round-trip - your machine says "hello," the server says "hello back," and then you can actually talk. That's one RTT(Round Trip Time) just to shake hands, before a single byte of your webpage arrives. So every HTTP request carries at least 2 RTTs of overhead: 1 to open the TCP connection, 1 for the actual request/response. Do that 20 times and you've spent 40 RTTs before the page renders. HTTP/1.0 vs HTTP/1.1: one change that mattered a lot HTTP/1.0 (non-persistent): open a TCP connection, fetch one object, close the connection. Repeat for every object. HTTP/1.1 (persistent): open a TCP connection, fetch as many objects as you need, then close. The server leaves the connection open after each response. That one change cuts subsequent fetches from 2 RTTs to 1 RTT each. For a page with 20 objects, that's real time saved - not microseconds, but hundreds of milliseconds that users actually feel. What an
AI 资讯
AI Agents Are the Best Thing to Happen to Network Administration Since SDN
AI Agents Are the Best Thing to Happen to Network Administration Since SDN A single API key, an AI agent, and a router behind a double-NAT in Southeast Asia. What happened next changed how I think about network management. I manage UniFi routers spread throughout the ASEAN region — some for friends, some for relatives, one for a charity. They're in different cities, different ISPs, different levels of network hostility. Most sit behind carrier-grade NAT. A few are in places where the government firewall blocks VPN protocols at the transport layer. UniFi's own management interface has always been good. The web dashboard, accessible through Ubiquiti's cloud, gives me visibility into every site: device health, client lists, traffic stats, WiFi experience scores. It's one of the reasons I chose UniFi in the first place — the centralized GUI just works. But the GUI is still a GUI. It's clicks and menus and dropdowns. It's fast for one site, manageable for three, and tedious at ten. For anything beyond what Ubiquiti built into the interface, you'd need to write your own tooling. I never bothered, because I'm not a developer, and the built-in dashboard was good enough. Then AI agents arrived, and suddenly the calculation changed. The Discovery I knew UniFi had an API. I'd heard about it in passing — some REST endpoints for the controller, vaguely documented, probably read-only. I never looked into it seriously because what was I going to do with it? Write a Python script to poll client counts? Build a custom dashboard? Without a team of developers, an API is just a locked door. But when I started working with an AI agent, I gave it my UniFi cloud API key on a whim. I figured it could pull basic stats — the stuff from the Site Manager API at api.ui.com/v1 . Read-only. Dashboard-level. Useful as context for answering questions. Then the agent discovered something I'd completely missed: the Cloud Connector API . I owe this discovery in large part to the Art of WiFi PHP client
AI 资讯
HLD Fundamentals #1: Network Protocols
Network Protocols Network protocols define how computers communicate over a network. Whether you're opening Instagram, sending a WhatsApp message, watching Netflix, or transferring money through a banking app, some protocol is working behind the scenes to make communication possible. Client-Server Model What is it? The Client-Server model is a communication architecture where: Client requests a service or data. Server processes the request and returns a response. Most modern applications follow this architecture. How Does It Work? Client ---------- Request ----------> Server Client <--------- Response ---------- Server The client always initiates communication, and the server listens for incoming requests. Real World Example Instagram When you open Instagram: Mobile app sends a request. Instagram servers process the request. Feed data is fetched from databases. Posts are returned to your phone. Instagram App | V Instagram Server | V Database Advantages Centralized control Easier security management Easy maintenance Easier data consistency Disadvantages Server can become a bottleneck Single point of failure if not replicated Interview One-Liner Client-Server architecture is a centralized model where clients request resources and servers provide them. Peer-to-Peer (P2P) Model What is it? In a Peer-to-Peer network, every machine can act as both: Client Server There is no central server controlling communication. How Does It Work? Peer A <------> Peer B ^ ^ | | V V Peer C <------> Peer D Each peer can directly share resources with others. Real World Example BitTorrent Instead of downloading a file from one server: User | +--> Peer 1 | +--> Peer 2 | +--> Peer 3 Different parts of the file are downloaded from multiple peers simultaneously. Blockchain Bitcoin and Ethereum networks operate using Peer-to-Peer communication. Advantages Highly scalable No central server cost Better fault tolerance Disadvantages Harder to manage Security challenges Data consistency issues Inter
AI 资讯
You Are Not Underpaid Because You Are Foreign. You Just Never Saw The Number.
I place developers with US tech companies for a living. Before that sentence makes you close the tab: what follows is the thing I tell developers for free, one conversation at a time, until I got tired of saying it one person at a time. Last month a developer in Prague asked me if 55 dollars an hour was a reasonable rate. Nine years in. Kotlin, AWS. He had built and run a payment system for one of the largest Czech fintechs. Three million transactions a month. Zero P0 incidents in two years. A profile most US startups would fight over. I told him what the US market actually pays for that exact stack at that exact level. He went quiet for about thirty seconds. Then he said: "I have been contracting for three years. I just did the math." He had left roughly 180,000 dollars on the table. Not because he was not good enough. Because no one had ever told him the number. This is the most expensive blind spot in our industry, and almost nobody outside the US escapes it. So let me walk through why it happens, because once you see it you cannot unsee it. You are pricing against the only benchmark you have ever seen When you set your rate, you do not pull it from nowhere. You anchor it to something. And the only thing you have ever had to anchor to is your local market. So a senior engineer in Warsaw prices against Warsaw. One in Bucharest against Bucharest. You take the local senior salary, maybe add a premium because the client is foreign, and you land on a number that feels brave. Forty-five an hour feels brave when the engineer at the next desk makes the local equivalent of twenty. Here is the disruptive part. The US client is not paying for your location. They are not even thinking about your location, except as a logistics detail. They are paying for the work, and what that work is worth to their business. A payment system that does not go down is worth the same to a US fintech whether the person who built it sits in San Francisco or Brno. The value did not get cheaper w
科技前沿
Threads of underground fungal networks are long enough to reach beyond the Solar System
Researchers have quantified the length and mass of arbuscular mycorrhizal fungal networks globally.
AI 资讯
I Lost 30% of My UDP Packets — and the Network Was Innocent
A receiver pulling a UDP feed was missing roughly 30% of its messages. No errors, no exceptions, no stack traces — just gaps in the sequence numbers. The first suspect is always the network: a flaky switch, a saturated link, a tired NIC. The network was innocent. The packets were being dropped on the receiving host , after they'd already arrived. Here's how to tell the difference, and why it matters. Why UDP makes this sneaky UDP has no retransmission and no backpressure. When a datagram is lost, nobody is notified — not the sender, not the receiver. The packet simply isn't there. That means two completely different failures look identical from the application's point of view: The network dropped the packet before it reached your machine. Your own host accepted the packet and then threw it away after it arrived. The application sees the same thing in both cases: a missing sequence number. But the fix is in a different building depending on which one it is. Where the packets actually go The receive path is: NIC → kernel socket receive buffer → your recv() call. The kernel parks incoming datagrams in a per-socket buffer until your code reads them. If your code doesn't drain that buffer fast enough, it fills, and the kernel drops the overflow. Crucially, the kernel counts those drops. On Linux: # Per-protocol summary — look for "receive buffer errors" netstat -su # Or straight from the kernel counters cat /proc/net/snmp | grep -A1 Udp # InDatagrams ... InErrors RcvbufErrors ... If RcvbufErrors is climbing, the network did its job and your host discarded the datagrams. That single counter collapses a week of "is it the switch?" into about ten seconds of certainty. The actual cause In this case the socket receive buffer was sitting at the default (~208 KB). The sender burst faster than a single receive thread could call recv() . Average throughput looked fine on every dashboard — but the bursts filled the buffer in milliseconds, and everything past the brim was dropped.
AI 资讯
When code becomes cheaper, what still makes an engineer valuable?
When code becomes cheaper, what still makes an engineer valuable? Recently, while writing my cover letter for remote roles and Upwork projects, I asked myself a very direct question: Why should a remote team or client choose me, especially in the AI era? I do not think the answer should be: “Because I am the strongest engineer technically.” That is not how I want to position myself. What I want to become is this: A backend engineer who can turn unclear business problems into reliable, maintainable systems. AI is making implementation faster. It can generate code, explain technologies, and provide alternatives. At the same time, remote work and platforms like Upwork make competition more global. We are not only competing with engineers nearby, but also with engineers from everywhere. If the only question is “Who knows more frameworks, patterns, or tools?”, many ordinary engineers may feel hopeless. But I believe there is another path. In real systems, code is only part of the work. Someone still needs to understand the business workflow. Someone still needs to define what “correct” means. Someone still needs to identify risks, edge cases, performance concerns, and reliability boundaries. My usual way of working starts from these questions: What is the real requirement? What does correctness mean in this workflow? What data must stay consistent? What edge cases could break the process? What performance or reliability signals should be protected? Where should the module boundary be? Who should orchestrate the main flow, and who should act as collaborators? This “orchestrator + collaborators” thinking helps me keep the main business process clear. The orchestrator owns the workflow. The collaborators handle specific responsibilities such as validation, translation, persistence, messaging, or external integration. I also use AI in this process, but not only to generate code. I use it to challenge my assumptions, explore alternatives, find missing cases, improve naming, r
AI 资讯
Podcast: Craig McLuckie on Culture as a Team's Operating System in the AI Era
In this podcast, Shane Hastie, Lead Editor for Culture & Methods spoke to Craig McLuckie, co-creator of Kubernetes and CEO of Stacklok, about the impact of AI coding tools on open source communities and engineering teams, designing deliberate organisational culture, and navigating evolving career paths for engineers in the age of AI. By Craig McLuckie
科技前沿
After nearly breaking, NASA's Deep Space Network "worked well" on Artemis II
"Some missions are using more than what their paperwork would say."
AI 资讯
I Put a Neural Network Inside My Portfolio — No TensorFlow, No Server, 145 KB
Training a network from scratch in raw NumPy, quantizing it to int8, and running it as ~80 lines of dependency-free JavaScript — with a parity test proving the browser matches Python to 1e-6. Why bother? MNIST is a solved problem Digit recognition is the "hello world" of ML — that's exactly why I used it. The model isn't the point. The point is everything around the model, which happens to be the part that matters in production work too: training without a framework, compressing for deployment, running inference in a constrained environment, and proving the deployed system matches the trained one. Training: just NumPy and math The network is a 784→128→64→10 MLP — hand-written forward pass, backpropagation, and Adam optimizer. No autograd, no framework: # backward pass, by hand dz3 = ( probs - y_batch ) / batch_size grads_w [ 2 ] = a2 . T @ dz3 da2 = dz3 @ weights [ 2 ]. T dz2 = da2 * ( z2 > 0 ) # ReLU mask grads_w [ 1 ] = a1 . T @ dz2 ... One trick that matters for a drawing demo specifically: shift augmentation . MNIST digits are centered; humans draw wherever they like. Training on randomly translated copies makes the model tolerant of sloppy placement. Combined with MNIST-style preprocessing at inference (crop to bounding box, scale into a 20×20 box, center by center-of-mass), real-world doodles classify reliably. Final test accuracy: 98.2% . Compression: int8 in 15 lines A float32 weight file would be ~430 KB. Symmetric int8 quantization cuts it ~4×: scale = np . abs ( w ). max () / 127.0 q = np . clip ( np . round ( w / scale ), - 127 , 127 ). astype ( np . int8 ) One scale factor per layer, weights stored as base64 in JSON: 145 KB total , and quantized test accuracy is identical to float — 98.2%. Inference: ~80 lines of plain JavaScript In the browser, the weights are dequantized once on load, and inference is three matrix-vector products with ReLU and a softmax. ~109K multiply-adds — about a microsecond-scale problem for any modern device. No TensorFlow.js (t
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 ... > <
开发者
Who's Going To RubyConf 2026?
RubyConf holds a special place in my heart. It was the very first tech conference I attended after receiving a scholarship fresh out of Flatiron School back in 2017 (you can read about my experience here ), and then in 2021, it was the stage for my first conference talk in Denver. Now, in another first, I joined the Program Committee for RubyConf 2026 to help put the program together, and what a program it is! We have an absolutely amazing lineup this year, and I'm so excited to see it come to life! Who else is planning on attending? Let's make plans to meet up and say hi!
AI 资讯
Data Visualizer
Data Visualizer Live Demo 🌐 Try it live: https://datavisualizer.urlmediainspector.dev/ What It Is Data Visualizer is a visual workspace where developers can explore, transform, execute, and understand data using interconnected nodes on an infinite canvas. Instead of jumping between API tools, JSON viewers, spreadsheets, code editors, schema inspectors, and visualization platforms, everything happens inside a single interactive environment. Each node represents a specific capability and can be connected together to create powerful workflows for data exploration, processing, automation, and analysis. Key Features Infinite Visual Workspace Work on an unlimited canvas where data, code, APIs, documents, and visualizations can be organized as connected workflows instead of isolated files and tabs. API Exploration Connect to APIs, inspect responses, analyze payloads, and build reusable visual pipelines for data processing. JSON & YAML Visualization Navigate deeply nested structures through interactive visual representations that make complex data easier to understand. JavaScript & TypeScript Execution Run JavaScript and TypeScript directly inside workflow nodes to transform, filter, and manipulate data in real time. Browser-Based Python Runtime Execute real Python entirely in the browser without requiring local installations or external servers. CSV & Dataset Analysis Import and explore tabular data visually, making it easier to inspect records, understand relationships, and process large datasets. Schema Exploration Visualize schemas and nested structures to quickly understand how data is organized and connected. PDF, Image & Video Support Work with documents and media assets directly inside the workspace without constantly switching applications. Visual Data Pipelines Create workflows by connecting nodes together, allowing data to flow naturally between APIs, transformations, code execution, schemas, and visualizations. Interactive Data Transformation Modify and reshape