Tuesday, August 28, 2018

擂台式人生

很意思,很激励
https://www.facebook.com/EmperorTM/videos/389090174959679/

人生很大程度上就是个擂台。

Wednesday, August 15, 2018

面包和激情

人生有三个阶段
第一个阶段是傻傻的付出很多 拿点工资。
第二阶段是做出衡量
第三阶段是发现,太过衡量,其实也很傻,人并不是为金钱而活着。

现在感觉虽然工作时间比较长,但是做的非常有激情,主要是有个distinguish engineer 在旁,可以好好学习。我发现我的工作激情,来自于学习新知+完成工作。

面包要拿,但是激情也不可少。激情可以来自于工作,也可以别的地方,但是必须要找出来。不要去想做什么重要的东西。做你自己有激情的东西,从简单做起。

怎么衡量有没有激情?做完某样东西后有没有充实、成就感,有没有快乐感,做的过程中会不会把时间忘了。

激情的活着,时间会过的很快,但是一直觉得很充实。

Tuesday, August 14, 2018

疯狂工作 II

公司里的印度人 赶deadline还在打游戏 开party 很放松的气氛 我觉得这很有益于我的工作。
不急不躁 困难的东西用最容易的方法弄出来 长时间工作 但是气氛很好 

这真是我拍脑袋想不出来的工作方式啊。

Saturday, August 4, 2018

Distinguished Engineer + 疯狂工作

跟着公司的Distinguished Engineer code, 真会爱上coding, 爱了会更加爱。


Vk
=====
0. Rely entirely on logic, not on syntactic similarity.
1. Code slowly (type slowly) and calmly even under deadline, able to understand the code with the whole picture without running it, and change them with confident;
2. If things are not right, do not do a quick fix, fix the right things by thinking of a proper architecture;
3. Focus on how to produce nicely knitted code that blends well with existing codes;
4. When undo etc., look at each places and figure out whether they are correct;
(codes is like an article, look at it without running)
(figure out the best flow for handling things, with good naming convention)
5. Very patient, no rushing for finishing.
6. Don't treat code improvement as a deadline thing, it is a continual process, treat it as a hobby thing
7. Have a clear workflow in mind, can immediately point out which workflow is redundant, which can be simplified

Code Advice
1. reduce parameters (copy utterances, new_mentions)
2. de-nesting
3. de-memory for long code
(no visited variable, if not...return directly rather than go last)
4. no bidirectional code
5. don't scare of correctness, just refactor and use unit test for your advantage
6. don't call redundant things
e.g. when you have candidates already, don't call a function where first step is get_candidates
7. annotate the output
a)Yes
if not ..
return
b)No
if ...:
long list

8. make a new list rather than delete element in existing list
9. a. function 1,2,3 return
Can just move it outside and detect for that instance
[each function should focus on one task, not too many things;
and don't put specific things too deep;
think of why you feel easily lose track of what is done in the current code]

Additional
1. use extract method and extract variable to comment the complex chunk of code and complex chunk of expression.
2.


这几天特别专心的工作,因为一个deadline 接着一个deadline.
学了很多东西,因为一群印度人从印度过来。
他们真是一群乐观的民族,deadline的时候也没见他们疯狂工作,就是打游戏什么的;然后晚上再工作。工作中有娱乐,娱乐中有工作。

自己方面,顺利完成目标有种成就感,但是这有赖于旁边的三位印度人的帮助。
开始的时候完成了code很开心,然后那个distinguished enginner要求写unit test才能check in, 我还以为可以慢慢写,我也没写过test case,于是又专心的码着,我觉得这种逼迫对学习很有效,几个小时内从新手变成中级用户。完全没有感觉时间的过去。deadline真是一把好刀。

从本来的不情愿加班,到加班加到很有热情,中间的成就感很重要。我觉得在工业界需要这种热情来带动,而不是单纯的工钱和时间的对等,这样才能做的积极快乐,学的更多,这可比金钱价值高多了。这怎么看都是一种良性循环。

另外发现很多是后最不想干的事情都是最重要的事情。先干了再说。