TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Dad and The Ten Commandments of Egoless Programming (2012)

272 点作者 dodders大约 10 年前

18 条评论

greggman大约 10 年前
&gt; Critique code instead of people – be kind to the coder, not to the code<p>A fellow co-worker taught me by example to try to always phrase each code review comment as a question.<p>Instead of<p>&gt; This loop never terminates<p>Write<p>&gt; Does this loop terminate?<p>Instead of<p>&gt; There&#x27;s no test for this condition<p>write<p>&gt; Is there supposed to be a test for this condition?<p>I&#x27;m probably not thinking of good examples but for some reason, more often than not, the direct comments came across as &quot;you screwed up!&quot; where as the questions instead made it feel like I was discovering my own mistakes rather than have someone tell me I made one.<p>It&#x27;s probably subtle and maybe some people will think it&#x27;s dumb but I really appreciated it. It felt like it went a long way toward me feeling like saw my own mistake and fixed it before I checked it in instead of the direct approach which made me feel stupid and embarrassed.<p>I&#x27;ve tried to adopt that approach (though it&#x27;s a struggle to remember to apply it).
评论 #9204197 未加载
评论 #9204147 未加载
评论 #9204550 未加载
评论 #9204295 未加载
评论 #9205090 未加载
评论 #9205307 未加载
评论 #9204174 未加载
评论 #9204149 未加载
评论 #9205631 未加载
评论 #9204816 未加载
评论 #9208688 未加载
评论 #9204627 未加载
评论 #9204961 未加载
pjmorris大约 10 年前
Always good to see Jerry Weinberg&#x27;s work mentioned. I tried reading &#x27;The Psychology of Computer Programming&#x27; when I was in college, it didn&#x27;t grab then. Finally read it 15 years later, and realized that the material there would&#x27;ve especially helped in my first couple of jobs.<p>Also... my dad was 45 when I came along. I didn&#x27;t get to spend much time with him before he was gone, but every moment was valuable and is cherished. I still try to make him proud, and suspect your dad would be proud.
danso大约 10 年前
The best part of this list is that with some tweaks, the commandments can pretty much apply to any field of personal and professional pursuit.<p>One rule I might add (and one that is also easy to apply elsewhere): Remember that far more time will be spent <i>reading</i> your code than writing it.<p>Grokking this not only has practical implications for how you write code (suddenly, the importance of style guides becomes clearer), but it makes you realize that this is how projects get built: programmers re-using libraries that contain encapsulated, clear functionality. Realizing that someone has to read your code -- even if that someone is mostly just <i>you</i> -- requires a modicum of empathy...and more often than not, this aids in the design process.<p>A common complaint about learning via something like Codecademy is that you might learn the syntax and how to solve problems...but you don&#x27;t get much guidance on how to apply that knowledge to real projects. I think part of this is because with Codecademy, you&#x27;re only writing code for the auto-checker to compile and test. Once you start writing code for <i>humans</i> to comprehend and re-use, it becomes easier to see how code becomes a real-world project.
greenyoda大约 10 年前
Jerry Weinberg wrote those &quot;commandments&quot; in 1971. (It&#x27;s sad that the article gives a link to his book but never mentions his name.) It&#x27;s interesting how well they&#x27;ve kept their relevance over the years, despite the huge changes in the practice of programming. However, we who do the programming still keep on forgetting these things and need to be periodically reminded of them.
mfisher87大约 10 年前
I have these on display at my desk. I&#x27;ve always wanted to know how to encourage cultural adoption? What are the arguments against these rules? There must be some.<p>My reasoning about these rules is that they derive from the idea that as teams of programmers, we&#x27;re professionally motivated (and being paid) to produce the highest possible quality results. To that end, these rules compensate for human biases and faults to maximize quality.<p>Many of the practices you&#x27;ve read about some companies enforcing, such as &quot;there are no bad ideas&quot; or &quot;no stupid questions&quot; can be related back to these rules under the same reasoning. None of us do a perfect job of compensating for our human faults and biases, so some rules help to improve our performance.<p>My dad also passed away very early, soon after I finished college, and I credit him for making these rules so easy to follow.
评论 #9205995 未加载
sporkenfang大约 10 年前
When I read things like this, it strikes me particularly that my dad is one of those rocket people the author is talking about. I&#x27;m glad he&#x27;s done what he has to put things in space so that maybe someday people can go places other than the Earth on a slightly more than part-time basis.<p>All dad-boosting aside, this is a brilliant list, and I&#x27;m glad to have it, OP!
Animats大约 10 年前
The trouble with egoless programming is that you don&#x27;t get promoted.
评论 #9204204 未加载
评论 #9204583 未加载
评论 #9204637 未加载
评论 #9204250 未加载
评论 #9205558 未加载
评论 #9204759 未加载
评论 #9204779 未加载
dllthomas大约 10 年前
<i>&#x27;No matter how much “karate” you know, someone else will always know more.&#x27;</i><p>As stated, there is always at least one person for whom this is not true. However, even for such a person it is likely the case that there are still people who know things they don&#x27;t, and the rest of 3 continues to hold:<p><i>&#x27;Such an individual can teach you some new moves if you ask. Seek and accept input from others, especially when you think it’s not needed.&#x27;</i>
Almaviva大约 10 年前
Am I really that rare that I treasure people above all others who will speak to me directly if they don&#x27;t like something?<p>With the themes in this article and others like it, are they how you should behave if you want to meet your own goals, or about how people you&#x27;re subordinate to prefer you behave, in order to not rock the boat too much?
评论 #9204391 未加载
评论 #9204316 未加载
评论 #9204647 未加载
a3n大约 10 年前
I agree with everything on this list, but in case someone takes things too literally, I would change this:<p>Fight for what you believe, but gracefully accept defeat.<p>to this:<p><i>Advocate</i> for what you believe, but gracefully accept defeat.<p>Sometimes &quot;fighting&quot; for what you believe can turn in to just fighting.
datashovel大约 10 年前
Great list.<p>When I first became involved in programming as a career, I got this unexpected and uneasy impression that people in the industry (extrapolated from my real-world experiences early in my career) were generally passive aggressive about how they handled conversations about code and how they agreed or disagreed with others about how the code should &quot;be&quot;. I think those groups of people would have benefited greatly from this list. Simultaneously it would have prevented alot of the angst I experienced as a young developer.
toolslive大约 10 年前
&#x27;&#x27;&#x27;Don&#x27;t feel a &quot;winner&quot; when having corrected, don&#x27;t feel a &quot;loser&quot; when having been corrected, and banish all feelings of mutual competition.&#x27;&#x27;&#x27; <a href="http://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/EWD683.html" rel="nofollow">http:&#x2F;&#x2F;www.cs.utexas.edu&#x2F;users&#x2F;EWD&#x2F;transcriptions&#x2F;EWD06xx&#x2F;EW...</a>
UserRights大约 10 年前
A little late to the party, but I would like to ask:<p>is there still some research going on in the areas of psychology and programming? Not AI, but how the state of the programmers mind affects collaboration, the quality of the code and the general outcome of projects?<p>Any hints and links would be very appreciated, thanks!<p>Have a nice sunday!
phprocks大约 10 年前
Highly recommend picking up the book (The Psychology of Computer Programming)<p>I have a low attention level, and one of my favorite things about this is you can really jump around and pick up the chapters from anywhere.<p>Also despite the title of the book, its actually a very light and entertaining read.
kbwt大约 10 年前
This has been posted before. A moderator might want to add (2012) to the title.
评论 #9204199 未加载
pvaldes大约 10 年前
I came here only for the promise of elves typing a keyboard at superfast pace...
digi_owl大约 10 年前
Something for everyone in that.
raverbashing大约 10 年前
It seems to me this list, while having positive ideas, reeks of condescendence. it&#x27;s mostly about how you are &quot;much better than everybody, that&#x27;s why you have to play cool with everybody&quot;<p>What is missing is a healthy dose of &quot;why do you think your ideas are better than everybody else&#x27;s?&quot;<p>Readability is mostly <i>subjective</i>. Code quality, maintainability, etc, are mostly subjective as well.<p>So don&#x27;t give me that BS &quot;I&#x27;m just trying to get the best code possible&quot; when it&#x27;s your opinion<p>Sure, I&#x27;m not saying that something like xx = strinvcatpfr(yy * zky_eng) can&#x27;t be improved, but beyond a certain point it&#x27;s mostly about taste and endless nitpicking
评论 #9204158 未加载
评论 #9204556 未加载