技术成长 | 浅谈程序员的职业操守
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">作者:吴欣蔚(蓄昂) 阿里大淘宝平台技术团队</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">《匠艺整洁之道》是鲍勃大叔的整洁系列新书。这本书<span style="color: black;">重点</span>从纪律、标准、操守三个方面阐述了软件从业者应该<span style="color: black;">怎样</span><span style="color: black;">需求</span>自己,<span style="color: black;">提高</span><span style="color: black;">开发</span>质量、效率、道德水准,本文<span style="color: black;">重点</span>围绕《匠艺整洁之道》的第三部分 —— 操守,聊一聊<span style="color: black;">咱们</span>程序员该<span style="color: black;">怎样</span>自我约束、自我<span style="color: black;">提高</span>。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">1、</span><span style="color: black;">为何</span>程序员<span style="color: black;">必须</span>职业操守</h1>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">1.1 行业的壮大</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这个问题还得从软件行业的发展说起。 软件行业从诞生(1935)<span style="color: black;">迄今</span>(2022),<span style="color: black;">已然</span>有八十<span style="color: black;">数年</span>历史了。</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/13db8d630bab42e19cd3e763103c7ec9~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1724110251&x-signature=0Vcm%2FSUTLUPRbrpfLw8rnz%2Fz0dU%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在这<span style="color: black;">时期</span>,<span style="color: black;">全部</span>软件行业有了巨大的发展:</p>从业人员<span style="color: black;">已然</span>过亿计算机/电子设备的数量超过人类数量软件监控、协调着全社会的运转<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">公众</span>对计算机及软件的认知,从早年的以<strong style="color: blue;"><span style="color: black;"><span style="color: black;">设备</span></span></strong>为主,到<span style="color: black;">此刻</span>以机器<span style="color: black;">背面</span>的<strong style="color: blue;"><span style="color: black;">程序员</span></strong>为主。<span style="color: black;">初期</span>《星际迷航》、《太空奥德赛》等以<span style="color: black;">设备</span>/计算机<span style="color: black;">做为</span>重要角色。 而随着个人计算机的<span style="color: black;">显现</span>,《黑客帝国》、《战争游戏》等电影<span style="color: black;">逐步</span>以程序员<span style="color: black;">做为</span>救世主,程序员正脱去<span style="color: black;">奥秘</span>的面纱,被社会所<span style="color: black;">认识</span>和接纳。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">1.2 影响面扩大</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">做为</span>程序员,<span style="color: black;">咱们</span>虽然不是<span style="color: black;">各样</span>规则的制定者,但<span style="color: black;">咱们</span>编写了运行这些规则的代码,并<strong style="color: blue;"><span style="color: black;">在全面监控和协调<span style="color: black;">咱们</span>生活的<span style="color: black;">设备</span>中执行</span></strong>。换句话说:<strong style="color: blue;"><span style="color: black;">程序员们统治着这个世界</span></strong>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span>编写的软件,记录着日程表、货物的运输、商品的交易,<span style="color: black;">掌控</span>着汽车的方向盘、火箭卫星,<span style="color: black;">乃至</span>还能影响法律的颁布或执行。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">由于</span>软件出错而<span style="color: black;">引起</span>的惨剧,在各行各业都有案例:</p><strong style="color: blue;"><span style="color: black;"><span style="color: black;">研究</span>:</span></strong>地面软件出错,<span style="color: black;">运用</span>了<strong style="color: blue;"><span style="color: black;">错误的单位</span></strong>,<span style="color: black;">引起</span>火星气候探测者号在火星大气层中下降太深,被撕<span style="color: black;">成为了</span>碎片。<strong style="color: blue;"><span style="color: black;">医疗:</span></strong>Therac-25 放射治疗机事故。<span style="color: black;">因为</span><strong style="color: blue;"><span style="color: black;">进程冲突</span></strong>,Therac-25 的高能电子束<span style="color: black;">引起</span>3人丧生,还烧伤了<span style="color: black;">另一</span>3人。<strong style="color: blue;"><span style="color: black;"><span style="color: black;">商场</span>:</span></strong><span style="color: black;">由于</span>用错标识符,遗留在系统中的<strong style="color: blue;"><span style="color: black;">死代码被激活</span></strong>,<span style="color: black;">引起</span>骑士资本集团在45分钟内损失了 4.6 亿美元。<strong style="color: blue;"><span style="color: black;">交通:</span></strong>丰田汽车的堆栈溢出<strong style="color: blue;"><span style="color: black;">漏洞</span></strong>,可能<span style="color: black;">引起</span>汽车加速失控,<span style="color: black;">最后</span>可能<span style="color: black;">引起</span>多达89人遇难。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">总有一天,程序员们做的<span style="color: black;">有些</span>自认为无伤大雅的(蠢)事,可能就会<span style="color: black;">引起</span>成千上万的人死去。而这一天,<span style="color: black;">亦</span>许就在明天。</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">当<span style="color: black;">出现</span>这些惨剧时,会有人<span style="color: black;">必须</span>为此负责,人们会<span style="color: black;">需求</span>程序员们说清楚<span style="color: black;">怎样</span>防止这种错误再次<span style="color: black;">出现</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">因此呢</span>,<span style="color: black;">做为</span>程序员的<span style="color: black;">咱们</span>,亟需有<span style="color: black;">知道</span>的职业操守以进行自我约束,为的是让软件行业能有更大的发展,<span style="color: black;">亦</span>为<span style="color: black;">咱们</span>自己能有更好的职业发展。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">思考:</span></strong>你<span style="color: black;">是不是</span>有<span style="color: black;">显现</span>过故障,<span style="color: black;">导致</span>的最坏影响是什么?<span style="color: black;">是不是</span>对社会造<span style="color: black;">成为了</span>影响?</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">2、</span>什么是职业操守?</h1>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">2.1 职业操守的定义</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">WIKI 里对职业操守的定义<span style="color: black;">指的是</span>人们在从事职业活动中<span style="color: black;">必要</span>遵从的最低道德底线和行业规范。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在职业活动中,有<span style="color: black;">有些</span>公认的职业操守,如:</p>诚信的价值观诚实地制作工作报告不要泄密给竞争对手<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">同期</span>,各个行业<span style="color: black;">亦</span>有各自细分的职业操守,如:</p><span style="color: black;">大夫</span>:救死扶伤,爱岗敬业魔术师:不公开魔术的<span style="color: black;">奥密</span>公安干警:<span style="color: black;">注重</span>调查<span style="color: black;">科研</span>,处理案件不捕风捉影,主观臆断法律工作者:忠于宪法和法律,<span style="color: black;">保持</span>以事实为<span style="color: black;">按照</span>教师:为人师表,关爱学生...<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在 《匠艺整洁之道》 里,鲍勃大叔提出了10条软件<span style="color: black;">研发</span>人员的职业操守。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">2.2 软件<span style="color: black;">研发</span>人员的职业操守</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">以下摘自 《匠艺整洁之道》 :</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">1. 为<span style="color: black;">保卫</span>和<span style="color: black;">守护</span>计算机程序员职业的荣誉,我承诺,尽我的能力和判断力:</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">2. 我不写有害的代码。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">3. 我生产的代码将永远是我最好的作品。 我不会故意让<span style="color: black;">哪些</span>在<span style="color: black;">行径</span>或结构上有缺陷的代码累积起来。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">4. 我将在每次发布时<span style="color: black;">供给</span>快速、确定和可重复的证据,证明代码的<span style="color: black;">每一个</span>元素都能正常工作。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">5. 我将经常进行小规模的发布,不妨碍其他人的<span style="color: black;">发展</span>。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">6. 我将无畏地、毫不留情地利用一切机会改进我的创作。我绝不让它变更差。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">7. 我将尽我所能尽可能地<span style="color: black;">加强</span>自己和他人的生产力。我不会做任何降低生产力的事。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">8. 我将<span style="color: black;">始终</span><span style="color: black;">保证</span>其他人能够补上我的位置,我<span style="color: black;">亦</span>能够为其他人补位。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">9. 我将给出在数量级和精确度上都<span style="color: black;">可靠</span>的预估。我不会做出<span style="color: black;">无</span>把握的承诺。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">10. <span style="color: black;">倘若</span>我的程序员同事<span style="color: black;">持有</span>足够的操守、标准、纪律和技能,就能赢得我的尊重。任何其他的属性或特征都不会<span style="color: black;">作为</span>我尊重程序员同事的<span style="color: black;">原因</span>。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">11. 我永远不会停止学习和改进我的技艺。</span></span></p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">3、</span>程序员的职业操守</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">鲍勃大叔提出的这10条誓言<span style="color: black;">能够</span>分为三个类型: <span style="color: black;">损伤</span>、集成、团队合作,<span style="color: black;">咱们</span>针对这三个类型分别展开聊聊。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.1 关于<span style="color: black;">损伤</span></h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">1. 我不写有害的代码。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">2. 我生产的代码将永远是我最好的作品。 我不会故意让<span style="color: black;">哪些</span>在<span style="color: black;">行径</span>或结构上有缺陷的代码累积起来。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">3. 我将在每次发布时<span style="color: black;">供给</span>快速、确定和可重复的证据,证明代码的<span style="color: black;">每一个</span>元素都能正常工作。</span></span></p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.1.1 何谓<span style="color: black;">损伤</span></h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span>编写的软件每时每刻都在对这个社会产生影响。<span style="color: black;">咱们</span>任何无意中的<span style="color: black;">行径</span>,都可能会给这个社会带来意想不到的<span style="color: black;">损伤</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">例如人们<span style="color: black;">发掘</span><span style="color: black;">公众</span>汽车<span style="color: black;">机构</span>的程序员写了<span style="color: black;">有些</span>代码,故意阻挠EPA排放测试,影响<span style="color: black;">相关</span><span style="color: black;">分部</span>对环境<span style="color: black;">害处</span>的<span style="color: black;">评定</span>,损害了这些汽车驾驶地所有人的健康。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">倘若</span><span style="color: black;">咱们</span>放任自己,就会对自己,<span style="color: black;">或</span>身边的人,<span style="color: black;">乃至</span><span style="color: black;">全部</span>社会<span style="color: black;">导致</span><span style="color: black;">害处</span>,<span style="color: black;">包含</span>:</span></strong></p>对社会<span style="color: black;">导致</span>的<span style="color: black;">损伤</span>对你的同行<span style="color: black;">导致</span>的<span style="color: black;">损伤</span>对<span style="color: black;">将来</span>的程序员<span style="color: black;">导致</span>的<span style="color: black;">损伤</span>对功能/结构<span style="color: black;">导致</span>的<span style="color: black;">损伤</span>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.1.2 直面<span style="color: black;">损伤</span></h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">以上</span><span style="color: black;">公众</span>汽车<span style="color: black;">机构</span>的程序员<span style="color: black;">导致</span>的<span style="color: black;">害处</span> ,谁该为此负责?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">做为</span>程序员的<span style="color: black;">咱们</span>,可能会这么说:"我只是在做我的工作,这不是我能<span style="color: black;">掌控</span>得了的事情。"</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">然则</span>,<span style="color: black;">倘若</span>你明<span style="color: black;">晓得</span>这么做会带来<span style="color: black;">欠好</span>的后果但还继续这么做了,那你就<span style="color: black;">必须</span>为此后果承担一部分责任。请不要忘记,<span style="color: black;">机构</span>雇佣你<span style="color: black;">做为</span>软件<span style="color: black;">研发</span>工程师的重要理由之一,是<strong style="color: blue;"><span style="color: black;">你应该有能力识别出软件可能在什么<span style="color: black;">状况</span>下出问题,你<span style="color: black;">必须</span>在它产生麻烦之前找到它,并且有责任大声说出来。</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">避免<span style="color: black;">损伤</span>,尽力而为</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">思考:以下两种系统,哪个系统的价值更高?</p>工作完美,但不可修改不能正确地做任何事情,但却容易修改<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">以上</span>的两个系统,分别<span style="color: black;">表现</span>了软件的两个价值:</p><strong style="color: blue;"><span style="color: black;"><span style="color: black;">行径</span>价值:</span></strong>让程序能够正确工作<strong style="color: blue;"><span style="color: black;">结构价值:</span></strong>让程序易于<span style="color: black;">调节</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">一个软件系统<span style="color: black;">倘若</span><span style="color: black;">没法</span>被改变,即使它能够正确工作,<span style="color: black;">最后</span><span style="color: black;">亦</span>摆脱不了被淘汰的命运:</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/31f0ea717acd4fe2b66bd6932dd78aaf~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1724110251&x-signature=6nNSmt0gC6uoHts1C4uH1ykd1ho%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">一个软件系统<span style="color: black;">想要</span>能够<span style="color: black;">供给</span><span style="color: black;">长时间</span>价值,它就<span style="color: black;">必要</span>能够响应需求的变化。<span style="color: black;">因此呢</span>,除了最紧急的<span style="color: black;">状况</span>之外(对人、对<span style="color: black;">机构</span>、对社会<span style="color: black;">导致</span><span style="color: black;">劫难</span>的<span style="color: black;">状况</span>),<span style="color: black;">咱们</span>应该优先<span style="color: black;">选择</span>第二种系统。 即使<span style="color: black;">咱们</span><span style="color: black;">必须</span>一点时间和金钱的投入,但在那之后,它就将<span style="color: black;">能够</span>永远继续工作。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">保持</span>好结构,它与<span style="color: black;">咱们</span>利益<span style="color: black;">关联</span></span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">为了能使软件能够<span style="color: black;">供给</span><span style="color: black;">长时间</span>价值,不对当下的同事、<span style="color: black;">将来</span>的同事<span style="color: black;">导致</span><span style="color: black;">损伤</span>,就<span style="color: black;">需求</span><span style="color: black;">咱们</span>写出来的软件要有一个好的结构,一个好结构带来的价值有:</p>容易测试容易修改容易重用<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">要写出一个好的结构,<span style="color: black;">常常</span>要花<span style="color: black;">咱们</span><span style="color: black;">更加多</span>的时间。<span style="color: black;">咱们</span>经常会遇到<span style="color: black;">这般</span>的场景:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">一个紧急的需求过来,<span style="color: black;">需求</span><span style="color: black;">咱们</span>在指<span style="color: black;">按时</span>间内完成并上线,但这些时间<span style="color: black;">常常</span>只够<span style="color: black;">咱们</span>完成需求,<span style="color: black;">同期</span>你的老板<span style="color: black;">亦</span><span style="color: black;">需求</span>你尽快完成这个紧急需求。<span style="color: black;">倘若</span>是你,会<span style="color: black;">怎样</span>应对这种<span style="color: black;">状况</span>呢?</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">首要</span>要记住的一点是:一个项目/软件的成功,对<span style="color: black;">咱们</span>的事业、声誉有着直接的影响,它与<span style="color: black;">咱们</span>的利益息息<span style="color: black;">关联</span>。<span style="color: black;">因此呢</span>,<span style="color: black;">做为</span>利益<span style="color: black;">相关</span>者,<span style="color: black;">咱们</span>对系统的<span style="color: black;">研发</span>和结构有发言权;<span style="color: black;">同期</span>,<span style="color: black;">咱们</span><span style="color: black;">亦</span>是工程师,<span style="color: black;">机构</span>雇佣<span style="color: black;">咱们</span>,是<span style="color: black;">由于</span><span style="color: black;">咱们</span><span style="color: black;">晓得</span><span style="color: black;">怎样</span>构建软件系统,<span style="color: black;">怎样</span>搭建这些系统的结构,并使其能够<span style="color: black;">供给</span><span style="color: black;">长时间</span>价值,<span style="color: black;">咱们</span><span style="color: black;">必须</span><span style="color: black;">保证</span>系统不会<span style="color: black;">由于</span>坏<span style="color: black;">行径</span>和坏结构而遭到破坏。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">回过头再来看这个问题,<span style="color: black;">咱们</span>的老板<span style="color: black;">认识</span>结构吗?<span style="color: black;">或</span>老板的理解仅限于<span style="color: black;">行径</span>吗?<span style="color: black;">倘若</span>老板<span style="color: black;">知道</span>告诉你不要理会结构,应完全关注<span style="color: black;">行径</span>,<span style="color: black;">咱们</span>该怎么办?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span>得拒绝,<span style="color: black;">由于</span><span style="color: black;">咱们</span>是工程师,是利益<span style="color: black;">关联</span>者。<span style="color: black;">亦</span>许会有争斗、对抗,但<span style="color: black;">咱们</span>的专业不<span style="color: black;">准许</span><span style="color: black;">咱们</span>退缩。<span style="color: black;">亦</span>许你认为拒绝就会被解雇,但大<span style="color: black;">都数</span><span style="color: black;">状况</span>下不会。<span style="color: black;">由于</span>大<span style="color: black;">都数</span>经理<span style="color: black;">亦</span>期望为<span style="color: black;">她们</span><span style="color: black;">必须</span>和相信的东西而奋斗,<span style="color: black;">况且</span><span style="color: black;">她们</span>尊重<span style="color: black;">哪些</span>愿意做<span style="color: black;">一样</span>事情的人(否则还会有<span style="color: black;">那样</span>多的技术沙龙、技术分享交流会吗?)。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.2 关于集成</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">1. 我将经常进行小规模的发布,不妨碍其他人的<span style="color: black;">发展</span>。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">2. 我将无畏地、毫不留情地利用一切机会改进我的创作。我绝不让它变更差。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">3. 我将尽我所能尽可能地<span style="color: black;">加强</span>自己和他人的生产力。我不会做任何降低生产力的事。</span></span></p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.2.1 为什么<span style="color: black;">必须</span>关注集成</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">软件上的并发<span style="color: black;">指的是</span>:同一时间可能有多个用户对同一数据进行读写操作。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">软件的集成,<span style="color: black;">亦</span><span style="color: black;">同样</span>存在并发。</span></strong>当<span style="color: black;">咱们</span>的项目<span style="color: black;">持续</span>变得<span style="color: black;">繁杂</span>、庞大, 参与这个项目的<span style="color: black;">研发</span>人员变多的时候,<span style="color: black;">每一个</span>人<span style="color: black;">同期</span>都在改动着各自的功能模块,软件集成冲突的问题会越来越<span style="color: black;">明显</span>,<span style="color: black;">最后</span>会<span style="color: black;">作为</span>瓶颈。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">漫长的(集成)周期阻碍了团队的进步。<span style="color: black;">因此呢</span>,<span style="color: black;">咱们</span><span style="color: black;">必须</span>关注集成,关注它的周期。它与迭代<span style="color: black;">相关</span>,它与编辑/编译/测试周期<span style="color: black;">相关</span>。<span style="color: black;">仅有</span><span style="color: black;">提高</span>这些<span style="color: black;">过程</span>的效率,<span style="color: black;">咱们</span>才不会阻碍别人的进度、团队的进步。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.2.2 <span style="color: black;">连续</span>集成</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">软件行业经过这么<span style="color: black;">数年</span>的发展,<span style="color: black;">已然</span>有了不少<span style="color: black;">处理</span><span style="color: black;">方法</span>。其中,<span style="color: black;">连续</span>集成<span style="color: black;">便是</span>一个很好的手段。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">连续</span>集成能够带来以下好处:</p>快速<span style="color: black;">发掘</span>错误防止分支大幅度偏离主干<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">连续</span>集成并<span style="color: black;">不可</span>让<span style="color: black;">咱们</span>消除Bug,<span style="color: black;">然则</span>能让它们非常容易被<span style="color: black;">发掘</span>和改正;它<span style="color: black;">能够</span>让<span style="color: black;">咱们</span>的软件在快速迭代的<span style="color: black;">同期</span>,仍能保持高质量,<strong style="color: blue;"><span style="color: black;">不阻碍别人的进度</span></strong>。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.2.3 随机善意<span style="color: black;">行径</span></h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">鲍勃大叔在《代码整洁之道》里<span style="color: black;">说到</span>过的<strong style="color: blue;"><span style="color: black;">童子军军规: 代码签入时要比签出时更整洁</span></strong>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>每次代码签入时,代码都比签出时干净,<span style="color: black;">那样</span>代码就不会腐坏。<span style="color: black;">咱们</span><span style="color: black;">能够</span><span style="color: black;">经过</span>在每次<span style="color: black;">检测</span>代码时,对其进行随机善意<span style="color: black;">行径</span>来做到。任何善意的<span style="color: black;">行径</span>,无论多么微小,都不会被浪费。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span><span style="color: black;">能够</span><span style="color: black;">经过</span><span style="color: black;">增多</span>测试的覆盖率(但<span style="color: black;">不该</span>该变为管理指标),来<span style="color: black;">帮助</span><span style="color: black;">咱们</span>改进代码,<span style="color: black;">帮助</span><span style="color: black;">咱们</span>写出更加健壮的代码。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">另一个有效的随机善意<span style="color: black;">行径</span>是简单的清理--以改进为目的的重构。<span style="color: black;">咱们</span><span style="color: black;">能够</span>从<span style="color: black;">有些</span>简单的手段入手,如:</p>优化字段的命名,让代码可读性更强清理无用代码,减少理解成本<span style="color: black;">调节</span>代码结构,保持代码的灵活性<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.3 关于团队合作</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">1. 我将<span style="color: black;">始终</span><span style="color: black;">保证</span>其他人能够补上我的位置,我<span style="color: black;">亦</span>能够为其他人补位。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">2. 我将给出在数量级和精确度上都<span style="color: black;">可靠</span>的预估。我不会做出<span style="color: black;">无</span>把握的承诺。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">3. <span style="color: black;">倘若</span>我的程序员同事<span style="color: black;">持有</span>足够的操守、标准、纪律和技能,就能赢得我的尊重。任何其他的属性或特征都不会<span style="color: black;">作为</span>我尊重程序员同事的<span style="color: black;">原因</span>。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">4. 我永远不会停止学习和改进我的技艺。</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">以上</span>几点<span style="color: black;">重点</span>是关于团队合作<span style="color: black;">关联</span>的誓言,总结起来<span style="color: black;">重点</span>为以下几点:</p>有团队精神,能够被补位,避免团队因知识断层而陷入瘫痪;诚实<span style="color: black;">恰当</span>地预估,不轻易承诺;只尊重职业技能、纪律、标准和操守,不因其他<span style="color: black;">原因</span>彼此<span style="color: black;">卑视</span>;永<span style="color: black;">一直</span>止学习,跟上行业的变化是对职业的尊重,<span style="color: black;">亦</span>是对自己的事业负责。<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.3.1 诚实<span style="color: black;">恰当</span>地预估,不轻易承诺</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">系一次鞋带<span style="color: black;">必须</span>多久? <span style="color: black;">亦</span>许你<span style="color: black;">能够</span><span style="color: black;">火速</span>地说出:20秒<span style="color: black;">上下</span>。<span style="color: black;">由于</span>系鞋带这件事几乎天天都在做,你<span style="color: black;">能够</span>相当快速、准确地给出<span style="color: black;">恰当</span>的预估。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">那<span style="color: black;">倘若</span>要你写一个系鞋带的教程,<span style="color: black;">必须</span>多久?你<span style="color: black;">是不是</span><span style="color: black;">无</span>办法快速准确地做出一个预估?你<span style="color: black;">必须</span><span style="color: black;">思虑</span>这个教程的受众、<span style="color: black;">是不是</span><span style="color: black;">必须</span>图文并茂、篇幅限制 ……</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这正是<span style="color: black;">咱们</span><span style="color: black;">做为</span>程序员经常会遇到的问题:预估工时。 <span style="color: black;">咱们</span>面临的用户可能都是计算机新手,<span style="color: black;">她们</span>对软件可能一窍不通,<span style="color: black;">咱们</span><span style="color: black;">必要</span>要写出<span style="color: black;">运用</span>要足够简单软件,并<span style="color: black;">持有</span>足够<span style="color: black;">仔细</span>的<span style="color: black;">运用</span>说明……</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">当一位经理来找你说:“我在星期二之前<span style="color: black;">必须</span>这个。” 你被这个问题困住了,<span style="color: black;">由于</span>你不<span style="color: black;">晓得</span>你<span style="color: black;">是不是</span>能在星期二之前完成这件事。<span style="color: black;">亦</span>许你做过类似的事情,花个两三天就搞定了;<span style="color: black;">亦</span>许<span style="color: black;">这儿</span>面藏着一个跟你之前做过的都不<span style="color: black;">同样</span>的技术难点,你不<span style="color: black;">晓得</span>能否按时完成。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">因此</span>当你被<span style="color: black;">需求</span>估计某件事时,你<span style="color: black;">不可</span>给出一个<span style="color: black;">详细</span>的时间</span></strong>,<span style="color: black;">由于</span>那是谎言,你不<span style="color: black;">晓得</span>你<span style="color: black;">是不是</span>能够在特定的时间完成它,你<span style="color: black;">必须</span><span style="color: black;">思虑</span>到最好和最坏的<span style="color: black;">状况</span>。<span style="color: black;">倘若</span>你确实给了一个精确的时间,那最好能咬牙完成它。<span style="color: black;">由于</span>你在做出承诺,<span style="color: black;">因此</span>你最好准时完成它,不要有任何借口。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">要给出一个<span style="color: black;">恰当</span>的预估,<span style="color: black;">能够</span>这么做:</p>不要轻易给出一个<span style="color: black;">详细</span>时间,诚实地保持诚实对项目的预估<span style="color: black;">不可</span>只是一个交付日期,而是一个时间范围进行工作项拆解,找出<span style="color: black;">隐匿</span>在里面的模糊因子(不确定<span style="color: black;">原因</span>)与经理交流,花<span style="color: black;">更加多</span>时间细化模糊因子,如此来回递归式操作针对最好<span style="color: black;">状况</span>、最坏<span style="color: black;">状况</span>、普通<span style="color: black;">状况</span>,分别估计其可能<span style="color: black;">出现</span>的概率,再针对这3种<span style="color: black;">状况</span>预估日期范围<h1 style="color: black; text-align: left; margin-bottom: 10px;">3.3.2 永<span style="color: black;">一直</span>止学习</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">咱们</span>所处的行业在过去几十年,经历了快速变化,<span style="color: black;">况且</span>这个变化还在<span style="color: black;">连续</span>,<span style="color: black;">咱们</span><span style="color: black;">必要</span>跟上。这就<span style="color: black;">寓意</span>着<span style="color: black;">咱们</span><span style="color: black;">必要</span><span style="color: black;">连续</span>学习,<span style="color: black;">连续</span>阅读图书、博客、参加技术交流会等等。<span style="color: black;">咱们</span>的雇主<span style="color: black;">无</span>责任培训<span style="color: black;">咱们</span>,<span style="color: black;">咱们</span><span style="color: black;">必须</span>对自己的事业负责。学习是自己的事,<span style="color: black;">咱们</span>要弄清楚该学什么,花多少时间学。<span style="color: black;">因此呢</span>,除了工作时间之外,每周投入10~20小时的时间来培养和<span style="color: black;">守护</span><span style="color: black;">咱们</span>的事业吧,这是保持<span style="color: black;">咱们</span>专业性的<span style="color: black;">恰当</span>做法。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">4、</span>写在最后</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">“The simplest way to describe craftsmanship is pride of workmanship. It is the mindset that you are working on something important and you are going to do it well."</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">程序员是一个技术含量很高的职业,但<span style="color: black;">亦</span><span style="color: black;">必要</span>受非技术概念的约束(标准和道德规范)。<span style="color: black;">仅有</span><span style="color: black;">经过</span>这些标准和道德规范的约束,才会让<span style="color: black;">咱们</span>这个行业越走越好。它约束<span style="color: black;">咱们</span>的<span style="color: black;">行径</span>,对<span style="color: black;">咱们</span>提出更高的<span style="color: black;">需求</span>,在<span style="color: black;">提高</span><span style="color: black;">咱们</span>竞争力的<span style="color: black;">同期</span>,<span style="color: black;">亦</span>会给<span style="color: black;">咱们</span>带来<span style="color: black;">更加多</span>的成就感。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">让<span style="color: black;">咱们</span><span style="color: black;">一块</span>尽力的<span style="color: black;">奋斗</span>做到最好,做一个有『良知』的程序员!</p>
你字句如珍珠,我珍藏这份情。 楼主的文章深得我心,表示由衷的感谢! 外贸论坛是我们的,责任是我们的,荣誉是我们的,成就是我们的,辉煌是我们的。 谢谢、感谢、感恩、辛苦了、有你真好等。
页:
[1]