A

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

image.png

第一次执行出错是检查输入参数长度校验时候我有意识得抛了一个异常,它期望返回空字符串,见仁见智吧

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

R

这周得世界职场发生了两件大事情,其中一个是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现在需要的。但是这不是我要的,而且过去的几年里,我已经撑得够久了

老哥压力好大啊,意大利同学么,可以理解可以理解…

我也确实带感了,人家可能只是说有用,而不是有点儿什么用的,但是哥们儿厌恶这种状态么不是,但是其实人也知道这件事情的重要性,人家也努力了,这个确实我瞎演绎了,但我刚才也就是想这么express…

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?)最近这些年给予了我很多的帮助

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

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 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.

这块儿其实还真不太清楚哥们儿想表达的真实的意思,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.

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

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

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

T

image.png

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

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

那他有什么用?

S

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

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