职业与工作方法yacoset.com
你是糟糕程序员的迹象
Signs that you are a bad programmer
2011 — 2015,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这篇经典文章列出一系列“糟糕程序员”的迹象(如无法确定程序执行顺序、抽象思维不足、对结果漠不关心等),并带讽刺意味地给出“替代职业”建议。它更像一份 provocative 的自省清单,而不是严谨的评判标准。
为什么经久不衰:它用夸张清单把常见反模式摆上台面,引发关于“好坏程序员”定义、指针难点和批评语气的长期争论,今天仍适合自省和讨论。
HN 评论精选
批评文章未界定好坏,导致讨论各说各话。
我希望这类文章能先说明自己所谓“好”或“坏”到底指什么,这样就能避免那种反复出现的回音室争论:A:好就是能交付并让客户满意;B:不对,好是写出其他黑客能读懂的清晰代码;C:你们都错了,好是两者之间的快乐折中;D:争论太难,我们去购物吧!真希望我们在讨论之前能先就词义达成一致……
mcantor查看英文原文
I wish articles like this would namespace their assertions by telling us what they mean by "good" or "bad", so we could avoid the perennial echo chamber debate that goes like this: A: GOOD MEANS SHIPPING AND PLEASING YOUR CUSTOMERS B: NO YOU FOOL! GOOD MEANS WRITING CLEAR CODE THAT OTHER HACKERS CAN READ C: NO YOU FOOLS! GOOD IS A HAPPY MEDIUM BETWEEN BOTH OF THOSE THINGS D: DEBATE IS HARD, LET'S GO SHOPPING! God forbid we agree on what words mean before we talk about them...
用交付两年后客户和同行仍满意作为唯一标准。
相反的做法简单得多。判断你是伟大程序员只有一个迹象:交付两年后,客户和同行程序员仍然对你的工作满意。(当然,“仍然”意味着交付时他们就满意,这包括及时交付可工作的软件。)
rickmb查看英文原文
The opposite approach is much simpler. There's only one sign that you are a great programmer: Clients and fellow programmers are still happy with your work two years after you've delivered it. (Of course: "still" implies that they we're happy at delivery, which includes actually shipping working software in a timely fashion.)
指针难在 C 的语法、优先级和声明规则,不是概念本身。
我怀疑那些“不懂”指针的人,其实是在 C 里处理指针声明和操作的语法时更吃力,而不是不理解指针如何工作、能做什么。比如 * 既用于声明指针又用于解引用,还能叠加;& 既取变量地址,又用于函数签名把调用改成传引用;& 还常和 const 声明一起出现。此外 * 和 & 有各自的优先级和结合性要记,还没提 []。我真不觉得人们理解不了指针是因为心智模型需要更新,更多只是没完全内化 C 让你处理指针时要跳过的那些圈。
substack查看英文原文
I suspect that people who don't "get" pointers (#4 in the article) actually have a much harder time with the pointer declaration and manipulation syntax in C than actually understanding how pointers work and what they let you do. For instance, in C the * character is used both to declare a pointer and to dereference one and they can be stacked to dereference nested structures. Then & references a variable memory location but is also used in method signatures to change the semantics of calling a function into pass-by-reference. To complicate & further, & is often seen alongside const declarations, which are a whole other thing that people have to keep in their heads. On top of all of this, * and & have their own operator precedences and associativities that you have to memorize, which is a whole discussion about binary versus unary operators and precedence tables. And I didn't even mention []. I really don't think that people fail to comprehend pointers because their mental models need updating nearly as often as they just haven't fully internalized all the hoops that C makes you jump through to mess with pointers.
批评文章语气贬低人、助长冒名顶替综合征,应鼓励而非训斥。
恭喜,你又在助长冒名顶替综合征。虽然文中包含有效的反模式,但风格没有帮助。人不该被贬低,而应被鼓励。人迟早会自己发现是否适合某个领域。训斥别人技能不足的唯一好处,是训斥者获得暂时宣泄,而另一端的人要付出心理代价,除非他非常清醒。命令式训斥在激烈争论中尚可原谅,但整篇长文保持这种语气是很差的选择;这会让作者显得像个幼稚的混蛋,损害其可信度。
fsloth查看英文原文
Congratulations on fomenting that impostor syndrome. While the the text contains valid anti-patterns its style is non-helpful. People should not be put down but encouraged. People will notice sooner or later if they are not fit for a field by themselves. The only benefit of berating someone for lack of skills is a temporary catharsis for the one doing the berating while the person at the other end pays a psychological cost of a kind or another unless he's really mindful. Berating command-voice is excusable in a heated argument but maintaining this voice throughout a long writing is stylistically a very poor choice, IMO. This just discredits the authors voice as that of an infantile jerk.
历次讨论
同类还值得读
用十年时间自学编程(1998)
Teach Yourself Programming in Ten Years (1998)
Peter Norvig 1998 年的经典文章,回应“21天/24小时学会编程”一类速成书,主张真正精通编程需要约十年持续、有意识的练习。
职业与工作方法上首页 11 次 · 2007–2025norvig.com编辑精选如何成为一名程序员:简短、全面而个人的总结
How to be a Programmer: A Short, Comprehensive, and Personal Summary
一篇广为流传的程序员成长指南,作者以个人经验系统总结了成为优秀程序员所需的各项技能——从调试、测试、沟通到团队协作与身心健康。
职业与工作方法上首页 6 次 · 2008–2015samizdat.mines.edu编辑精选不要自称程序员
Don't Call Yourself a Programmer
经典职业建议文章劝软件工程师不要把自己局限在“程序员”这个标签上,而要从公司业务角度说明自己创造的价值;文中讨论了成本中心与利润中心、头衔、求职与职业选择,也顺带批评了学术界的价…
职业与工作方法上首页 5 次 · 2011–2021kalzumeus.com编辑精选创作者的日程与经理的日程
Maker's Schedule, Manager's Schedule (2009)
Paul Graham 在这篇文章里把时间表分成两类:管理者的日程以小时为单位,会议可以填满一天;创作者(程序员、写作者等)的日程则以半天为单位,需要长时间不被打断的连续块。
职业与工作方法上首页 5 次 · 2009–2021paulgraham.com编辑精选为什么程序员的薪酬不与生产力成正比
Why programmers are not paid in proportion to their productivity
讨论为什么程序员的薪酬往往不随其生产力成比例增长:生产力难以客观量化,薪酬更多受组织预算、岗位定价和个人议价能力影响。
职业与工作方法上首页 5 次 · 2009–2022johndcook.com