Jekyll2023-11-19T23:46:57+00:00https://blog.ashchan.com/feed.xml知易行难James Chen's blog: a.k.a ashchan, a Ruby / Rails / iOS / Mac freelance developer/consultant based in Hangzhou, China and Tokyo, Japan.自由软件开发者的十点注意事项2016-06-26T00:00:00+00:002016-06-26T00:00:00+00:00https://blog.ashchan.com/archive/2016/06/26/ten-things-freelancer-should-know<p>在 Teahour 85 期“<a href="http://teahour.fm/2016/06/11/all-about-remote-working.html">这次我们聊聊远程工作</a>”中谈到了远程工作者和自由开发者应该注意的一些事项,但聊的比较散乱。抽空整理出十点,是为补充。</p>
<p><img src="https://assets.ashchan.com/blog/2016/freelancer-10-things.jpg" alt="freelancer 10 things to know" /></p>
<h2 id="一信任是合作的基石">一、信任是合作的基石</h2>
<p>没有信任,难以进行远程工作。信任是相互的,体现为:</p>
<ul>
<li>客户放心把项目交给你,由你来规划、管理和完成任务。</li>
<li>客户相信你提交的所花费时间的报告。</li>
<li>你会在期望的时间内把预期的工作成果交给客户。</li>
<li>你会在预定的时间内收到客户支付的报酬。</li>
</ul>
<p>有些竞价平台要求自由开发者(freelancer)在工作的时候打开某个监控软件和摄像头,客户可以随时通过该软件查看你的工作状态。这显然不是正常的合作关系。</p>
<h2 id="二沟通是长期关系的纽带">二、沟通是长期关系的纽带</h2>
<p>沟通对软件开发团队来说非常重要,于自由工作者(一般也是远程工作者)更是重中之重。Email 和电话(Skype)作为传统的沟通方式,将继续发挥主要作用。除此之外,使用在线协同工具,提高沟通效率,如:</p>
<ul>
<li>Slack: 实时交流,同时可以分享文件和其他资源。我的做法是,让客户将我加到他们的 Slack channel 中,或是我建 channel 邀请客户进来。</li>
<li>Trello: 项目管理。</li>
</ul>
<p>沟通要及时有效(但没必要实时,大部分的交流可以是异步的)。遇到问题主动与客户交流,对于客户的提问及时回复处理。</p>
<h2 id="三避免恶性低价竞争">三、避免恶性低价竞争</h2>
<p>你永远不可能与 $5/hour 的开发者竞争。与其(恶性)压低报价,不如花力气寻找付得起你的价位的客户。只要你能提供让人满意的服务,总有人会乐意买单。</p>
<p>我甚至碰到过嫌你开价低的客户。这种客户一定要珍惜,他们认同一种观点:优质服务的提供者,会报出与之相称的较高的价格。</p>
<h2 id="四务必签订合约">四、务必签订合约</h2>
<p>合约是对双方的保护,所以一定要签订合约。在合约里写明项目内容,报价,双方的权利和义务,完成或提前终止合约的要求,等等。</p>
<p>当然如果工作内容非常简单,所花时间不超过一天或报价很低(低到拿不到这笔钱也无所谓),那么不签合约也 OK。不过这种情况下保险的做法是要求客户先全额付款。</p>
<h2 id="五克服孤独">五、克服孤独</h2>
<p>远程工作,难免会孤单寂寞。解决方法也很多,比如花更多时间陪家人,多参加社区活动,多读书,偶尔去 co-working space 或类似地方与其他开发者一起工作。</p>
<p>发展各种兴趣爱好,充实生活。我的个人爱好是看电影和写程序,嗯,比较宅。</p>
<h2 id="六学习学习再学习">六、学习学习再学习</h2>
<p>软件开发是一门技术性和时效性兼具的工匠活。不进则退,只有一直不断学习与进步才能保持竞争力。</p>
<p>不要以为端着一门手艺就可以吃一辈子了。有无数其他方面长你无数倍的人,在学习成长为<a href="https://blog.ashchan.com/archive/2016/06/16/xiaolaili-full-stack-developer-in-one-year/">全栈工程师</a>,随时会抢走你的饭碗。</p>
<h2 id="七提供超出客户预期的价值">七、提供超出客户预期的价值</h2>
<p>做为自由开发者,要求自己能<a href="https://blog.ashchan.com/archive/2016/05/20/what-value-to-offer-as-freelancer-consultant/">提供超出客户预期的价值</a>。说白了,只要你给客户带来的收益增长高于你开出的报价,双方就是 win-win 的。</p>
<p>如果推销能力高超,你也许可以报超出给客户带来的实际效益的价格,但这种好事一般不长久。</p>
<h2 id="八关于报价">八、关于报价</h2>
<p>避免按小时报价。小时报价对自由开发者来说是非常不合适的,原因有:</p>
<ul>
<li>随着你的水平和经历的增长,你完成同等工作的时间应该是递减的。但小时报价不容易大幅增长。换句话说,如果你的报价保持不变,你每小时都在给客户打更大的折扣。</li>
<li>很多客户听到你的小时报价会觉得价格太高。当你把这个数字乘以 8 再乘以 5 然后以周报价时,他们反而会觉得价位合理。</li>
<li>软件开发需要手脑并用。思考 5 小时,编程 3 小时,这是我个人日常的时间分配。但有些客户会觉得你收那 5 小时的钱不合适,哎。</li>
</ul>
<p>尽量按天甚至周报价,如果是按月来就更好了(听着像一份全职工作了呢,不打紧,这是错觉)。</p>
<h2 id="九定时准时发送-invoice并要求客户及时支付">九、定时准时发送 invoice,并要求客户及时支付</h2>
<p>你付出了劳动交付了成果,客户就需要按时按量的支付报酬。如果客户在没有特殊并且可以理解的原因的情况下延时甚至拒绝支付,客气的提醒对方尽快补上(合约上可以订上 late fee)。如果对方不及时处理,参见下条。</p>
<h2 id="十该分手时就分手">十、该分手时就分手</h2>
<p>遇到以下情况,当机立断说拜拜,快速终止与客户的合约。这样做,对双方都是好事。</p>
<ul>
<li>你无法提供客户需要的服务。比方说客户的需求以你目前的技术和知识结构无法实现。</li>
<li>客户不讲理,不认同你的工作成果,或再三提出不切实际的需求。</li>
<li>客户在项目进行中要求降价。</li>
<li>客户恶意延期支付或拒绝支付报酬。</li>
</ul>
<p>以上十点,每点都可以展开进行很多讨论。欢迎探讨。</p>在 Teahour 85 期“这次我们聊聊远程工作”中谈到了远程工作者和自由开发者应该注意的一些事项,但聊的比较散乱。抽空整理出十点,是为补充。笑笑李笑来的一年全栈工程师养成说2016-06-16T00:00:00+00:002016-06-16T00:00:00+00:00https://blog.ashchan.com/archive/2016/06/16/xiaolaili-full-stack-developer-in-one-year<p>什么鬼标题,三笑是什么意思?无他,哗众取宠做一次标题党尔。</p>
<p>前阵子李笑来<a href="https://twitter.com/xiaolai/status/738627808738476033">发推</a>说:</p>
<blockquote class="twitter-tweet" data-lang="ja"><p lang="zh" dir="ltr">算了一下 一个普通人 只要不笨,一年是可以成长为全栈工程师的。用不着一万小时。</p>— 李笑来 (@xiaolai) <a href="https://twitter.com/xiaolai/status/738627808738476033">2016年6月3日</a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>此言一出,众皆哗然,讽刺嘲笑论证否定的居多,到今天也不消停。知乎上一个问题《<a href="https://www.zhihu.com/question/47359997">如何看待李笑来说的“一年可以成长为全栈工程师”观点?</a>》更是引来近 150 个回答。</p>
<p>可以抛出我的看法了。我认为一年(甚至更短时间)内学习成长为全栈工程师是完全可能的。对于以此为目标,计划去实施,并且能努力去实践的人,我举十二个👍。</p>
<p>所以此文标题的真正含义是:李笑来说一年可以成长为全栈工程师 -> 部分围观者笑话这种说法 -> 我笑这一部分围观者。</p>
<p>我倒是一直自认是一名全栈工程师,事实上我哪方面都算不上精,不过 web 前后端开发,iOS app 和 Mac 桌面开发都会一点点。(可惜的是两个还在架上的 Mac app 无人问津,赚不足每天的咖啡钱)</p>
<p>事实上不用学究的去探讨什么是全栈工程师。肤浅的说,独自或作为开发团队的一员,有能力在可接受的时间内捣鼓出完整可运行且运行效果还 OK 的软件产品的开发者,我以为就可以叫做全栈工程师。</p>
<h2 id="可是有些工程师不同意啊">可是有些工程师不同意啊</h2>
<p>有些从业者可能不同意这个观点了。特别是不少工程师苦心专研数载,尚觉得自己离合格的全栈开发还有些差距呢。
特别是少数大牛自恃功力深厚,见门外汉涉入江湖号称一年内要踢大家道场抢大家饭碗,也会觉得荒唐(可否也有一定的慌张?)呢。
特别是现在身处一线的开发者,难免会担心这不是降低了全栈工程师的准入门槛引起了职位的掉价嘛。</p>
<p>不管你同不同意,就是存在“一小撮人”,能在很短时间内速成高手,让别人羡煞。比方说令狐冲能在一年面壁时间内习得独孤九剑,比方说狄云能在二师伯不到一晚的指点下便能打败联手的八个师兄。</p>
<p>Well 武侠是虚构的不算?殊不知程序界也是江湖啊。</p>
<p>很多人不同意不相信,有可能是没意识到或是忽略了下面一些现象:</p>
<ul>
<li>
<p>个体之间的学习和其它能力的差异是巨大的。</p>
</li>
<li>
<p>决心(目标驱动)的力量是无穷的。</p>
</li>
<li>
<p>兴趣与利益驱动的学习过程也可以有出众的效果。</p>
</li>
<li>
<p>有些人工作十年,是重复了十次“一年工作经历”;有些人成长半年,却是脱胎换骨多次升级。</p>
</li>
<li>
<p>有开放心智和好的方法,不断然下结论,认识到自己有很多不足,认识到别人有很多优点,有这样特性的人往往能更迅速有效的学习与成长。</p>
</li>
</ul>
<h2 id="程序江湖中真有速成传说吗">程序江湖中真有速成传说吗</h2>
<p>有。这里就不拿那些报出名来会吓着你的案列了。说说我身边的:</p>
<ul>
<li>设计师 H,有一天心血来潮说要做 freelancer,开始学 Rails 开发。三个月后我们两个一起开始做一个客户的项目。人家真心不赖,从 PS 到 HTML/CSS 到 JS 到 Ruby,什么脏活累活都干的,关键是都干的有声有色。</li>
<li>帅哥 T,毕业前后开始做 Rails 开发,半年后以 remote 方式加入一家美国知名软件咨询开发公司,成为核心工程师。</li>
</ul>
<p>为什么两个例子都是学 Rails 的?因为我最爱 Rails,然后我欣赏的 NB Rails 开发,都是全栈全端的。</p>
<p>那个,如果你觉得这是我编造的,我可以介绍不少身边的全栈工程师给你认识。</p>
<p><img src="https://assets.ashchan.com/blog/2016/full-stack-developer.jpg" alt="全栈工程师" title="全栈工程师" /></p>
<h2 id="怎样在短时间内成长为全栈工程师或任意软件工程师">怎样在短时间内成长为全栈工程师或任意软件工程师</h2>
<p>斗胆提出一些方法或理论,是否具可行性看官请自行判断,我不是教练,只出方案不提供保证。</p>
<ul>
<li>
<p>(依据自身情况)设定学习目标</p>
<p>有目标,才能追踪评估进步,引导自己成长。</p>
</li>
<li>
<p>Just do it,坚持,不轻言放弃</p>
<p>知易行难。开始做,就比动动嘴皮要好上很多倍了。坚持做,则必有进步。</p>
</li>
<li>
<p>学习学习再学习</p>
<p>这也是李笑来说的。朴素却很有道理。</p>
</li>
<li>
<p>筛选资料,优先采用有口碑高质量的学习教材</p>
<p>一般来说,从质量和含金量来考量技术资料,专业书籍优于博客文章,博客文章优于论坛口水架,最差的是 twitter 微博之类。(twitter 上倒有很多闪光的妙语,但不足一百五十字的表达难以技术施教。)</p>
<p>以学习 Ruby on Rails 为例,推荐 <a href="https://www.railstutorial.org/book">Ruby on Rails Tutorial</a> 和 <a href="https://pragprog.com/book/rails5/agile-web-development-with-rails-5">Agile Web Development with Rails 5</a>(及其以前几版)。</p>
<p>如果可以,尽量用英文资料。</p>
</li>
<li>
<p>找一位 mentor</p>
<p>Obi-Wan 和 Anakin 都有顶级的 master,这对他们成为银河系里最伟大的 Jedi Knight 功不可没。如果狗屎运十足遇到一位好 mentor,你的学习成长也会事半功倍。</p>
</li>
<li>
<p>花钱请教练</p>
<p>看到很多人毒舌五万学费由专业教练教授全栈技术这件事。哎,知识其实是最值钱的。</p>
</li>
<li>
<p>阅读学习优秀开源项目的代码</p>
<p>从别人的一招一式中领悟诀窍。</p>
</li>
<li>
<p>边学习边开发一个真实的 app</p>
<p>一年时间,这个 app 可以迭代 20 个 MVP。注意“一个”和“真实”。“一个”:具备完整基本功能,整体有架构有血脉。“真实”:完成后不管功能如何,得是一个工程意义上成品。</p>
<p>做一个 app(不管何种类型),专心致志,使用到各方面技术。</p>
</li>
<li>
<p>与 Google 和 Stack Overflow 做朋友</p>
<p>不管你信不信,这世上真的存在 Copying and Pasting from Stack Overflow with Love 的程序员的。</p>
</li>
</ul>什么鬼标题,三笑是什么意思?无他,哗众取宠做一次标题党尔。Tab 与空格争竞2016-06-10T00:00:00+00:002016-06-10T00:00:00+00:00https://blog.ashchan.com/archive/2016/06/10/tabs-vs-spaces<blockquote>
<p>二人武功既高,自负益甚,每当情苗渐茁,谈论武学时的争竞便随伴而生,始终互不相下。</p>
</blockquote>
<p>这里谈的并非王重阳和林朝英的感情,而是上周那集 “<a href="http://www.hbo.com/silicon-valley">Silicon Valley</a>” (美剧《硅谷》) 中的情节。</p>
<p>男主 Richard 约会的女孩 Winnie 是 Facebook 的员工,她跟 Richard 的代码习惯不可调和:一个用 tabs 一个用 spaces。就为这个,Richard 把姑娘“甩”了。</p>
<p>程序员当然知道 tab 与空格是业界旷日持久的争斗之一。Ruby 界基本无争议的使用两个空格作为缩进,所以 Rails 开发者应该不怎么为这个问题困惑。</p>
<p><img src="https://assets.ashchan.com/blog/2016/space.png" alt="space" /></p>
<p>好玩的是,Winnie 有 GitHub 账号 <a href="https://github.com/Stitchpunk">github.com/Stitchpunk</a>:</p>
<blockquote class="twitter-tweet" data-lang="ja"><p lang="zh" dir="ltr">大伙来见识一下最新一集美剧《硅谷》中因空格和 tab 分歧而与男主角分担扬镳(被男主甩了)的美女程序员的 GitHub profile <a href="https://twitter.com/hashtag/SiliconValleyHBO?src=hash">#SiliconValleyHBO</a> <a href="https://t.co/V7UfqGSPtp">https://t.co/V7UfqGSPtp</a></p>— James Chen (@ashchan) <a href="https://twitter.com/ashchan/status/737637574294917120">2016年5月31日</a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>更好玩的是该账号下的 repo <a href="https://github.com/Stitchpunk/atari-ai">Stitchpunk/atari-ai</a> 里的历史提交,有兴趣的不妨去翻翻。</p>
<p>这个 repo fork 自 <a href="https://github.com/emcmanus">github.com/emcmanus</a> ,该账号是 Ed McManus 的,他是《硅谷》的 Lead Technical Advisor。</p>
<p>不得不佩服 HBO,每部剧集都是良心之作。</p>二人武功既高,自负益甚,每当情苗渐茁,谈论武学时的争竞便随伴而生,始终互不相下。What Value to Offer as a Freelancer/Consultant2016-05-20T00:00:00+00:002016-05-20T00:00:00+00:00https://blog.ashchan.com/archive/2016/05/20/what-value-to-offer-as-freelancer-consultant<p>As a freelancer & consultant, when asked what I offer I always respond like this: I’m a full stack developer, I do Ruby on Rails web development and iOS mobile development.</p>
<p>It can’t be more wrong!</p>
<p>My clients would’t care less about what programming language/platform I’m using and skilled. What they really want to know is what value I can offer and by value I mean a solution to their problems.</p>
<p><img src="https://assets.ashchan.com/blog/2016/freelancer-value.jpg" alt="Offer value as a freelancer/consultant" /></p>
<h2 id="more">More</h2>
<p>They pay a freelancer/consultant to yield that value. When such value is greatly delivered, the clients’ problems get solved: they get more active users, sell more goods, earn more profits,…</p>
<p>Notice the <strong>more</strong> above? Clients expect more from you. They’re happy to pay you more when you get more done for them - as long as the <code class="language-plaintext highlighter-rouge">more</code> you offer is greater than the <code class="language-plaintext highlighter-rouge">more</code> they pay you.</p>
<h2 id="focus">Focus</h2>
<p>I understand what problem I have now: Ruby on Rails web development and iOS mobile development is too broad and generic. Too many developers are doing that - OK, more developers are doing Node.js and front end development.</p>
<p>I (and my company) need to narrow the focus - better to a niche - and become an <strong>Expert</strong> for a specfic field. The market might still be big enough for the field that I can have sustained consultant business chances.</p>
<p>Need to keep this in mind.</p>
<p>I have an idea around this. I’m willing to experiment 3 months to see how it goes.</p>As a freelancer & consultant, when asked what I offer I always respond like this: I’m a full stack developer, I do Ruby on Rails web development and iOS mobile development.How to Take Screenshots for App Store2015-01-19T00:00:00+00:002015-01-19T00:00:00+00:00https://blog.ashchan.com/archive/2015/01/19/how-to-take-screenshots-for-app-store<p>This is a quick step by step guide to take screenshots for submission to App Store. It works on Yosemite, requiring QuickTime Player and connecting iOS device to Mac via Lightning connector.</p>
<ol>
<li>Connect iOS device to Mac (Yosemite)</li>
<li>Open QuickTime Player</li>
<li>Choose File - New Movie Recording</li>
<li>from the dropdown list to the right of the record button, select the connected iOS device as ‘Camera’</li>
<li>Start recording, play with your app, stop recording</li>
<li>Play the recorded movie to the frame you want and pause, then press CMD+C</li>
<li>Open Preview.app, press CMD+E</li>
<li>Save the pasted screenshot, be sure to uncheck ‘Alpha’ since iTunes Connect would reject the screenshot if it has alpha channel</li>
<li>Upload it to iTunes Connect</li>
</ol>
<p>Bonus: you don’t have to remove the status bar from the screenshot.</p>
<p>Bonus 2: the time on the status bar will be 9:41<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup>, is that awesome?</p>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p><a href="http://www.quora.com/History-of-Apple-Inc/In-iPhone-advertisements-why-is-the-time-always-set-to-9-42-a-m-on-the-clock">History of Apple Inc.: In iPhone advertisements, why is the time always set to 9:42 a.m. on the clock?</a> <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>This is a quick step by step guide to take screenshots for submission to App Store. It works on Yosemite, requiring QuickTime Player and connecting iOS device to Mac via Lightning connector.各付各的2015-01-11T00:00:00+00:002015-01-11T00:00:00+00:00https://blog.ashchan.com/archive/2015/01/11/we-split<p>儿子(老大)有不少玩具。</p>
<p>出去逛,看到新鲜的玩意儿或糖果小吃就会缠着要买。不答应则拉长脸给颜色看,不过随着年龄渐长,倒也不至于赖地上耍泼了。</p>
<p>上月圣诞节得到了一个很是喜欢的乐高。看着广告册上的同系列还想搞一个。我们告诉他要不等下一次重大节日,或者自己赚钱去买。</p>
<p>于是天天观察着找赚钱机会。衣服洗好了妈妈还在睡觉,他就“偷偷”地从洗衣机里搬出来去晾上。吃完晚饭我要犯懒一时没去洗碗,小子说不定就抢去干了——这活他很欢喜,主要内容是玩水,洗不洗的干净那是不重要的。干完了就要工钱,rate 他自己要求,一般一次100~200日元。没几天竟筹下了两千元。</p>
<p>从工时和工作成果上来看,时给比去すき家打工都高了:)</p>
<p>今天带他去观 Big Hero 6。我说别点爆米花和饮料了吧,给你的玩具经费省点钱,要不你自己带瓶水去。儿子说不行,影院不让自带零食,但我还是要喝饮料。最终我请客出爆米花那份钱,让他负担饮料费。</p>
<p>儿子马上就上小学了。不妨让他时不时在家打打工;出去玩,也可以让他自己负担一部分。想来不是坏事。</p>儿子(老大)有不少玩具。Yosemite Bluetooth Audio Lag Issue2014-10-23T00:00:00+00:002014-10-23T00:00:00+00:00https://blog.ashchan.com/archive/2014/10/23/yosemite-bluetooth-audio-lag-issue<p>I’ve been having Bluetooth audio lag issue since very early release of OS X Yosemite Developer Preview.</p>
<p>It only happens in <a href="http://support.apple.com/kb/HT3131?viewlocale=en_US&locale=en_US">closed clamshell</a> mode. I connect my MacBook Air to an external display on a daily basis and close the lid most of the time. Audio output to a Bose SoundLink Mini speaker or Sony ZX750BN headphone. For both devices, I notice the audio lag every 1 or 2 seconds.</p>
<p>This totally kills my pleasure of listening to music, podcasts or Internet radios.</p>
<p>Many users are complaining about the <a href="https://discussions.apple.com/thread/6603243">same issue</a>. I’m not sure if they have this problem when their lids are open. For me, if I open the lid, then Bluetooth audio is fine.</p>
<p>Before Apple releases an update to fix this, my solution is keeping the lid open when connecting to external display(s).</p>
<p><strong>Update Nov 4, 2014</strong>: 10.10.1 seed seems to have improved (if not fixed) the Bluetooth audio. Listened to music for more than 1 hour without any lag today. Yet to see if this is persistent though.</p>I’ve been having Bluetooth audio lag issue since very early release of OS X Yosemite Developer Preview.Summer Holiday2014-07-18T00:00:00+00:002014-07-18T00:00:00+00:00https://blog.ashchan.com/archive/2014/07/18/summer-holiday<p>Japanese kindergarten (幼稚園) summer holidays start next week.</p>
<p>The family is going back to China for one month. Currently on parental leave (育児休暇), I’m happy to be able to pay visits to my parents and many friends.</p>
<p>4 years ago when I came to live and work in Japan, my son was 2 years old. Now I have a second who’s 5 months.</p>
<p>This is a great ROI of 100%!</p>
<p><img src="http://assets.ashchan.com.s3.amazonaws.com/blog/2014/brothers.jpg" alt="Brothers" /></p>Japanese kindergarten (幼稚園) summer holidays start next week.I have Two Displays2014-07-12T00:00:00+00:002014-07-12T00:00:00+00:00https://blog.ashchan.com/archive/2014/07/12/i-have-two-displays<p>I have two displays, one has a resolution of 2560x1080 and the other 1920x1080.</p>
<p>As a professional developer I’m quite productive at work with these two displays: I decide which one to use based on the aspect ratio of the movie I’m watching.</p>I have two displays, one has a resolution of 2560x1080 and the other 1920x1080.Rules2014-05-27T00:00:00+00:002014-05-27T00:00:00+00:00https://blog.ashchan.com/archive/2014/05/27/rules<p>Rules are meant to be broken, but are still good if I follow them:</p>
<ul>
<li>Do not work after 10 p.m.</li>
<li>Get to sleep before 11:30 p.m.</li>
<li>Do not burn out</li>
</ul>Rules are meant to be broken, but are still good if I follow them: