Posts in category “Essays”

《自卑与卓越》书摘

作者【奥】阿弗雷德·阿德勒

2013年读了这本书,这是当时的书摘。存这里备个份。

2013-03-30
人生的意义即“对整体作出贡献”。

2013-04-01
人的目标一旦建立,随后便会开始自我管理。

2013-04-01
人生的真谛就在于奉献与合作。

2013-04-01
他们对于人生的理解已经表现在他们的行为之中,如果他们不对自己的思想加以改变,行为自然也不会改变。

2013-04-01
正因为无人可以理解他们的痛苦,所以他们总是越来越自我。

…more

读书笔记:也许你该找个人聊聊

也许你该找个人聊聊

洛莉·戈特利布

序:當痛苦可以被言説

2022-01-07 23:23:04

你沒法逃避痛苦,只能承認。

2022-01-07 23:24:15

但最根本的辦法,説來説去只有一個,就是誠實。誠實地承擔來訪者遭遇的無常,也誠實接受自己哪怕有此覺悟,仍會有無法負擔之重。

2022-01-08 23:20:49

我們改變不了問題,但我們可以改變對問題的態度。或者説,只要能夠看到問題的存在,就已經改變了面對問題的態度

2022-01-08 23:21:30

洛莉的故事,所有人的故事,説到底都是同一件事——我們無法逃避痛苦,只能承認。

2022-01-08 23:41:35

不要心存幻想。這個世界沒有奇跡。你無法逃避你所遇到的痛苦,心理學也不能提供任何幻想,但不要忘了,世界上也有這樣的地方,有這樣一些人,可以直面這個無處可逃的、困惑的、痛苦的你。你們坐在一起,隨便談談。你可以言説真實的你,而這就是心理咨詢的奇跡所在。

…more

Microsoft Wubi (微软五笔) is good

I use the Wubi-pinyin input method on macOS and Linux systems by installing the Rime input method framework. On a Windows system, Rime is also available if you have the Administrator privilege. Unfortunately, I am only a standard user on my laptop at work. So I have to find a not-bad alternative and the built-in Microsoft Wubi looks like a good choice.

It actually tastes delicious. No compatible issue, it is Wubi-pinyin compatible, and very fast. The only thing I might complain about is that you cannot press Enter key to send out the code you input onto the screen, but pressing the Shift key twice did the trick.

In total, it is a good choice, and most importantly, it is built-in.

What is good code? and what attributes do you think an ideal software developer demonstrates?

I was asked those questions recently and the following is my answer:

What is good code?

Good code has at least the following characteristics:

  • Good code has good readability, so it is easy to understand.
    • Good code is well organized, a clear and reasonable directory structure with meaningful filename is the basic element of good code.
    • Every class, method, variable has a deliberate and meaningful name. You can know the purpose of an identifier through the name at first glance.
    • Methods should be short, every method should only do one thing.
    • Good code does not use magic numbers and hard coded strings.
  • Good code has automated tests, so it is easy to maintain or change.
  • Good code has a good architecture, so its components can easily be replaced by another.
  • Good code has explicit dependencies.
  • Good code has good performance.
    • It does not do database queries or other time-consuming jobs in a loop.
  • It should use a queue for certain situations
  • It should use a full-text search engine instead of the 'LIKE' query on the database.
  • If part of the code is really complex, a carefully written comment would be helpful. By the way, do not forget to update the comment when you change the code later.
  • Good code is highly cohesive and low coupling. Components should be well defined, that is, they are self-contained with one and only one purpose. Each component should know as little as possible about another component.
  • Good code is modular. The Business logic (the controller) should be separated from the data storage layer (the model), while the view layer should be separated from the controller layer.

What attributes do you think an ideal software developer demonstrates?

  • They should always have enthusiasm for programming, which means that they programming not only at work.
  • They should know Linux or macOS well. I mean they should know the command line well.
  • They care about the user experience.
  • They are responsible and willing to do their best to meet the deadline.
  • They are knowledgeable, I mean they know not only programming, they have wide knowledge in various fields.
  • They love sharing and teaching, or mentoring. I mean they are kind to newbies.

What do you believe is the difference in behaviours and skills between a Senior Software Engineer and an Intermediate Software Engineer?

  • A senior engineer not only knows how to code or how to implement a feature but also knows how to code in a better way. They not only implement a feature, they help refine the feature. I mean they do extra work to make the feature better.
  • Senior engineers know how to plan, separate big tasks into smaller ones, and can recognize which task has the higher priority.
  • Senior engineers not only program, they help other engineers grow up. They do mentoring, tutoring, or teaching in a team.
  • Senior engineers are people beyond the bounds of skillset. They could be a potential leader, or just a leader without a title.

书摘 《半生为人》

豆瓣链接

14年底读了这本书,这是当时的书摘。

2014-12-20 18:12:12 这一切都始于那个周日的午后,始于偶然回首的一瞬间他那冷峻而若有所思的样子对一个女孩儿的触动。

2014-12-20 18:13:34 赶二十里路用饭盒带粥,这样的事恐怕只有他才做得出来。 注: 此言差矣。沉浸在爱情中的小年轻,什么都做得出来。

2014-12-20 18:15:37 他们有时候海阔天空,国事家事天下事无所不谈;有时候话又很少,可贵在于“一切尽在不言中”的默契。

2014-12-20 18:45:57 现在我们上哪里去寻找当年的圆明园、丁家滩、十渡,又怎样才能促成当年那种背着瓶啤酒,带着干面包,在野外玩儿童年时的游戏的郊游呢?

2014-12-20 18:48:15 上午参加一个朋友的婚礼,我为他高兴,可是晚上回到家里又得知另外一个朋友被判处死刑,我的心情是可想而知的。然而,又能怎样,这就是生活。

…more