题外话

这周我觉得是我最近一段时间最暗黑的一周,我自己内心深处有不少已经压抑在潜意识中的好多感觉和记忆感觉喷涌而出,让我自己有点招架不住了,一个影响的结果就是ARTS打卡没有按我自己可以接受的质量完成

我觉得,一方面,有些东西应该就保持在那里,让自己看到,“你Y就是个SB”,有助于自己将来不再,或者至少少犯一些傻;另一方面,如果一些特别不让自己满意的东西,都不去尝试让他变得令自己再稍微哪怕满意一点,就更谈不上将来输出更重要内容时候,会有什么质量

所以有必要在此另开一贴,做修订

A

仓促之中,选了一个简单题,https://leetcode-cn.com/problems/longest-common-prefix/

image.png

第一次执行出错是做输入参数长度校验时候,我有意识得抛了一个异常,但是leetcode的测试case,是期望返回空字符串,见仁见智吧,我现在回过头来看,确实空字符串,应该会让调用方的处理更顺畅,这也是很多人诟病抛异常设计的原因吧

真正的问题是:

这回连执行时间都是5%…完了,下周必须得review总结一下吧,或者就优化之前的一个题,也算A这个过了吧,俗务缠身啊

R

这周的世界职场发生了两件大事情…严格的说起来,是对我有影响的两件事情,都是精神上的打击

其中一个是redis得创始人退居二线,虽然我一直叫不上他的名字…这特么太不寻常了这名字,我其实也不太清楚这厮到底是不是意大利人,所以他说的英语…无所谓语病了吧,肯定至少比我强,问题在于,之前看他得只言片语,已经很是认同得价值观和判断一些事物的思维方式

出于对redis产品的尊敬,对其创造者的尊敬,敏捷12原则那篇放一放吧,精读一遍这老哥得告别宣言吧,同时也是向我所认同的价值观和生活态度致敬

When I started the Redis project more than ten years ago I was in one of the most exciting moments of my career. My co-founder and I had successfully launched two of the major web 2.0 services of the Italian web. In order to make them scalable we had to invent many new concepts, that were already known in the field most of the times, but we didn’t know, nor we cared to check. Problem? Let’s figure out a solution. We wanted to solve problems but we wanted, even more, to have fun. This was the playful environment where Redis was born

超过十年前,当我开始做Redis的时候,那是我职业生涯中最高光的时刻。我和我的联合创始人成功的上线了两个意大利网站得两个主要的web 2.0服务(译注:忆当年,峥嵘岁月…)。为了保证他们的伸缩性,我们不得不发明许多新的概念——这些已经在领域内已经被了解很久了得概念,但我们不知道,我们也不想去知道… 这有问题?那我们就找出解决方案吧。我们要解决这些问题,而且我们其实要的更多,那就是找乐子。Redis就是在这样的一个有趣的氛围(背景?)中诞生的

也许是我翻的时候带感了,或者就是我主观得要去证明,我前面推测意大利同学得英文吧,也就那么回事,平实得词语,蕴含的都是反讽或幽默?我觉得也不是瞎编的,这种强烈的感情意向,我觉得我通读下来时候,就是这种feel啊

But now Redis is, incredibly, one of the main parts of so many things. And year after year my work changed from building this thing to making sure that it was also as useful as possible, as reliable as possible. And in recent years, what I do every day changed so much that most of my attention is spent in checking what other developers tell me about the Redis code, how to improve it, the changes it requires to be more correct or faster or more secure. However I never wanted to be a software maintainer.

然而现在的redis,已经令人难以置信的成为了许多事物的主要的组成部分。并且这么一年年的吧,我的工作从建造这个东西变成了确保他要尽可能的有用,尽可能的可靠。在最近的几年,更严重了吧,最花费我注意力的是检查其他开发者跟我谈论他们如何把Redis改进、改变的更正确(译注?这肯定是在吐槽啊)、更快速、更安全得代码上。然而我从来都不想成为一个软件的维护者

这段感情我觉得更强烈,要不就是我瞎说了,但是人家本来就是个乐子,结果现在成了一份巨大的责任,其实不光是意大利人吧,哪儿都会有这样的人,扪心自问,我其实也更喜欢乐子,而不是责任,是不是是人都这样啊

I write code in order to express myself, and I consider what I code an artifact, rather than just something useful to get things done. I would say that what I write is useful just as a side effect, but my first goal is to make something that is, in some way, beautiful. In essence, I would rather be remembered as a bad artist than a good programmer. Now I’m asked more and more, by the circumstances created by a project that became so important, to express myself less and to maintain the project more. And this is indeed exactly what Redis needs right now. But this is not what I want to do, and I stretched myself enough during the past years.

我写代码是为了表达我自己,而且我认为我得目的是创造工艺品,而不仅仅是为了完成某个有点儿什么用的东西。我的意思是说我写的东西有用,也不过是一个副作用,而我首要的目标是让这东西,通过某种方式,表现出美感。某种意义上讲,我宁愿作为一个糟糕的艺术家被铭记,而不是一个好的程序员。现在,在这个项目变得如此重要的情形下,我被要求更加注重较少来表达自己同时较多的去维护这个项目。这确实是redis现在需要的。但是这不是我要的,而且过去的几年里,我已经撑得够久了

老哥压力好大啊,但,可以理解可以理解…

我也确实带感了,人家可能只是说有用,而不是有点儿什么用的,但是哥们儿厌恶这种状态么不是

不过,其实人也知道这件事情的重要性,人家也努力了,真的无可厚非,其实…那小姑娘又何尝不是呢?

So, dear Redis community, today I’m stepping back as the Redis maintainer. My new position will be, on one side, an “ideas” person at Redis Labs, in order to provide inputs for new Redis possibilities: I’ll continue to be part of the Redis Labs advisory board. On the other hand however my hands will be free, and I’ll do something else, that could be writing code or not, who knows, I don’t want to make plans for now. However I’m very skeptical about me not writing more code in the future. It’s just too much fun :D

这段先评… 就是为了开心么,所以感觉一下行文轻松很多了,中间对new position得描述按前面的措辞相比较已经很官方正式了,而且,怎么滴,对redis这东西以及很多的相关的人也是有感情的吧

所以,亲爱得redis社区,今天我退后一步成为一个Redis得maintainer(译注:不了解背景得可能会觉的奇怪,前面不是不想做maintainer么,这厮在redis这个project里面其实算是一个owner,或者用社区习惯来讲叫做,仁慈得独裁者,原文稍后找)。我新的定位从某种意义上讲是一个在 Redis Labs里面出“点子”得人,以便能为新的Redis 可能性出谋划策:我还是Redis Labs 咨询委员会得成员。从另一方面讲,我的双手解放了,而且我可能会写点代码,也可能不会,谁知道呢,我现在不想做这个计划。然而,我倒是非常怀疑我未来不去写更多的代码。coding这事儿多有趣啊!

强翻完了,印象最深的还是,干嘛现在就非得计划好了一定要怎么样呢,多累啊,意大利人,嗯,挺好

I leave Redis in the hands of the Redis community. I asked my colleagues Yossi Gottlieb and Oran Agra to continue to maintain the project starting from today: these are the people that helped me the most in recent years, and that tried hard, even when it was not “linear” to follow me in my very subjective point of views, to understand what my vision on Redis was. Since I don’t want to be part of how the new Redis development setup will be shaped (that is the most meta of the maintenance tasks, exactly what I want to avoid), I’ll just leave Yossi and Oran the task of understanding how to interface with the rest of the Redis developers to find a sustainable development model, you can hear directly from Yossi and Oran in this blog post: https://redislabs.com/blog/new-governance-for-redis/

我把redis留在社区得手中。我要求我的同事xxx和yyy(译注:管他是谁呢,其实我到现在你让我拼这老哥的名字我也拼不出来,我记别人的名字干嘛)从今天(译注:大概是7.1?)开始维护这个项目,这有不少人(译注:按说估计应该还暗指别人,否则干嘛不说they 来指那俩人呢?而是 there are the people?)最近这些年给予了我很多的帮助。金光我吧
我将Redis交给Redis社区。我要求我的同事Yossi Gottlieb和Oran Agra立即接手这个项目:这些年来,这些人对我的帮助最大,即使在我看来并非“线性”跟着我个人非常主观的视角,理解我对Redis的看法。由于我不想成为新的Redis development setup如何形成的组成部分(这是最基本的维护任务,但也正是我要避免的事情),因此我让Yossi和Oran这些理解这个任务中如何与Redis开发人员的其他成员互动的人,让他们去找到一个可持续发展的开发模型,您可以在此博客文章中直接从Yossi和Oran了解到具体的情况:https://redislabs.com/blog/new-governance-for-redis/

后面的时间原因吧,我只评不翻了先,因为我也不确定我是不是在做一件更有意义的事情,但是还有什么比追求内心平静的对自己来说更重要的呢?

I believe I’m not just leaving Redis in the hands of a community of expert programmers, but also in the hands of people who care about the legacy of the community spirit of Redis. In eleven years I hope I was able to provide a point of view that certain persons understood, about an alternative way to write software. I hope that such point of view will be taken into consideration in the evolution of Redis.

我相信我不只是把Redis留给了Redis社区的专家程序员们,也是交给了关心Redis社区传统的那些人的手中。在过去的11年终,我希望我提供了一种某些人所能理解的一种编写软件的方式的独特的视角。我希望这个观察角度可以被应用在接下来的Redis的发展当中

这段感觉还是对Redis Lab未来的规划不满,寄希望于社区吧,in eleven years 啥意思没搞明白是啥梗,指的是09年至今么?再经历这么长的时间?那岂不是整段又成了反讽
~~
现在看起来更像是有点想放又不想放,一种不充满希望的指望…

Redis was the most stressful thing I did in my career, and probably also the most important. I don’t like much what the underground programming world became in recent years, but even if it was not an easy journey, I had the privilege to work and interact with many great individuals. Thank you for your humanity and your help, and for what you taught me. You know who you are! I want to also say thank you to the companies and individuals inside such companies that allowed me to write open source every day for so many years, with the freedom to do what I believed to be correct for the user base. Redis Labs, VMware and Pivotal, thank you for your great help and generosity.

Redis是我职业生涯中最有份量的事情,而且可能是最重要的。我不是太喜欢最近这些年地下的编程世界的样子,而且尽管这不是一个轻松地体验,我还是有幸和许多出色的个人交流及工作。谢谢你们的人性和你们的帮助,并且感谢你们教会我的。你们知道我说的是谁!我也要感谢这个公司以及这恶搞公司里允许我这么多年来每天都写开源代码的那些个人,并且自由的做我认为对于用户来说正确的事情。Redis Labs VMwae和Pivotal,感谢你们对我的巨大和慷慨的帮助

这块儿其实还真不太清楚哥们儿想表达的真实的意思,也许纯致敬吧,underground programming world指的是黑客社区么?

As I said, I don’t really know what there is for me in my future, other than the involvement with the Redis advisory board. I guess that for some time, just look around is a good idea, without doing too many things. I would like to explore more a few hobbies of mine. Writing blog posts is also a major thing that I wanted to do but did less and less because of time concerns. Recently I published videos in Italian language explaining technological concepts to the general public, I had fun doing that and received good feedbacks, maybe I’ll do more of that as well. Anyway I guess some of you know that I’m active on Twitter as @antirez. If you are interested in what an old, strange programmer will do next, see you there.

就像刚说的,我真的不知道未来我会干点啥,除了假如Redis的专家委员会。我想会有那么一段时间,就是随便看看会是个好主意,而不是做太多说的事情。我想探索更多我自己的爱好。写点儿东西发blog上是我要做的一个主要的事情,但是时间也是越来越少。最近我发布了一些意大利语的videos,向大众介绍一些技术概念,我很开心收到了好的反馈,可能我之后就会做的更多。无论如何,我才你们中有些人知道我会以@antirez的名字Twitter上活跃。如果你对一个奇怪的老程序员接下来做什么感兴趣,到哪去找我

这段骤然也轻松下来了,没有什么利害或隐喻了吧,一种放松感,而且考虑可能搞教学了?意大利语的,我就不当真了,有空去围观下,吃个瓜 … 但我确实前天因为这段follow了老哥的推

主要还是自己遇到的事情的感慨

好啦作弊完成,强翻后面还是要补,到时候copy as吧,现在是23:58,下周给大家show我这个反面教材
~~
好了终于算补完了吧!

T

image.png

这个左右箭头的快捷键好用,但是通用alt+enter没有这个apply signature change得菜单项出来给我啊

另外左右箭头那个有点危险的感觉,我拿我手头得一个分页参数试得,因为current和pageSize都是int,交换签名之后,这个调用方可没有交换实参啊,那这个不能作为一个重构功能来用了

那他有什么用?

S

准备作弊了,拿一个工作当中的东西来充数了,否则无法完成了

这个吧,没有敏感信息,另一个我做了一个api tool得选型对比,但涉及点公司得信息,脱敏之后再放上来