Anthropic's Opus 5 is about token efficiency, not a capability leap
Models are improving quickly, but the cheaper options are often good enough.
找到 115 篇相关文章
Models are improving quickly, but the cheaper options are often good enough.
TL;DR Croc GUI is a free desktop app for schollz/croc — encrypted peer-to-peer file transfer with drag-and-drop, QR codes (via getcroc.com ), and LAN mode. macOS, Windows, Linux. MIT licensed. Download: GitHub Releases Why I built this I send files with croc constantly. End-to-end encrypted, cross-platform, no vendor cloud. The CLI is perfect — until you're helping someone who doesn't have a terminal open. Croc GUI is the Send/Receive desktop app I wanted: same croc binary, clearer UX. What it does Send — drag files/folders, get a code phrase + QR link Receive — paste a code, pick a download folder Share — copy phrase, getcroc.com URL, or full croc … command Local-only — croc --local for LAN peers Zip — pack on send, unpack helper on receive Options — relay, port, proxy, overwrite, auto-confirm What it doesn't do Reimplement croc's crypto or protocol Upload anything to a GUI-specific cloud Claim to be an official schollz project Transfer engine: schollz/croc . Please sponsor schollz . Stack UI: React + TypeScript Shell: Tauri 2 (Rust) Engine: bundled croc binary per platform Dev quick start git clone https://github.com/interfluve-wav/croc-gui.git cd croc-gui/gui npm install npm run bundle:croc:download npm run tauri:dev Try it Platform Installer macOS (Apple Silicon) Croc_* (Apple Silicon).dmg macOS (Intel) Croc_*_x64.dmg Windows Croc_*_x64-setup.exe Linux .deb or .AppImage ⭐ Star on GitHub · 🐛 Issues
Sometimes you export a spreadsheet and the next tool in your pipeline wants JSON instead. Pulling in pandas for that feels like overkill — Python's standard library already has everything needed. Here's a small converter that does it in a handful of lines, no third-party packages required. 1. Reading the CSV csv.DictReader turns each row into a dictionary keyed by the header row automatically — no manual header parsing needed. import csv def read_csv ( csv_path ): with open ( csv_path , newline = "" , encoding = " utf-8 " ) as f : reader = csv . DictReader ( f ) return list ( reader ) Wrapping the result in list() consumes the whole reader up front, which is fine for small-to-medium files and much simpler to reason about than lazily iterating later. 2. Writing the JSON import json def write_json ( rows , json_path ): with open ( json_path , " w " , encoding = " utf-8 " ) as f : json . dump ( rows , f , indent = 2 ) indent=2 keeps the output human-readable, which matters if anyone will actually open the file to sanity-check it. 3. Wiring it together def csv_to_json ( csv_path , json_path ): rows = read_csv ( csv_path ) write_json ( rows , json_path ) return len ( rows ) Returning the row count gives a quick sanity check — if you expected 500 contacts and it says 3, something upstream went wrong before you even open the output file. 4. The full script, start to end import csv import json def read_csv ( csv_path ): with open ( csv_path , newline = "" , encoding = " utf-8 " ) as f : reader = csv . DictReader ( f ) return list ( reader ) def write_json ( rows , json_path ): with open ( json_path , " w " , encoding = " utf-8 " ) as f : json . dump ( rows , f , indent = 2 ) def csv_to_json ( csv_path , json_path ): rows = read_csv ( csv_path ) write_json ( rows , json_path ) return len ( rows ) if __name__ == " __main__ " : count = csv_to_json ( " contacts.csv " , " contacts.json " ) print ( f " Converted { count } rows -> contacts.json " ) 5. Trying it out Given a contact
Expedia Group has introduced STAR, an internal AI-assisted observability platform that helps engineers investigate production incidents using service telemetry and LLMs. Built with FastAPI, Datadog, Celery, Redis, and Langfuse, STAR follows structured workflows to analyze telemetry, generate root cause assessments, and support incident response while keeping engineers in the loop. By Leela Kumili
I'll guide you through Python fundamentals by comparing concepts with JavaScript. Let's start! 1. Hello World & Basic Syntax JavaScript console . log ( " Hello World " ); let x = 5 ; Python print ( " Hello World " ) x = 5 # No semicolon, no let/const Key Differences: No semicolons in Python Indentation matters (replaces curly braces) Comments use # instead of // 2. Variables & Data Types JavaScript let name = " Alice " ; // string let age = 30 ; // number let isStudent = true ; // boolean let scores = [ 95 , 87 , 91 ]; // array let person = { // object name : " Bob " , age : 25 }; let nothing = null ; let notDefined = undefined ; Python name = " Alice " # str age = 30 # int (or float for decimals) is_student = True # bool (capital T/F) scores = [ 95 , 87 , 91 ] # list (mutable) person = { # dict (dictionary) " name " : " Bob " , " age " : 25 } nothing = None # Python's null/undefined Key Differences: Python uses snake_case (not camelCase) True / False capitalized None instead of null / undefined Lists ≈ Arrays, Dicts ≈ Objects 3. Control Flow JavaScript // If-else if ( age >= 18 ) { console . log ( " Adult " ); } else if ( age >= 13 ) { console . log ( " Teen " ); } else { console . log ( " Child " ); } // For loop for ( let i = 0 ; i < 5 ; i ++ ) { console . log ( i ); } // While loop let count = 0 ; while ( count < 5 ) { console . log ( count ); count ++ ; } Python # If-else (indentation instead of braces) if age >= 18 : print ( " Adult " ) elif age >= 13 : # NOT else if print ( " Teen " ) else : print ( " Child " ) # For loop (more like for...of in JS) for i in range ( 5 ): # range(5) = [0, 1, 2, 3, 4] print ( i ) # Iterate over list (like for...of) for score in scores : print ( score ) # While loop count = 0 while count < 5 : print ( count ) count += 1 # No ++ operator in Python 4. Functions JavaScript // Function declaration function add ( a , b ) { return a + b ; } // Arrow function const multiply = ( a , b ) => a * b ; // Default parameters function greet ( n
I'm AlanWu. I'm in junior high. I've written a lot of bad code. Here's what I changed to make it less bad. 1. Name things like a human // Don't do this int d ; // days? distance? damage? int cnt = 0 ; // "cnt" — you know, the classic vector < int > v ; // v of what // Do this int daysUntilDeadline ; int errorCount = 0 ; vector < int > studentScores ; Full words, no abbreviations. idx instead of i in loops is fine. But sz for size, cnt for count, ptr for pointer — just type the word. You're not being charged by the character. 2. Functions should do one thing If you need the word "and" to describe a function, split it. // Bad: does two things, name lies void loadAndValidateConfig () { readFile (); checkSyntax (); } // Better Config loadConfig ( string path ) { return parseConfig ( readFile ( path )); } bool validateConfig ( const Config & cfg ) { return cfg . width > 0 && cfg . height > 0 ; } My rule of thumb: if a function is longer than what fits on one screen, break it. If I can't describe what it does in one sentence without "and", break it. 3. Comments explain WHY, not WHAT // Bad — tells me what the code already says // Loop through all students for ( auto & s : students ) { s . score += 5 ; } // Good — tells me WHY, which the code can't // Extra credit: 5 points for submitting early for ( auto & s : students ) { s . score += 5 ; } If you're writing a comment that just restates the next line of code, delete it. The only comments worth keeping are the ones that answer "why did I do it this way?" 4. Don't nest too deep // Bad — 3 levels deep, I've already forgotten what the top level was for ( auto & student : students ) { if ( student . hasSubmitted ()) { for ( auto & answer : student . answers ) { if ( answer . isCorrect ()) { score ++ ; } } } } // Better — flatten with early exits for ( auto & student : students ) { if ( ! student . hasSubmitted ()) continue ; for ( auto & answer : student . answers ) { if ( ! answer . isCorrect ()) continue ; score ++ ; } } Al
For a long time, I believed coding was only for people who studied computer science or worked as professional developers. Whenever I saw a screen filled with code, it looked like a completely different language. There were brackets, symbols, functions, and terms I did not understand. I assumed learning it would require years of study before I could create anything useful. That changed when I encountered a repetitive task at work. I was regularly copying information from a spreadsheet, checking each row, preparing an email, sending it, and updating the status manually. The work was manageable, but completing the same process repeatedly took time and left room for mistakes. I started wondering if the spreadsheet could do some of the work for me. That question led me to Google Apps Script. At first, I did not even know where to begin. I understood the result I wanted, but I did not know how to translate it into code. I could explain the process clearly to another person, but explaining it to a computer felt different. AI became my starting point. I described the task and asked it to create a script. Within seconds, it gave me several lines of code. I copied them, ran the script, and immediately received an error. My first reaction was frustration. I had expected the code to work because it looked complete. But I soon realized that generated code was not automatically working code. I went back and explained the error. AI suggested a change, so I tested it again. Another issue appeared. I repeated the process until the automation finally worked. The moment it worked, something changed in the way I viewed coding. I did not suddenly become a programmer, but I had created something useful. A task that previously required several manual steps could now happen automatically. I became curious about what else I could build. I started experimenting with confirmation emails, timestamps, form submissions, missing-data checks, and automatic reports. Each project introduced me to a
How Normal Software Engineers Actually Use AI in Their Daily Work Let's cut through the hype. You're not building the next AGI. You're a working software engineer with deadlines, legacy code, and a backlog that never shrinks. So how do you actually use AI tools in your day-to-day work? After surveying hundreds of developers and reflecting on real-world usage patterns, here's what normal software engineers are doing with AI—no Silicon Valley theatrics required. The Mundane But Invaluable: Code Completion and Boilerplate The most common use case is the least sexy: letting AI handle repetitive code. GitHub Copilot, Cursor, and similar tools excel at generating boilerplate that you'd otherwise copy-paste from Stack Overflow or previous projects. Real example: Writing CRUD endpoints in Express/TypeScript: typescript // Type this comment and let AI complete: // Create a REST endpoint for user registration with email validation app.post('/api/users/register', async (req: Request, res: Response) => { try { const { email, password, name } = req.body; // Email validation const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailRegex.test(email)) { return res.status(400).json({ error: 'Invalid email format' }); } // Check if user exists const existingUser = await User.findOne({ email }); if (existingUser) { return res.status(409).json({ error: 'User already exists' }); } // Hash password and create user const hashedPassword = await bcrypt.hash(password, 10); const user = await User.create({ email, password: hashedPassword, name }); res.status(201).json({ userId: user.id, email: user.email }); } catch (error) { res.status(500).json({ error: 'Internal server error' }); } }); Did AI write perfect code? No. But it gave you scaffolding to refine, saving 10-15 minutes of typing. That's the real win. The Game-Changer: Explaining Legacy Code and Obscure APIs Every developer inherits someone else's mess. AI tools shine when deciphering undocumented code or unfamiliar libraries. Pract
After spending countless hours designing, coding, debugging, and improving every little detail, I'm excited to share my personal portfolio with the developer community! 🌐 Live Website : https://didulagamage.pages.dev/ I'd Love Your Feedback ❤️ If you have a few minutes, I'd really appreciate it if you could visit my portfolio and share your thoughts. Your feedback helps me become a better developer. Thanks for reading! 🚀
Strings & Text Processing: Text Isn't as Simple as It Looks If someone asks you what's the simplest type of data in programming, there's a good chance you'll say strings . After all, they're just text. A person's name is a string. An email address is a string. A password is a string. Even the message you're reading right now is just a collection of strings. At first glance, there doesn't seem to be much to learn. You create a string, print it, compare it with another string, and move on. But after writing a few programs, things start getting... strange. You convert "hello" into uppercase, yet the original string somehow stays the same. An emoji that looks like a single character suddenly reports a length of 2 . Joining thousands of small strings together makes your program unexpectedly slower. And then someone introduces you to something called Regex , which looks less like code and more like an ancient spell. None of these are bugs. They're simply the result of how strings actually work behind the scenes. In this lesson, we'll uncover those hidden details one by one. Surprise #1: Why Didn't the String Change? Take a look at this code. const original = " hello " ; const shouted = original . toUpperCase (); console . log ( original ); console . log ( shouted ); What would you expect the output to be? Many beginners think the output will look like this: HELLO HELLO But that's not what happens. Instead, JavaScript prints: hello HELLO The original string remains exactly as it was. Why? Because strings are immutable . What Does "Immutable" Mean? The word immutable simply means: Once something is created, it cannot be changed. Think of a printed book. If you want every occurrence of the word hello to become HELLO , you don't magically change the ink that's already on the paper. Instead, you print a new copy with the updated text. Strings behave in a similar way. Whenever you use methods like: toUpperCase() toLowerCase() replace() concat() the original string stays untouch
На прошлой неделе DeepSeek отказался писать мне регулярку. Не «не смог», а вежливо объяснил, что регулярка тут плохая идея, и предложил цикл. Тогда я поймал себя на том, что уже год сравниваю модели «на глаз»: одна затупила — скопировал промпт в соседнюю вкладку, посмотрел, сделал выводы из ничего. Надоело. Я устроил маленький честный замер: три типовые задачи из моих рабочих будней, буквально один и тот же промпт, три модели. Про сетап — один абзац, чтобы дальше не отвлекаться. Хотелось убрать переменную «у одной вкладки отвалился VPN, у другой слетела сессия», поэтому гонял всё в одном окне через агрегатор; ссылка будет внизу, здесь она не важна. Важно одно: модель переключается прямо над полем ввода, так что все три участника получали идентичный текст без копипасты между сервисами. Участники: GPT (флагман, GPT-5-класс), Claude, DeepSeek. Задача 1. Регулярка: split CSV-строки, не ломая кавычки Промпт: «Напиши JS-регулярку, чтобы разбить строку CSV по запятым, но запятые внутри двойных кавычек разделителями не считать». Классическая ловушка: наивный split(',') рвёт поле "Иванов, Иван" пополам. GPT сразу выдал вариант с lookahead: const parts = row . split ( /, (?=(?:[^ " ] *" [^ " ] *" ) * [^ " ] *$ ) / ); Работает. Правда, на моём проверочном кейсе с экранированной кавычкой "" внутри поля — уже нет. Но я такого и не просил, засчитываю. Claude дал ту же регулярку, но с примечанием: lookahead на каждой запятой пробегает хвост строки, на длинных строках это квадратично, для продакшена берите csv-parse . Занудно, но по делу — я однажды именно такую конструкцию ловил на таймауте. DeepSeek — это тот самый отказ, с которого всё началось. Регулярку писать не стал, предложил цикл с флагом «мы внутри кавычек» — мол, так надёжнее. Формально это даже честнее, но задание было «напиши регулярку», и выдал он её только после уточнения. Итог раунда: GPT и Claude ровно, Claude на полбалла впереди за предупреждение. Задача 2. Рефакторинг: функция скидок с вложенными if Скормил всем
Augment Code's Vinay Perneti talks models, harnesses, and context.
Hi, I'm Cesar, a Senior Software Engineer with 10+ years of experience. In 2023, I got sick and...
Every engineer eventually hits this phase: “My design looks okay… but something feels off.” No compile errors. No obvious bugs. But still: responsibilities feel scattered services feel too big entities feel too thin logic feels duplicated boundaries feel unclear This is normal. Because domain modeling is not about getting it right in one attempt. It is about refining structure until the business behavior becomes clear. Step 1 — Start With the Symptom, Not the Code If your design feels wrong, don’t immediately rewrite everything. First identify the symptom: Common symptoms: too many “Manager” services logic repeated in multiple places unclear ownership of rules too many dependencies between modules frequent “if-else explosion” Each symptom points to a specific modeling issue. Step 2 — Check If Invariants Are Scattered Ask: “Where are my business rules living?” Bad sign: Rules inside services + controllers + helpers This leads to: inconsistent behavior duplicated validation broken business guarantees Good design: invariants live close to the entity or aggregate root Step 3 — Check Entity vs Service Confusion A very common issue: Entities become dumb: only fields no behavior Services become overloaded: all logic all rules all decisions This creates: Anemic Domain Model + Fat Services Fix mindset: Entity = owns behavior + protects state Service = coordinates workflows Step 4 — Check Your Aggregate Boundaries Ask: “What must stay consistent together?” If your answer is unclear, you likely have: wrong aggregates or missing aggregates Example problem: Cart and Order sharing logic This causes: inconsistent pricing unclear lifecycle ownership Fix: Cart = intent Order = truth Step 5 — Look for “Hidden Coupling” Hidden coupling happens when: one module depends on internal state of another multiple services modify same data business rules are duplicated across boundaries This leads to fragile systems. Strong design ensures: each domain owns its own truth. Step 6 — Validate Stat
Creator says he will "very loudly ignore" those arguing for a ban on AI tools.
Intuition Manacher's Algorithm leverages the symmetry of palindromes to avoid redundant comparisons. Instead of treating odd- and even-length palindromes separately, the input string is transformed by inserting a special character (#) between every character and adding sentinel characters (^ and $) at both ends. This allows every palindrome to be treated as an odd-length palindrome. While traversing the transformed string, the algorithm maintains the center and right boundary of the rightmost palindrome found so far. For each position, it uses the palindrome information from its mirror position (with respect to the current center) to initialize the palindrome radius, significantly reducing unnecessary expansions. Only when the palindrome reaches beyond the current right boundary is additional expansion performed. This optimization ensures that every character is expanded at most a constant number of times, resulting in linear time complexity. Approach Handle the edge case by returning an empty string if the input string is empty. Transform the input string by inserting # between every character and adding sentinel characters (^ and $) at both ends to treat odd- and even-length palindromes uniformly. Create a palindrome radius array p, where p[i] stores the radius of the palindrome centered at index i in the transformed string. Initialize the variables center and right to represent the center and right boundary of the current rightmost palindrome. Initialize max_len and center_index to keep track of the longest palindrome found during traversal. Traverse the transformed string from left to right, ignoring the sentinel characters. Compute the mirror index of the current position using the current palindrome's center. If the current index lies within the current right boundary, initialize its palindrome radius using the previously computed mirror information. Expand around the current center while the characters on both sides are equal, increasing the palindrome radius
Stripe introduces a benchmark suite to evaluate whether AI agents can build real-world Stripe integrations across backend, frontend, and browser-based checkout workflows. The study examines end-to-end software engineering capability, focusing on execution, testing, and validation gaps in agentic systems under production-like constraints. By Leela Kumili
AI-assisted builders can take an idea from prompt to production in a weekend. That speed is useful, but it also compresses the part of the process where someone normally reviews deployment settings, browser-visible secrets, authorization boundaries, and recovery plans. A public security scanner is a good first pass for that problem. It is also easy to misunderstand. A clean public scan does not mean an application is secure, and a warning does not always mean a vulnerability is exploitable. The useful question is not “Did the scanner pass my app?” It is “What evidence could this scanner actually observe?” Layer 1: the public deployment surface A passive scanner can request the same resources that a normal visitor can reach. Depending on its scope, it may inspect: HTTP security headers such as Content-Security-Policy and Strict-Transport-Security HTTPS behavior and redirect consistency Public JavaScript bundles for credential-shaped strings Public source maps that expose original source structure Common sensitive paths such as environment files or repository metadata Cookie attributes and other response-level deployment signals These checks are valuable because they test the deployed result, not the configuration you intended to ship. For example, a repository may contain a CSP configuration while the CDN response does not. A source map may be disabled in one build configuration but still appear in production. A key may be stored safely on the server in most code paths while one client bundle accidentally contains a privileged token. The deployed surface is where those mistakes become observable. Layer 2: source-code review A public URL cannot reveal every control behind an application. Source review or SAST can inspect code paths, configuration, data flow, and dangerous implementation patterns that never appear in a normal response. This is where you can answer questions such as: Is authorization enforced on the server? Can a user change an object ID and read anothe
Last year my team had to pick a coding agent, and I volunteered to run the evaluation. I felt good about it. I pulled up the public benchmark scores, lined up the contenders, took the one at the top, and told everyone we had a winner. Then we actually pointed it at our repo. It did not blow up dramatically. It just kept being slightly wrong in ways that ate our time. It wrote diffs our reviewers would not approve. It renamed a function and broke three files it had never opened. The tests it ran passed, and the repo was still broken. I had confidently recommended a tool based on a number that turned out to say almost nothing about our situation. That was embarrassing enough that I went and figured out why. It took a few weeks of reading and a couple more bad calls before I landed on something that works. This is that, written plainly, and I hope it saves you the meeting where you have to walk your recommendation back. Why the benchmark score lied to me The score was not fake. It was just measuring somebody else's code. Once I looked properly, four gaps explained the whole thing: The agent might have already seen the answers. The problems in these public benchmarks are old. Models were very likely trained on the actual fixes used to grade them. So the score partly measures memory, not problem-solving. The setup is nothing like real work. A benchmark gives the agent a clean repo, one clear issue, and one command to run the tests. My engineers give it a half-open editor, a messy branch, a Slack thread, and a reviewer comment. Completely different job. Our codebase has its own habits. Our internal libraries, our wrappers, our test style, the imports we ban. No benchmark knows any of that, so an agent can write textbook-perfect code that our reviewers still reject on sight. The bar for passing is way lower. A benchmark passes a patch if the broken test now passes. My team passes a patch if it does that, and does not break unrelated tests, does not reformat the whole file,
The Quest Begins (The "Why") I still remember the first time I stared at a LeetCode problem that asked me to count the number of islands in a grid. My initial instinct? Run a BFS/DFS from every unvisited land cell, mark everything reachable, and repeat. It worked, but each query felt like I was re‑exploring the same territory over and over again—like walking the same hallway in a dungeon every time I wanted to open a new door. Then a friend tossed me another problem: “Given a list of friendships, tell me if two people are in the same social circle.” Again, the naive solution was to rebuild the whole graph for every query. I felt like I was stuck in a grind‑fest, repeating the same low‑level work while the real challenge—understanding the structure of the connections—remain. That frustration sparked a question: Is there a way to remember what we’ve already discovered about connectivity, so future queries are instant? The answer, as many of you have guessed, lives in a humble but mighty data structure called Union‑Find (also known as Disjoint Set Union, DSU). The Revelation (The Insight) At its core, Union‑Find is about two simple ideas : Each element starts in its own set – think of every person as a lone adventurer. When we learn that two elements belong together, we merge their sets – we call that a union . The magic isn’t just in merging; it’s in how we find the representative (or “root”) of a set later on. If we naïvely walked up a chain of parents every time, we could end up with O(n) per find—still a grind. Two optimizations turn this into near‑constant time: Union by rank (or size) – always attach the smaller tree under the root of the larger one. This keeps the overall tree shallow, guaranteeing that the height never exceeds log n. Path compression – during a find operation, we make every node we pass point directly to the root. It’s like handing every traveler a map that instantly shows the shortest route to the campfire, so next time they don’t need to trek