programmer既職業道德

153 回覆
7 Like 234 Dislike
2021-02-10 02:10:47
Rule No. 1
你寫code比cpu去執行, 就要對所有運行你啲code既machine付責任

你啲code 浪費左人地1bit, 咁你就係導致人地cpu process額外多呢個冇意義既1 bit既原兇

所以你既責任 R 有一條公式去計(assuming same architecture)

R(M) = b * t


R = R(M0) + R(M1) + R(M2) + ... + R(Mn)


where
M is the machine that runs your crappy code
b is the bit waste that your code causes
t is how many times your code is executed in each machine

R越大 代表你職業生涯裡面浪費既總bit數越多, programmer 要追求R -> 0

有道德既programmer係唔會用4 bytes既data structure 去store 1 bit既information
所以落code前 請計好曬數, 多謝合作

























利申: 粗略估算我既R超過GB
2021-02-10 02:14:41
2021-02-10 02:25:59
2021-02-10 03:40:21
趕Deadline都有難度
仲要同你Optimize
唔係話唔得嘅
錢作怪囉
2021-02-10 03:48:57
2021-02-10 07:03:09
咁環保嘅話
硬件生產商會少咗生意
好多人會失業
2021-02-10 07:06:28
The Pareto principle states that for many outcomes roughly 80% of consequences come from 20% of the causes (the “vital few”).

In computer science the Pareto principle can be applied to optimization efforts.[14] For example, Microsoft noted that by fixing the top 20% of the most-reported bugs, 80% of the related errors and crashes in a given system would be eliminated.[15] Lowell Arthur expressed that "20 percent of the code has 80 percent of the errors. Find them, fix them!"[16] It was also discovered that in general the 80% of a certain piece of software can be written in 20% of the total allocated time. Conversely, the hardest 20% of the code takes 80% of the time. This factor is usually a part of COCOMO estimating for software coding.
2021-02-10 07:07:03
喂你真係唔撚識個喎
拎bit數黎講職業道德 而唔係講code易唔易maintain 足唔足documentation test齊唔齊case
再者你識唔識computer architecture 我拎四byte去裝個bool 事實上係有好處
2021-02-10 07:12:47
每次CPU cache flush一次你都要付責任
2021-02-10 07:18:46
仲有dram refresh
2021-02-10 07:59:31
最緊要同個垃圾codebase 一樣質素,寫多d垃圾code
2021-02-10 08:25:41
programmer最高境界係齋吹唔打code
2021-02-10 09:42:22
寫開SQL同HTML
bit食唔食得?
2021-02-10 10:19:40
留名學野.
2021-02-10 10:22:34
到到都留名學野
2021-02-10 10:51:17
其實都係講 performance
中 index 唔使 full table scan 嘅 SQL
WHATWG conformance 嘅 HTML

BTW
創造到價值嘅 tech 先係有用
否則淨係停留喺 undergrad level 講 coding 其實同自己玩泥沙差唔多

有 business insight 嘅 data analysis
User friendly 吸引到顧客嘅 website

任何投資都係睇 reward to cost
你個 program 係賺到錢嘅
用多啲 cost 唔係大問題
2021-02-10 10:58:09
algo trading既話就唔係咁計
code performance隨時導致幾百萬上落
2021-02-10 11:02:06
Time performance 都係 cost 嘅一種
唔同 application 佔比唔同咁解
你個 program 慢 meet 唔到 requirement 唔可以及時做唔到 trade 咪即係輸錢賺唔到錢
Reward to cost
2021-02-10 11:02:10
唔係入我數, 連登我冇份develop
2021-02-10 11:39:18
老細同你講職業道德 然後比fresh grad錢 超短deadline
2021-02-10 11:40:31
有通漲架嘛
驚乜春
2021-02-10 11:42:51
邊鬼個咁得閒同你逐段code optimize
2021-02-10 13:00:12
吹得到至得,吹得太離地俾d有experience嘅user插咁就無謂
吹水台自選台熱 門最 新手機台時事台政事台World體育台娛樂台動漫台Apps台遊戲台影視台講故台健康台感情台家庭台潮流台美容台上班台財經台房屋台飲食台旅遊台學術台校園台汽車台音樂台創意台硬件台電器台攝影台玩具台寵物台軟件台活動台電訊台直播台站務台黑 洞