AI 资讯
Not 'Did You Use AI' but 'Are You the One Driving' — Reflections on Building a Real Product Through AI Collaboration
📝 Originally published in Japanese on Zenn. This is the English version. Canonical: https://zenn.dev/uya0526_design/articles/satellite4_ai-collaboration 📚 This is satellite article #4 (the finale) in my "Read-Aloud Speed Meter dev log" series. For the whole picture, see the main article . Where This Sits The read-aloud speed meter was the first project where I adopted "AI-collaborative development" as an explicit mode. Until then, my learning style was "I write all the code myself; AI is a reviewer." With a contest deadline looming, I stepped one notch further. This article isn't a technical deep dive — it's a reflection on the development style itself. Three things: The reframe from "did you use AI" to "are you the one driving" The stumbles I actually hit in AI collaboration, and the patterns I pulled out of them Why rejecting an AI suggestion was the single most important thing 💡 This is a record of an ex-Java SE engineer learning TypeScript and Python in public. It's less a technical article and more a reflective, prose-y piece on the development process. I Switched Styles My learning articles have always run on a rule: I write the code myself; I use AI for hints, spec clarification, and bug spotting. Typing every word myself had learning value. This time there was a contest deadline, and a huge amount to cover. So I switched into a collaborative mode: AI demonstrates boilerplate (recording, fetch, API Route skeletons), and I handle the conceptual core and the design decisions. The awkward part was how to disclose that in the article. I'd publicly stated my AI use for code before, but this time I collaborated with AI on the article's outline, structure, draft prose, and even translation. In a contest with money (a prize) on the line, blurring that didn't feel honest. At first I framed it as "using AI is no different from accepting an IDE's autocomplete." But that was inaccurate. Autocomplete ≈ word/line-level completion This time ≈ delegating outline, structure,
AI 资讯
I Went Looking for the Basis of 'N Characters Per Minute Is Fast' — There Wasn't One. Setting Read-Aloud Thresholds Honestly
📝 Originally published in Japanese on Zenn. This is the English version. Canonical: https://zenn.dev/uya0526_design/articles/satellite3_metrics-rationale 📚 This is satellite article #3 in my "Read-Aloud Speed Meter dev log" series. For the whole picture, see the main article . Where This Sits The read-aloud speed meter converts speaking speed into an evaluation label like "slightly fast," and stagnation rate into one like "few." Those labels ultimately become the foundation for Claude Haiku's feedback. So — on what basis did I draw the thresholds (the dividing lines)? This article digs into that "basis." The short answer from my research: I couldn't find a paper that defines an academic threshold for "N characters/min = fast/slow." This is a record of how I drew the lines honestly once I'd learned there was no firm basis. More than the metric numbers themselves, I believe being transparent about why I chose those numbers is what makes an evaluation app trustworthy. 💡 I'm an ex-Java engineer learning TypeScript in public. This one is mostly about design decisions. Why Obsess Over the "Basis"? An evaluation app passes judgment on the user: "your reading is slightly fast." Once you're passing judgment, if you can't explain "why we can say that," it's just guesswork. This app in particular passes the labels straight to Claude Haiku to generate coaching. If the foundational label has an unclear basis, the feedback built on top of it is a castle on sand. So I decided to nail down the basis for the thresholds first. Two things to research: The judgment basis for speaking speed (characters/min) The judgment basis for stagnation rate (the proportion of silence) As it turned out, these two had completely different kinds of basis. Speed Thresholds: No Academic Threshold → Draw From General Rules of Thumb What I found For speaking speed, I first looked for academic backing. Here's what I found: Speaking speed has traditionally been measured against mora count, but prior researc
AI 资讯
Calling AmiVoice's Synchronous HTTP API Through a Next.js BFF — Auth, multipart Order, and the WebM Trap
📝 Originally published in Japanese on Zenn. This is the English version. Canonical: https://zenn.dev/uya0526_design/articles/satellite1_amivoice-bff 📚 This is satellite article #1 in my "Read-Aloud Speed Meter dev log" series. For the whole picture, see the main article . Where This Sits In the read-aloud speed meter app, this article covers the part that sends browser-recorded audio to the AmiVoice API to get back recognized text plus timestamps. The theme is calling an external API without exposing your API key to the browser — in other words, implementing a BFF (Backend for Frontend). The main article only touched the highlights, so here I go down to a level you can reproduce yourself. Specifically, four things: Why you must not call AmiVoice directly from the browser (why a BFF is needed) AmiVoice's synchronous HTTP auth, parameters, and multipart order Why the browser's MediaRecorder output (WebM/Opus) passes through as-is Reshaping the raw JSON with a pure-function mapper and testing it with fixtures 💡 I'm an ex-Java engineer learning TypeScript in public, so I drop in comparisons to Java here and there. Why a BFF Is Needed Using the AmiVoice API requires an API key. And that key must never appear in browser-side code. Frontend JavaScript is fully inspectable by the user, so writing the key there leaks it instantly. So I insert a relay that holds the key. [Browser] ──audio Blob──▶ [Next.js API Route (BFF / holds key)] ──▶ [AmiVoice API] record / display audio field reshape into u / d / a speech → text The browser only calls my own API Route ( /api/recognize ), and that Route attaches the key server-side and forwards to AmiVoice. The key is just read from process.env and never ends up in the bundle shipped to the browser. ☕ Java comparison: This is the same as a Spring @RestController reading an external API key from application.yml (env vars) and relaying without showing it to the client. Think "a thin Servlet that hides the secret and relays an external API."
AI 资讯
Collection of Claude Skills for Indie Developers - Here's What I Learned
A few months ago I started building small tools as single HTML files - no npm, no React, no backend. Just one file that opens in a browser and works offline. I built 4 real products this way: DarkenAmber IT Tools - 17+ developer tools in 194KB ZeroOffice - PDF, image, AI tools in one file PrivacyKit - Photo privacy tools, no upload required ElectroKit - Electrical calculator + cost estimates for CIS market Every single one: one .html file. Works offline. Opens instantly. No server. The problem with AI coding assistants Every time I asked Claude or Copilot to build something simple, I got: A React project with src/ folder package.json with 12 dependencies webpack config TypeScript setup ...before writing a single line of actual logic. I kept manually correcting it. "No, one file. No npm. Vanilla JS." Then I realized - I should just teach it once and reuse that knowledge. What is a Claude Skill? A skill is a Markdown file with YAML frontmatter that changes how Claude thinks for a specific context. It is not a prompt. It is not a system message. It is a reusable set of rules that shapes how Claude reasons, what it prioritizes, and what it avoids. yaml--- name: single-file-app description: "Build complete web tools as a single HTML file - vanilla JS, inline CSS, localStorage, offline-first." tags: html vanilla-js offline version: 1.2 --- The two skills I built single-file-app Teaches Claude to build complete web tools in one HTML file. What changes: No React, no npm, no build tools unless truly justified Vanilla JS first, always localStorage for data persistence Dark/light theme with system preference detection Accessibility built in (labels, aria, keyboard nav) XSS prevention for user input Export/import for user data Anti-patterns it prevents: ❌ "Let me set up a React project" ❌ Creating src/ folder for a simple tool ❌ Suggesting npm install for a calculator ✅ "Here is your complete HTML file" ship-it Teaches Claude to bias toward shipping over planning for early-stag
AI 资讯
Measuring Japanese Read-Aloud Speed with AmiVoice Timestamps — A Coaching App That Doesn't Stop at STT-to-Claude
📝 Originally published in Japanese on Zenn. This is the English version. Canonical: https://zenn.dev/uya0526_design/articles/main_article_reading-speed-meter Introduction — What I Built I built a web app that lets you read a Japanese passage aloud, measures your speed and fluency, and has an AI coach return a one-line piece of feedback. 🌐 Demo: https://reading-speed-meter.vercel.app/ 📦 Repository: https://github.com/uya0526-design/reading-speed-meter The flow is simple. You read a passage aloud into the mic (up to 10 seconds) while looking at the script — I prepared the opening lines of two Japanese classics, The Tale of the Heike and Hōjōki — and when you press "Measure," : AmiVoice API recognizes the audio, the code computes your pure speaking speed (characters/min) and stagnation rate from that result, and Claude Haiku returns coaching as "one compliment + one improvement." (Measurement starts on a button press after recording — it never runs automatically.) This article aims to be a single, self-contained piece covering the whole picture, the design decisions, and the reproduction steps . 💡 Where this sits in my journey I'm an ex-Java engineer learning TypeScript and Python in public. This was my first project where I deliberately adopted "AI-collaborative development" as a clear mode. Throughout, I'll drop in comparisons to Java — hopefully useful for anyone coming from a similar background. What You'll Get From This Article How to design evaluation logic that fully exploits the per-word timestamps AmiVoice returns How to build a BFF (Backend for Frontend) so API keys never reach the browser A "two-stage" design where code does the math and Claude Haiku only does the wording First-hand findings you only learn by verifying — e.g., "I thought I'd optimized it, but it wasn't actually working" I include concrete endpoints, parameters, and environment variables so you can reproduce it yourself. My Learning Style (AI Transparency) 💡 Learning companions & how this art
AI 资讯
My First Week on DEV — Badges, Game Jams, and Way More Than I Expected
I joined DEV at the start of January, but it's only really been in the past week or so that things clicked into place — and looking back, it's been a lot more eventful than I expected for "week one." What I Set Out to Do My original plan was simple: write a structured series covering iOS development with Swift and SwiftUI, one topic at a time, with anime examples thrown in to keep things fun. Strings, arrays, loops, functions — the building blocks. What I didn't plan for was everything else that happened alongside it. The June Solstice Game Jam Happened I saw the announcement for DEV's June Solstice Game Jam and, on a whim, decided to build something for it. A few hours later I had a fully working SwiftUI trivia game — Pride Trivia & Alan Turing Edition — with ten questions covering LGBTQIA+ history and Alan Turing's legacy, a rainbow progress bar, and a results screen with score-based messages. I'd never built and shipped something end-to-end like that before, let alone submitted it to a community challenge. Going from "let's see if this works in the simulator" to "this is live on GitHub with a demo video and a published writeup" in one sitting was honestly a bit of a blur. Then I Detoured Into Google AI Studio A few days later, I worked through the DEV Education Track for Google AI Studio and built MascotCraft Studio — an app that generates coding mascots using Gemini and Imagen. One prompt later, I had a fully deployed web app and a mascot named Octo-Byte , a cheerful deep-sea developer with eight arms and a talent for multitasking. That post sparked one of my favorite discussions so far — a few comments turned into a genuinely interesting conversation about how AI is shifting the bottleneck from "can I build this" to "what should I build, and how do I know if it's good." Not at all what I expected from a post about a cartoon octopus. The Badges Somewhere in all of this, I picked up: A 1 Week Community Wellness Streak badge, just from commenting on other people's
AI 资讯
Windows ortamında Python geliştirme ve operasyon yönetimi için “çekirdek CLI komutları”
1. Python Ortam Kontrolü (Windows CLI) Python sürüm kontrol python --version py --version where python pip kontrol pip --version python -m pip --version pip güncelleme (kritik) python -m pip install --upgrade pip 2. Python Çalıştırma Mekanizması (Windows Standard) Script çalıştırma python app.py Py launcher ile sürüm seçme py app.py py -3 .12 app.py py -3 .11 app.py Modül çalıştırma python -m mymodule 3. Sanal Ortam (venv) – Kurumsal Standart Oluşturma python -m venv venv Aktivasyon (PowerShell) venv \S cripts \A ctivate.ps1 Aktivasyon (CMD) venv \S cripts \a ctivate.bat Deaktivasyon deactivate Sanal ortam kontrol where python where pip pip list 4. requirements.txt Yönetimi Oluşturma pip freeze > requirements.txt Kurulum pip install -r requirements.txt Güncelleme pip install --upgrade -r requirements.txt 5. Paket Yönetimi (pip Core Set) Paket yükleme pip install requests Versiyon sabitleme pip install requests == 2.31.0 Paket kaldırma pip uninstall requests Listeleme pip list Güncellenebilir paketler pip list --outdated 6. Windows .env Yönetimi (Konfigürasyon Standardı) .env dosyası oluşturma notepad .env Örnek içerik DEBUG=True API_KEY=123456 DB_URL=localhost Python tarafı (.env kullanımı) pip install python-dotenv from dotenv import load_dotenv import os load_dotenv () api_key = os . getenv ( " API_KEY " ) print ( api_key ) 7. Sistem Komutları ve Process Yönetimi Process listeleme tasklist Python process filtreleme tasklist | findstr python Process sonlandırma taskkill /PID 1234 /F Python process kill taskkill /IM python.exe /F 8. Dosya İşlemleri (CLI seviyesinde) Dosya listesi dir Klasör değiştirme cd project Dosya silme del file.txt Klasör silme rmdir /S /Q folder 9. Log ve Debug Yönetimi Dosya log izleme (PowerShell) Get-Content app.log -Wait Son satırlar Get-Content app.log -Tail 100 Filtreleme Select-String "ERROR" app.log 10. Uzaktan Erişim (Windows → SSH) SSH bağlantı ssh user@server_ip Dosya gönderme scp app.py user@server_ip:C: \U sers \u ser \ Klasör gön
AI 资讯
Weekly Dev Log 2026-W10
🗓️ This Week While organizing ideas for my first iOS app , I remembered an old web app idea called ToneDrill , which I had casually built before to help practice note names on a guitar fretboard🎸. I decided to try turning it into an iOS app 🛠️. I clarified the purpose of ToneDrill , its minimum requirements , and its core features , then organized them in Notion 📝. I was curious to see how well Codex could implement an iOS app from those minimum requirements , so I gave it a try right away💡. I reviewed the SwiftUI code generated by Codex and worked through the app logic to understand how it was implemented 🔍. For now, I was able to create a working app, which felt like a meaningful step forward 🚶. I created the top page UI design for my portfolio website in Figma 🎨. I focused on keeping the structure simple and implementation-friendly, and designed the UI with reusable components for each major part. Based on what I learned from my previous failed attempt, I tried again to see how well Codex could implement a prototype from the Figma UI design (You can read about my previous attempt that didn’t go so well here😅.) Worked on the AI Threat Modelling room from the AI Security Learning Path on TryHackMe this week🤖. 📱 iOS (SwiftUI) Revisited an old web app idea called ToneDrill, which I had previously built casually as a guitar note-training app, and considered turning it into an iOS app. Organized the app idea in Notion, including its purpose, target use case, minimum requirements, and core features. Decided to aim for an MVP-level version first, instead of trying to build a fully featured app from the beginning. Wrote down simple requirements and tested how accurately Codex could implement the initial version of the app. Reviewed the iOS app implementation generated by Codex and examined the code in detail to understand how the logic worked. 🌐 Web Development Posted my weekly dev log on Dev.to📝 Completed the top page UI design for my portfolio website in Figma. Tried us
AI 资讯
What Beginners Get Wrong About IT Certifications
Certifications help when they match a role and are backed by proof — not as a scoreboard. The problem Beginners are told certifications are the key to IT, so they buy the most popular one, pass it, and are surprised when interviews still go badly. A certificate proves you can pass an exam; it does not, on its own, prove you can do the job. Why this matters now Certifications remain useful signals, and official providers like CompTIA, Microsoft, AWS, Cisco and Google keep their exam objectives public and current. But as AI makes it easier to grind practice questions, employers lean harder on whether you can actually apply the knowledge. The value of a certificate is increasingly in what you can demonstrate alongside it. There is also a cost reality. Exams, courses and retakes add up in money and time, and career changers usually have limited amounts of both. Spending three months and a chunk of savings on a certificate that no target role actually asks for is one of the most common and most avoidable mistakes in an IT transition — which is exactly why the order you choose them in matters. The practical framework Use certifications as targeted evidence, not as a scoreboard. Three rules: Match objectives to a job. Open the certification's published objectives next to a real job description. Overlap means it is relevant; no overlap means it is a hobby. Prove the same skills in practice. For each major objective, build one small artefact that shows you can do it, not just recall it. Stop at enough. One well-chosen, well-demonstrated certification beats three unrelated ones. Sequence them to roles, not to availability. Which one first? Let the target role decide, not the brand with the loudest marketing. As a rough guide: a vendor-neutral foundation (such as CompTIA A+ for general IT support, or Network+/Security+ as you specialise) suits broad support roles; a cloud-fundamentals exam (Microsoft Azure or AWS) suits cloud-leaning roles; Cisco-flavoured paths suit networkin
AI 资讯
What an LLM Actually Does: Predicting the Next Word, Explained
"How does ChatGPT think ?" It doesn't. The entire mechanism behind every chatbot is almost anticlimactic: it predicts one next word , adds it, and repeats. I built a tiny interactive predictor so you can be the model — and it explains both the magic and the flaws. 🔮 Be the model: https://dev48v.infy.uk/ai/days/day6-next-token.html This is Day 6 of AIFromZero — AI literacy, one concept a day, no code to follow. 1. It only predicts the NEXT word Given everything so far, the model outputs a probability for every possible next word, picks one, appends it, and runs again with the longer text. Paragraphs, code, poems — all of it is this one step on repeat. "the cat sat on the ___" → P(mat) high, P(bird) low 2. It's a probability over the WHOLE vocabulary The output isn't one word — it's a number for every word it knows (100,000+ for a real model). Most are near zero; a handful are plausible. The bars in the demo are that distribution, over a tiny vocabulary. 3. Autoregression: feed the output back in After picking a word, it becomes part of the input for the next prediction. Predict → append → predict again. Because each new word conditions on all the previous ones, short local choices add up to coherent long text. 4. Temperature = the creativity dial Once you have probabilities, how do you choose? Temperature reshapes them before sampling: Near 0: the top word always wins — safe, repetitive. High: the odds flatten, so rarer words get a real chance — creative, error-prone. p = p ** ( 1 / temperature ); // then renormalise and sample Drag the slider in the demo and watch the bars sharpen or even out. That one knob is what an API calls "creativity." 5. Where do the probabilities come from? In my toy, from counting which word followed which in a few sentences (a "bigram" with 1-word memory). A real LLM replaces the counting with a giant neural network trained on much of the internet, and its memory spans thousands of words. The mechanism is identical — only the quality of th
AI 资讯
Loss Functions: MSE vs MAE vs Cross-Entropy, Visualized
Pick the wrong loss function and your model optimises the wrong thing — perfectly. The loss is the single number training tries to shrink, so it quietly defines what "wrong" even means. I built an interactive visualiser of MSE, MAE, and cross-entropy so you can see why the choice matters. 🎯 Drag the prediction: https://dev48v.infy.uk/dl/day6-loss-functions.html This is Day 6 of DeepLearningFromZero. Loss = one number for "how wrong" The network's output is compared to the truth and collapsed into one scalar. Everything in training exists to make that number smaller. Choose the loss and you've defined the network's entire goal. MSE — square the error (regression) const mse = ( pred , y ) => ( pred - y ) ** 2 ; Squaring means off-by-4 hurts 16×, off-by-1 hurts 1×. MSE obsesses over large errors — great when big misses are unacceptable, risky when outliers will drag the model around. MAE — absolute error, outlier-robust const mae = ( pred , y ) => Math . abs ( pred - y ); Linear penalty: off-by-4 hurts exactly 4× off-by-1. One wild outlier can't dominate. The trade-off is a constant gradient, so it can be slower and less precise near the answer. Cross-entropy — for classification When the output is a probability, you don't use MSE. Cross-entropy rewards confident-and-right and brutally punishes confident-and-wrong: const bce = ( p , y ) => - ( y * Math . log ( p ) + ( 1 - y ) * Math . log ( 1 - p )); Predict 1% for the true class and the loss screams toward infinity. In the demo, switch to Classification and slide p toward 0 to watch it explode. The slope is what learning actually uses Backprop doesn't follow the loss value — it follows the loss's gradient (slope) downhill. That's why the shape matters: cross-entropy's steep slope when very wrong gives a strong corrective push, helping classifiers learn faster than MSE would. grad = dLoss / dPred ; // gradient descent steps along this Choosing the loss is a design decision Predicting a price? MSE or MAE. Yes/no? Binary
AI 资讯
Naive Bayes From Scratch: A Spam Filter Built From Word Counts
Naive Bayes ran real spam filters for years, and it's the rare ML model whose "training" is just counting . No gradient descent, no iterations — count words, apply Bayes' rule, multiply. I built one from scratch and visualised exactly which words push a message toward spam. 📨 Interactive demo (type a message): https://dev48v.infy.uk/ml/day6-naive-bayes.html This is Day 6 of MachineLearningFromZero — algorithms from scratch, no scikit-learn. 1. Bag of words — order doesn't matter Naive Bayes treats a message as a set of words. "free cash now" and "now cash free" look identical to it. That throws away grammar, but for spam detection the words present matter far more than their order — and it makes the math tiny. 2. Training = counting For every word, how often does it appear in spam vs ham? for ( const { text , label } of trainingData ) for ( const w of tokenize ( text )) counts [ label ][ w ] = ( counts [ label ][ w ] || 0 ) + 1 ; free and click flood spam; meeting and tomorrow live in ham. One pass over the data, done. 3. Bayes' rule flips the question You measured P(words | spam) , but you want P(spam | words) . Bayes flips it: P(spam | words) ∝ P(spam) × P(words | spam) P(spam) is the prior (how common spam is); the likelihood multiplies in the word evidence. 4. "Naive" = pretend words are independent The trick that makes it fast: assume each word is independent given the class, so the likelihood is just a product: P(words | spam) = P(w1|spam) × P(w2|spam) × ... Real words aren't independent ("credit" and "card" co-occur), so it's a naive lie — but the classification still lands right astonishingly often. 5. Smoothing + logs keep it stable Two practical fixes. Add 1 to every count (Laplace smoothing) so an unseen word doesn't zero out the whole product. And add logarithms instead of multiplying tiny probabilities, which would underflow to 0: score [ label ] = Math . log ( prior [ label ]); for ( const w of words ) score [ label ] += Math . log (( counts [ label ][
AI 资讯
I Built an Image Compressor That Runs 100% in the Browser
Most "compress your image" websites upload your photo to a server. You don't need one. The browser's own canvas can re-encode an image at any quality — I built a drag-and-drop compressor in about 30 lines , and your photo never leaves your machine. 🗜️ Try it (drop a photo): https://dev48v.infy.uk/solve/day9-image-compressor.html 1. Catch the dropped file — locally drop . addEventListener ( " drop " , e => { e . preventDefault (); const file = e . dataTransfer . files [ 0 ]; // stays in the tab, 0 bytes uploaded loadImage ( file ); }); For sensitive images (IDs, screenshots), "never uploaded" is a real feature, not just a nicety. 2. Decode it into an <img> A dropped file is just bytes. Load it via a local blob: URL: const img = new Image (); img . src = URL . createObjectURL ( file ); await img . decode (); 3. Draw it onto a canvas Now the browser holds the raw pixels, detached from the original file format: canvas . width = img . naturalWidth ; canvas . height = img . naturalHeight ; canvas . getContext ( " 2d " ). drawImage ( img , 0 , 0 ); 4. Re-encode at a quality (this IS the compression) canvas . toBlob ( blob => { preview . src = URL . createObjectURL ( blob ); showSize ( blob . size ); }, " image/jpeg " , 0.7 ); // 0.7 = 70% quality JPEG and WebP are lossy — they discard detail the eye barely notices. That third argument is the entire compression dial; a small quality drop often halves the file size. 5. Hand the result back as a download link . href = URL . createObjectURL ( blob ); link . download = " compressed.jpg " ; // the browser saves it, no server The takeaway FileReader → Image → Canvas → toBlob is a surprisingly powerful local image pipeline. The same four steps do resizing, format conversion, cropping, watermarking — all client-side, all private. A whole category of "image tools" needs no backend at all. Open it and drop a photo.
AI 资讯
Stop Saying Python Iterators Are Eager
As a backend developer, I sometimes help companies evaluate candidates by reviewing their recorded technical interviews. However, over time, I’ve noticed a deeply ingrained misconception. When discussing memory management or data streaming, many developers explicitly state: "Iterators in Python are inherently eager. If you want true lazy loading or lazy evaluation, you have to use generators and the yield keyword." This misconception is common. Many popular bootcamps and online courses introduce lazy evaluation exclusively through generators . Custom class-based iterators are usually skipped or dismissed as boilerplate-heavy OOP theory rarely used in production Python. This confusion is further reinforced by two common educational simplifications : The List vs. Generator Expression Analogy: Beginners are taught that square brackets [...] (list comprehensions) are eager and take up memory, while parentheses (...) (generator expressions) are lazy. This often creates a false binary mental model: "generators = lazy, everything else = eager." Standard "Textbook" Examples: When courses demonstrate a custom iterator, they usually write a basic class that accepts an already fully loaded list in its __init__ and simply increments an index in __next__ . While this is valid for in-memory data, it leads developers to assume that custom iterators inherently require loading all data upfront. In reality, generators are a specialized language feature designed to implement the iterator protocol automatically . They comply with the exact same interface ( __iter__ and __next__ ). A generator is lazy not because of some magical property of the yield keyword, but simply because it adheres to this underlying contract. To show that custom iterators can be lazy without using any generators or yield keywords, I’ve put together a lightweight and reproducible benchmark. 🧪 The Experiment: Proving Lazy Loading with Custom Iterators Suppose we need to read a database export file ( test_users_db.
开发者
What I Learned Building My First Go Project (go-reloaded)
During my first week at Zone01 Kisumu, I worked on a project called go-reloaded . It was my first real hands-on experience using Go, and it helped me understand not just the language, but also how to think like a developer. In this article, I’ll share what I learned, the challenges I faced, and the key concepts that made everything click. What the Project Was About The goal of the project was to build a small Go program that works with command-line arguments and processes input using Go’s standard libraries. This was my first time interacting deeply with: os package command-line arguments (os.Args) basic Go program structure At first, it felt confusing, but step by step, things started to make sense. What I Learned How command-line arguments work in Go I learned that Go provides access to raw input from the terminal using: os.Args This returns a slice of strings where: os.Args[0] is the program name os.Args[1:] are the actual inputs Working with the os package The os package became one of the most important parts of the project. I used it to: Read input arguments Handle program execution flow Understand how programs interact with the system This helped me realize that Go is very close to the system level compared to JavaScript. Breaking problems into smaller steps One of the biggest lessons wasn’t about code—it was about thinking. Instead of trying to solve everything at once, I learned to: Understand the problem first Break it into smaller tasks Solve each part step by step This made debugging much easier. Challenges I Faced At the beginning, I struggled with: Understanding how os.Args works Knowing where to start in the code Handling errors when inputs were missing Sometimes I would get stuck just trying to figure out what the program was actually receiving. But debugging helped me a lot. Printing values at each step made things clearer. Key Takeaways Go is very explicit compared to JavaScript The os package is powerful for system-level interaction Command-line ar
AI 资讯
LLMs เข้าใจและเขียนโค้ดได้อย่างไร?
มีคำถามที่น่าสนใจเกิดขึ้นระหว่างใช้งาน AI — "มันรู้ได้อย่างไรว่าต้อง return อะไร?" คำอธิบายที่ AI ให้มักฟังดูซับซ้อนและน่าประทับใจ แต่คำตอบที่ตรงไปตรงมากว่านั้นคือ: มันเห็น pattern นี้มาหลายล้านครั้งแล้ว LLM คิดแบบมนุษย์จริง ๆ หรือไม่? คำตอบคือไม่ — แต่มันทำบางอย่างที่ให้ผลลัพธ์คล้ายกับการคิดได้อย่างน่าทึ่ง ลองนึกภาพคนที่ได้อ่านโค้ดทุกบรรทัดที่เคยถูกเขียนบน GitHub, Stack Overflow, เอกสาร library ทุกตัว รวมถึงบทความด้าน programming จากทั่วโลก แล้วจดจำ pattern ทั้งหมดนั้นไว้ LLM คือสิ่งนั้น เพียงแต่ทำในระดับที่มนุษย์ไม่สามารถทำได้ Tokenization: AI มองโค้ดอย่างไร? เมื่อส่งโค้ดให้ AI ประมวลผล มันไม่ได้อ่านทีละตัวอักษร แต่แบ่งข้อความออกเป็น token ซึ่งเป็นชิ้นส่วนที่มีความหมาย pythondef greet(name): return f"Hello, {name}!" โค้ดนี้อาจถูกแบ่งเป็น token ประมาณนี้: def / greet / (name / ): / \n return / f"Hello / , / {name} / !" แต่ละ token ถูกแปลงเป็นตัวเลข (vector) แล้ว model จึงประมวลผลตัวเลขเหล่านั้น Attention Mechanism: ทำไม AI ถึง "เข้าใจ" Context ได้ ส่วนที่น่าสนใจที่สุดของ LLM คือ attention mechanism — กลไกที่ทำให้ model รู้ว่าเมื่อจะ predict token ถัดไป ควรให้ความสำคัญกับส่วนไหนของ input ที่ผ่านมา ตัวอย่างเช่น เมื่อ model กำลังจะเขียน error handling ใน function มันจะวิเคราะห์: ชนิด exception ที่ function อาจ throw pattern ของ error handling ที่ปรากฏในโค้ดใกล้เคียง library ที่ใช้อยู่และวิธีที่มักจัดการ error ทำไม AI จึง Hallucinate บางครั้ง? เพราะ LLM ไม่ได้ "รัน" โค้ดในกระบวนการคิดจริง ๆ มันแค่ทำนาย token ถัดไปจาก pattern ที่เคยเห็น เปรียบได้กับคนที่ศึกษาโจทย์คณิตศาสตร์มาอย่างมากมาย พอเห็นโจทย์ใหม่ก็เขียนวิธีแก้ออกมาดูสมเหตุสมผล แต่ถ้าโจทย์นั้น novel และไม่เคยเห็น pattern ที่คล้ายกันมาก่อน ก็อาจให้คำตอบที่ผิดได้ นั่นจึงเป็นเหตุผลสำคัญว่าทำไมต้อง test โค้ดที่ AI เขียนทุกครั้ง สรุป LLM เขียนโค้ดได้ดีเพราะสามเหตุผลหลัก: เห็น pattern มาในปริมาณมหาศาล, มี attention mechanism ที่ช่วยเชื่อมโยง context, และถูก fine-tune ให้ output มีประโยชน์จริง การเข้าใจกลไกเหล่านี้ช่วยให้ใช้งาน AI ได้ฉลาดขึ้น — รู้ว่าเมื่อไหรควรเชื่อผลลัพธ์ และเมื่อไหรควรตรวจสอบเพิ่มเติม ด้วยความสามารถของ
AI 资讯
15 perguntas de segurança para quem está praticando vibe coding
Outro dia, vi nos stories do Instagram uma amiga pesquisadora contando que estava usando o Claude para ressuscitar uma plataforma criada anos antes por parceiros. Ela não é da área de desenvolvimento de software. O projeto estava praticamente parado. Não havia mais recurso para manter tudo como estava. Com a ajuda da IA generativa, ela conseguiu migrar serviços, reduzir custo, melhorar performance, redesenhar partes da experiência e voltar a implementar coisas que estavam no backlog havia muito tempo. Achei aquilo inspirador! Mas também um pouco assustador. Não por ela estar usando IA generativa. Pelo contrário: acho fascinante que pessoas que não programam profissionalmente estejam conseguindo recuperar autonomia sobre projetos que antes ficavam dependentes de verba, disponibilidade de terceiros ou uma fila infinita de prioridades. O ponto que me acendeu uma luz amarela foi outro: em certo momento da conversa ela comentou que o projeto tinha dados de usuários e pagamentos via Stripe . Antes de seguir, uma ressalva: eu não gosto muito do termo "vibe coding" . Vou usar o termo aqui porque ele pegou, e porque todo mundo entende mais ou menos o que ele quer dizer: criar software com muita ajuda de IA generativa, muitas vezes sem dominar profundamente a linguagem, o framework ou a arquitetura por trás do projeto. Mas o termo me incomoda porque parece diminuir a responsabilidade envolvida. Se você está criando código, alterando código e colocando esse código no ar, você é sim uma pessoa desenvolvedora. Talvez iniciante. Talvez insegura. Talvez dependente demais da IA generativa. Talvez uma pessoa desenvolvedora ruim ou medíocre, como todos nós somos em algum recorte. Mas é. E isso traz responsabilidades. Vibe coding em uma página pessoal é uma coisa. Vibe coding em um sistema com login, dados pessoais, áreas administrativas, arquivos, integrações externas ou pagamento é outra. E aqui existe uma tensão interessante. Eu trabalho com desenvolvimento de software há bastante
AI 资讯
How I Built Production-Grade AI Systems While Still a Student
🚀 Hello, DEV Community! I'm Nader Al Shawki , a final-year AI Engineering student at Al-Razi University, Yemen. This is my first post here, and I'm excited to start sharing my journey with this amazing community. 🎯 Who Am I? I'm passionate about building production-grade AI systems that solve real-world problems. My main areas of focus are: 🖼️ Computer Vision & Deep Learning 🤖 ML Model Deployment (Docker, FastAPI, REST APIs) 🧠 LLMs, RAG, and AI Agents (currently learning) 📊 Data Visualization & Analytics (Power BI) 💡 What I've Built So Far 1. 🍅 Tomato Leaf Disease Detection Platform Tech: YOLOv8, PyTorch, FastAPI, Docker What it does: Detects tomato leaf diseases from images with real-time inference. Containerized with Docker for easy deployment. 2. 🫁 Pneumonia Detection System Tech: PyTorch, CNN Architecture, Medical Imaging What it does: A deep learning model that detects pneumonia from chest X-ray images. 3. 📊 Sales Profit Analysis Dashboard Tech: Power BI, DAX, Data Analysis What it does: Interactive dashboard for tracking sales KPIs. 4. 😀 Face Detection & Emotion Recognition Tech: OpenCV, Deep Learning What it does: Real-time face detection, age estimation, emotion recognition, and gender classification. 5. 🍽️ Restaurant Website Tech: HTML5, CSS3, JavaScript What it does: Fully responsive restaurant website with interactive UI. 🌱 What I'm Currently Learning LLMs (Large Language Models) RAG (Retrieval-Augmented Generation) LangChain & AI Agents Workflow automation with n8n 🔗 Let's Connect 🐙 GitHub: Naderalshawki 💼 LinkedIn: in/nader-al-shawky 📫 Email: naderalshawki@gmail.com Thanks for reading! I'll be posting regularly about AI projects, tutorials, and lessons learned. Stay tuned! 🚀
AI 资讯
What Sololearn Got Right (And What I'm Trying to Fix)
I'm not here to trash Sololearn. Sololearn taught millions of people how to code. It was one of the first apps to make programming education feel mobile-native. That's a real achievement. I respect it. But I'm building Codino — a Python learning app — and I'd be lying if I said I didn't study Sololearn carefully before writing a single line of code. I looked at what they got right. I looked at where users complained. And I made decisions based on both. This is that honest breakdown. What Sololearn Got Right 1. The Community Feel Sololearn built a genuine community. The code playground where users share their projects, comment on each other's code, and get likes — that was smart. Learning feels less lonely when other people are doing it alongside you. It created a social loop that kept people coming back even when they weren't actively doing lessons. I haven't built this yet in Codino. The leaderboard is a start, but a full community layer is something I'm thinking about for a future update. 2. Multi-Language Support Sololearn didn't bet on just one language. Python, JavaScript, C++, SQL, HTML — they covered everything. That gave them a massive addressable audience. Codino is Python-only right now. That's intentional — going deep on one language is better than going shallow on ten. But I understand why multi-language eventually matters for scale. 3. The Code Playground The ability to write and run real code inside the app — without going to a browser — was ahead of its time when Sololearn launched it. That feature alone brought back users who had finished all the lessons. Codino has a full offline IDE powered by Sora Editor. I'd argue ours is actually more capable — real syntax highlighting, autocompletion, offline Python execution — but Sololearn deserves credit for proving this feature matters. 4. Bite-Sized Lessons That Actually Work Sololearn understood that people learn on the bus, in bed, waiting in line. Their lessons are short, digestible, and don't demand 45
AI 资讯
HTTP vs HTTPS — What Actually Happens When You Visit a Website
By Sailee Shingare | M.S in Computer Science, Northern Illinois University Every time you visit a website, your browser and the server have a conversation. That conversation happens over a protocol — either HTTP or HTTPS. You’ve seen both in your browser’s address bar. But what’s actually different between them, and why does it matter? Let’s break it down. What is HTTP? HTTP stands for HyperText Transfer Protocol . It’s the foundation of data communication on the web — the set of rules that defines how your browser requests information and how servers respond. When you visit a website over HTTP, here’s what happens: You type a URL in your browser Your browser sends a request to the server The server sends back the webpage Your browser displays it Simple. But there’s a problem — everything is sent in plain text . Anyone sitting between you and the server can read it. Your passwords, your credit card numbers, your messages — all visible. This is where HTTPS comes in. What is HTTPS? HTTPS stands for HyperText Transfer Protocol Secure . It’s HTTP with an extra layer of security called TLS (Transport Layer Security) — previously known as SSL. The S in HTTPS means everything between your browser and the server is encrypted . Even if someone intercepts the data, they see nothing but scrambled gibberish. What Actually Happens When You Visit an HTTPS Website When you visit an HTTPS site, your browser and the server perform a TLS Handshake before any data is exchanged. Here’s what happens step by step: Step 1 — Client Hello Your browser says hello to the server and shares which encryption methods it supports. Step 2 — Server Hello The server picks an encryption method and sends back its SSL certificate — a digital document that proves the server is who it claims to be. Step 3 — Certificate Verification Your browser checks the certificate against a list of trusted authorities. If it’s valid, the connection proceeds. If not, you see a warning — “Your connection is not private.”