HackerURLs

一次又一次被重新发现的经典。

同一个链接,相隔一年以上,一次又一次被人重新发现、再次冲上 Hacker News 首页。能经受住这种时间检验的,大多是值得一读再读的文章。每篇附中文标题,讨论最热的那些再加上中文导读和高赞评论翻译。

从名人堂开始
  • 4,700+篇经过时间检验的经典

Hall of fame

名人堂

在经典库里看全部精选

上首页次数最多、而且有中文导读的 30 篇。时间轴上每个黑点是一次上首页,空心点是一次没冲上去的投稿。

  1. 正在载入经典…

Archive

经典库

按第一次上首页的年份分布,点柱子筛选。

排序

    About

    这些经典是怎么挑出来的

    1. 01

      合并同一个链接

      读取 Hacker News 自 2006 年以来的全部链接投稿,把 http/https、www、跟踪参数等写法不同的同一篇文章合并成一条。

    2. 02

      只留经得起时间的

      同一链接至少两次拿到 50 分以上(约等于上首页),而且两次相隔一年以上;再由 AI 剔除状态页、产品首页和新闻事件。

    3. 03

      写导读、译评论

      上首页次数最多的 2,000 篇配上中文导读、"为什么经久不衰",并精选翻译 HN 高赞评论。导读由 AI 生成,可能有误。

    编程与软件工程icube-icps.unistra.fr编辑精选

    《现代 C》免费书(PDF)

    Modern C [pdf]

    2次上首页
    1年跨度
    670累计得分
    430条评论

    2015 — 2016,它一次次回到首页

    黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。

    导读

    《Modern C》是 Jens Gustedt 编写的免费 C 语言教材(PDF),面向不同经验水平的读者分层组织,覆盖 C99/C11 的现代特性。作者曾参与 musl libc 的 C11 标准库开发,因此对语言标准有深入理解。

    为什么经久不衰:它是少数系统讲解 C11 现代特性(如 static 数组参数、_Noreturn、_Alignas)的免费教材,对想更新过时 C 知识的老程序员尤其有价值。

    关键词 C语言C11教材免费书籍

    HN 评论精选

    对初学者来说内容太多太快,入门示例过于复杂

    我很想喜欢这本书,但看了第一章只能想象学生的困惑。我支持分层的想法,但它试图覆盖太多内容、节奏太快。第 2 页就用复杂的 printf 格式串、数组和循环来演示,初学者会看得眼花。正确的入门方式应该是极简的例子:先解释 main 是入口点并返回成功或失败,再逐步引入变量、循环。

    jackhack查看英文原文

    I wish I could like this book, but after reviewing the first chapter I can only imagine the confusion of students. I support very much the idea of breaking the book into levels, but it attempts to cover far too much, far too quickly and I don't believe this book would be useful for those who are not already familiar with the language. I've been writing C since the late 1980s, moved to mostly C++ by the mid 90s, C# in the 2000s, and now I've come back to C. Most recently built some realtime components and drivers, having to drop back to C77. I mention this as I've taught many colleagues along the way and I'm sensitive to the places where beginners tend to get hung up with problems and I've come to anticipate many of the questions along the way. Let me take a moment to illustrate the base of the problems i see: "Too much, too fast." The best example is right on page 2: a program which demonstrates a complex printf format string, along with arrays and loops. I can't help but sarcastically ask "Are you sure that is how you want to introduce someone to the language?" A beginner's eyes will glaze over. Seriously, the way to introduce the language is simple examples. Explain the main is the entry point where all programs begin running, and that main returns it's success or failure to the operating system (or other program that called it). 3 lines of code. Then add a SIMPLE print, if you wish, or a variable declaration. Int. Float. char. again, it MUST be simple. Introduce loops. Then show how to move some functionality out of main into a subroutine/a new method/new function, how to call that function, and return results. Talk about header files, etc. From there, dive into the rest of the base language... talk up arrays, memory management, heap/stack, pointers, libraries, exceptions, etc. But this is only my experience, and I'm sure that it is different for others. Kind regards.

    书中部分示例代码过于炫技,且有技术性错误

    书里很多内容不错,但第二章就出现 for (size_t i = 9; i <= 9; --i) 这种例子,我不会让这行代码通过 code review。还有 isset[!!largeA[i]] += 1; 这种卖弄的写法,请不要鼓励初学者写这种代码。另外书中说无符号整数'最容易被优化'在 x86 上完全不成立——编译器恰恰利用有符号溢出的未定义行为来优化。

    colanderman查看英文原文

    While I like a lot of what's in here, for (size_t i = 9; i <= 9; --i) is a pretty terrible example to put in the second chapter. I would not let that line pass code review. There is no need or place for cutesy cleverness in C. EDIT: Ugh, just found this too: isset[!!largeA[i]] += 1; Not only is that confusingly cutesy, but largeA[i] is a double. Please DON'T write – or encourage beginners to write! – such smug code! EDIT2: In section 5 is the statement than unsigned integers "can be optimized best." This is flatly untrue on x86 and I suspect many other architectures. Compilers can and do take advantage of undefined signed overflow to optimize signed arithmetic; the same is not possible with unsigned arithmetic. See https://kristerw.blogspot.com/2016/02/how-undefined-signed-overflow-enables.html

    即使是资深 C 程序员也能从书中学到 C11 新特性

    我可能得为老程序员做一个'C 从 1980 年以来有什么变化'的页面。我已经从这本书学到了新东西:size_t strlen(char const string[static 1]); 和 int main(int argc, char* argv[argc+1]); 据说有助于防止传入空指针,并给分析器和优化器提供信息。C11 也值得一看,一些原本靠 gcc/clang 属性实现的东西已进入语言,如 _Noreturn、_Alignas、_Alignof 和 aligned_alloc()。

    jws查看英文原文

    I might have to make a What has changed in C since 1980 page for old programmers. I've tried to stay current, but I learned something from this book already: size_t strlen(char const string[static 1]); int main(int argc, char* argv[argc+1]); This allegedly helps prevent null pointers from being passed in, and presumably tells the analyzers and optimizers some things they should know. It's worth a look at C11 as well, some of what you might have used gcc or clang attributes for has climbed into the language, such as _Noreturn, _Alignas, _Alignof and their friend aligned_alloc(). Addendum: Well, you can pass in pointers that go to fewer elements, but you can't pass in an actual naked null.

    作者有 musl libc 的 C11 标准库开发背景,专业性强

    作者还参与了 musl 的开发——一个符合 C11 的现代标准库实现。

    pawadu查看英文原文

    The author has also been involved in development of "musl", a modern C11 compliant standard library implementation: http://www.musl-libc.org https://gustedt.wordpress.com/2014/10/14/musl-1-1-5-with-full-c11-library-support/

    历次讨论

    同类还值得读

    1. 开源应用架构

      The Architecture of Open Source Applications

      《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。

      编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选
    2. 编程语言简史:简短、不完整且多半错误

      A Brief, Incomplete, and Mostly Wrong History of Programming Languages

      一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。

      编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.com
    3. SQLite 是如何测试的

      How SQLite is tested

      SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…

      编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选
    4. 高级编程语言(2009)

      Advanced programming languages (2009)

      Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…

      编程与软件工程上首页 8 次 · 2009–2022matt.might.net
    5. 我的 Forth 与栈机器经历

      Yosefk - My history with Forth & stack machines

      作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。

      编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选

    打赏支持

    打赏二维码

    觉得有用,请作者喝杯咖啡。

    WeChat

    关注向阳乔木

    微信公众号「向阳乔木推荐看」

    微信公众号「向阳乔木推荐看」二维码

    微信扫一扫;在微信里打开本页时,长按二维码识别。