Skip to content

Commit

Permalink
There is no compensation
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankNine committed Mar 7, 2020
1 parent b46caad commit f976077
Show file tree
Hide file tree
Showing 8 changed files with 257 additions and 6 deletions.
Binary file added images/there-is-no-compensation/git-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/there-is-no-compensation/trunk-based.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<meta property="og:description" content="Maybe you will get some, maybe you won&#39;t" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.chunfuchao.com/" />
<meta property="og:updated_time" content="2017-12-29T12:43:16+00:00" />
<meta property="og:updated_time" content="2020-03-08T01:28:00+08:00" />
<meta itemprop="name" content="Northern Wind">
<meta itemprop="description" content="Maybe you will get some, maybe you won&#39;t"><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Northern Wind"/>
Expand Down Expand Up @@ -94,6 +94,20 @@
<div id="content" class="content">

<section id="archive" class="archive">
<div class="collection-title">
<h2 class="archive-year">2020</h2>
</div>

<div class="archive-post">
<span class="archive-post-time">
2020-03-08
</span>
<span class="archive-post-title">
<a href="https://www.chunfuchao.com/posts/there-is-no-compensation/" class="archive-post-link">
沒有人會賠你的
</a>
</span>
</div>
<div class="collection-title">
<h2 class="archive-year">2017</h2>
</div>
Expand Down
11 changes: 10 additions & 1 deletion index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@
<description>Recent content on Northern Wind</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<lastBuildDate>Fri, 29 Dec 2017 12:43:16 +0000</lastBuildDate>
<lastBuildDate>Sun, 08 Mar 2020 01:28:00 +0800</lastBuildDate>

<atom:link href="https://www.chunfuchao.com/index.xml" rel="self" type="application/rss+xml" />


<item>
<title>沒有人會賠你的</title>
<link>https://www.chunfuchao.com/posts/there-is-no-compensation/</link>
<pubDate>Sun, 08 Mar 2020 01:28:00 +0800</pubDate>

<guid>https://www.chunfuchao.com/posts/there-is-no-compensation/</guid>
<description>https://news.ycombinator.com/item?id=22496724 昨天剛好翻 HackerNews 看到 GitFlow 竟然也十年了,想當初還在跟同事激烈討論 branch 要怎麼規劃、Hotfix 要放在哪個 branch、給韓國代理商的特別版程式要放在哪</description>
</item>

<item>
<title>使用 ReSharper 或 Rider 在編輯器裡執行 Unity 元件測試</title>
<link>https://www.chunfuchao.com/posts/unity-unit-testing-in-resharper-and-rider/</link>
Expand Down
16 changes: 15 additions & 1 deletion posts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<meta property="og:description" content="Maybe you will get some, maybe you won&#39;t" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.chunfuchao.com/posts/" />
<meta property="og:updated_time" content="2017-12-29T12:43:16+00:00" />
<meta property="og:updated_time" content="2020-03-08T01:28:00+08:00" />
<meta itemprop="name" content="Posts">
<meta itemprop="description" content="Maybe you will get some, maybe you won&#39;t"><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Posts"/>
Expand Down Expand Up @@ -94,6 +94,20 @@
<div id="content" class="content">

<section id="archive" class="archive">
<div class="collection-title">
<h2 class="archive-year">2020</h2>
</div>

<div class="archive-post">
<span class="archive-post-time">
03-08
</span>
<span class="archive-post-title">
<a href="/posts/there-is-no-compensation/" class="archive-post-link">
沒有人會賠你的
</a>
</span>
</div>
<div class="collection-title">
<h2 class="archive-year">2017</h2>
</div>
Expand Down
11 changes: 10 additions & 1 deletion posts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@
<description>Recent content in Posts on Northern Wind</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<lastBuildDate>Fri, 29 Dec 2017 12:43:16 +0000</lastBuildDate>
<lastBuildDate>Sun, 08 Mar 2020 01:28:00 +0800</lastBuildDate>

<atom:link href="https://www.chunfuchao.com/posts/index.xml" rel="self" type="application/rss+xml" />


<item>
<title>沒有人會賠你的</title>
<link>https://www.chunfuchao.com/posts/there-is-no-compensation/</link>
<pubDate>Sun, 08 Mar 2020 01:28:00 +0800</pubDate>

<guid>https://www.chunfuchao.com/posts/there-is-no-compensation/</guid>
<description>https://news.ycombinator.com/item?id=22496724 昨天剛好翻 HackerNews 看到 GitFlow 竟然也十年了,想當初還在跟同事激烈討論 branch 要怎麼規劃、Hotfix 要放在哪個 branch、給韓國代理商的特別版程式要放在哪</description>
</item>

<item>
<title>使用 ReSharper 或 Rider 在編輯器裡執行 Unity 元件測試</title>
<link>https://www.chunfuchao.com/posts/unity-unit-testing-in-resharper-and-rider/</link>
Expand Down
200 changes: 200 additions & 0 deletions posts/there-is-no-compensation/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>沒有人會賠你的 - Northern Wind</title>
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="Chun-Fu Chao" /><meta name="description" content="https://news.ycombinator.com/item?id=22496724 昨天剛好翻 HackerNews 看到 GitFlow 竟然也十年了,想當初還在跟同事激烈討論 branch 要怎麼規劃、Hotfix 要放在哪個 branch、給韓國代理商的特別版程式要放在哪" />






<meta name="generator" content="Hugo 0.62.0 with theme even" />


<link rel="canonical" href="https://www.chunfuchao.com/posts/there-is-no-compensation/" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">


<link href="/dist/even.a489c479.min.css" rel="stylesheet">



<meta property="og:title" content="沒有人會賠你的" />
<meta property="og:description" content="https://news.ycombinator.com/item?id=22496724 昨天剛好翻 HackerNews 看到 GitFlow 竟然也十年了,想當初還在跟同事激烈討論 branch 要怎麼規劃、Hotfix 要放在哪個 branch、給韓國代理商的特別版程式要放在哪" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.chunfuchao.com/posts/there-is-no-compensation/" />
<meta property="article:published_time" content="2020-03-08T01:28:00+08:00" />
<meta property="article:modified_time" content="2020-03-08T01:28:00+08:00" />
<meta itemprop="name" content="沒有人會賠你的">
<meta itemprop="description" content="https://news.ycombinator.com/item?id=22496724 昨天剛好翻 HackerNews 看到 GitFlow 竟然也十年了,想當初還在跟同事激烈討論 branch 要怎麼規劃、Hotfix 要放在哪個 branch、給韓國代理商的特別版程式要放在哪">
<meta itemprop="datePublished" content="2020-03-08T01:28:00&#43;08:00" />
<meta itemprop="dateModified" content="2020-03-08T01:28:00&#43;08:00" />
<meta itemprop="wordCount" content="1634">



<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="沒有人會賠你的"/>
<meta name="twitter:description" content="https://news.ycombinator.com/item?id=22496724 昨天剛好翻 HackerNews 看到 GitFlow 竟然也十年了,想當初還在跟同事激烈討論 branch 要怎麼規劃、Hotfix 要放在哪個 branch、給韓國代理商的特別版程式要放在哪"/>

<!--[if lte IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->

<!--[if lt IE 9]>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/html5shiv.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dest/respond.min.js"></script>
<![endif]-->

</head>
<body>
<div id="mobile-navbar" class="mobile-navbar">
<div class="mobile-header-logo">
<a href="/" class="logo">Northern Wind</a>
</div>
<div class="mobile-navbar-icon">
<span></span>
<span></span>
<span></span>
</div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
<ul class="mobile-menu-list">

</ul>
</nav>
<div class="container" id="mobile-panel">
<header id="header" class="header">
<div class="logo-wrapper">
<a href="/" class="logo">Northern Wind</a>
</div>

<nav class="site-navbar">
<ul id="menu" class="menu">

</ul>
</nav>
</header>

<main id="main" class="main">
<div class="content-wrapper">
<div id="content" class="content">
<article class="post">
<div class="post-content">
<p><a href="https://news.ycombinator.com/item?id=22496724">https://news.ycombinator.com/item?id=22496724</a></p>
<p>昨天剛好翻 HackerNews 看到 <a href="https://nvie.com/posts/a-successful-git-branching-model/">GitFlow</a> 竟然也十年了,想當初還在跟同事激烈討論 branch 要怎麼規劃、Hotfix 要放在哪個 branch、給韓國代理商的特別版程式要放在哪裡。現在幾乎都沒有在開又大又長的 Feature branch,跟 HackerNews 底下的回應一樣,又回去用像是傳統版本控制的 Trunk based。當初在那邊規劃 branch 現在想起來感覺特別的空虛。</p>
<p>也許這個故事教給我們的就是 <a href="https://developers.google.com/tech-writing">Technical Writing</a> 的重要?</p>
<figure>
<img src="/images/there-is-no-compensation/trunk-based.png"/> <figcaption>
<h4>你要無聊的一條線?</h4>
</figcaption>
</figure>

<figure>
<img src="/images/there-is-no-compensation/git-hero.png"/> <figcaption>
<h4>還是 git hero!!!</h4>
</figcaption>
</figure>

<p>有的時候技術的傳播也真的不是取決於好壞,很多時候也是很看門面的。第一次接觸到 Technical Writing 是還在大學的時候讀的 Joel on Software,他寫的文章非常的吸引人,也從裡面學到了幾個至今很<a href="https://www.csie.ntu.edu.tw/~p92005/Joel/fog0000000069.html">受用的概念</a>。可惜他後來在 FogBugz 嘗試軟體工程界的<del>人體練成</del><a href="https://blog.codinghorror.com/has-joel-spolsky-jumped-the-shark/">自創語言</a>,結果不是很好的樣子&hellip; (曾<a href="../visual-concepts-1">在遊戲公司維護過自創語言</a>的人告訴你看過太多人 Compile 出東西就覺得完成了,其實 Compile 出東西才是剛開始,接下來還有編輯環境、Auto-complete、Debugger、Optimization 等等等&hellip;)</p>
<p>有的時候概念就是這樣普及起來了,等到浪費了以年為單位的時間後大家才才慢慢發現不對勁,最早開始提出要檢討的人可能還會被人放火燒。<a href="https://youtu.be/gKZGWJDkhRA?t=3680">OOP</a> 也是、Design Pattern 也是、<a href="(https://martinfowler.com/articles/is-tdd-dead/)">TDD</a> 也是、UML 也是、Scrum 也是
。記得大學學軟體工程教的是 UML 跟 Rational Rose,照課本說的所謂的軟體工程工程就是設計師在 <a href="https://www.ibm.com/support/knowledgecenter/zh-tw/SSCLKU_7.5.5/com.ibm.xtools.rsm.legal.doc/helpindex_rsm.html">Rational Rose</a> 裡面拉完圖之後其他人在 Code Gen 出來的 Class 玩填字遊戲。上課第一張投影片就寫到說希望軟體的產出可以<strong>無視由誰來實作</strong>,以現在的角度聽起來感覺像是在描述中古世紀的醫療,發燒就要放血之類的東西。但也才過十年多一點而已,難講現在很夯的東西,再過個三五年回頭看不會像是中世紀。</p>
<p>像我跟 Scrum 相處到現在就完全不相信時程是可以預估的,也不相信什麼越估會越準的的說法。以前還會半信半疑,現在你送我兩套撲克牌我都不信。當你寫的程式只佔整套系統(Firmware、OS、遊戲引擎、加上你的 Gameplay code)不到萬分之一的 <a href="https://en.wikipedia.org/wiki/Source_lines_of_code">LoC</a>,怎麼可能會準。摸索到現在覺得只能靠 Feature Toggle 跟臨場應變來降低估錯的傷害。</p>
<p>在大學第一次念到 Design Pattern 的時候覺得有如見到<a href="https://www.tenlong.com.tw/products/9789867794529">葵花寶典</a>,然後就拿 Pattern 亂揮,搞到差點自宮。到很久以後才知道 Pattern 是從既有的程式整理出來的,不是還沒開始寫程式就動手套的。要整理出 Pattern 需要重構,重構則需要測試來保證重構前後行為一致,是 Refactoring 不是 <a href="https://blog.codinghorror.com/new-programming-jargon/">Refuctoring</a>。所以正常的方向是測試 &gt; 重構 &gt; 設計模式,不過因為設計模式教起來感覺很有料、考試也好考,所以很多學校是不實做直接教 Pattern ,有如逆練九陰真經。</p>
<p>更退一步 Design Pattern 也不過是在 Class-based Inheritance OOP 裡面糾結,Class-based inheritance 把繼承跟 Reuse 混在一起造成 <a href="https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem">Diamond problem</a>,然後為了迴避這個問題規定繼承需要是個樹狀結構不能多重繼承。結果一堆人在糾結實做要放在 Class 繼承樹的哪裡糾結不出來,實際上也不可能糾結出來,因為 Reuse 沒有樹狀結構。花了一堆時間在糾結 NPC class 是 is-a 還是 has-a Actor class、is-a 還是 has-a AI,結果<a href="https://vinta.ws/blog/695">鄙視鍊</a>末端的 Javascript 走 Prototype-based Inheritance 根本<a href="https://www.youtube.com/watch?v=wfMtDGfHWpA">沒在跟你糾結</a>,最後只好兩手一攤大喊 <a href="https://www.sicpers.info/2018/03/why-inheritance-never-made-any-sense/">Composition over inheritance</a></p>
<p>測試在沒有做出 <a href="https://blog.ploeh.dk/2017/02/02/dependency-rejection/">Pure-impure-pure sandwitch</a> 的情況下不 make sense,<a href="https://nsubstitute.github.io/">Mocking Library</a> 雖然很酷炫但是用太多只會讓你在程式有改動的時候修測試修到死。Exception 不 make sense,丟的人不知道誰會接,接的人不知道底下誰會丟、丟哪種的。Defensive programming 不 make sense,有問題的輸入應該<a href="https://stackoverflow.com/questions/42341535/how-to-make-illegal-values-unrepresentable">在邊界就擋掉</a>,不是在業務邏輯裡面你防我我防你。Domain-driven Design 在沒有 Algebraic data type 的環境下不 make sense,在有 ADT 的語言裡面<a href="https://pragprog.com/book/swdddf/domain-modeling-made-functional">程式可以長得超像設計文件</a>的。</p>
<p>然後努力念書以後什麼都會好也不 make sense,如果你不會生活,念了書、拿了文憑、賺了錢、寫了文章給別人看、演講給別人聽、救了無數的火也都不會讓你過得好,你只能哭給你的諮商師看。哭完繼續從幼幼班學人是怎麼生活的。</p>
<p>被人拐了彎路,沒有人會賠你的</p>
<p>下次看到什麼東西實踐起來覺得不 make sense,不要因為 <em>長輩/名人/老闆/老師/很多其他人</em> 都說沒問題就覺得是自己有問題。多往外找找不同的想法來嘗試,不要被慣例限制住了。</p>
<blockquote>
<p>Nothing is true, Everything is permitted.</p>
</blockquote>

</div>
</article>
</div>





<script src="https://utteranc.es/client.js"
repo="FrankNine/franknine.github.io"
issue-term="pathname"
theme="github-light"
crossorigin="anonymous"
async>
</script>
<noscript>Please enable JavaScript to view the <a href="https://github.com/utterance">comments powered by utterances.</a></noscript>

</div>
</main>

<footer id="footer" class="footer">
<div class="social-links">
<a href="FrankNine" class="iconfont icon-thub" title="thub"></a>
<a href="aaefiikmnnnr" class="iconfont icon-itter" title="itter"></a>
<a href="https://www.chunfuchao.com/index.xml" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
</div>

<div class="copyright">
<span class="power-by">
Powered by <a class="hexo-link" href="https://gohugo.io">Hugo</a>
</span>
<span class="division">|</span>
<span class="theme-info">
Theme -
<a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
</span>



<span class="copyright-year">
&copy;
2010 -
2020
<span class="heart">
<i class="iconfont icon-heart"></i>
</span>
<span class="author">Chun-Fu Chao</span>
</span>
</div>
</footer>

<div class="back-to-top" id="back-to-top">
<i class="iconfont icon-up"></i>
</div>
</div>
<script type="text/javascript" src="/lib/jquery/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="/lib/slideout/slideout-1.0.1.min.js"></script>

<script type="text/javascript" src="/dist/even.26188efa.min.js"></script>








</body>
</html>
9 changes: 7 additions & 2 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@

<url>
<loc>https://www.chunfuchao.com/</loc>
<lastmod>2017-12-29T12:43:16+00:00</lastmod>
<lastmod>2020-03-08T01:28:00+08:00</lastmod>
</url>

<url>
<loc>https://www.chunfuchao.com/posts/</loc>
<lastmod>2017-12-29T12:43:16+00:00</lastmod>
<lastmod>2020-03-08T01:28:00+08:00</lastmod>
</url>

<url>
<loc>https://www.chunfuchao.com/posts/there-is-no-compensation/</loc>
<lastmod>2020-03-08T01:28:00+08:00</lastmod>
</url>

<url>
Expand Down

0 comments on commit f976077

Please sign in to comment.