-
Notifications
You must be signed in to change notification settings - Fork 2
/
kindlenote-2020-03-26.txt
1184 lines (666 loc) · 122 KB
/
kindlenote-2020-03-26.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
==========
>> 关键对话:如何高效能沟通(原书第2版) (科里·帕特森)
共享观点库是实现协同效应的前提 共享观点库不但能帮助个人做出更好的选择,更重要的是,观点的共享能让人们团结起来,对决策目标深信不疑,能够从主观上积极地投入决策的实施过程中去。只有当对话者能够开诚布公地共享看法时,他们才会实现观点的自由交流。这样做可以帮助他们理解为什么共享式决策是最佳的解决方案,同时有效地激励他们展开行动。例如,凯文和其他副总不肯接受最终选择是因为他们未能参与对话,只有在充分理解对方的观点之后他们才能得出最佳决策。
与此相反,如果人们未能参与交流,而是在敏感的对话中保持沉默,这种做法不会为最终决策带来任何好处。他们的观点都停留在自己的脑中,从不拿出来和对方共享,最终只能导致无声的反对和消极的抵制。更糟糕的是,当有人强迫施加自己的观点时,人们往往很难接受此类信息。他们表面上会表示赞成,但实际上是在违心地执行错误的决定。用塞缪尔·巴特勒(Samuel Butler)的话说就是:“违心服从的人仍然保留着自己的看法。”
==========
>> 清醒思考的艺术(精编图文版) (Rolf Dobelli, PhD,)
幸存偏误是指:由于日常生活中更容易看到成功、看不到失败,你会系统性地高估成功的希望。不了解现实的你(与雷托一样)对成功抱有一种幻想,认识不到成功的概率有多微弱。每位成功的作家背后都有100个作品卖不出去的作家,每个作品卖不出去的作家背后又有100个找不到出版社的作者,每个找不到出版社的作者背后又有数百个抽屉里沉睡着刚动笔的手稿的写作爱好者。
为此,请你从现在起远离成功自助图书,它们百分之百是那些天生具有快乐倾向的人所著。书中从头到尾都是好点子,但读者不知道,这些点子对数十亿人都不管用——因为倒霉蛋是不写成功自助图书的。
为什么会有这种荒谬行为呢?因为人类想努力表现得坚韧,坚韧是我们发出的可信信号。我们害怕矛盾。如果我们决定中断一个项目,我们就在制造矛盾:承认从前的想法与今天不同。继续执行一个无意义的项目是在推迟这一疼痛认识。那样我们就显得更坚韧。
有许多好理由支持你继续投资下去,但如果你只是因为舍不得已经作出的投资而决定继续做某件事,这就不是一个好理由了。理性的决定意味着忽视已经投入的成本。你已经投资了什么并不重要,唯一重要的是现在的形势及你对未来的评估。
因为我们的大脑更容易接受壮观、华丽或大声的东西。我们的大脑是剧本式思维的,而不是量化思维的。
如果有人说:“在好转之前会先恶化”,你脑子里就应该敲响警钟。不过请小心:确实有那样的情形,先是再次下滑然后回升。事业的转换可能会耗费时间,会造成停发工资。一个企业的重组也需要一定的时间。但所有这些情况,人们很快就能看出措施是否有效。里程碑是明确的,是可以检测的。请你望着里程碑,而不是望着天空。
讲述一则故事的广告,比理性地罗列产品优点的广告效果更好。事实上,产品的故事只是附带物,可我们的大脑不是这样运转的。它要听故事。谷歌在2010年美国“超级碗”节目中插播的广告出色地证明了这一点
结论:从自传到世界大事——我们将一切炮制成有“意义”的故事。我们这样做是在扭曲真相——这会影响我们决定的质量。应对方法:请你将这些故事拆解开来。请你问问自己:这些故事想隐藏什么?训练方法:请你设法用无关联的眼光看看自己的生平,你会吃惊的。
事后诸葛亮偏误绝对是最顽固的思维错误之一,可以恰如其分地称为“我早知道现象”,即事后回顾时一切都显得是可以理解的、不可避免的。
查理·芒格的合作伙伴沃伦·巴菲特使用了一个美妙的概念:“能力范围”。在这个范围之内的,人们都像专家一样精通;在这个范围之外的,就不懂或只懂一部分。巴菲特的生活信条是:“请认清你的能力范围,并待在里面。这个范围有多大,并不重要。重要的是知道这个范围的界线在哪里。”查理·芒格重复说:“你必须找出自己的才能在哪里。我几乎可以向你保证,如果你必须在你的能力范围之外碰运气,你的职业生涯将会非常糟糕。
结论:请你不要信任司机的知识。请你不要将公司新闻发言人、爱出风头的人、新闻播音员、唠叨鬼、花言巧语者、爱说闲话的人与一个真正有知识的人搞混。你怎么能区分出来呢?这里有个明确的信号。真正有知识的人知道他们知道什么,也知道他们不知道什么。这类人一旦来到他的“能力范围”之外,他要么什么也不说,要么就说“我不知道”。他这么说时不会觉得难为情,甚至还会带着一定的骄傲。而从“司机们”那儿,你别的什么话都能听到,就是听不到这一句。
在赌场里,当人们想要一个大数字时,大多数人会尽可能使劲地掷色子;当人们希望得到一个小数字时,他们会尽可能掷得温柔。这自然与球迷们的手势和脚部动作一样没有意义。球迷们那么做,好像他们真能干预比赛似的。许多人都存有这样的幻想:他们想靠传播正能量影响世界。 控制错觉是指:相信我们能够控制或影响某种我们客观上无法控制或影响的东西的倾向。
在曼哈顿横穿街道时,人们会按一个红绿灯按钮。事实上他们按的是个不起作用的按钮。那为什么还要有这个按钮呢?就是为了让行人们相信,他们能影响信号控制器。事实证明,这样他们就能更好地忍受在红绿灯前的等待。许多电梯里的“开门、关门”按钮也是这样的,它们与电梯控制器其实并不相连。科学里称它们为“安慰按钮”。还有大办公室里的空调温度调节开关:有人觉得太热,另一些人觉得太冷。 聪明的工程师会利用控制错觉,在每一层楼都安装一个假的温度调节按钮。这样一来,投诉的数量明显减少了。
禀赋效应。我们感觉我们拥有的东西比我们没有拥有的更有价值。换句话说:当我们出售某物时,我们要求的钱多于我们自己愿意为它支付的钱。
请不要死抱着某种东西不放,请将你拥有的视作“宇宙”临时留给你的某种东西。要知道你拥有的一切随时又会被拿走。
如果你是一个智囊团的成员,无论何时,你都要讲出你的看法——哪怕这看法不是很中听。你要仔细考虑没有讲出的意见,必要时要甘冒被隔离在温暖团体之外的风险。如果你领导着一支团队,请你指定某人唱反调。他将不是团队里最受欢迎的人,但也许是最重要的人。
:我们是对一件事的预期强度做出反应(累计奖金的多少及电压的强度),而不是对它的概率。换个说法:我们缺少对概率的直觉理解。
请你告别零风险的想象,学会怀着“没有什么是安全的”想法生活——无论是你的积蓄、你的健康、你的婚姻、你的友谊、你的敌人,还是你的土地。请你满足于至少有东西让你保持相对稳定并体验自身的快乐。研究表明,无论是中了百万彩票还是半身瘫痪都不会长期改变你的满意程度。不管发生什么事,快乐的人照样快乐,不快乐的人依旧不快乐。更多内容请见享乐适应症那一章。
我们对稀少性的典型反应是丧失清晰思考的能力。因此请你仅按价格和作用判断一样东西。你不要在乎它是否稀少,是否有哪位“伦敦来的医生”也想要它。
人们相信命运具有一种平衡力量。这就是常说的赌徒谬误,但独立事件不存在平衡的力量。一只球可以持续落在黑色上,无论之前它已经落了多少次。一位朋友不厌其烦地在表格里填入彩票数字,他总是在填得最少的数字上打叉。但他的整个工作其实都是瞎子点灯白费蜡——这就是赌徒谬误。
人们害怕失去某种东西的想法要比获得某种同等价值的东西的想法强烈。
我们无法改变:恶比善更有影响力。我们对不利东西的反应要比对有利东西的反应敏感。走在大街上,一张凶恶的脸要比一张友善的脸更容易引起我们注意。恶行要比善行更久地留存在我们的记忆里。当然也有例外:在事关我们自己的时候。
除了心理学家,这个结果没让任何人感到意外。科学界称这一效应为社会性懈怠。它之所以会出现,是因为在团队中个人的效率无法直接看到,而是与团队融合在一起的。划桨手身上存在社会性懈怠,而接力赛运动员身上却没有,因为接力赛时每个人的贡献是显而易见的。社会性懈怠是一种理性行为:假如使出一半力就行,又不会引起注意,为什么要使出全力呢?一句话,社会性懈怠是一种我们让自己亏欠所有人的欺骗形式。这一欺骗大多不是故意的,而是不知不觉地发生的——就像马拉车一样。
我们很容易就能理解线性增长,但我们对指数(或按百分比计算的)增长没有感觉。为什么?因为过去的进化没有让我们为此作好准备。我们祖先的经验大多是线性的。谁花费双倍的时间采摘,谁就会带回家双倍的莓果;谁同时将两只猛犸而不是一只驱逐到地渊上方,谁有肉吃的时间就会是双倍。石器时代几乎没有人遇到过指数增长的例子,但今天不同。
结论:风险从来不是一眼就能看到的。因此,请你时刻考虑你有什么样的替代途径。比起你通过无惊险的平凡途径(比如从事律师、牙医、滑雪教练、飞行员或企业顾问的辛苦工作)获得的成功,别拿通过冒险的替代途径获得的成功太当真。蒙田怎么说来着:“我的生命充满不幸——这些不幸大多没有发生
不明情形下我们会产生要做点什么的冲动,随便什么——不管它有没有帮助。之后我们会感觉好受些,虽然其实什么也没有好转——事实甚至往往正好相反。因此,如果情况不明,请你不要采取任何行动,直到你能更好地分析形势。你要克制自己。“人类的全部不幸就是他们不能安静地待在他们的房间里。”帕斯卡尔就曾经这么写道,在他的书房里。
事业上迈进了一步的人在平均3个月后的幸福感又与先前一样了。就连那些非要驾驶最新款保时捷的人也一样。科学里称这一效应为享乐适应症: 我们工作、升迁,给自己购买更多更漂亮的东西,但我们不会
(1)请你避免很长时间也不会习惯的负面效应,例如往返交通、噪音、慢性疲累等;(2)请你对物质的东西只期待短期效果,例如汽车、房屋、分红、中彩票、得金奖等;(3)持续的正面效应主要与你如何利用你的时间有关。你要设法让自己得到尽可能多的自由时间和自主权。请你做你最爱做的事情——哪怕你要付出部分收入。请你为友谊投资。对于女人,隆胸具有长期的幸福效应;对于男人,则是升职——不过,只有当男人不与此同时更换对比群体时才会感到幸福。因此,如果你在升为首席执行官之后只跟其他的首席执行官们交谈,幸福感就会消失。
我们从中可以学到什么?没有谁讲得比马克·吐温更贴切了:“我们应该注意,一个经历里隐藏着多少智慧,我们就只吸取多少——不要多;好让我们不像坐过热灶台的猫一样。被烫过的猫永远不会再坐到热灶台上去——这是对的;但它也永远不会再坐到冷灶台上去了。”
在群体里容易按照他人的想法生活,在孤独中容易按照自己的想法生活。但值得记住的只是那些在群体中保持独立的人。
==========
>> Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series) (Brett Slatkin)
To convert Unicode characters to binary data, you must use the encode method. To convert binary data to Unicode characters, you must use the decode method.
In Python 3, bytes contains sequences of 8-bit values, str contains sequences of Unicode characters. bytes and str instances can’t be used together with operators (like > or +).
In Python 2, str contains sequences of 8-bit values, unicode contains sequences of Unicode characters. str and unicode can be used together with operators if the str only contains 7-bit ASCII characters. Use helper functions to ensure that the inputs you operate on are the type of character sequence you expect (8-bit values, UTF-8 encoded characters, Unicode characters, etc.). If you want to read or write binary data to/from a file, always open the file using a binary mode (like 'rb' or 'wb').
==========
>> So Good They Can't Ignore You: Why Skills Trump Passion in the Quest for Work You Love (Cal Newport)
I disagree. The more I studied the issue, the more I noticed that the passion hypothesis convinces people that somewhere there’s a magic “right” job waiting for them, and that if they find it, they’ll immediately recognize that this is the work they were meant to do . The problem, of course, is when they fail to find this certainty, bad things follow, such as chronic job-hopping and crippling self-doubt.
Observing a few instances of a strategy working does not make it universally effective.
for most people , “follow your passion” is bad advice.
craftsman mindset is the foundation for creating work you love.
Whereas the craftsman mindset focuses on what you can offer the world, the passion mindset focuses instead on what the world can offer you . This mindset is how most people approach their working lives.
No one owes you a great career, it argues; you need to earn it—and the process won’t be easy.
“The harder I work,
“The harder I work, the more relaxed I can play, and the better it sounds.”
“The harder I work, the more relaxed I can play, and the better it sounds.”
“It’s a constant learning process,”
“Money is a neutral indicator of value. By aiming to make money, you’re aiming to be valuable.”
When deciding whether to follow an appealing pursuit that will introduce more control into your work life, seek evidence of whether people are willing to pay for it. If you find this evidence, continue. If not, move on.
“Do what people are willing to pay for.”
==========
>> 铃木大拙说禅 ([日] 铃木大拙)
这是禅的锻炼方法的一个古怪的地方。要想知道真理是什么,就要亲身去体验,
生命本身是极其单纯的。如果用智力去测量生命,那么,在分析的目光中,它将以无与伦比的错综复杂映现出来。即使使用了支配科学的所有手段,现在也仍然无法测知生命的神秘
十年画竹,此身化为竹,而后画竹,皆忘竹,即得其妙,神动天随。
而禅要诉诸行动,最有效的行动,就是一旦下了决心绝不回头地前进,在这一点上,禅实在是武士的宗教
==========
>> morderncpp
Discovering Modern C++ by Peter Gottschling.
==========
>> 这就是OKR:让谷歌、亚马逊实现爆炸性增长的工作法 (约翰·杜尔)
道理,也就是我的口头禅:想
想法很容易,执行最重要。
==========
>> 王阳明大传:知行合一的心学智慧(全新修订版) (冈田武彦)
。 胡居仁虽然激烈抨击异端学说和陆学,但是从他把“居敬”当作治学根本这一点可以看出,他不知不觉中也受到了各种学说包括陆学的影响。 到明朝中叶,又出现了一位大儒——罗整庵 (18) (罗钦顺)。他曾和王阳明论过道(在后文中,我将会对他的学问以及论道的详细内容予以介绍)。 若将王阳明视作明学的代表人物,那么明学的始祖就是吴与弼,而不是薛瑄。吴与弼虽然信奉朱子学,但他受陆九渊心学的影响也非常深,所以说他是明学的始祖。
==========
>> Brian_Kernighan_-_UNIX__A_History_and_a_Memoir-Kindle_Direct_Publishing_(2019)
The purpose of computing is insight, not numbers
==========
>> 你想活出怎样的人生 (吉野源三郎)
传达出一个讯息,那就是无论处在多么艰困的时代或是残酷的时代,都要活得像个人”
==========
>> 重新定义公司:谷歌是如何运营的 (奇点系列) (埃里克•施密特;乔纳森•罗森伯格)
你的头衔可以让你成为管理者,但让你成为领导者的,是你的员工。
那些无论你是否批准都按自己的想法做事的人,才值得你投资。你会发现,这样的人往往会成为企业最为宝贵的创意精英。
。第一印象是双向的,你在审视别人,别人也在审视你
==========
>> 重新定义团队:谷歌如何工作 ((美)博克)
调查显示高分经理具备八种低分经理所不具备的共性: 8个氧气项目特性 1. 做一名好的导师。 2. 给团队授权,不随便插手下属工作。 3. 表达出对团队成员的成功和个人幸福的兴趣和关心。 4. 高效/结果导向型。 5. 善于沟通——聆听和分享信息。 6. 在职业发展方面助力团队。 7. 对团队有清晰的愿景和战略。 8. 具备重要的技术技能,可为团队提供建议。
==========
>> The Talent Code (Daniel Coyle)
“All skills, all language, all music, all movements, are made of living circuits, and all circuits grow according to certain rules.”
The trick is to choose a goal just beyond your present abilities; to target the struggle. Thrashing blindly doesn't help. Reaching does. “It's all about finding the sweet spot,” Bjork said. “There's an optimal gap between what you know and what you're trying to do. When
The trick is to choose a goal just beyond your present abilities; to target the struggle. Thrashing blindly doesn't help. Reaching does. “It's all about finding the sweet spot,” Bjork said. “There's an optimal gap between what you know and what you're trying to do. When you find that sweet spot, learning takes off.”*3
The truth is, practice makes myelin, and myelin makes perfect. And myelin operates by a few fundamental principles.
Skill is insulation that wraps neural circuits and grows according to certain signals.
“If people knew how hard I had to work to gain my mastery,” Michelangelo later said, “it would not seem so wonderful at all.”
As football coach Tom Martinez likes to say, “It's not how fast you can do it. It's how slow you can do it correctly.”
Pick a target. Reach for it. Evaluate the gap between the target and the reach.
Pick a target. Reach for it. Evaluate the gap between the target and the reach. Return to step one.
strut,” Thomas said. “Then after a while they aren't strutting
those people over there are doing something terrifically worthwhile. Each signal, in short, is about future belonging. Future belonging is a primal cue: a simple, direct signal that activates our built-in motivational triggers, funneling our energy and attention toward a goal. The idea makes intuitive sense—after all, we've all felt motivated by the desire to connect ourselves to high-achieving groups. What's interesting, however, is just how powerful and unconscious those triggers can be.
“Here's the deal. You've got to give kids credit at a younger age for feeling stuff more acutely. When you say something to a kid, you've got to know what you're saying to them. The stuff you say to a kid starting out—you got to be supercareful, unowaime? What skill-building really is, is confidence-building. First they got to earn it, then they got it. And once it gets lit, it stays lit pretty good.”
Esquith—“Work Hard, Be Nice”—and
Wooden may not have known about myelin, but like all master coaches, he had a deep understanding of how it worked. He taught in chunks, using what he called the “whole-part method”—he would teach players an entire move, then break it down to work on its elemental actions. He formulated laws of learning (which might be retitled laws of myelin): explanation, demonstration, imitation, correction, and repetition. “Don't look for the big, quick improvement. Seek the small improvement one day at a time. That's the only way it happens—and when it happens, it lasts,” he wrote in The Wisdom of Wooden. “The importance of repetition until automaticity cannot be overstated,” he said in You Haven't Taught Until They Have Learned, authored by Gallimore and former Wooden player Swen Nater. “Repetition is the key to learning.”
If you spend years and years trying hard to do something, you'd better get better at it. How dumb would I have to be if I didn't?”
“The way I look at it, everybody's life is a bowl of whipped cream and shit, and my job is to even things out,” he said. “If a kid's got a lot of shit in his life, I'm going to stir in some whipped cream. If a kid's life is pure whipped cream, then I'm going to stir in some shit.”
kaizen, which is Japanese for “continuous improvement” and which just as easily could be called corporate deep practice. Kaizen is the process of finding and improving small problems. Each employee, from the janitor on up, has authority to halt the production line if they spot a problem. (Each factory has pull cords on the factory floor, called andons.) The vast majority of improvements come from employees, and the vast majority of those changes are small: a one-foot shift in the location of a parts bin, for instance. But they add up. It's estimated that each year Toyota implements around a thousand tiny fixes in each of its assembly lines, about a million tiny fixes overall.
==========
>> eff-cpp
Item 2: Prefer consts, enums, and inlines to #defines
Declaring something const helps compilers detect usage errors. const can be applied to objects at any scope, to function parameters and return types, and to member functions as a whole. ✦ Compilers enforce bitwise constness, but you should program using logical constness. ✦ When const and non-const member functions have essentially identical implementations, code duplication can be avoided by having the non-const version call the const version.
If a class does not contain virtual functions, that often indicates it is not meant to be used as a base class. When a class is not intended to be a base class, making the destructor
Occasionally it can be convenient to give a class a pure virtual destructor. Recall that pure virtual functions result in abstract classes — classes that can’t be instantiated (i.e., you can’t create objects of that type
Destructors should never emit exceptions. If functions called in a destructor may throw, the destructor should catch any exceptions, then swallow them or terminate the program. ✦ If class clients need to be able to react to exceptions thrown during an operation, the class should provide a regular (i.e., non-destructor) function that performs the operation.
During base class construction, virtual functions never go down into derived classes. Instead, the object behaves as if it were of the base type. Informally speaking, during base class construction, virtual functions aren’t.
Never return a pointer or reference to a local stack object, a reference to a heap-allocated object, or a pointer or reference to a local static object if there is a chance that more than one such object will be needed. (Item 4 provides an example of a design where returning a reference to a local static is reasonable, at least in single-threaded environments.)
==========
>> Common Lisp Recipes_A Problem-Solution Approach-Apress(2015)
All external symbols of the used package become inherited symbols of the package using this package.
==========
>> 少有人走的路(1-3套装升级版) (M·斯科特·派克)
自律有四个原则:推迟满足感、承担责任、忠于事实、保持平衡。
指环王》的作者托尔金说:“掌握世界所有事情的兴衰,并不是你我分内的事情,但是从整理内心开始,连根拔起一切恶念,则是我们义不容辞的责任。”
圣人喜欢改变自己,大恶之人喜欢改变别人
==========
>> 人文阅读与收藏·良友文学丛书:从文自传 (沈从文, ePUBw.COM)
还有一本值六块钱的云麾碑,值五块钱的圣教序,值两块钱的兰
还有一本值六块钱的云麾碑,值五块钱的圣教序,值两块钱的兰亭序,值五块钱的虞世南夫子庙堂碑。还有一部李义山诗集。
“好坏我总有一天得死去,多见几个新鲜日头,多过几个新鲜的桥,在一些险危中使尽最后一点气力,咽下最后一口气,比较在这儿病死或无意中为流弹打死,似乎应当有意思些。”到后我便这样决定了:“把自己生命押上去,赌一注看看,看看我自己去支配一下自己,比让命运来处置得更合理一点呢还是更糟糕一点?若好,一切有办法,一切今天不能解决的明天可望解决,那我赢了;若不好,向一个陌生地方跑去,我终于有一时节肚子瘪瘪的倒在人家空房下阴沟边,那我输了。”
==========
>> 张家旧事 (大家雅音) (ePUBw.COM;张充和;叶稚珊)
梁园日暮乱飞鸦,极目萧条三两家。庭树不知人去尽,春来犹发旧时花。”
==========
>> 奈飞文化手册 (【美】帕蒂.麦考德(Patty McCord);范珂译)
管理最重要的工作是专注于建立伟大的团队。
只雇用、奖励 和容忍 完全成熟的 成年人
==========
>> Mickey Petersen-Mastering Emacs (2015)
You can view your current buffer’s syntax table by typing C-h s — it may take a while to load. In it you will see a human readable version of the characters and their assigned syntax class
C-M-f Move forward by s-expression C-M-b Move backward by s-expression
C-M-d Move down into a list C-M-u Move up out of a list
C-M-a Move to beginning of defun C-M-e Move to end of defun
==========
>> mastering-bitcoin-2nd
At its core, money sim‐ ply facilitates the exchange of value between people
A wallet is simply a collection of addresses and the keys that unlock the funds within
Only once it has been associ‐ ated with a transaction does it become part of the known addresses in the network
In summary, transactions move value from transaction inputs to transaction outputs. An input is a reference to a previous transaction’s output, showing where the value is coming from. A transaction output directs a specific value to a new owner’s bitcoin address and can include a change output back to the original owner. Outputs from one transaction can be used as inputs in a new transaction, thus creating a chain of ownership as the value is moved from owner to owner
==========
>> 沈从文全传:沈从文的前半生+沈从文的后半生(增订版全二册) (张新颖)
我念到我自己所写的“萑苇是易折的,磐石是难动的”时候,我很悲哀。易折的萑苇,一生中,每当一次风吹过时,皆低下头去,然而风过后,便又重新立起了。只有你使它永远折伏,永远不再作立起的希望。
==========
>> 1948:天地玄黄 (钱理群作品精编) (钱理群)
我曾经说过,我这个人只有一个优点,就是勤奋,整天关在书房里写东西,写作的速度超过了读者阅读的速度,以至于我都不好意思给朋友赠书,怕他们没有时间看。在这个意义上,我是为自己写作的,我整个的生命都融入其中,并因此收获丰富的痛苦与欢乐。
==========
>> 林达作品集 (林达)
1963年,他的世界史专著《西方的崛起》(The Rise of the West: A History of the Human Community)为他奠定了在史学界的地位,这部一卷本的世界史赢得了国家书籍奖。虽然书名是“西方的崛起”,他的观点却是反对西方中心论的。从远古说起,东西南北来回穿梭,几大文明面面俱到,特别注重文明潮流之间的互相影响。
美国南北战争时期的罗伯特·李将军曾经说过,人的短暂一生里,所见到的大多是悲惨和苦难,是卑劣和失望,为了对人性、对人类的前途保持信心,所以必须读历史。
==========
>> 费马大定理:一个困惑了世间智者358年的谜 (西蒙•辛格)
代在他的《一个数学家的自白》(A Mathematician's Apology)一书中说道:“任
==========
>> 异类:不一样的成功启示录(新版) (马尔科姆•格拉德威尔)
:如果你努力工作,维护自己的利益,运用你的智慧和想象力,你就能在现实世界中实现自己的愿望。
==========
>> 基因传 (悉达多·穆克吉)
一个微不足道的想法,就足以占据某个人的一生。”
==========
>> 阿黑小史 (沈从文)
话,对人对事又不会出主意,因此做参谋顾问机会也不多。由于还读过几本书,知道点诗词歌赋,面前一切的刺激和生活教育,不甘随波逐流就得讲求自救,于是近于自卫,首先学坚持自己,来抵抗生活行为上的同化和腐蚀作用。反映到行为中,即尽机会可能顽强读书,扩大知识领域。凑巧当时恰有个亲戚卸任县长后,住在对河石屋洞古庙里作客,有半房子新旧书籍,由《昭明文选》到新小说,什么都有。特别是林[3]译小说,就有一整书箱。狄更司的小说,真给了我那时好大一份力量!
但这自然不是一件简单事情。到这个部队工作以前,我曾经有过一年多时间,在沅水流域好几个口岸各处飘流过,在小旅馆和机关作过打流食客,食住两无着落。好容易有了个比较固定的职业,要说不再干下去,另找出路,当然事不简单。我知道世界虽然尽够广大,到任何一处没有吃的就会饿死。我等待一个新的机会。生活教育虽相当沉重,但是却并不气馁,只有更加坚强。这里实在不是个能呆下去的地方,中国之大,一定还有别的什么地方,比这里生存得合理一些。孟子几句话给了我极大鼓舞,我并没有觉得有个什么天降大任待担当,只是天真烂漫的深深相信老话说的“天无绝人之路 ”,一个人存心要活得更正当结实有用一点,决不会轻易倒下去的。
我为人并不怎么聪敏,而且绝无什么天才,只是对学习有耐心和充满信心,深信只要不至于饿死,在任何肉体挫折和精神损害困难情形下,进行学习不会放松。而且无论学什么,一定要把它学懂,学通……于是在一场大病之后,居然有一天,就和这一切终于从此离开,进入北京城,在一个小客店旅客簿上写下姓名籍贯,并填上“求学”两个字,成为北京百万市民的一员,来接受更新的教育和考验了。
却综合给我建立了个比较单纯的人生观,对个人存在和工作意义,都有种较素朴理解。觉得个人实在渺小不足道,但是一个善于使用生命的人,境遇不论如何困难,生活不论如何不幸,却可望在全个人类向前发展进程中,发生一定良好作用。我从事写作,不是为准备做伟人英雄,甚至于也不准备做作家,只不过是尽一个“好公民”责任。既写了,就有责任克服一切困难,来把它作好。我不希望做空头作家,只盼望能有机会照着文学革命所提出的大目标,来终生从事这个工作。在万千人共同作成的总成绩上,增加一些作品,丰富一些作品的内容。要竞赛,对象应当是世界上已存在的最高纪录,不能超过也得比肩。不是和三五同行争上下,争出路,以及用作品以外方法走捷径争读者。这种四十年前的打算,目前
个人存在和工作意义,都有种较素朴理解。觉得个人实在渺小不足道,但是一个善于使用生命的人,境遇不论如何困难,生活不论如何不幸,却可望在全个人类向前发展进程中,发生一定良好作用。我从事写作,不是为准备做伟人英雄,甚至于也不准备做作家,只不过是尽一个“好公民”责任。既写了,就有责任克服一切困难,来把它作好。我不希望
个人存在和工作意义,都有种较素朴理解。觉得个人实在渺小不足道,但是一个善于使用生命的人,境遇不论如何困难,生活不论如何不幸,却可望在全个人类向前发展进程中,发生一定良好作用。我从事写作,不是为准备做伟人英雄,甚至于也不准备做作家,只不过是尽一个“好公民”责任。
==========
>> Blocks and Chains - Introduction to Bitcoin, Cryptocurrencies, and Their Consensus Mechanisms
This box is then placed on a geyser
With this separation into two main components, it is also possible to view such systems as distributed operating systems with applications running on top of them. In this analogy the consensus management component can be viewed as the operating system which provides services (e.g., syscalls) to userland applications, i.e., the digital asset management component
Addresses, transactions, and blocks are the three basic data structures used in Bitcoin
permissioned blockchain The central property of this type of blockchain is that the set of nodes, amongst which consensus over the state of the chain should be reached, is known. Vukolic et al. refers to this type as Byzantine Fault Tolerant (BFT) blockchains [147]. Further distinction can be made between permissioned blockchains and private blockchain regarding the composition and selection of the set of nodes. 5
==========
>> 汪曾祺经典文学系列三册套装:人间滋味+受戒+邂逅 (汪曾祺)
一个人要兴旺发达,得有那么一点精气神
==========
>> 简读中国史:世界史坐标下的中国 (张宏杰, ePUBw.COM)
仁宇在《赫逊河畔谈中国历史》中说:“春秋时代的车战,是一种贵族式的战争,有时彼此都以竞技的方式看待,布阵有一定的程序,交战也有公认的原则,也就是仍不离开‘礼’的约束。”
黄仁宇在《赫逊河畔谈中国历史》中说:“春秋时代的车战,是一种贵族式的战争,有时彼此都以竞技的方式看待,布阵有一定的程序,交战也有公认的原则,也就是仍不离开‘礼’的约束。”
所以中国从秦到清的历史,最主要的特点就是频繁地“改朝换代”。秦制的规律是,一个王朝建立之初,就像新手机开机,开始总会运行得比较顺畅。有一段政治清明期,甚至会出现盛世。然而几代之后,就会腐败混乱,官逼民反,各种危机爆发,导致大一统郡县制王朝经常出现系统崩溃,不得不重新启动。
==========
>> 人生海海(何必在意一时沉浮。浑身是“谜”的上校,带你解密人性的荒唐与高尚!离奇的故事包藏着令人叹息的人生况味。) (ePUBw.COM;麦家)
“人生海海总知道吧,就这意思。” 一个十七岁的乡下傻小子,付得出死的勇气,却拿不出活的底气——当时我连“人生海海”也不知什么意思。她扑哧一下笑了,告诉我这是一句闽南话,是形容人生复杂多变但又不止这意思,它的意思像大海一样宽广,但总的说是教人好好活而不是去死的意思。
==========
>> 改变世界的机器:精益生产之道 (【美】詹姆斯 P. 沃麦克, 【美】丹尼尔·鲁斯, 【英】丹尼尔·T.琼斯, ePUBw.COM)
真正的精益工厂有两个关键的组织特征:①它能够把最大量的工作任务和责任转移到在真正为汽车进行增值工作的生产线上的工人们身上;②有一个在处于适当位置的缺陷检测系统,一旦发现问题,它就能快速追査并找到其
真正的精益工厂有两个关键的组织特征:①它能够把最大量的工作任务和责任转移到在真正为汽车进行增值工作的生产线上的工人们身上;②有一个在处于适当位置的缺陷检测系统,一旦发现问题,它就能快速追査并找到其根源。
==========
>> Hackers & Painters (Paul Graham)
There was something else I wanted more: to be smart. Not simply to do well in school, though that counted for something, but to design beautiful rockets, or to write well, or to understand how to program computers. In general, to make great things.
I've read that this is why poor whites in the United States are the group most hostile to blacks.
nothing brings people closer than a common enemy.
In fact their primary purpose is to keep kids locked up in one place for a big chunk of the day so adults can get things done.
For a long time I felt bad about this, just as I once felt bad that I didn't hold my pencil the way they taught me to in elementary school. If I had only looked over at the other makers, the painters or the architects, I would have realized that there was a name for what I was doing: sketching.
As far as I can tell, the way they taught me to program in college was all wrong. You should figure out programs as you're writing them, just as writers and painters and architects do.
A programming language is for thinking of programs, not for expressing programs you've already thought of. It should be a pencil, not a pen.
This is not a problem for big companies, because they don't win by making great products. Big companies win by sucking less than other big companies.
I remember sitting back in the dentist's chair, waiting for the drill, and feeling like I was on vacation.
copying forces you to look closely at the way a painting is made.
How hard he worked on part of a painting didn't depend at all on how closely he expected anyone to look at it. He was like Michael Jordan. Relentless.
Argue with idiots, and you become an idiot.
I think so. I think a society in which people can do and say what they want will also tend to be one in which the most efficient solutions win, rather than those sponsored by the most influential people.
All you need to do is be part of a small group working on a hard problem.
If you're in a job that feels safe, you are not going to get rich, because if there is no danger there is almost certainly no leverage.
What this meant in practice was that we deliberately sought hard problems. If there were two features we could add to our software, both equally valuable in proportion to their difficulty, we'd always take the harder one.
A great deal has been written about the causes of the Industrial Revolution. But surely a necessary, if not sufficient, condition was that people who made fortunes be able to enjoy them in peace.11 One piece of evidence is what happened to countries
A great deal has been written about the causes of the Industrial Revolution. But surely a necessary, if not sufficient, condition was that people who made fortunes be able to enjoy them in peace.
If taste is just personal preference, then everyone's is already perfect: you like whatever you like, and that's it.
GOOD DESIGN IS SIMPLE. You hear this from math to painting.
In math it means that a shorter proof tends to be a better one. Where axioms are concerned, especially, less is more. It means much the same thing in programming.
GOOD DESIGN IS TIMELESS.
if you can imagine someone surpassing you, you should do it yourself.
GOOD DESIGN SOLVES THE RIGHT PROBLEM.
GOOD DESIGN IS HARD. If you look at the people who've done great work, one thing they all seem to have in common is that they worked very hard. If you're not working hard, you're probably wasting your time.
GOOD DESIGN IS REDESIGN.
The ambitious are not content to imitate.
And looking down on the user, however benevolently, always seems to corrupt the designer.
In software, my rule is: always have working code. If you're writing something you'll be able to test in an hour, you have the prospect of an immediate reward to motivate you. The same is true in the arts, and particularly in oil painting.
Design means making things for humans. But it's not just the user who's human. The designer is human too.
I found that I liked to program sitting in front of a computer, not a piece of paper. Worse still, instead of patiently writing out a complete program and assuring myself it was correct, I tended to just spew out code that was hopelessly broken, and gradually beat it into shape. Debugging, I was taught, was a kind of final pass where you caught typos and oversights. The way I worked, it seemed like programming consisted of debugging.
Everyone in the sciences secretly believes that mathematicians are smarter than they are. I think mathematicians also believe this.
You can't do anything really well unless you love it, and if you love to hack you'll inevitably be working on projects of your own.3
Being smart seems to make you unpopular.
"no art, however minor, demands less than total dedication if you want to excel in it."
Before you develop a conscience, torture is amusing.
I think this is the right model for collaboration in software too. Don't push it too far. When a piece of code is being hacked by three or four different people, no one of whom really owns it, it will end up being like a common-room. It will tend to feel bleak and abandoned, and accumulate cruft. The right way to collaborate, I think, is to divide projects into sharply defined modules, each with a definite owner, and with interfaces between them that are as carefully designed and, if possible, as articulated as programming languages.
What this meant in practice was that we deliberately sought hard problems. If there were two features we could add to our software, both equally valuable in proportion to their difficulty, we'd always take the harder one. Not just because it was more valuable, but because it was harder. We delighted in forcing bigger, slower competitors to follow us over difficult ground. Like guerillas, startups prefer the difficult terrain of the mountains, where the troops of the central government can't follow. I can remember times when we were just exhausted after wrestling all day with some horrible technical problem. And I'd be delighted, because something that was hard for us would be impossible for our competitors.
Start by picking a hard problem, and then at every decision point, take the harder choice.
But in technology, you cook one thing and that's what everyone eats. So any difference between what people want and what you deliver is multiplied. You please or annoy customers wholesale. The closer you can get to what they want, the more wealth you generate.
The recipe for great work is: very exacting taste, plus the ability to gratify it.
If you want to win in a software business, just take on the hardest problem you can find, use the most powerful language you can get, and wait for your competitors' pointy-haired bosses to revert to the mean.
In fact their primary purpose is to keep kids locked up in one place for a big chunk of the day so adults can get things done.
Great software, likewise, requires a fanatical devotion to beauty. If you look inside good software, you find that parts no one is ever supposed to see are beautiful too. When it comes to code I behave in a way that would make me eligible for prescription drugs if I approached everyday life the same way. It drives me crazy to see code that's badly indented, or that uses ugly variable names.
It's a good idea to save some easy tasks for moments when you would otherwise stall.
==========
>> 学箭悟禅录 (欧根•赫里格尔)
真正的艺术,”大师高声说道,“是没有目的、没有目标的!你越是一心想学会以射中靶子为目的的射箭,你就越射不好箭,靶子离你也会越远。你的拦路虎是你的主观意愿太强了。你以为不经过你自身做过的事是不会发生的
==========
>> gjm.lambook88 (1)
As we will see, the main difference between imperative programming languages, like Pascal, FORTRAN and COBOL, and functional programming languages, like SML and Miranda, lies in the rules governing the association of names and values. 1.3. Names and values in imperative and functional languages Traditional programming languages are based around the idea of a variable as a changeable association between a name and values. These languages are said to be imperative because they consist of sequences of commands: <command1> ; <command2> ; <command3> ; ... Typically, each command consists of an assignment which changes a variables’ value. This involves working out the value of an expression and associating the result with a name: <name> := <expression> In a program, each command’s expression may refer to other variables whose values may have been changed by preceding commands. This enables values to be passed from command to command. Functional languages are based on structured function calls. A functional program is an expression consisting of a function call which calls other functions in turn: <function1>(<function2>(<function3> ... ) ... )) Thus, each function receives values from and passes new values back to the calling function. This is known as function composition or nesting. In imperative languages, commands may change the value associated with a name by a previous command so each name may be and usually will be associated with different values while a program is running. In imperative languages, the same name may be associated with different values. In functional languages, names are only introduced as the formal parameters of functions and given values by function calls with actual parameters. Once a formal parameter is associated with an actual parameter value there is no way for it to be associated with a new value. There is no concept of a command which changes the value associated with a name through assignment. Thus, there is no concept of a command sequence or command repetition to enable successive changes to values associated with names. In functional languages, a name is only ever associated with one value
we will see, the main difference between imperative programming languages, like Pascal, FORTRAN and COBOL, and
As we will see, the main difference between imperative programming languages, like Pascal, FORTRAN and COBOL, and functional programming languages, like SML and Miranda, lies in the rules governing the association of names and values. 1.3. Names and values in imperative and functional languages Traditional programming languages are based around the idea of a variable as a changeable association between a name and values. These languages are said to be imperative because they consist of sequences of commands: <command1> ; <command2> ; <command3> ; ... Typically, each command consists of an assignment which changes a variables’ value. This involves working out the value of an expression and associating the result with a name: <name> := <expression> In a program, each command’s expression may refer to other variables whose values may have been changed by preceding commands. This enables values to be passed from command to command. Functional languages are based on structured function calls. A functional program is an expression consisting of a function call which calls other functions in turn: <function1>(<function2>(<function3> ... ) ... )) Thus, each function receives values from and passes new values back to the calling function. This is known as function composition or nesting. In imperative languages, commands may change the value associated with a name by a previous command so each name may be and usually will be associated with different values while a program is running. In imperative languages, the same name may be associated with different values. In functional languages, names are only introduced as the formal parameters of functions and given values by function calls with actual parameters. Once a formal parameter is associated with an actual parameter value there is no way for it to be associated with a new value. There is no concept of a command which changes the value associated with a name through assignment. Thus, there is no concept of a command sequence or command repetition to enable successive changes to values associated with names. In functional languages, a name is only ever associated with one value
==========
>> Serious Cryptography: A Practical Introduction to Modern Encryption (Aumasson, Jean-Philippe)
letters, it could be words, numbers, or ideograms
letters, it could be words, numbers, or ideograms
==========
>> eintr
a marker (a special object representing a buffer position).
Whenever you give an editing command to Emacs Lisp, such as the command to move the cursor or to scroll the screen, you are evaluating an expression, the first element of which is a function. This is how Emacs works.
Incidentally, if you are in the *scratch* buffer and want the value returned by an expression to appear in the *scratch* buffer itself rather than in the echo area, type C-u C-x C-e instead of C-x C-e. This causes the value returned to appear after the expression. The buffer will look like this: (buffer-name)"*scratch*"
Incidentally, while you can type a number or symbol into a program, you cannot do that with the printed representation of a buffer: the only way to get a buffer itself is with a function such as current-buffer. A related function is other-buffer. This returns the most recently selected buffer other than the one you are in currently
set-buffer, on the other hand, does only one thing: it switches the attention of the computer program to a different buffer
The function buffer-size tells you the size of the current buffer; that is, the function returns a count of the number of characters in the buffer. (buffer-size)
You can see the character count for point in this buffer by evaluating the following expression in the usual way
Interestingly, when you call an interactive function interactively, the value returned is not automatically displayed in the echo area. This is because you often call an interactive function for its side effects, such as moving forward by a word or line, and not for the value returned. If the returned value were displayed in the echo area each time you typed a key, it
save-excursion function is very common. It saves the location of point and mark, executes the body of the function, and then restores point and mark to their previous positions if their locations were changed
The function point returns the current position of the cursor as a number.
The mark is another position in the buffer; its value can be set with a command such as C-SPC (set-mark-command). If a mark has been set, you can use the command C-x C-x (exchange-point-and-mark) to cause the cursor to jump to the mark and set the mark to be the previous position of point. In addition, if you set another mark, the position of the previous mark is saved in the mark ring. Many mark positions can be saved this way. You can jump the cursor to a saved mark by typing C-u C-SPC one or more times.
The part of the buffer between point and mark is called the region. Numerous commands work on the region, including center-region, count-lines-region, kill-region, and print-region
the save-excursion would put point back to where it was before, after the expressions in the body of the function were evaluated.
Also, describe-function will tell you the location of the function definition
switch to that directory in Emacs using M-x cd command, or list the directory with C-x d (dired)
“The C-h p command lets you search the standard Emacs Lisp libraries by topic keywords.”
Here is the complete text of the shortened version of the function: (defun simplified-beginning-of-buffer () "Move point to the beginning of the buffer; leave mark at previous position." (interactive) (push-mark) (goto-char (point-min)))
Consequently, you can, if you wish, go back to where you were originally by typing C-x C-x.
==========
>> 蒋勋说文学:从《诗经》到陶渊明 (中国文学之美系列) (蒋勋)
我建议大家去看伊朗导演阿巴斯的电影,他有一部电影叫《生生长流》,还有一部非常有名的《何处是我朋友的家》。
印度也有一位大导演雷伊,已经过世了,他拍过一部讲印度农民生活的电影叫《大河之歌》。他和阿巴斯的电影至今还在被全世界讨论,是因为农业文明还没有
在他的电影《悲情城市》里,女主角辛树芬走向九份的山路,两边是秋天里刚刚发白的芒草,画外音叙述了她的幸福感。那大概是侯孝贤电影里最美的片断,完全像《诗经》。侯孝贤电影中的人物都不是英雄,全是些微不足道的小人物,比如小毕,比如《冬冬的假期》中的角色,又比如《风柜来的人》里那个早年打棒球,后来头被棒球打到,从此就坐在澎湖海边看晚霞的中年男子。这类小人物是属于农业社会的,具有悠远、朴素的情感。一直到他后期的电影《南国再见,南国》里面,半黑道的小混混儿骑着摩托车在阿里山的山路上行走,也非常像《诗经》。
大家去看他的《早安》、《晚春》和《东京物语》,可以看到东方农业美学所产生的那种诗一般的情感,非常稳定。这就
==========
>> C .Crash.Course.2019.9
pointer type. References are just pointers with extra safety precautions and a sprinkle of syntactic sugar
References are just pointers with extra safety precautions and a sprinkle of syntactic sugar
In large projects, it’s incredibly helpful for separating code in different libraries
User-defined types are the basic building blocks of C++ applications. Think of them as struct objects that can also have functions
An object’s constructor is called just after its storage duration begins, and the destructor is called just before its storage duration ends. Both the constructor and destructor are functions with no return type and the same name as the enclosing class. To declare a destructor, add a ~ to the beginning of the class name
This is the resource allocation is initialization (RAII) concept (sometimes also called constructor acquires, destructor releases
Sometimes you need the flexibility of dynamic memory allocation, but you still want to lean on the object life cycle of C++ to ensure that you don’t leak memory or accidentally “use after free. ” This is exactly the role of smart pointers, which manage the life cycle of dynamic objects through an ownership model
Rather than copying the object, you use the move semantics of C++ to transfer ownership from one unique pointer to another
The move function tells the compiler that you want to make the transfer. After
The move function tells the compiler that you want to make the transfer
The options for initializing objects bewilder even experienced C++ programmers. Here’s a general rule to make initialization simple: use braced initializers everywhere. Braced initializers work as intended almost everywhere, and they cause the fewest surprises. For this reason, braced initialization is also called uniform initialization. The remainder of the book follows this guidance.
The keyword const (short for “constant”) roughly means “I promise not to modify.
All the subclasses in std::exception can be partitioned into three groups: logic errors, runtime errors, and language support errors.
If you throw an exception in a destructor, you are juggling with chainsaws. Such an exception absolutely must be caught within the destructor
C++ offers two polymorphic approaches.Compile-time polymorphic code incorporates polymorphic types you can determine at compile time. The other approach is runtime polymorphism, which instead incorporates types determined at runtime
If you want to require a derived class to implement the method, you can append the =0 suffix to a method definition. You call methods with both the virtual keyword and =0 suffix pure virtual methods. You can’t instanti ate a class containing any pure virtual methods
coexistence of the typename and class keywords is unfortunate and confusing. They mean the same thing.(They’re both supported for historical reasons. ) This chapter always uses typename
The coexistence of the typename and class keywords is unfortunate and confusing. They mean the same thing.(They’re both supported for historical reasons. ) This chapter always uses typename
named-conversion<desired-type>(object-to-cast
In other words, whenever you use a concept as part of a function definition, that function becomes a template. The template function
In other words, whenever you use a concept as part of a function definition, that function becomes a template
If you’re in such a situation, refer to Chapter 9, “Names in Templates,” in C++ Templates: The Complete Guide by David Vandevoorde et al. and to [temp.res]
which is why Chapter 2 recommends using the braced initializer as much as possible
You can extend the reach of the compiler by using the expression constexpr. Whenever all the information required to compute an expression is present at compile time, the compiler is compelled to do so if that expression is marked constexpr. This simple commitment can enable a surprisingly large impact on code readability and runtime performance
Because x is assigned u but never used before getting reassigned v, it’s called a dead store and is a straightforward candidate for getting optimized away. There’s a similar story where x is used to set the value of y twice without any intervening instructions
The final modifier indicates that a method cannot be overridden by a child class. It’s effectively the opposite of virtual.
Neither final nor override is technically a language keyword; they are identifiers. Unlike keywords, identifiers gain special meaning only when used in a specific context. This means you can use final and override as symbol names elsewhere in your program, thereby leading to the insanity of constructions like virtual void final() override. Try not to do this
Using a function can incur runtime overhead. For technical reasons, function might need to make a dynamic allocation to store the callable object. The compiler also has difficulty optimizing away function invocations, so you’ll often incur an indirect function call. Indirect function calls require additional pointer dereferences
pointer, you can rest assured that the pointed-to object is alive and that the pointed-to object won’t leak
pointer, you can rest assured that
Put another way, when you use a smart pointer, you can rest assured that the pointed-to object is alive and that the pointed-to object won’t leak. The smart pointer manages the object it owns, so you can’t forget to destroy it thanks to RAII
==========
>> The Road Less Traveled (M. Scott Peck)
Yet it is in this whole process of meeting and solving problems that life has its meaning. Problems are the cutting edge that distinguishes between success and failure.
“Those things that hurt, instruct.”
pain of problems constructively that I call discipline? There are four: delaying of gratification, acceptance of responsibility, dedication to truth, and balancing.
Problems do not go away. They must be worked through or else they remain, forever a barrier to the growth and development of the spirit.
It is in such ways that character-disordered parents almost invariably produce character-disordered or neurotic children. It is the parents themselves who visit their sins upon their children.
By casting away their responsibility they may feel comfortable with themselves, but they have ceased to solve the problems of living, have ceased to grow spiritually, and have become dead weight for society.
“If you are not part of the solution, then you are part of the problem.”
==========
>> The 4-Hour Body: An Uncommon Guide to Rapid Fat-Loss, Incredible Sex, and Becoming Superhuman (Timothy Ferriss)
To do the impossible (sail around the world, break the four-minute mile, reach the moon), you need to ignore the popular.
The decent method you follow is better than the perfect method you quit.
Recreation is for fun. Exercise is for producing changes. Don’t confuse the two.
==========
>> 寄意故乡 (汪曾祺)
儿女是属于他们自己的。他们的现在,和他们的未来,都应由他们自己来设计。一个想用自己理想的模式塑造自己的孩子的父亲是愚蠢的,而且,可恶!另外作为一个父亲,应该尽量保持一点童心
==========
>> 周鸿祎自述:我的互联网方法论 (周鸿祎)
我建议这个企业能踏踏实实地想一想: 我要做的东西或者我已经做的东西,用户是什么人?用户在用我的产品的时候,会遇到什么问题?有什么问题是竞争对手没有解决好的?那可能对我来说就是一个机会。有些什么问题我做得不好,但我还可以做得更好?这代表着其中有创新的机会。
什么是商业模式?其实,商业模式不是赚钱模式。它至少包含了四方面内容:产品模式、用户模式、推广模式,最后才是收入模式,也就是怎么去赚钱。一句话,商业模式就是你能提供什么样的产品,给什么样的用户创造什么样的价值,在创造用户价值的过程中,用什么样的方法获得商业价值。
在中国,永远不要相信“酒香不怕巷子深”。如果只靠自然的口碑,即使产品做得再好,还没接触到大多数目标用户,就可能先被互联网巨头盯上了。人家一模仿一捆绑,你多年的心血就算白费了。然而,很多
。相反,很多技术出身的人过于迷信技术,变成了为了技术而技术。技术本来是手段,结果成了目的。为了技术而技术,其结果就是忽略了消费者。所以,我也经常告诫技术人员,包括我自己,做好产品服务消费者才是根本,用谁的技术、用什么技术都是手段而已。
==========
>> Zen and the Art of Motorcycle Maintenance (Robert M. Pirsig)
The hereness and nowness of things is something they know all about. It’s the others, the ones who moved to the cities years ago and their lost offspring, who have all but forgotten it. The discovery was a real find.
She wasn’t ignoring that faucet at all! She was suppressing anger at that faucet and that goddamned dripping faucet was just about killing her!
Of course she’s not going to get mad at that faucet, I thought. You always suppress momentary anger at something you deeply and permanently hate.
That attitude is not hard to come to. You go through a heavy industrial area of a large city and there it all is, the technology. In front of it are high barbed-wire fences, locked gates, signs saying No TRESPASSING, and beyond, through sooty air, you see ugly strange shapes of metal and brick whose purpose is unknown, and whose masters you will never see. What it’s for you don’t know, and why it’s there, there’s no one to tell, and so all you can feel is alienated, estranged, as though you didn’t belong there. Who owns and understands this doesn’t want you around. All this technology has somehow made you a stranger in your own land. Its very shape and appearance and mysteriousness say, “Get out.”
The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower.
physical discomfort is important only when the mood is wrong.
I said before, on a cycle you’re in the scene, not just watching it, and storms are definitely part of it.
The radio was a clue. You can’t really think hard about what you’re doing and listen to the radio at the same time.
Caring about what you are doing is considered either unimportant or taken for granted.
When you want to hurry something, that means you no longer care about it and want to get on to other things. I just want to get at it slowly, but carefully and thoroughly, with the same attitude I remember was present just before I found that sheared pin. It was that attitude that found it, nothing else.
ghosts. Laws of logic, of mathematics are also human inventions, like ghosts. The whole blessed thing is a human invention, including the idea that it isn’t a human invention. The world has no existence whatsoever outside the human imagination. It’s all a ghost, and in antiquity was so recognized as a ghost, the whole blessed world we live in. It’s run by ghosts.
Ach, du lieber!
You just sit and stare and think, and search randomly for new information, and go away and come back again, and after a while the unseen factors start to emerge.
It was an intrusion on his reality.
What you’ve got here, really, are two realities, one of immediate artistic appearance and one of underlying scientific explanation, and they don’t match and they don’t fit and they don’t really have much of anything to do with one another. That’s quite a situation. You might say there’s a little problem here.
It goes over and over again through my thoughts…mein Kind—my child. There it is in another language. Mein Kinder…“Wer reitet so spät durch Nacht und Wind? Es ist der Vater mit seinem Kind.”
The purpose is to bury him—forever.
A classical understanding sees the world primarily as underlying form itself. A romantic understanding sees it primarily in terms of immediate appearance.
Although motorcycle riding is romantic, motorcycle maintenance is purely classic.
bring order out of chaos and make the unknown known.
Its value is measured in terms of the skill with which this control is maintained.
From all this awareness we must select, and what we select and call consciousness is never the same as the awareness because the process of selection mutates it.
We take a handful of sand from the endless landscape of awareness around us and call that handful of sand the world.
I add, “If one person complains he just makes it that much harder for the others. They’ve got stamina. They know how to keep on going.”
Solution of problems too complicated for common sense to solve is achieved by long strings of mixed inductive and deductive inferences that weave back and forth between the observed machine and the mental hierarchy of the machine found in the manuals.
Sometimes just the act of writing down the problems straightens out your head as to what they really are.
(1) statement of the problem, (2) hypotheses as to the cause of the problem, (3) experiments designed to test each hypothesis, (4) predicted results of the experiments, (5) observed results of the experiments and (6) conclusions from the results of the experiments. This is not different from the formal arrangement of many college and high-school lab notebooks but the purpose here is no longer just busywork. The purpose now is precise guidance of thoughts that will fail if they are not accurate.
Scientific questions often have a surface appearance of dumbness for this reason. They are asked in order to prevent dumb mistakes later on.
They are using the experiment as part of a program to expand their hierarchy of knowledge of the faulty motorcycle and compare it to the correct hierarchy in their mind. They are looking at underlying form.
Sometimes it’s a little better to travel than to arrive.
One of the most important is the Sanskrit dhyana, mispronounced in Chinese as “Chan” and again mispronounced in Japanese as “Zen.”
Like the one between art and art history. One does it and the other talks about how it’s done and the talk about how it’s done never seems to match how one does it.
“Peace of mind isn’t at all superficial, really,” I expound. “It’s the whole thing. That which produces it is good maintenance; that which disturbs it is poor maintenance. What we call workability of the machine is just an objectification of this peace of mind. The ultimate test’s always your own serenity. If you don’t have this when you start and maintain it while you’re working you’re likely to build your personal problems right into the machine itself.”
I add, “What’s more common is that you feel unpeaceful even if it’s right, and I think that’s the actual case here.
the art of the work is just as dependent upon your own mind and spirit as it is upon the material of the machine. That’s why you need the peace of mind.
“You look at where you’re going and where you are and it never makes sense, but then you look back at where you’ve been and a pattern seems to emerge. And if you project forward from that pattern, then sometimes you can come up with something.
The whole Renaissance is supposed to have resulted from the topsy-turvy feeling caused by Columbus’ discovery of a new world.
The Church attitude is that civilization, or “the system” or “society” or whatever you want to call it, is best served not by mules but by free men. The purpose of abolishing grades and degrees is not to punish mules or to get rid of them but to provide an environment in which that mule can turn into a free man.
Mountains should be climbed with as little effort as possible and without desire. The reality of your own nature should determine the speed. If you become restless, speed up. If you become winded, slow down. You climb the mountain in an equilibrium between restlessness and exhaustion. Then, when you’re no longer thinking ahead, each footstep isn’t just a means to an end but a unique event in itself. This leaf has jagged edges. This rock looks loose. From this place the snow is less visible, even though closer. These are things you should notice anyway. To live only for some future goal is shallow. It’s the sides of the mountain which sustain life, not the top. Here’s where things grow.
“Quality is a characteristic of thought and statement that is recognized by a nonthinking process.
Any effort that has self-glorification as its final endpoint is bound to end in disaster.
If we can show that a world without Quality functions abnormally, then we have shown that Quality exists, whether it’s defined or not.”
before he arrived at this, but eventually he saw that Quality couldn’t be independently related with either the subject or the object but could be
before he arrived at this, but eventually he saw that Quality couldn’t be independently related with either the subject or the object but could be found only in the relationship of the two with each other.
This means Quality is not just the result of a collision between subject and object. The very existence of subject and object themselves is deduced from the Quality event. The Quality event is the cause of the subjects and objects, which are then mistakenly presumed to be the cause of the Quality!
The only Zen you find on the tops of mountains is the Zen you bring up there.
The past exists only in our memories, the future only in our plans. The present is our only reality.
The past exists only in our memories, the future only in our plans. The present is our only reality. The tree that you are aware of intellectually, because of that small time lag, is always in the past and therefore is always unreal. Any intellectually conceived object is always in the past and therefore unreal. Reality is always the moment of vision before the intellectualization takes place. There is no other reality. This preintellectual reality is what Phaedrus felt he had properly identified as Quality. Since all intellectually identifiable things must emerge from this preintellectual reality, Quality is the parent, the source of all subjects and objects.
You have to depress for a while before you can get down to doing it. Then, once you have depressed into a really low-key mood, it isn’t so bad.
It is the quest of this special classic beauty, the sense of harmony of the cosmos, which makes us choose the facts most fitting to contribute to this harmony.
It’s always been an artificial interpretation superimposed on reality. It’s never been reality itself.
If your mind is truly, profoundly stuck, then you may be much better off than when it was loaded with ideas.
The fear of stuckness is needless because the longer you stay stuck the more you see the Quality-reality that gets you unstuck every time.
The material and the craftsman’s thoughts change together in a progression of smooth, even changes until his mind is at rest at the exact instant the material is right.
Peace of mind produces right values, right values produce right thoughts. Right thoughts produce right actions and right actions produce work which will be a material reflection for others to see of the serenity at the center of it all. That was what it was about that wall in Korea. It was a material reflection of a spiritual reality.
What keeps me from thinking I’ve hit them all is that with every job I discover more. Motorcycle maintenance gets frustrating. Angering. Infuriating. That’s what makes it interesting.
What you have to do, if you get caught in this gumption trap of value rigidity, is slow down—you’re going to have to slow down anyway whether you want to or not—but slow down deliberately and go over ground that you’ve been over before to see if the things you thought were important were really important and to…well…just stare at the machine.
If you have a high evaluation of yourself then your ability to recognize new facts is weakened.
In motorcycle maintenance the mu answer given by the machine to many of the diagnostic questions put to it is a major cause of gumption loss. It shouldn’t be! When your answer to a test is indeterminate it means one of two things: that your test procedures aren’t doing what you think they are or that your understanding of the context of the question needs to be enlarged. Check your tests and restudy the question. Don’t throw away those mu answers! They’re every bit as vital as the yes or no answers. They’re more vital. They’re the ones you grow on!
Here by far the most frustrating gumption trap is inadequate tools. Nothing’s quite so demoralizing as a tool hang-up. Buy good tools as you can afford them and you’ll never regret it. If you want to save money don’t overlook the newspaper want ads. Good tools, as a rule, don’t wear out, and good secondhand tools are much better than inferior new ones. Study the tool catalogs. You can learn a lot from them.
predisposes you to avoid the traps and see the right facts. You want to know how to paint a perfect painting? It’s easy. Make yourself perfect and then just paint naturally. That’s the way all the experts do it.
The real cycle you’re working on is a cycle called yourself. The machine that appears to be “out there” and the person that appears to be “in here” are not two separate things. They grow toward Quality or fall away from Quality together.
Quality isn’t method. It’s the goal toward which method is aimed.
We see much more of this loneliness now. It’s paradoxical that where people are the most closely crowded, in the big coastal cities in the East and West, the loneliness is the greatest. Back where people were so spread out in western Oregon and Idaho and Montana and the Dakotas you’d think the loneliness would have been greater, but we didn’t see it so much.
Man is not the source of all things, as the subjective idealists would say. Nor is he the passive observer of all things, as the objective idealists and materialists would say. The Quality which creates the world emerges as a relationship between man and his experience. He is a participant in the creation of all things. The measure of all
Man is not the source of all things, as the subjective idealists would say. Nor is he the passive observer of all things, as the objective idealists and materialists would say. The Quality which creates the world emerges as a relationship between man and his experience. He is a participant in the creation of all things. The measure of all things—it fits. And they taught rhetoric—that fits.
Caring about what you are doing is considered either unimportant or taken for granted.
When you want to hurry something, that means you no longer care about it and want to get on to other things. I just want to get at it slowly, but carefully and thoroughly, with the same attitude I remember was present just before I found that sheared pin. It was that attitude that found it, nothing else.
You just sit and stare and think, and search randomly for new information, and go away and come back again, and after a while the unseen factors start to emerge.
Although motorcycle riding is romantic, motorcycle maintenance is purely classic.
We take a handful of sand from the endless landscape of awareness around us and call that handful of sand the world.
What has become an urgent necessity is a way of looking at the world that does violence to neither of these two kinds of understanding and unites them into one.
Solution of problems too complicated for common sense to solve is achieved by long strings of mixed inductive and deductive inferences that weave back and forth between the observed machine and the mental hierarchy of the machine found in the manuals. The correct program for this inter-weaving is formalized as scientific method.
Sometimes just the act of writing down the problems straightens out your head as to what they really are.
(1) statement of the problem, (2) hypotheses as to the cause of the problem, (3) experiments designed to test each hypothesis, (4) predicted results of the experiments, (5) observed results of the experiments and (6) conclusions from the results of the experiments.
One must be extremely careful and rigidly logical when dealing with Nature: one logical slip and an entire scientific edifice comes tumbling down. One false deduction about the machine and you can get hung up indefinitely.
Scientific questions often have a surface appearance of dumbness for this reason. They are asked in order to prevent dumb mistakes later on. Part Three, that
Scientific questions often have a surface appearance of dumbness for this reason. They are asked in order to prevent dumb mistakes later on.
An experiment is never a failure solely because it fails to achieve predicted results. An experiment is a failure only when it also fails adequately to test the hypothesis in question, when the data it produces don’t prove anything one way or another.
An untrained observer will see only physical labor and often get the idea that physical labor is mainly what the mechanic does. Actually the physical labor is the smallest and easiest part of what the mechanic does. By far the greatest part of his work is careful observation and precise thinking.
When people are fanatically dedicated to political or religious faiths or any other kinds of dogmas or goals, it’s always because these dogmas or goals are in doubt.
you have to have faith in reason because there isn’t anything else. But it was a faith he didn’t have himself.
“To travel is better than to arrive”
“Peace of mind isn’t at all superficial, really,” I expound. “It’s the whole thing. That which produces it is good maintenance; that which disturbs it is poor maintenance. What we call workability of the machine is just an objectification of this peace of mind.
The ultimate test’s always your own serenity. If you don’t have this when you start and maintain it while you’re working you’re likely to build your personal problems right into the machine itself.”
“It’s an unconventional concept,” I say, “but conventional reason bears it out. The material object of observation, the bicycle or rotisserie, can’t be right or wrong. Molecules are molecules. They don’t have any ethical codes to follow except those people give them. The test of the machine is the satisfaction it gives you. There isn’t any other test. If the machine produces tranquillity it’s right. If it disturbs you it’s wrong until either the machine or your mind is changed. The test of the machine’s always your own mind. There isn’t any other test.”
“That’s self-contradictory. If you really don’t care you aren’t going to know it’s wrong. The thought’ll never occur to you. The act of pronouncing it wrong’s a form of caring.”
“What’s more common is that you feel unpeaceful even if it’s right, and I think that’s the actual case here. In this case, if you’re worried, it isn’t right. That means it isn’t checked out thoroughly enough. In any industrial situation a machine that isn’t checked out is a ‘down’ machine and can’t be used even though it may work perfectly. Your worry about the rotisserie is the same thing. You haven’t completed the ultimate requirement of achieving peace of mind, because you feel these instructions were too complicated and you may not have understood them correctly.”
the art of the work is just as dependent upon your own mind and spirit as it is upon the material of the machine. That’s why you need the peace of mind.
“You look at where you’re going and where you are and it never makes sense, but then you look back at where you’ve been and a pattern seems to emerge.
Walk into any of a hundred thousand classrooms today and hear the teachers divide and subdivide and interrelate and establish “principles” and study “methods” and what you will hear is the ghost of Aristotle speaking down through the centuries—the desiccating lifeless voice of dualistic reason.
Now the stream of our common consciousness seems to be obliterating its own banks, losing its central direction and purpose, flooding the lowlands, disconnecting and isolating the highlands and to no particular purpose other than the wasteful fulfillment of its own internal momentum. Some channel deepening seems called for.
The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower. To think otherwise is to demean the Buddha—which is to demean oneself. That is what I want to talk about in this Chautauqua.
He isn’t so interested in what things mean as in what they are.
“Thou art that,” which asserts that everything you think you are and everything you think you perceive are undivided. To realize fully this lack of division is to become enlightened.
The real University is nothing less than the continuing body of reason itself.
the mandate to speak the rational truth.
To live only for some future goal is shallow. It’s the sides of the mountain which sustain life, not the top. Here’s where things grow.
“No one ever travels so high as he who knows not where he is going,”
Any effort that has self-glorification as its final endpoint is bound to end in disaster.
hope it’s been made plain that the real evil isn’t the objects of technology but the tendency of technology to isolate people into lonely attitudes of objectivity. It’s the objectivity, the dualistic way of looking at things underlying technology, that produces the evil.
by individuals making Quality decisions and that’s all.
Everyone’s just about out of gumption. And I think it’s about time to return to the rebuilding of this American resource—individual worth.
Reason and Quality had become separated and in conflict with each other and Quality had been forced under and reason made supreme somewhere back then.
“duty toward self”
Aretê implies a respect for the wholeness or oneness of life, and a consequent dislike of specialization. It implies a contempt for efficiency—or rather a much higher idea of efficiency, an efficiency which exists not in one department of life but in life itself. Phaedrus remembered a line from Thoreau:
Aretê implies a respect for the wholeness or oneness of life, and a consequent dislike of specialization. It implies a contempt for efficiency—or rather a much higher idea of efficiency, an efficiency which exists not in one department of life but in life itself.
Forms and mannerisms—hated by the best, loved by the worst. Year after year, decade after decade of little front-row “readers,” mimics with pretty smiles and neat pens, out to get their Aristotelian A’s while those who possess the real aretê sit silently in back of them wondering what is wrong with themselves that they cannot like this subject.
A truly able person is always a threat.
Even the special use of the terms “classic” and “romantic” are examples of his knifemanship.
garments worn by the personality, not the other way around.
To the untrained eye ego-climbing and selfless climbing may appear identical. Both kinds of climbers place one foot in front of the other. Both breathe in and out at the same rate. Both stop when tired. Both go forward when rested. But what a difference! The ego-climber is like an instrument that’s out of adjustment. He puts his foot down an instant too soon or too late. He’s likely to miss a beautiful passage of sunlight through the trees. He goes on when the sloppiness of his step shows he’s tired. He rests at odd times. He looks up the trail trying to see what’s ahead even when he knows what’s ahead because he just looked a second before. He goes too fast or too slow for the conditions and when he talks his talk is forever about somewhere else, something else. He’s here but he’s not here. He rejects the here, is unhappy with it, wants to be farther up the trail but when he gets there will be just as unhappy because then it will be “here.” What he’s looking for, what he wants, is all around him, but he doesn’t want that because it is all around him. Every step’s an effort, both physically and spiritually, because he imagines his goal to be external and distant.
==========
>> How To Win Friends And Influence People (Carnegie, Dale)
Criticism is futile because it puts a person on the defensive and usually makes him strive to justify himself. Criticism is dangerous, because it wounds a person’s precious pride, hurts his sense of importance, and arouses resentment.
When dealing with people, let us remember we are not dealing with creatures of logic. We are dealing with creatures of emotion, creatures bristling with prejudices and motivated by pride and vanity.
Any fool can criticise, condemn and complain – and most fools do.
‘A great man shows his greatness,’ said Carlyle, ‘by the way he treats little men.’
You can make more friends in two months by becoming interested in other people than you can in two years by trying to get other people interested in you.
‘It is the individual who is not interested in his fellow men who has the greatest difficulties in life and provides the greatest injury to others. It is from among such individuals that all human failures spring.’
‘Hatred is never ended by hatred but by love,’ and a misunderstanding is never ended by an argument but by tact, diplomacy, conciliation and a sympathetic desire to see the other person’s viewpoint.
Three-fourths of the people you will ever meet are hungering and thirsting for sympathy. Give it to them, and they will love you.
==========
>> 小狗钱钱 (〔德〕博多·舍费尔)
钱钱耐心地解释道:“人们把这种行为称作‘视觉化’。成功的人之所以成功,就是因为他们一直梦想着自己成功的那一天,不停地想象着自己实现了理想时的情形。当然,人不能停留在梦想里,你妈妈要对你说的是这一层意思。
有一只海鸥曾经对我说过:‘在你展翅飞翔之前,你就必须相信自己能到达目的地。’你必须设想自己已经拥有了这些东西,这样你的一个小愿望才会变成一种强烈的渴望。
==========
>> 成为乔布斯 (布伦特·施兰德;里克·特策利)
史蒂夫就像汤姆·汉克斯电影在《荒岛余生》(Castaway)中所扮演的角色,保持呼吸,永不放弃,因为你不知道海浪明天会带来什么。”
==========
>> 美看不见的竞争力(修订版) (爱智典藏) (蒋勋)
庄子讲的“物我两忘”反而是最好的解答。你在看花的时刻,忘掉你在看花,而好像在看自己,其实这就是“物我两忘”的关系。
==========
>> haskell-programming-0.12.0-ereader
Reducible expressions are also called redexes
Haskell doesn’t evaluate everything to canonical or normal form by default. Instead, it only evaluates to weak head normal form (WHNF) by default
If the function name is alphanumeric, it is a prefix function by default, and not all prefix functions can be made infix. If the name is a symbol, it is infix by default but can be made prefix by wrapping it in parentheses. 4
The ($) operator is a convenience for when you want to express something with fewer pairs of parentheses
Type systems in logic and mathematics have been designed to impose constraints that enforce correctness.
==========
>> 北野武的小酒馆 (北野武)
亲应该成为孩子在人生道路上遇到的第一块绊脚石。 父亲不应该畏惧被自己的孩子憎恨。
亲应该成为孩子在
父亲应该成为孩子在人生道路上遇到的第一块绊脚石。 父亲不应该畏惧被自己的孩子憎恨。 在我的中学时代,我们学校附近有一所富家子弟的私立高中。
父亲应该成为孩子在人生道路上遇到的第一块绊脚石。 父亲不应该畏惧被自己的孩子憎恨。
这个世界是一个冷风吹的世界,没有忍耐力的人势必会被淘汰,这个道理我们都懂。
有价值的东西,是必须通过残酷的竞争来获取胜利的。
友谊就是单方面地为他人付出,而不是从他人那里得到什么。所谓友谊,其实就是对他人的关怀。
我们必须设置爱心专座这样的东西,本身就证明了这是一个畸形的时代
所谓规矩,从根本上考虑,其实就是为他人着想
一个差劲的人,是完全没有为他人着想的想法的。在自己的行为发生前,先考虑一下别人的感受,他们原本就没有这种想法。
他人着想,还有一个关键点,那就是要善于倾听
他人着想,
为他人着想,还有一个关键点,那就是要善于倾听。
他人着想,还有一个关键点,那就
为他人着想,还有一个关键点,那就是要善于倾听
到厨师就听他说做菜的事,碰到司机就听他说汽车的事,碰到和尚就听他说来生的事,反正不要装作自己什么都懂,要虚心地聆听别人的话语。不管怎么说,这个世界要比你的光荣历史来得博大精深得多,而且最关键的是,虚心聆听能营造出一种和谐的对话氛围。
碰到厨师就听他说做菜的事,碰到司机就听他说汽车的事,碰到和尚就听他说来生的事,反正不要装作自己什么都懂,要虚心地聆听别人的话语。不管怎么说,这个世界要比你的光荣历史来得博大精深
碰到厨师就听他说做菜的事,碰到司机就听他说汽车的事,碰到和尚就听他说来生的事,反正不要装作自己什么都懂,要虚心地聆听别人的话语。不管怎么说,这个世界要比你的光荣历史来得博大精深得多,而且最关键的是,虚心聆听能营造出一种和谐的对话氛围
==========
>> 时过子夜灯犹明 (李鹿, ePUBw.COM)
从异乡又奔向异乡,这愿望多么渺茫,而况送着我的是海上的波浪,迎接着我的是异乡的风霜。”
==========
>> The.Rust.Programming.Language.(Covers.Rust.2018).2019.8
The Rust compiler has a borrow checker that compares scopes to determine whether all borrows are valid
==========
>> emacs
This behavior is designed to give confident users fast response, while giving hesitant users maximum feedback.
Error messages may be accompanied by beeping or by flashing the screen
For example, C-x = (hold down Ctrl and type x, then let go of Ctrl and type =) displays a message describing the character at point, its position in the buffer, and its current column in the window
The least specialized major mode is called Fundamental mode
Most major modes fall into three major groups. The first group contains modes for normal text, either plain or with mark-up. It includes Text mode, HTML mode, SGML mode, TEX mode and Outline mode. The second group contains modes for specific programming languages. These include Lisp mode (which has several variants), C mode, Fortran mode, and others. The third group consists of major modes that are not associated directly with files; they are used in buffers created for specific purposes by Emacs, such as Dired mode for buffers made by Dired (see Chapter 27 [Dired], page 314), Message mode for buffers made by C-x m (see Chapter 29 [Sending Mail], page 349), and Shell mode for buffers used to communicate with an inferior shell process (see Section 31.4.2 [Interactive Shell], page 383)
The value of the buffer-local variable major-mode is a symbol with the same name as the major mode command (e.g., lisp-mode). This variable is set automatically; you should not change it yourself
Many modes also define special commands of their own, usually bound in the prefix key C-c
Every major mode, apart from Fundamental mode, defines a mode hook, a customizable list of Lisp functions to run each time the mode is enabled in a buffer.
and all programming language modes run prog-modehook, prior to running their own mode hooks
Hook functions can look at the value of the variable major-mode to see which mode is actually being entered.
If the mode command is called via Lisp, the minor mode is unconditionally turned on if the argument is omitted or nil. This makes it easy to turn on a minor mode from a major mode’s mode hook
Overwrite mode causes ordinary printing characters to replace existing text instead of shoving it to the right. For example, if point is in front of the ‘B’ in ‘FOOBAR’, then in Overwrite mode typing a G changes it to ‘FOOGAR’, instead of producing ‘FOOGBAR’ as usual. In Overwrite mode, the command C-q inserts the next character whatever it may be, even if it is a digit—this gives you a way to insert a character instead of replacing an existing character. The mode command, overwrite-mode, is bound to the Insert key.
You can also type Meta characters using two-character sequences starting with ESC. Thus, you can enter M-a by typing ESC a. You can enter C-M-a by typing ESC C-a. Unlike META, ESC is entered as a separate character. You don’t hold down ESC while typing the next character; instead, press ESC and release it, then enter the next character. This feature is useful on certain text terminals where the META key does not function reliably.
M-= Display the number of lines, words, and characters that are present in the region (count-words-region). See Chapter 8 [Mark], page 45, for information about the region.
M-x hl-line-mode Enable or disable highlighting of the current line. See Section 11.20 [Cursor Display], page 86.
partial-completion This aggressive completion style divides the minibuffer text into words separated by hyphens or spaces, and completes each word separately. (For example, when completing command names, ‘em-l-m’ completes to ‘emacs-lisp-mode’.) Furthermore, a ‘*’ in the minibuffer text is treated as a wildcard—it matches
substring A matching completion alternative must contain the text in the minibuffer before point, and the text in the minibuffer after point, as substrings (in that same order). Thus, if the text in the minibuffer is ‘foobar’, with point between ‘foo’ and ‘bar’, that matches ‘afoobbarc’, where a, b, and c can be any string including the empty string. initials This very aggressive completion style attempts to complete acronyms and initialisms. For example, when completing command names, it matches ‘lch’ to ‘list-command-history’. There is also a very simple completion style called emacs21. In this style, if the text in the minibuffer is ‘foobar’, only matches starting with ‘foobar’ are considered. You can use different completion styles in different situations, by setting the variable completion-category-overrides. For example, the default setting says to use only basic and substring completion for buffer names
Once you have a region, here are some of the ways you can operate on it: Kill it with C-w (see Chapter 9 [Killing], page 52). Copy it to the kill ring with M-w (see Section 9.2 [Yanking], page 55). Convert case with C-x C-l or C-x C-u (see Section 22.6 [Case], page 215). Undo changes within it using C-u C-/ (see Section 13.1 [Undo], page
Type M-x delete-trailing-whitespace to delete all trailing whitespace. This command deletes all extra spaces at the end of each line in the buffer, and all empty lines at the end of the buffer; to ignore the latter, change the variable delete-trailing-lines to
==========
>> 明智行动的艺术(《清醒思考的艺术》姊妹篇 精编图文版) (Rolf Dobelli, PhD,〔德〕罗尔夫•多贝里)
滔滔不绝可以掩饰无知。如果一些内容没有清楚地表达,其实是说话者自己不知道在说什么。语言表达是思想的镜子:清晰的思想会带来清楚的表达,糊涂的思想结果只会是废话连篇。很遗憾的是,我们只在很少情况下才有真正清晰的思路。世界是很复杂的,我们的大脑要思考很多内容才能理解世界的某一个方面。在你对整个世界顿悟之前,最好还是记住马克·吐温的话:“如果你没有什么可说的,就什么都别说。”简单是生活这条艰难长路的终结点,而不是起始点。
邓宁-克鲁格效应”,即无能的人往往无法认识到自己的无能。
==========
>> Leaders Eat Last: Why Some Teams Pull Together and Others Don't (Sinek, Simon)
“If your actions inspire others to dream more, learn more, do more and become more, you are a leader.”
But that doesn’t mean we can get away with doing nothing. We will still need to change the way we do things when we show up at work. It will require us to turn some of our focus away from ourselves to give more attention to those to the left of us and those to the right of us. Like the Spartans, we will have to learn that our strength will come not from the sharpness of our spears but from our willingness to offer others the protection of our shields.
Net-net, if you don’t like your work, for your kids’ sake, don’t go home.
==========
>> 生命的烤火者:杨绛传 (慕容素衣)
If we don’t have freedom of speech,at least we have freedom of silence.(
回顾往事,她说:“乌云蔽天的岁月是不堪回首的,可是停留在我记忆里不易磨灭的,倒是那一道含蕴着光和热的金边。”
==========
>> hire
I'd like to work on meaningful projects and have enough breadth and depth of knowledge to design and contribute in a meaningful way in them, but if we're being totally honest my career goals are absolutely "make enough money to pay the mortgage, go on the occasional vacation, and save for retirement".
==========
>> 沈从文小说 (经典文存) (林乐齐)
火是各处可烧
火是各处可烧的,水是各处可流的,日月是各处可照的,爱情是各处可到的。
==========
>> Bill Walsh, Steve Jamison, Craig Walsh - The Score Takes Care of Itself_ My Philosophy of Leadership -the Penguin Group (2009)
1. Do expect defeat. It’s a given when the stakes are high and the competition is working ferociously to beat you. If you’re surprised when it happens, you’re dreaming; dreamers don’t last long. 2 . Do force yourself to stop looking backward and dwelling on the professional “train wreck” you have just been in. It’s mental quicksand. 3 . Do allow yourself appropriate recovery—grieving—time. You’ve been knocked senseless; give yourself a little time to recuperate. A keyword here is “little.” Don’t let it drag on. 4. Do tell yourself, “I am going to stand and fight again,” with the knowledge that often when things are at their worst you’re closer than you can imagine to success. Our Super Bowl victory arrived less than sixteen months after my “train wreck” in Miami. 5. Do begin planning for your next serious encounter. The smallest steps— plans—move you forward on the road to recovery. Focus on the fix. MY FIVE DON’TS: 1. Don’t ask, “Why me?” 2. Don’t expect
intelligently applied work ethic directed at continual improvement; demonstrate respect for each person in the organization and the work he or she does; be deeply committed to learning and teaching, which means increasing my own expertise; be fair; demonstrate character; honor the direct connection between details and improvement, and relentlessly seek the latter; show self-control, especially where it counts most—under pressure; demonstrate and prize loyalty; use positive language and have a positive attitude; take pride in my effort as an entity separate from the result of that effort; be willing to go the extra distance for the organization; deal appropriately with victory and defeat, adulation and humiliation (don’t get crazy with victory nor dysfunctional with loss); promote internal communication that is both open and substantive (especially under stress); seek poise in myself and those I lead; put the team’s welfare and priorities ahead of my own; maintain an ongoing level of concentration and focus that is abnormally high; and make sacrifice and commitment the organization’s trademark.
continual improvement; demonstrate respect
Exhibit a ferocious and intelligently applied work ethic directed at continual improvement; demonstrate respect for each person in the organization and the work he or she does; be deeply committed to learning and teaching, which means increasing my own expertise; be fair; demonstrate character; honor the direct connection between details and improvement, and relentlessly seek the latter; show self-control, especially where it counts most—under pressure; demonstrate and prize loyalty; use positive language and have a positive attitude; take pride in my effort as an entity separate from the result of that effort; be willing to go the extra distance for the organization; deal appropriately with victory and defeat, adulation and humiliation (don’t get crazy with victory nor dysfunctional with loss); promote internal communication that is both open and substantive (especially under stress); seek poise in myself and those I lead; put the team’s welfare and priorities ahead of my own; maintain an ongoing level of concentration and focus that is abnormally high; and make sacrifice and commitment the organization’s trademark.
Respect for the emblem was important because it represented something very significant, namely, respect within the organization for one another. I would tolerate no caste systems, no assumption of superiority by any coaches, players, or other personnel. Regardless of the size of an employee’s check or the requirements of his or her job, I made it clear that he or she was 100 percent a member of our team, whether he or she was a superstar or secretary, black or white, manager or maintenance man
sought intelligence in employees, not just for the obvious reason, but also because a dull-witted staff member who’s aggressive creates anarchy; when you have one of those who thinks he’s intelligent in your midst, look out. The bull-headed know-it-all is a destructive force on your team
Victory is produced by and belongs to all. Winning
Likewise, failure belongs to everyone. If you or a member of your team “drops the ball,” everyone has ownership. This is an essential lesson I taught the San Francisco organization: The offensive team is not a country unto itself, nor is the defensive team or the special teams, staff, coaches, or anyone in the organization separate from the fate of the organization. We are united and fight as one; we win or lose as one
The culture precedes positive results. It doesn’t get tacked on as an afterthought on your way to the victory stand. Champions behave like champions before they’re champions; they have a winning standard of
The culture precedes positive results. It doesn’t get tacked on as an afterthought on your way to the victory stand. Champions behave like champions before they’re champions; they have a winning standard of performance before they are winners
key to performing under pressure at the highest possible level, regardless of circumstance, is preparation in the context of your Standard of Performance and a thorough assimilation by your organization of the actions and attitudes contained within your philosophy of leadership
offering credit to someone in your organization who has stepped up and done the job
during a game. I defy you to think as well—as clearly—under great stress as you do in normal circumstances. I don’t care how smart or quick-witted you are, what your training or intellect is; under extreme stress you’re not as good. Unless, that is, you’ve planned and thought through the steps you’re going to take in all situations—your contingency plans.
during a game. I defy you to think as well—as clearly—under great stress as you do in normal circumstances. I don’t care how smart or quick-witted you are, what your training or intellect is; under extreme stress you’re not as good. Unless, that is, you’ve planned and thought through the steps you’re going to take in all situations—your contingency plans.
Be prepared? I was prepared for almost anything, just as you should be. I never wanted to be in a situation where I would kick myself later and say, “Why didn’t I think of that?” I didn’t want