编程 · 最新文章

今日新增 29 篇 · 共 2,698 篇 · 来自 79 个博客

Josh W. Comeau··Josh W. Comeau

Becoming a Software Developer Without a CS Degree

A look at how hundreds of developers got their start in the industry despite not having a Computer Science or Software Engineering degree. We'll sort responses into 6 categories, and detail strategies that you can use to ensure you capture

Without Boats·

waitmap - an async awaitable map

AI 摘要The author has released a new Rust crate called waitmap, a concurrent hash map built on top of dashmap, designed as a concurrency primitive for async/await code. It extends dashmap's API with a wait method that looks up an entry and suspends the calling task if the entry is not present. The suspended task is woken whenever a value is inserted under that key.

Josh W. Comeau··Josh W. Comeau

The Perils of Hydration

A surprisingly-common misconception can lead to big rendering issues that are difficult to debug. This deep-dive tutorial examines how React and Gatsby can be used to pre-render content, and how we can work around the constraints to build d

Josh W. Comeau··Josh W. Comeau

Persisting React State in localStorage

A common thing in React development is that we want to store a bit of React state in localStorage, and re-initialize from that value on the next page-load. This quick tutorial shows you how we can build a custom hook that does exactly this!

Travis Downs··Travis Downs

Adding Staticman Comments

AI 摘要The article is a detailed, step-by-step guide to adding comments to a static Jekyll blog using Staticman, including creating a dedicated GitHub bot account, generating access tokens, and configuring staticman.yml and _config.yml. It explains how to deploy a private Staticman API bridge to Heroku (since the public one proved unsustainable), generate an RSA keypair for encrypting secrets, and invite the bot to the blog repository. Finally, it covers enabling reCAPTCHA to prevent spam, so that reader comments are validated by the bridge and submitted as pull requests that trigger site regeneration when accepted.

Josh W. Comeau··Josh W. Comeau

Effective Collaboration with Product and Design

How we work with design can have a tremendous impact on our overall output, and yet we don't always treat it as very important. A look at how collaborating with design can supercharge our own productivity. Keep reading.

Travis Downs··Travis Downs

The Hunt for the Fastest Zero

AI 摘要This article investigates a surprising C++ performance quirk: filling a char array with std::fill using the integer 0 is up to 29x slower than using the char literal '\0' with gcc at -O2, because libstdc++ only applies its memset-based optimization when the iterator type exactly matches the fill value type, and 0 is deduced as int. The author traces the cause through the library's SFINAE-based implementation, shows workarounds like explicit template arguments or casts, notes edge cases involving conversion-counting types, and proposes a standard library fix. He concludes that C++ developers should keep using std::fill and modern idioms, passing a char-cast value in hot paths, rather than reaching for memset, which is rarely safe for arbitrary types.