← 返回技术雷达
Hacker News tech

Small programming tricks

Hacker News 热议:Small programming tricks(310 赞 / 157 评论,来源 will-keleher.com)

一句话概要

A lot of effective engineering comes from the accumulation of small nuggets of knowledge.

原文开头节选

Day to day, I think a surprising amount of engineering productivity comes from small nuggets of knowledge: being aware that a language feature exists; knowing that an unexplained tcp delay is probably related to the TCP_NO_DELAY setting and Nagle’s algorithm; knowing the right git incantation to get out of a pickle; or knowing a trick with sed to rewrite a file.

In one sense, this is self-evident: anything you know is going to be made up of smaller pieces of knowledge. Of course those smaller pieces of knowledge matter.

But I think there are some nuggets of knowledge that are particularly valuable and don’t require a lot of supporting mental infrastructure. You don’t need to know any python to use python3 -m http.server to start a simple server in a directory, but it might still make your work marginally easier. Let me share a few examples:

const bucket = Math. floor (Math. log10 ( userInGroupCount )) metrics . increment ( “my_metric” , { bucket }); Modern JS now supports Array.flatMap , Object.entries , and Promise.withResolvers .

(以上为原文节选,完整内容见下方”原文来源”)

这条动态今日登上 Hacker News 首页(310 赞 / 157 评论,来源 will-keleher.com)。技术雷达每日自动聚合 AI 工程、后端架构、DevOps 方向的前沿动态;相关工程落地可浏览下方的相关服务与延伸阅读,或直接与我们团队交流。

原文来源: Hacker News

相关服务