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

标签:#programming

找到 1580 篇相关文章

AI 资讯

Building AquaStat: Why We Started Tracking Data Center Water Usage

When people think about data centers, they usually think about servers, GPUs, electricity, and AI. Very few people think about water. That realization is what led me to start building AquaStat . Why AquaStat? Modern data centers consume significant amounts of water for cooling. Depending on the technology, climate, and workload, water usage can vary dramatically from one facility to another. Finding reliable information about that usage, however, is often difficult. Some facilities voluntarily publish sustainability reports. Others release only limited information. In many cases, information is scattered across government documents, environmental reports, local news articles, permits, or community discussions. I wanted to build a platform that could organize this information into something developers, researchers, journalists, and the public could actually use. What AquaStat Is AquaStat is an API-first platform focused on collecting, organizing, and analyzing information related to data center water usage. The long-term vision includes: A developer-friendly REST API OpenAPI documentation API key management A desktop control center A command-line interface Historical tracking Source attribution for collected information Transparent methodologies A modern TypeScript ecosystem Rather than hiding calculations, I want AquaStat to explain where information comes from and how conclusions are reached whenever possible. Technical Goals I'm designing AquaStat around several principles: API First Everything should be accessible through documented APIs before being exposed through a graphical interface. Strong Documentation Documentation should be treated as part of the product, not an afterthought. Reproducible Calculations Whenever AquaStat estimates or derives values, the methodology should be understandable and repeatable. Modern Tooling The project uses a modern TypeScript stack with an emphasis on maintainability, testing, and developer experience. Challenges One of the b

2026-07-16 原文 →
AI 资讯

#04 – Modules & Modern Python Project Structure

Welcome to Day 4! Today is all about clean architecture, dependency isolation, and modern Python tooling. You will learn how to structure your files, control execution flows, use modern tools like uv to manage virtual environments at lightning speed, and organize a codebase like a professional software engineer. 🚀 1. Modules & Packages 📦 Module: A single .py file containing variables, functions, or classes you want to reuse. Package: A directory of modules. __init__.py : Runs automatically when a package is imported, allowing you to expose a clean top-level API and hide internal folder nesting. Absolute Import: Imports specifying the full path from the project root ( from app.core import analyze ). Preferred by PEP 8 . Relative Import: Imports relative to the current file using dots ( from .utils import clean ). Single dot . is current folder; double dot .. is parent folder. A. Core Modules & Packages 🌱 Easy Starter Example Creating a basic module and importing it: # file: calculator.py (Our module) def add ( a , b ): return a + b # file: main.py (Importing our module) import calculator print ( calculator . add ( 5 , 3 )) # Output: 8 🏛️ Real-World Example: Database Package API Exposing internal package functions cleanly using __init__.py : # Project Layout: database/ ├── __init__.py ├── auth.py (defines login_user()) └── query.py (defines fetch_data()) # database/__init__.py # Expose functions relative to this folder so users don't need deep imports from .auth import login_user from .query import fetch_data # main.py # Clean absolute package import for the end-user from database import login_user , fetch_data login_user ( " admin " , " password123 " ) B. Built-In vs. Third-Party Modules Built-In: Included with Python out-of-the-box (e.g., os , sys , json ). Third-Party: Built by the community and installed from PyPI (e.g., requests , rich ). 🌱 Easy Starter Example import math # Built-in math operations print ( math . sqrt ( 25 )) # Output: 5.0 # import requests # Th

2026-07-16 原文 →
AI 资讯

How AI Can Help You Improve Your Performance as a Developer

Why this matters Let’s be real — most of us don’t struggle because we “can’t code”. We struggle because: we waste time on repetitive tasks we get stuck on small bugs we context-switch too much we overthink simple problems That’s where AI actually helps. Not as a replacement — but as a performance multiplier . 🤖 First, what AI is actually good at AI is not magic. But it’s really good at: generating boilerplate explaining errors suggesting improvements summarizing docs speeding up repetitive work 👉 Basically: saving your mental energy ⚡ 1. Write code faster (without burning out) Instead of writing everything from scratch: // prompt idea " create a custom React hook for localStorage " You get a solid starting point instantly. 👉 You still review it 👉 You still understand it 👉 But you don’t waste time writing boilerplate 🐞 2. Debug faster Instead of Googling for 20 minutes: Error: Cannot read property 'map' of undefined You ask AI: 👉 It explains the issue 👉 suggests fixes 👉 shows edge cases Example mindset shift Before: search → open 5 tabs → read → test → maybe fix Now: ask → get explanation → apply → move on 🧠 3. Learn way faster AI is like having a senior dev on demand. You can ask: “Explain React Server Components simply” “When should I use memo?” “What’s wrong with this pattern?” 👉 Instant explanations 👉 Real examples 👉 No fluff 🔄 4. Automate boring tasks Things you shouldn’t waste time on: writing regex generating types creating repetitive components converting data formats 👉 AI handles these in seconds 📚 5. Write better documentation Most devs hate writing docs. AI helps you: generate README files write comments document APIs 👉 Your project becomes easier to understand 👉 Your team moves faster 🧩 6. Break down complex problems Instead of getting stuck: "build a dashboard with auth, charts, and API integration" Ask AI to break it down: 👉 smaller steps 👉 clear structure 👉 less overwhelm ⚡ 7. Stay focused (this is underrated) Biggest hidden benefit: 👉 less context swi

2026-07-16 原文 →
AI 资讯

11 Open-Source Tools I Install on Every New Development Machine

Key Concepts 🗝️ These 11 tools have saved me thousands of hours over the past 4 years. If you're serious about becoming a better full-stack developer, they're worth mastering before chasing the next framework. Every year, dozens of new developer tools appear on Product Hunt, GitHub, and Hacker News. Some disappear within months. Others quietly become part of every professional developer's workflow. After years of building JavaScript applications, AI agents, browser automation projects, and technical content, these are the open-source tools I keep installing on every new machine. They solve different problems, but together they create a faster, cleaner, and more productive development environment. 1. Git Every developer eventually breaks something. The question isn't if . It's when . Git is the reason those mistakes rarely become catastrophes. Instead of thinking about Git as "version control," think about it as an unlimited undo button for your entire project. With Git you can: experiment without losing work create separate feature branches collaborate with teammates inspect old versions recover deleted work understand who changed what Without Git? Start over. With Git? git checkout main Problem solved. 2. Visual Studio Code Even with AI editors like Cursor becoming popular, VS Code remains the foundation of most modern development environments. VS Code is probably the application I spend more time inside than my browser. Yes it's "just" a code editor. But the extension ecosystem turns it into an entire development platform. My favorite extensions include: ESLint Prettier GitLens Error Lens Docker Thunder Client Playwright GitHub Copilot Together they create an environment where formatting, linting, debugging, testing, and Git management happen without leaving the editor. 3. Wave Terminal Wave Terminal is one of the most exciting open-source terminals I've used recently. Unlike traditional terminals, it transforms your command line into an interactive workspace wher

2026-07-16 原文 →
AI 资讯

**# 🐛 The Bug That Made Me Stop Blaming Python**

# 🐛 The Bug That Made Me Stop Blaming Python "The computer wasn't confused. I was." I still remember the moment. I had just started learning Python. Every new concept felt exciting. Every successful program made me believe I was getting closer to becoming a real developer. Then I met my first bug. It wasn't a complicated algorithm. It wasn't artificial intelligence. It wasn't even a project. It was a simple countdown. "Print the numbers from 5 to 1." That sounded easy enough. So I wrote this: count = 5 while count > 0 : print ( count ) I pressed Run . For a split second, everything looked normal. Then the terminal kept printing. 5 5 5 5 5 5 ... It never stopped. My first thought was that VS Code had frozen. Then I wondered if Python was broken. Maybe I'd installed something incorrectly. Maybe my laptop was the problem. I restarted everything. Nothing changed. Finally, I stopped blaming the tools and started reading my own code. That's when I noticed something embarrassingly simple. I was asking Python the same question over and over again: Is count greater than zero? The answer was always yes . Because I had never told Python to change count . Not once. The computer wasn't making a mistake. It was following my instructions perfectly. The fix took one line. count = 5 while count > 0 : print ( count ) count -= 1 I ran it again. 5 4 3 2 1 Done. One line. One lesson I'll probably never forget. That day changed how I think about programming. Before, I believed debugging meant finding what the computer had done wrong. Now I know debugging usually means discovering what I told the computer to do. Computers don't guess. They don't assume. They don't fill in missing logic. They execute instructions exactly as they're written. If the result is wrong, the first place I look isn't Python anymore. It's my own thinking. I'm still a beginner, and I know much harder bugs are waiting for me. But strangely, I'm looking forward to them. Because every bug teaches something that no tuto

2026-07-16 原文 →
AI 资讯

Distill Coding Agent Learnings

Repo: https://github.com/voku/agent-loop Demo: https://voku.github.io/agent_loop_demo/ Your Coding Agent Doesn’t Need More Memory. It Needs a Governed Loop. Coding agents repeat mistakes. The obvious response is to give them more memory: MEMORY.md project-rules.md agent-notes.md lessons-learned.md MEMORY_FINAL.md Soon the agent receives old decisions, temporary workarounds, copied transcripts, abandoned ideas, and rules nobody remembers approving. It has more context. It does not necessarily have better context. At some point, memory becomes landfill. The problem is not that coding agents forget too much. The problem is that most workflows fail to distinguish between temporary context, evidence, proposed learning, and approved project guidance. A transcript is not memory. A note is not a rule. A finding is not guidance. And a successful patch is not automatically a project convention. Instead of giving the agent one growing pile of context, I built voku/agent-loop around a governed workflow: task -> approved plan -> selective recall -> implementation -> verification -> recorded evidence -> reviewed learning Start with approved scope A coding agent should not begin by reading a ticket and creatively filling in everything the ticket forgot to mention. It should begin with an explicit work brief: goal; permitted scope; non-goals; affected files; required validation; human approval. For example: vendor/bin/agent-loop workflow plan PROJECT-123 \ --by lars \ --learning-root infra/doc/agent-learning \ --file src/Order/OrderService.php \ --file tests/Order/OrderServiceTest.php \ --goal "Reject invalid order state transitions" \ --scope "Order state validation and its tests" \ --non-goal "Do not redesign the order aggregate" \ --validate "composer phpstan" \ --validate "composer test" A human then approves that specific revision: vendor/bin/agent-loop workflow approve PROJECT-123 --by lars When the plan changes, the old revision becomes superseded , and the new one requires

2026-07-16 原文 →
AI 资讯

Inkling MoE + Agent Safety: Token Efficiency Meets Reliability

This week's tooling news clusters around two themes that don't usually arrive together: token-efficient multimodal reasoning and infrastructure-level agent safety. The Inkling model launch dominates the conversation, but the more quietly significant story is Microsoft and Vercel independently shipping primitives that make running untrusted agent code and managing agent credentials meaningfully less dangerous. Here's what's worth your attention. Inkling mixture-of-experts model enables token-efficient reasoning Inkling is a decoder-only MoE with 1T total parameters and 40B active per token, native multimodal I/O (text, image, audio), and a reasoning_effort API parameter that lets you tune compute depth per request. It's live on Together Serverless today with no capacity queue. The practical upside is architectural simplification. If you're currently chaining a vision model, a transcription service, and a text LLM into a single reasoning pipeline, that's three API clients, three failure surfaces, and three billing relationships. Inkling collapses that into one endpoint. The reasoning_effort knob is the other interesting piece—per-request control over inference depth means you can spend tokens proportionally to task complexity rather than paying full reasoning cost on every call. The caveat: exact reasoning_effort parameter values aren't fully documented yet. Don't hardcode assumptions about accepted values into production before checking the official docs. Verdict: Evaluate. Worth spinning up against your current multimodal workload to benchmark latency and cost. Hold production migration until parameter documentation stabilizes. Inkling open model handles image, text, and audio natively This is the self-hosted side of the same model. The 1T-parameter MoE ships with day-0 support in transformers 5.14.0+ and SGLang, plus llama.cpp quantizations for teams that want to run trimmed variants. The catch is hardware: full NVFP4 precision requires 600GB VRAM; BF16 needs 2TB.

2026-07-16 原文 →
AI 资讯

Grok Build is open source, and that matters for AI coding tools

Grok Build is open source, and that matters for AI coding tools What happened xAI published the source code for Grok Build , its terminal-based AI coding agent. The repository shows a full stack for a TUI-driven assistant that can inspect a codebase, edit files, run shell commands, search the web, and manage longer-running tasks. In other words, this is not just a model demo or a chat wrapper; it is the software layer that turns a model into a usable developer tool. The release came up on the Hacker News front page, which is useful context because the discussion there was less about model benchmarks and more about tooling, workflow, and whether open-source agent infrastructure is becoming a competitive advantage on its own. Primary source: Grok Build repository Why this release is interesting A lot of AI coding products hide the implementation details behind a hosted UI. Open-sourcing the agent runtime gives the community something different to inspect: how the tool is structured, how it handles shell access, and how it organizes the user experience around files, commands, and context. That matters for engineers because the practical questions are often not about raw model capability. They are about reliability, prompting surfaces, permissions, and how much of the workflow can be automated without turning the tool into a black box. The README describes Grok Build as a terminal-based coding agent that supports interactive use, headless scripting, editor integration via the Agent Client Protocol, and a modular tool/runtime layout. That makes it closer to an infrastructure project than a showcase demo. If you are building internal copilots, code assistants, or agent workflows, the design choices here are worth studying. What the repository tells us The repository description makes a few things clear: 1. The agent is meant to be operational, not decorative The docs emphasize real actions: editing files, executing shell commands, searching the web, and coordinating long-

2026-07-16 原文 →
AI 资讯

What Is My IP Address? IPv4 vs IPv6 Explained for DevelopersPublished

What Is My IP Address? IPv4 vs IPv6 Explained for Developers If you've ever debugged a CORS error, set up an IP allowlist, or wondered why req.ip returned something weird in your Express logs, you've run into the same question from a different angle: what actually is an IP address, and which one is "mine"? fastestchecker.com This post breaks down IPv4 vs IPv6, public vs private IPs, and how to reliably detect a user's IP address in your own code — plus a fast way to check yours right now. fastestchecker.com TL;DR IPv4 addresses look like 192.168.1.1 — four numbers, 0-255, separated by dots. There are about 4.3 billion of them, and we've run out. IPv6 addresses look like 2001:0db8:85a3::8a2e:0370:7334 — a much larger address space designed to replace IPv4. Your device usually has a private IP (local network) and shares a public IP (internet-facing) with everyone else on your router. You can check your current public IP instantly with a tool like FastestChecker's IP Checker — useful for confirming what your server or API actually sees. > IPv4 vs IPv6 : What's the Actual Difference IPv4 IPv4 has been the backbone of the internet since the 1980s. It's a 32-bit address, which caps the total number of unique addresses at roughly 4.3 billion. Given how many devices are online today, that pool has been effectively exhausted for years — which is why NAT (Network Address Translation) exists: it lets an entire household or office share one public IPv4 address. Example IPv4: 203.0.113.42 IPv6 IPv6 uses 128-bit addresses, which gives it an address space so large it's effectively unlimited for practical purposes (2^128 addresses). It was designed specifically to solve IPv4 exhaustion, and adoption has been climbing steadily — most major cloud providers and mobile carriers support it by default now. ** Example IPv6:** 2001:0db8:85a3:0000:0000:8a2e:0370:7334 Quick Comparison IPv4IPv6Address length32-bit128-bitFormatDotted decimal (192.168.1.1)Hexadecimal, colon-separatedTotal addre

2026-07-16 原文 →
AI 资讯

Every HTTP Status Code Tells a Story

Every time you open a website, sign into an application, or send a request to an API, a server responds with a small but powerful message: an HTTP status code. Most developers encounter these codes every day. But behind every number is a story about what happened between the client and the server. HTTP status codes are part of a standardized response system defined by RFC 9110. They help applications understand whether a request succeeded, needs attention, or failed. The HTTP Status Code Families 🟢 2xx — Success The request was received, understood, and completed successfully. Examples: 200 OK — The request succeeded. 201 Created — A new resource was successfully created. These responses tell the client: everything worked as expected. 🔵 3xx — Redirection The requested resource requires an additional step. These responses help clients find another location or use a different version of a resource. Examples include redirects and cache-related responses. 🟠 4xx — Client Errors Something is wrong with the request sent by the client. Common examples: 400 Bad Request — The request format is invalid. 401 Unauthorized — Authentication is required. 403 Forbidden — The client does not have permission. 404 Not Found — The requested resource does not exist. In simple terms: the problem is usually on the client side. 🔴 5xx — Server Errors The request was valid, but the server failed while processing it. Example: 500 Internal Server Error — An unexpected error occurred on the server. These responses indicate problems within the server or its internal systems. Why HTTP Status Codes Matter HTTP status codes are not just numbers. They are: The language of web communication Essential signals for API behavior Valuable tools for debugging and monitoring A foundation of backend engineering and distributed systems Understanding status codes helps developers build better applications, diagnose problems faster, and design more reliable systems. A single three-digit number can reveal what ha

2026-07-16 原文 →
AI 资讯

Stratagems #15: Derek and Alex Shared One Server. ACL's AI Was Listening to Both.

When the enemy occupies favorable terrain, don't attack head-on. Use a decoy to lure the tiger down the mountain. Then take the mountain. — The 36 Stratagems, Lure the Tiger Down the Mountain Previously on this series: #2: Derek Shaw Walked Into Another AI Promise. The Pipeline Had a Better Plan. — Derek lost the Finova contract at QualiGuard. In the parking lot, Lena turned back before getting in her car: "Next time you put together a proposal — make sure your boss knows what you're doing out there." That line followed him. At MediSys he nearly made the same mistake. Fixed the ETL pipeline instead of the model, beat OmniDx with their own white paper. But VP Morgan still saw through him: he still hadn't told his boss. #8: Alex Watched an AI Dashboard Take Over. He Kept the Keys Under the Table. — MedTech signed a seven-figure AI operations monitoring system. Alex was assigned as training lead. Under everyone's noses, he built a second monitoring panel labeled "training environment." Three weeks later the vendor dashboard went down. Alex's hidden panel was the only one still running. The first time Alex and Derek really talked, and it wasn't in a working group. At the FHIR standards committee quarterly meeting, they sat in the same row, three seats apart, and voted against the same proposal. They knew each other's names. That was it. Two months later, Derek was fixing a partition config in the staging environment. MediSys had just signed a major hospital; the AI diagnostic validation platform was in integration testing. He found an unrotated log directory in /etc/logrotate.d/ with a prefix that didn't match MediSys's naming convention. He traced it upstream. One server. Labeled "temporary data exchange node." MedTech's supply chain order stream and MediSys's diagnostic validation records were sitting in the same directory. Write permissions hadn't been restricted. The hospital's integration spec had a line saying "both parties are recommended to complete data alignme

2026-07-16 原文 →