programmer既職業道德
complex 2021-2-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
:^(

Ads

complex 2021-2-10 02:14:41 https://www.youtube.com/watch?v=Nz9SiF0QVKY
靈魂被你拖走 2021-2-10 02:25:59
:^(
髀加蕉 2021-2-10 03:40:21 趕Deadline都有難度
仲要同你Optimize
:^(

唔係話唔得嘅
錢作怪囉
:^(
complex 2021-2-10 03:48:57
:^(
@o@ 2021-2-10 06:54:29 此回覆已被刪除
638422762 2021-2-10 07:03:09 咁環保嘅話
硬件生產商會少咗生意
好多人會失業
:^(
…………………… 2021-2-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.
手一黏便緊(UTC+9 2021-2-10 07:07:03 喂你真係唔撚識個喎
拎bit數黎講職業道德 而唔係講code易唔易maintain 足唔足documentation test齊唔齊case
再者你識唔識computer architecture 我拎四byte去裝個bool 事實上係有好處
網蛇 2021-2-10 07:12:47 每次CPU cache flush一次你都要付責任
手一黏便緊(UTC+9 2021-2-10 07:18:46 仲有dram refresh
:^(

Ads

れんげ 2021-2-10 07:59:31 最緊要同個垃圾codebase 一樣質素,寫多d垃圾code
德國工程師 2021-2-10 08:25:41 programmer最高境界係齋吹唔打code
:^(
諸如此類 2021-2-10 09:42:22 寫開SQL同HTML
bit食唔食得?
:^(
b42b82 2021-2-10 10:19:40 留名學野.
手一黏便緊(UTC+9 2021-2-10 10:22:34 到到都留名學野
:^(
…………………… 2021-2-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 唔係大問題
complex 2021-2-10 10:58:09 algo trading既話就唔係咁計
code performance隨時導致幾百萬上落
:^(
齋藤道三 2021-2-10 10:59:43 此回覆已被刪除
…………………… 2021-2-10 11:02:06 Time performance 都係 cost 嘅一種
唔同 application 佔比唔同咁解
你個 program 慢 meet 唔到 requirement 唔可以及時做唔到 trade 咪即係輸錢賺唔到錢
Reward to cost
complex 2021-2-10 11:02:10 唔係入我數, 連登我冇份develop
:^(

Ads

黑人??? 2021-2-10 11:39:18 老細同你講職業道德 然後比fresh grad錢 超短deadline
:^(
Mike_Chan 2021-2-10 11:40:31 有通漲架嘛
驚乜春
Black9mist 2021-2-10 11:42:51 邊鬼個咁得閒同你逐段code optimize
ʕ•ᴥ•ʔ維尼 2021-2-10 13:00:12 吹得到至得,吹得太離地俾d有experience嘅user插咁就無謂
:^(