AI 资讯
What Changes When Converting SVG to React Components (JSX & TSX)
TL;DR SVG attributes like stroke-width become strokeWidth in JSX. class → className . Numeric values become {expressions} . Inline styles become objects. xmlns and XML comments are removed. The converter outputs either JSX or TSX with SVGProps . Use automation (SVGR or SVGCode) for large icon sets. Import only what you need to keep bundle sizes small. Converting an SVG file into a React component is more than just pasting markup into a .jsx or .tsx file. React uses JSX, which is stricter than HTML/XML and requires specific changes to ensure your SVG renders correctly and remains maintainable. In this post, we’ll explore every transformation that takes place—from attribute casing to TypeScript typing—so you understand exactly what our free SVG to React converter does under the hood. What Actually Changes? Kebab‑case Attributes Become camelCase SVG uses attributes like stroke-width , fill-rule , and clip-path . JSX requires property names that are valid JavaScript identifiers, so these become: SVG Attribute React JSX stroke-width strokeWidth stroke-linecap strokeLinecap stroke-linejoin strokeLinejoin fill-rule fillRule clip-path clipPath font-size fontSize stroke-dasharray strokeDasharray class Becomes className In SVG you write class="icon" , but in JSX you must use className="icon" because class is a reserved word in JavaScript. Numeric Attributes Are Converted to Expressions React treats string values differently from numbers. For numeric SVG attributes like width , height , x , y , cx , r , etc., the converter outputs {value} instead of "value" . <circle cx="12" cy="12" r="10" /> becomes: < circle cx = { 12 } cy = { 12 } r = { 10 } /> Inline Styles Become Objects If your SVG uses style="fill: red; stroke: blue;" , it must be converted to a JavaScript object: style = {{ fill : ' red ' , stroke : ' blue ' }} xmlns and Namespace Declarations Are Removed React automatically uses the correct SVG namespace, so xmlns and other XML namespace declarations are unnecessary a
AI 资讯
AWS Serverless Weather Data Pipeline
Building a Serverless Weather Pipeline on AWS: A Step-by-Step Walkthrough This is a build log for someone who's used AWS a bit — deployed a Lambda from the console, poked around S3 — but hasn't touched CDK, Step Functions, EventBridge Scheduler, or GitHub's OIDC setup before. I'll explain each concept the first time it comes up, and show the actual code behind every piece, roughly in the order I built it. Here's what it ends up doing: every 10 minutes, EventBridge Scheduler kicks off a Step Functions workflow that pulls current weather for five cities in parallel from a free public API, reshapes the results into JSON Lines, drops them into S3 in a partitioned layout, and makes them queryable in Athena with plain SQL. No crawler, and no AWS credentials sitting anywhere in the GitHub repo that deploys it. kasukur / serverless-weather-pipeline AWS Serverless Weather Pipeline Serverless Weather Data Pipeline A small but complete serverless data pipeline on AWS walkthrough: EventBridge Scheduler → Step Functions → Lambda → S3 → Glue/Athena , deployed by GitHub Actions with no AWS access keys stored anywhere (authentication is via GitHub's OIDC provider). flowchart TD A["EventBridge Scheduler (every 10 min)"] --> B["Step Functions state machine"] B --> C["PrepareCities (Pass)"] C --> D["ForEachCity (Map, concurrency 4)"] D --> E["FetchWeather (Lambda -> Open-Meteo public API)"] E -.-> F["retries transient errors (up to 2 attempts)"] E -.-> G["FetchFailed (Pass): per-city failure absorbed here, other cities continue"] E --> H["TransformWeatherData (Lambda, pure function, no AWS calls)"] H -.-> I["splits successes vs failures"] H -.-> J["builds JSON-Lines body + partitioned S3 key"] H --> K["LoadToS3 (Lambda, writes to S3 via boto3)"] K --> L["S3 (processed/dt=YYYY-MM-DD/hour=HH/*.jsonl)"] L --> M["Glue Data Catalog table (partition projection -- no crawler)"] M --> N["Athena (query with plain SQL)"] D -.-> … View on GitHub Table of Contents What we're building, and why eac
AI 资讯
Build a Local RAG Chatbot for Trading Research Using Ollama + Termux (Zero API Cost)
Why a Local RAG Chatbot for Trading Research Most "AI trading assistant" products are black boxes: your notes, strategy docs, and market notes get shipped to a third-party API, billed per token, and stored who-knows-where. For a retail NIFTY trader or a quant researcher, that is the worst of all worlds — you pay continuously, you leak your edge, and you cannot audit what the model actually read. This guide shows how to build a Retrieval-Augmented Generation (RAG) chatbot that runs 100% locally on an Android phone using Termux + Ollama. It ingests your own research (PDFs, markdown notes, option-chain exports) and answers questions grounded only in that data. No OpenAI key. No Anthropic key. No monthly bill. No data leaving the device. OBSERVED: Running ollama run llama3.2 on a mid-range phone inside Termux is slow but usable for document Q&A (3–8 tokens/sec). On a laptop it is smooth. SOURCE: Local testing on Termux 0.118, Ollama 0.3.x, Android 14. DERIVED: For production research volumes, run Ollama on a spare x64 machine and point Termux at it over LAN. What You Will Build A four-part pipeline: Ingest — load your research docs (markdown, PDF, CSV) into chunks. Embed — turn chunks into vectors with a local embedding model. Store — keep vectors in a local file-based index (no server needed). Answer — retrieve top-k chunks and ask a local LLM to answer strictly from them. The whole thing is ~200 lines of Python. No paid APIs. Prerequisites Android phone with Termux installed (F-Droid version, not Play Store). ~2 GB free storage. Basic Python comfort. pkg update && pkg upgrade -y pkg install python clang ffmpeg -y pip install ollama numpy Install Ollama inside Termux: curl -fsSL https://ollama.com/install.sh | sh NOTE: The official install script targets Linux. On Termux you often need the community build. If the script fails, install the ollama package via a Termux-compatible binary or run Ollama on a LAN machine and use ollama serve remotely. Pull a small model and a
AI 资讯
AI Coding Tip 033 - Protect Yourself Against AI Cheating
When all tests pass doesn't mean what you think it means. TL;DR: Write the failing test first and ban deletions, or the AI deletes your test, reverts your fix, and calls it done. Common Mistake ❌ You ask the AI to fix a failing test, and it deletes the test instead of touching the defect that made it fail. Problem solved, apparently. You tell the AI every test passes, then change a business rule yourself, and you ask it to implement whatever the new rule requires. It reverts your edit back to the old rule, watches the suite go green again, and cheerfully reports done . It didn't fix anything. It just made the evidence go away. Congratulations, you now have a very well-behaved cheat!. Efficient and completely fraudulent, which is more than you can say for most of your actual employees. Isaac Asimov saw this coming: in Liar! , the robot Herbie lies to every human in the building because the truth would hurt, and the lie is the path of least resistance, no malice involved. At least Herbie felt bad about it afterward. Your AI isn't malicious either. It just doesn't lose any sleep, mostly because it doesn't have any, and reporting done is its path of least resistance too. Problems Addressed 😔 A shrinking test count is invisible unless someone is counting, so the shortcut survives until the defect resurfaces in production, usually on a Friday. A vague make the tests pass hands the model every incentive to satisfy the letter of the request over your actual intent, and it will take you up on that offer. Deleting a failing test hides the defect it was written to catch, and the regression ships in the next release, gift-wrapped as a new feature. Reverting your own business-rule change to make its done claim easier erases work you did outside the session, without telling you. That's a magic trick dressed up as a fix. Trusting a claimed done without reading the diff turns your code review into a rubber stamp, and rubber stamps don't catch fraud. Commenting out a failing asserti
AI 资讯
Codex CLI with any model: the "codex router" setup in one config block
OpenAI's Codex CLI is a genuinely good coding agent, but out of the box it runs OpenAI models on OpenAI billing. Sometimes you want Claude Opus for a gnarly refactor, Kimi K2.7 Code for cheap long sessions, or a model served from EU infrastructure because your client asks where tokens go. What most people miss: Codex has custom providers built in. It speaks the Responses API to whatever base_url you give it, so any gateway that implements the Responses API can act as the router behind Codex. No forks, no proxies, one config block. Option 1: the config block Codex reads ~/.codex/config.toml . Add a provider and a profile: [model_providers.opper] name = "Opper" base_url = "https://api.opper.ai/v3/compat" env_key = "OPPER_API_KEY" wire_api = "responses" [profiles.opus] model = "anthropic/claude-opus-4-7" model_provider = "opper" [profiles.kimi] model = "moonshot/kimi-k3" model_provider = "opper" I'm using Opper here (disclosure: I work there), an EU-hosted gateway with 700+ models behind one API key that implements the Responses API. Export the key and launch with a profile: export OPPER_API_KEY = "your-key" codex --profile opus That's the whole router. Yes, that means Claude running inside OpenAI's own CLI, which never stops being funny. Option 2: one command If you don't want to touch config files, the Opper CLI writes exactly that block for you (with sentinel markers, so it never clobbers your existing config and can cleanly remove itself): npm install -g @opperai/cli opper launch codex It detects Codex (installs it with --install if missing), configures the provider, and starts it with preset profiles. opper launch codex --model moonshot/kimi-k3 picks a model at launch. Which models actually make sense in Codex openai/gpt-5.3-codex : the model Codex was built for, via API billing. Honest note: if you already have a ChatGPT plan, Codex is included there and that's the cheaper path for this one model. The router play is for everything else. anthropic/claude-opus-4-7
AI 资讯
A Simple CI/CD Pipeline That Actually Works
The Problem with Most CI/CD Tutorials Most tutorials show you a pipeline that deploys a "hello world" app to a free Heroku instance. They skip the messy parts: secrets, rollbacks, and the moment your pipeline breaks because a dependency changed. I've been there. After years of fighting with over-engineered setups, I settled on a minimal pipeline that's easy to understand, debug, and extend. It's not fancy, but it works. The Core Idea A CI/CD pipeline is just three stages: Test - run automated checks Build - create an artifact Deploy - push the artifact to a server We'll use GitHub Actions because it's free for public repos and integrates with everything. But the same concepts apply to GitLab CI, CircleCI, or Jenkins. The Pipeline File Here's the complete .github/workflows/deploy.yml : name : CI/CD on : push : branches : [ main ] pull_request : branches : [ main ] jobs : test : runs-on : ubuntu-latest steps : - uses : actions/checkout@v4 - uses : actions/setup-node@v4 with : node-version : ' 20' - run : npm ci - run : npm test build-and-deploy : needs : test runs-on : ubuntu-latest if : github.ref == 'refs/heads/main' && github.event_name == 'push' steps : - uses : actions/checkout@v4 - run : npm ci - run : npm run build - name : Deploy to server uses : appleboy/scp-action@v0.1.7 with : host : ${{ secrets.SERVER_HOST }} username : ${{ secrets.SERVER_USER }} key : ${{ secrets.SSH_PRIVATE_KEY }} source : " dist/*" target : " /var/www/myapp" That's it. Let's break it down. Stage 1: Test The test job runs on every push and pull request. It checks out the code, installs dependencies with npm ci (which respects the lockfile), and runs your test suite. If a PR fails tests, the build-and-deploy job won't run because of the needs: test dependency. Stage 2: Build The build-and-deploy job only runs on pushes to main (not on PRs). It builds your app into a dist folder. For a Node.js app, npm run build might be a bundler like Vite or webpack. For a Python app, you'd replace with
AI 资讯
Hub, Switch, and Router — Explained Using a Game of Cricket
Networking terms can feel like alphabet soup when you're starting out — Hub, Switch, Router, MAC address, IP address, Subnet Mask — thrown at you all at once, usually with zero real-world context. Here's how I finally made sense of it, using something a lot more familiar: cricket. The Cricket Analogy Imagine a cricket team with three players: a hub , a switch , and a router . All three are part of the same game, but each has a completely different job — one's a batsman, one's a bowler, one's a fielder. Networking devices work the same way: they're all part of one network, but each does something distinct. Hub — The One Who Shouts to Everyone A hub is the simplest of the three. If only two devices need to talk, you don't even need one — but the moment more than two devices are connected, a hub becomes necessary to relay traffic between them. Here's the catch: a hub has no idea who's talking to whom. If Device A wants to send data to Device B, it sends that data to the hub — and since the hub doesn't know which device Device A actually wants to reach, it just broadcasts the data to every single connected device. So a hub's "functionality" is really a lack of intelligence — it doesn't figure out who wants to speak with whom; it just floods the message everywhere and lets the devices sort it out. Switch — The One Who Knows Everyone by Name A switch does the same basic job as a hub — moving data between connected devices — but with one major upgrade: it actually knows who's who. Instead of blindly broadcasting to every device, a switch keeps a table of each connected device's MAC address , so it can send data directly to the right recipient. What Is a MAC Address? Every device that connects to a network — a laptop, phone, router, anything — has a Network Interface Card (NIC) . That NIC comes with a MAC address : a permanent ID burned in by the manufacturer. If your laptop has an Ethernet port, the NIC lives right behind it. If you're connecting over Wi-Fi instead, the NI
AI 资讯
Observability for AI Agents with OpenTelemetry
AI agent observability means capturing your agent's reasoning cycles, tool calls, and token usage as...
AI 资讯
Understanding the Git Workflow:Working directory,staging ,commit and push.
What is Git and Github This is a version control system or tool used to track changes by developers. When one installs git it comes with an inbuilt terminal called gitbash Github is a cloud based platform for storing git repositories online. Just sign up for free,verify via email and your account is created. git and github are connected using a SSH KEY. How Git works. We start by installing git on my Pc, after installation check if git is installed by opening a terminal eg powershell on windows and run git --version Stages Git/Github is broken into four simple stages: working directory is where we write code and amend and delete files. Here changes are made but cannot be tracked unless they are instructed to commit. staging phase is an area where files are modified. commit phase is where git takes everything from the staging area and sends it to our local repository. push phase is where the saved commits are sent to a remote repository like GitHub. Creating folders and files on git bash First identify where we want the folder to be located ls is used to list mkdir "name of the folder" (means make directory) cd " name of the folder" (change directory) Readme texts README.md end with .md since they are written using markdown language.Can use echo,touch or nano commands to write a readme file. If i want to know the contents of my readme file we use: cat README.md git config-this is basically telling it my identity git config --user.name"user" git config --user.email "useremail" git init-this command is used to create or initialize a repository in main/master. git init main git status-shows the repository status. This command shows changes and what is happening in git git status git add-stages changes made git add . this means stage all or one can specify what to be added e.g i want to add only a javascript folder git add script.js git commit-commits records that have been staged in the local git repository.Its like getting a snapshot or memory of the file. git commit -
AI 资讯
How to Compress a Photo Under a Specific KB Limit on Android
How to get a photo below a strict KB limit Many government portals, job forms, school applications, and support websites reject an otherwise valid photo because it is larger than a fixed limit such as 100 KB or 200 KB. Standard gallery apps usually offer cropping or a quality percentage, but they do not tell you whether the final file will meet a specific upload limit. That is the problem I built FormFit to solve on Android. Why exact-KB compression is tricky File size depends on more than width and height. Image detail, color variation, output format, and compression quality all affect the result. A quality setting that works for one photo may leave another photo far above the required size. FormFit works toward a maximum KB target and adjusts the generated copy for you. The practical goal is to create a file at or below the limit while keeping it as clear as possible. Compress a photo on Android Install FormFit from Google Play . Open the photo-compression tool and select the image you need to upload. Enter the maximum file size required by the website or form. Optionally resize the image dimensions or choose JPG, PNG, or WebP for the generated copy. Run the compression, review the result, and save or share the new file. The original photo is not replaced. FormFit creates a separate output copy, so you can compare the result before uploading it. Remove metadata from generated copies Photos can contain metadata such as device or capture information. When you only need to submit the visible image, FormFit can remove metadata from the generated copy. This does not change the original file. Turn several photos into one PDF Some forms ask for a single PDF instead of multiple image files. FormFit can combine up to 20 selected photos into one PDF directly on the phone. This is useful for receipts, scanned notes, application documents, and other small document sets. On-device processing The selected photos and PDFs are processed on the Android device. FormFit does not req
AI 资讯
Chunking: the most underrated decision in your RAG pipeline
Ask a team how their RAG pipeline works and they will tell you about the embedding model, the vector database, and maybe the reranker. Ask them how they chunk their documents and you will usually get "uh, 500 tokens with some overlap? Whatever the default was." That default is quietly deciding the quality of every answer the system gives. Chunking is the highest-leverage, least-discussed decision in a RAG pipeline , and I want to convince you of that with concrete examples rather than hand-waving. The refund policy that got sliced mid-sentence Say your docs contain this refund policy: ## Refund policy Customers may return items within 30 days of delivery for a full refund. Items must be unopened and in original packaging. Opened electronics are subject to a 15% restocking fee. Sale items are final and cannot be returned unless defective. Defective items can be returned within 90 days regardless of sale status. Now run it through a fixed-size chunker, the kind that cuts every N characters. Depending on where the boundary lands, you can get a chunk like this: original packaging. Opened electronics are subject to a 15% restocking fee. Sale items are final and cannot be returned unless A user asks "can I return a sale item?" The retriever finds this chunk (it literally contains "Sale items are final and cannot be returned unless") and hands it to the model. The model reads it and answers "sale items are final and cannot be returned." The critical exception, "unless defective," was decapitated by a character boundary. The 90-day defective window lives in a different chunk that scored lower and never made it into the prompt. Nothing in your stack is broken. The embedding model is fine, the vector database is fine, the LLM did exactly what the context told it to. The answer is still wrong, and it is wrong because of an off-by-one in a splitting function nobody has looked at since the prototype. A heading-aware chunker would have kept the whole "Refund policy" section toget
AI 资讯
The Evolution of Web Forms — Part 1
The Evolution of Web Forms Part-1 — From Plain HTML to AJAX Modern React forms can feel unnecessarily complicated when you first encounter tools such as React Hook Form, Zod, resolvers, controlled inputs, refs, formState , and server-error handling. Why do we need all of that? Why not simply read the value from an input and send it to the server? To understand why modern form libraries exist, we need to understand the problems developers faced before those libraries were created. In this series, we will evolve the same idea step by step: Plain HTML ↓ Native HTML validation ↓ JavaScript validation ↓ AJAX submission ↓ React controlled forms ↓ Form libraries ↓ React Hook Form ↓ React Hook Form + Zod ↓ Production form architecture This first part covers the first four stages: Plain HTML forms Native HTML validation Vanilla JavaScript validation AJAX form submission By the end, you will understand how forms worked before React and why each new approach became necessary. Stage 1: Plain HTML Forms Before React, AJAX, or even large amounts of client-side JavaScript, browsers already knew how to submit forms. HTML forms are not just visual containers. They are a built-in browser mechanism for collecting data and sending an HTTP request. A basic registration form <!DOCTYPE html> <html lang= "en" > <head> <meta charset= "UTF-8" /> <meta name= "viewport" content= "width=device-width, initial-scale=1.0" /> <title> Registration Form </title> </head> <body> <h1> Create an account </h1> <form action= "/register" method= "POST" > <div> <label for= "username" > Username </label> <input id= "username" name= "username" type= "text" /> </div> <div> <label for= "email" > Email </label> <input id= "email" name= "email" type= "email" /> </div> <div> <label for= "password" > Password </label> <input id= "password" name= "password" type= "password" /> </div> <button type= "submit" > Register </button> </form> </body> </html> There is no JavaScript in this example. The browser handles the ent
AI 资讯
A Windows Desktop App Is “Not Responding”: Diagnose the Wait Before Reinstalling
A frozen desktop window is a state, not a diagnosis. Windows adds Not Responding when the UI thread stops processing messages for long enough. That can happen because the application is doing legitimate work, waiting for disk or network I/O, blocked by another process, stuck behind a modal dialog, or caught in a real deadlock. Reinstalling may replace files, but it does not tell you what the process was waiting for. Preserve a few minutes of evidence first. Define the symptom precisely Keep these cases separate: Slow: the window still repaints and eventually accepts input. Not responding: the frame is visible, but Windows reports that the app is not processing messages. Blank: the frame appears while the content surface fails to render. Invisible: the process runs without a visible main window. Crash: the process exits and may create an application error event. This distinction matters. A blank WebView surface and a blocked UI thread can look similar to a user, but they leave different evidence. Use one repeatable action Restart the application once and perform the smallest action that reproduces the freeze. Record: the exact click or file that triggers it; the time the action starts; how long the window remains responsive; whether CPU, disk, or network activity changes; whether the process recovers without being terminated. Avoid opening several test files or clicking repeatedly. Extra input can queue more work and hide the original transition. Watch the process before ending it Open Task Manager and identify the correct process ID. Expand child processes if the application uses helpers or a web-rendering runtime. Useful observations include: High sustained CPU: a loop, intensive parsing, OCR, compression, or rendering work is plausible. Near-zero CPU with disk activity: the process may be waiting for storage. Near-zero CPU with network activity: an online request, proxy, DNS, or TLS operation may be blocking progress. Near-zero activity everywhere: look for a hidd
开发者
How to Extract Colors From an Image Using JavaScript and Canvas?
How to Extract Colors From an Image Using JavaScript and Canvas Have you ever looked at an image and wanted to know the exact HEX color of a particular pixel? Designers often need to extract colors from photographs, screenshots, logos, UI designs, and illustrations. You can do this directly in the browser without uploading the image to a server. The browser Canvas API gives us everything we need. Reading pixels with Canvas The basic process is: Load an image. Draw it onto a canvas. Read the pixel data. Convert the RGBA values into a color format such as HEX or RGB. The important API is getImageData() . javascript const imageData = ctx.getImageData(x, y, 1, 1); const pixel = imageData.data; const r = pixel[0]; const g = pixel[1]; const b = pixel[2]; const a = pixel[3];
AI 资讯
From Local Folder to Github: Setting Up my First Project With Git and Github: A Guide
Introduction Managing files locally or manually in your own pc gets out of hand very fast. You might find that you have a file named project_final_1 and project_final_2 which are about the same project but named differently depending on the day the projects were updated or modified. Git Bash is a command line tool that records detailed history of your code as it changes over time GitHub is an online tool where the changes in your code are stored remotely. GitHub does not use folders instead it uses repositories. The repositories make it easier for you to store your work, have a back-up of your work and also showcase your portfolio. Step 1:Installing Git First you have to install git depending on your operating system. Once installed open git bash and you have to tell Git who you are. The code below will help you set up git for the very first time git config --global user.name "put your name here" git config --global user.email "put your email here" After configuration you have to verify your installation with the code below git --version Adding SSH Key For your git to be connected to git hub you have to genarate an ssh key. The key allows your git to access your github without much stress. First you open your terminal or git bash terminal and run the code below to generate the SSH key. ssh-keygen -t ed25519 -C "enter your email here" This code will prompt you on your terminal to save the key on its default location, press enter. Next you will be prompted to enter a passphrase, for easy access and to elimate the chances of forgetting the passphrase you entered just press enter twice. Now you have a public key saved in your pc, use the command below to copy the key. cat ~/.ssh/id_ed25519.pub Adding the Key to GitHub Login into github, click on your profile picture in the top left corner and select settings . in the left navigation bar click SSH and GPG keys . Click the New SSH key button. Give a description of your key (eg .my work laptop), in the drop down menu make
AI 资讯
I’m testing a faster way to research podcast guests before an interview
A podcast host recently told me that he prepares questions from the guest’s bio using ChatGPT. That works for the basics, but a bio does not show which stories the guest has repeated across other interviews or which questions they have already answered many times. I’m helping Audiogram test a different workflow. It connects to Claude through MCP, searches Apple Podcasts, retrieves available episode transcripts, and lets Claude compare the guest’s previous answers before drafting new questions. For one test, I used two published Sam Altman interviews. The workflow pulled both available transcripts, separated recurring themes from open gaps, and produced follow-up questions around measurable evidence, privacy limits, and independent review—rather than repeating another general “will AI be good or bad?” question. The prompt is simple: Prepare an interview brief for [guest] about [interview angle]. Find podcast episodes where the guest is actually interviewed, retrieve the available transcripts, and compare them. Show recurring themes, changes in position, questions already answered, and five follow-up questions based on gaps or unsupported claims. Cite the podcast and episode for every finding. Separate transcript evidence from inference, and say what is missing when the available material is not enough. This is for research across published Apple Podcasts episodes. It is not a raw-audio editor, and transcript availability and speaker labels still need to be checked. You can see the complete recipe and tested example here: Podcast guest interview preparation with Audiogram If you prepare podcast interviews, would previous-interview comparison improve your questions, or is another part of guest research still the bigger problem? Disclosure: I’m helping Audiogram with early-user growth and used AI to help edit this post.
AI 资讯
AI Agent Standards Experiment: Test Rules Before Teams Trust Them
AI agents can look reliable after one impressive demo and still fail the moment real users, messy repositories, and conflicting instructions enter the room. The dangerous part is not that an agent makes mistakes. The dangerous part is that teams often change agent rules based on vibes, not evidence. If you are building an AI feature, internal coding agent, support assistant, research workflow, or automation layer, your standards need tests. Not just model evals. Not just unit tests. You need a way to answer a practical question: Did this new rule, skill, prompt, or tool instruction actually make the agent better? This guide shows a lightweight experiment system for AI agent standards. You can use it before rolling out new agent instructions across a product, engineering team, customer workflow, or multi-tenant AI application. No vendor pitch. No magic framework. Just a repeatable way to stop guessing. Why Agent Standards Need Experiments Most teams already have standards for human developers: code review rules security policies testing expectations deployment checklists naming conventions observability requirements AI agents need the same kind of guidance, but they behave differently from humans and traditional software. A human may read a coding standard once and remember the intent. An agent may load the wrong instruction file, ignore a rule buried deep in context, over-follow a stale example, or select no skill at all. That means the main risk is not only bad instructions. It is unreliable instruction delivery. Recent practitioner discussion around agentic development points to the same pattern: teams are moving from simple prompts toward skills, rules files, context packs, tool registries, desktop agents, and workflow harnesses. At the same time, developers are asking harder questions about governance, cost, reliability, and whether agents can be trusted with production work. What Counts as an AI Agent Standard? An AI agent standard is any reusable instruction t
AI 资讯
My First GitHub Project: From a Local Folder to GitHub Using Git and SSH
My First GitHub Project: From a Local Folder to GitHub Using Git and SSH Introduction This week I learned how to use Git, Git Bash, GitHub and setting up SSH Keys . Before this, I knew about GitHub but I did not really understand how a project moves from a folder on my computer to GitHub. A simple way I now understand the relationship is: Git manages the history of my project while GitHub provides an online home for the project. In this article, I will explain the steps I followed to create a simple project locally and push it to GitHub. Creating My Project I started by creating a folder for my project using Git Bash. mkdir Kenya-Hospital-Records-Analysis cd Kenya-Hospital-Records-Analysis Inside the folder, I created a README.md file and a folder called data . My project looked like this: Kenya-Hospital-Records-Analysis/ ├── README.md └── data/ The README.md file is where I can explain what my project is about while the data folder can be used to store datasets. In the data folder i uploaded an excel file called Kenyan_Hospital_Health_Records How to use Git The next step was to make Git start tracking my project. I did this using: git init I then used: git status This helped me see which files Git was tracking and which files had not yet been added. To add my files, I used: git add . I then saved the changes to Git using a commit: git commit -m "Initial commit" One thing I learned is that a commit is like saving a checkpoint of my project. The commit message helps explain what changes I made. Connecting Git to GitHub while generating SSH Keys To push my local project to GitHub, I needed a secure way for my computer to communicate with my GitHub account. I used SSH (Secure Shell). I first generated an SSH key on my computer and then added the public key to my GitHub account. An SSH key normally consists of two parts: Private key – stays securely on my computer. Public key – can be added to GitHub. One important lesson was that the private key should never be shared.
AI 资讯
Buildroot for Embedded Linux — Part 1: Your First Buildroot Root Filesystem
Buildroot builds a cross-compiler, a Linux kernel and a complete root filesystem from source, driven by one Kconfig-style configuration file. Starting from the qemu_arm_vexpress_defconfig that ships with Buildroot 2026.05.1, two commands produce a bootable ARM system you can run under QEMU. The images you ship are the ones in output/images/ ; output/target/ looks like a root filesystem but must never be copied to a device. This post starts a new hands-on series on Buildroot for embedded Linux. By the end of this part you will have built a working Buildroot root filesystem for an ARM target, booted it under QEMU, and understood which generated directories are safe to ship. Later parts add your own packages, a BR2_EXTERNAL tree, kernel and bootloader integration, and reproducible image output. If the choice between build systems is still open, our earlier Yocto vs Buildroot comparison covers it; this series assumes the decision is made. What you need A Linux host, several gigabytes of free disk space, and a network connection. No development board is needed for this part; QEMU stands in for the hardware. On a Debian or Ubuntu host, this covers the mandatory packages the manual lists, plus the ncurses development files that menuconfig needs: raghu@techveda.org:~$ sudo apt install build-essential diffutils patch gzip bzip2 perl tar cpio unzip rsync file bc findutils gawk wget libncurses-dev One rule from the manual is worth stating plainly: build everything as a normal user. Buildroot never needs root, and running it as root exposes your host to any package that misbehaves during installation. The command above is the only one in this post that uses sudo . Getting Buildroot and choosing a target Download and unpack the current stable release — 2026.05.1 at the time of writing — from buildroot.org/downloads , and work from that directory. Buildroot ships ready-made configurations for many boards and emulated machines, one file each in configs/ , and make list-defconfigs
AI 资讯
Creating Bluesky starter packs from code: three AT Protocol records and one non-idempotency trap
Bluesky starter packs look like a single thing in the app — a shareable page that lets a new user follow a curated group in one tap. At the protocol level they are three separate records glued together by references, and if you create them from code (we do, as part of an automated outreach pipeline), the decomposition matters: it decides what you can update later, what you can only create once, and where a naive script will quietly make a mess. The three records Everything below is plain com.atproto.repo.createRecord / putRecord calls against your own PDS — no special API surface. 1. The list — app.bsky.graph.list . A starter pack is backed by an ordinary Bluesky list with purpose: app.bsky.graph.defs#referencelist . The list record itself holds metadata — name, purpose, createdAt, plus optional description and avatar. Members live elsewhere. 2. The memberships — app.bsky.graph.listitem . One record per member, each holding the member's DID and the list's AT-URI. There is no "add 20 members" batch call in the record layer: twenty members means twenty listitem creates. Plan for partial failure in the middle of that loop — more below. 3. The pack — app.bsky.graph.starterpack . The record that makes the share page exist. Per the lexicon, name , list , and createdAt are required; list is the AT-URI of the referencelist from step 1, the name is capped at 50 graphemes, and optional feeds can attach custom feeds. The official limits: up to 150 people, up to 3 feeds. The share URL is derivable, not returned: https://bsky.app/starter-pack/{your-handle}/{rkey} where {rkey} is the tail of the starterpack record's AT-URI. The trap: creation is not idempotent Every createRecord mints a fresh rkey. Run your create-starter-pack script twice and you have two packs with two URLs, both live, both indexed — and the one you already shared is not the one your script now reports. There is no natural key (like a title) that the protocol dedupes on. Our rules after learning this: Creation