标签:#c
找到 29817 篇相关文章
Introduction to Compilers and Language Design
EU Council forces Chat Control via fast-track
Spain's cadastre API is SOAP from 2003, so I built a JSON wrapper (+MCP)
Chemical accidents rise as Trump administration proposes weakening safety rules
Chemicals from accidents that injured or killed people increased by nearly 50 percent in recent years.
Prediction Markets Let You Bet on Whether a Wildfire Will Burn Down Your Town
Wildfire survivors call fire-prediction markets “morally reprehensible” and worry they could increase the risk of arson.
Best Wi-Fi Routers (2026): My Honest Picks After Testing 40+
Don’t suffer the buffer. These WIRED-tested home routers will deliver reliable internet across your home, whatever your needs or budget.
The missing 500 million: Cosmic bombardment melted Earth's first crust
The heat of the Hadean may have come from impacts as well as the interior.
Pi square is nearly 10
Review: TCL RM9L RGB-Mini LED (2026)
This massive 85-inch model is highly customizable but jaw-droppingly expensive.
Japan's Hayabusa2 probe to conduct flyby of Torifune asteroid
Eight Sleep Pod 5 Review: The Smartest, Nosiest Bed You Can Buy
Eight Sleep’s Pod 5 is great at its job, but its job is also watching you sleep.
If You Can Write Acceptance Criteria, You Can Write an AI Routing Policy
What Are Fish Oil Supplements Good For? Here’s Your Crash Course
A large-scale clinical trial has shown that even long-term consumption of DHA—an omega-3 fatty acid found in abundance in oily fish—may not lead to improvements in cognitive function.
Harvey AI started with a Reddit thread. Now it's worth $11B
Europe's new climate in seven charts
Scientist who cleaned space toilet on work now leading Mars exploration
I wanted to be Anthony Bourdain–until I met him
Your SQS Queue Is Redelivering Messages Your Lambda Is Still Processing
Your order-processing Lambda starts sending duplicate confirmation emails. Not always — maybe one order in twenty. CloudWatch shows more invocations than messages published. The function code hasn't changed in weeks. What changed is that someone added a fraud check that pushed processing time from 25 seconds to around 45, and your SQS queue is still running the default 30-second visibility timeout. That combination is the whole bug. When a Lambda pulls a message from SQS, the message isn't deleted — it's hidden for the duration of the visibility timeout. If the function is still working when that window closes, SQS assumes the consumer died and hands the same message to another invocation. Now two Lambdas are processing the same order, both will "succeed," and both will send the email. Nothing errors. Nothing retries. There is no log line that says "this message was delivered twice because your timeouts are misconfigured." Infrawise ( npm ) flags this exact mismatch as a high-severity finding before it costs you an afternoon of staring at idempotency-free handler code. This post walks through why the bug is so hard to see, how the detection works, and how to keep an AI assistant from reintroducing it. Why you never catch this one yourself Three things make this misconfiguration nearly invisible: It passes every test. In local tests and staging, your handler processes a synthetic message in two seconds. The 30-second visibility window never comes close to expiring. The bug only exists under production conditions — real payload sizes, real downstream latency, cold starts stacking on top of slow dependencies. The defaults set the trap. SQS queues default to a 30-second visibility timeout. Lambda functions routinely get their timeout bumped to 60, 120, or 900 seconds as they grow. Nobody bumps the queue at the same time, because the two settings live in different consoles, different IaC resources, and usually different pull requests. The failure signature points elsewhe
Modern C# Features: A Deep Dive into Records, Pattern Matching, Async, and Performance
Modern C# Features: A Deep Dive into Records, Pattern Matching, Async, and Performance A practical guide to the C# language features that have reshaped how we write .NET code — records, pattern matching, async/await improvements, nullable reference types, LINQ enhancements, Span<T> , and performance optimizations. Table of Contents Introduction Records Pattern Matching Async/Await Improvements Nullable Reference Types LINQ Enhancements Span<T> and Memory<T> Performance Optimizations Quick Reference Table Conclusion Introduction C# has evolved significantly since C# 8. Each release (9, 10, 11, 12, 13) has focused on three consistent themes: Conciseness — write less boilerplate to express the same intent. Safety — catch bugs at compile time instead of runtime (especially around null ). Performance — give developers low-level control without leaving the managed, safe world of .NET. This guide walks through the features that matter most in day-to-day development, with working code examples you can drop into a dotnet run project. 1. Records Introduced in C# 9 , record types give you immutable, value-based data models with almost no ceremony. Why records exist Before records, representing an immutable data object meant hand-writing a constructor, Equals , GetHashCode , ToString , and often a With -style copy method. Records generate all of this for you. // Before: a "plain" immutable class public class PersonClass { public string FirstName { get ; } public string LastName { get ; } public PersonClass ( string firstName , string lastName ) { FirstName = firstName ; LastName = lastName ; } public override bool Equals ( object ? obj ) => obj is PersonClass p && p . FirstName == FirstName && p . LastName == LastName ; public override int GetHashCode () => HashCode . Combine ( FirstName , LastName ); public override string ToString () => $"PersonClass {{ FirstName = { FirstName }, LastName = { LastName } }} " ; } // After: the same thing as a record public record Person ( stri