menu

周记

坚持就是胜利

Avatar

【译】资深工程师之酒后真言

今天偶然看到这篇 reddit 热帖,觉得挺不错,摘录于此并顺便翻译一下。

Drunk Post: Things I've learned as a Sr Engineer

I'm drunk and I'll probably regret this, but here's a drunken rank of things I've learned as an engineer for the past 10 years.
我喝高了,管他呢,趁酒劲来捋一下过去10年的感悟。

The best way I've advanced my career is by changing companies.
职业生涯最好的晋升之道是:跳槽。

Technology stacks don't really matter because there are like 15 basic patterns of software engineering in my field that apply. I work in data so it's not going to be the same as webdev or embedded. But all fields have about 10-20 core principles and the tech stack is just trying to make those things easier, so don't fret over it.
技术栈什么的不重要。软件工程领域也就15种基本模式。我搞数据的,和 web 或者嵌入式这些不同。但所有领域也就那么10-20种核心准则,技术栈无非就是把这些东西弄得更简单些,所以不要为它伤脑筋。

There's a reason why people recommend job hunting. If I'm unsatisfied at a job, it's probably time to move on.
猎头的存在是有原因的,对工作不满意走为上计。

I've made some good, lifelong friends at companies I've worked with. I don't need to make that a requirement of every place I work. I've been perfectly happy working at places where I didn't form friendships with my coworkers and I've been unhappy at places where I made some great friends.
在前几份工作里我结交了好些挚友。但这不是选择公司的先决条件。在有的公司我没有和同事结下多深厚的友谊,但工作得十分愉快;相反在有些公司我认识了很好的朋友, 但工作并不开心。

I've learned to be honest with my manager. Not too honest, but honest enough where I can be authentic at work. What's the worse that can happen? He fire me? I'll just pick up a new job in 2 weeks.
我对上司足够坦诚,以本色工作。最坏能怎样?不就是被炒呗?2周后我就能找新工作。

If I'm awaken at 2am from being on-call for more than once per quarter, then something is seriously wrong and I will either fix it or quit.
如果每季度都来那么一次半夜2点的 on-call,那公司一定有大问题。要么彻底搞定问题,要么我走人。

pour another glass
……再来一杯

Qualities of a good manager share a lot of qualities of a good engineer.
好的经理和好的工程师有很多共同优点。

When I first started, I was enamored with technology and programming and computer science. I'm over it.
刚入职时,我狂热迷恋技术、编程以及计算机科学本身。俱往矣……

Good code is code that can be understood by a junior engineer. Great code can be understood by a first year CS freshman. The best code is no code at all.
好代码,新手能理解。伟大代码,菜鸟也能懂。至高境界则是无码胜有码……

The most underrated skill to learn as an engineer is how to document. Fuck, someone please teach me how to write good documentation. Seriously, if there's any recommendations, I'd seriously pay for a course (like probably a lot of money, maybe 1k for a course if it guaranteed that I could write good docs.)
作为工程师最被低估的技能是写文档。操,谁能教教我怎么写出好文档?讲真,我愿意出高价求推荐(1千块钱没问题,只要包学成)

Related to above, writing good proposals for changes is a great skill.
同上,写出好的修改提议也是一项绝技。

Almost every holy war out there (vim vs Emacs, mac vs Linux, whatever) doesn't matter... except one. See below.
所有那些『圣战』(vim 对 Emacs,Mac 对 Linux……随便啥)都无所谓的,除了一个。见下。

The older I get, the more I appreciate dynamic languages. Fuck, I said it. Fight me.
随着年龄渐长我越来越喜欢动态类型语言。不服来战。

If I ever find myself thinking I'm the smartest person in the room, it's time to leave.
当在公司里达到独孤求败的境界时,就是到我该走人的时间了。

I don't know why full stack webdevs are paid so poorly. No really, they should be paid like half a mil a year just base salary. Fuck they have to understand both front end AND back end AND how different browsers work AND networking AND databases AND caching AND differences between web and mobile AND omg what the fuck there's another framework out there that companies want to use? Seriously, why are webdevs paid so little.
搞不懂为啥全栈工程师挣钱那么少。讲真,这群人基本工资至少都该有 50w。md 他们得会写前端,会写后端,会搞网络,数据库,缓存,懂 web 和手机端……天,又出了个啥框架要学?确实挣得太少了。

We should hire more interns, they're awesome. Those energetic little fucks with their ideas. Even better when they can question or criticize something. I love interns.
我们要多招实习生,他们超棒的。这帮充满活力又有点子的小 X。偶尔还能提点建设性意见。我爱实习生。

sip
小酌一口

Don't meet your heroes. I paid 5k to take a course by one of my heroes. He's a brilliant man, but at the end of it I realized that he's making it up as he goes along like the rest of us.
偶像都是见光死。我曾花了5千去参加一个偶像的培训课。之前一直觉得他是个大牛,上完课后才意识到他跟咱一样其实只是在装 B。

Tech stack matters. OK I just said tech stack doesn't matter, but hear me out. If you hear Python dev vs C++ dev, you think very different things, right? That's because certain tools are really good at certain jobs. If you're not sure what you want to do, just do Java. It's a shitty programming language that's good at almost everything.
技术栈是重要的。好吧,我之前说了相反的话。当你听到 Python 工程师和 C++ 工程师,你脑子想的是不一样的东西对么?因为有些工具是真的好用。如果你不知道干啥,就整 Java 吧。虽然是个稀烂的语言,但什么都能做。

The greatest programming language ever is lisp. I should learn lisp.
有史以来最伟大的编程语言是 Lisp。我应该学 Lisp。

For beginners, the most lucrative programming language to learn is SQL. Fuck all other languages. If you know SQL and nothing else, you can make bank. Payroll specialist? Maybe 50k. Payroll specialist who knows SQL? 90k. Average joe with organizational skills at big corp? $40k. Average joe with organization skills AND sql? Call yourself a PM and earn $150k.
对于初学者,最实惠的语言是 SQL。cnm 的其他语言。如果除了 SQL 啥都不懂,那你就能快速致富了。薪资专员?大概能挣 50k。会 SQL 的薪资专员?90k。大公司里有点组织能力普通员工?40k。会写 SQL 的?可以当 PM 了,150k 起。

Tests are important but TDD is a damn cult.
测试很重要,但 TDD 是种该死的邪教。

Cushy government jobs are not what they are cracked up to be, at least for early to mid-career engineers. Sure, $120k + bennies + pension sound great, but you'll be selling your soul to work on esoteric proprietary technology. Much respect to government workers but seriously there's a reason why the median age for engineers at those places is 50+. Advice does not apply to government contractors.
对于初中级工程师,在政府部门内工作并非传说中那么轻松自在。的确,120k 加各种福利和养老金听起来很赞,但是掌握那里所用的深奥冷门技术,相当于出卖灵魂。没有不敬的意思,但那里工程师平均年龄 50+ 不是无缘无故的。当然编外合同工例外。

Third party recruiters are leeches. However, if you find a good one, seriously develop a good relationship with them. They can help bootstrap your career. How do you know if you have a good one? If they've been a third party recruiter for more than 3 years, they're probably bad. The good ones typically become recruiters are large companies.
第三方猎头就像水蛭一样缠人。不过,如果发现一个真正好的,一定跟他保持良好关系。他们对你的职业生涯会大有帮助。怎么看出是一个好猎头?要是他干这行超过 3 年,那他应该不咋样,否则早就去了大公司。

Options are worthless or can make you a millionaire. They're probably worthless unless the headcount of engineering is more than 100. Then maybe they are worth something within this decade.
公司期权可能让你在10年内成为百万富翁。前提是你们公司有超过 100 人的工程师团队。否则恐怕一文不值。

Work from home is the tits. But lack of whiteboarding sucks.
在家办公爽歪歪。没有白板很不爽。

I've never worked at FAANG so I don't know what I'm missing. But I've hired (and not hired) engineers from FAANGs and they don't know what they're doing either.
我从没在 FAANG 工作过,所以可能不了解很多。但我招过(也拒过)前 FAANG 的工程师,他们照样是群不知道自己在干啥的人。

My self worth is not a function of or correlated with my total compensation. Capitalism is a poor way to determine self-worth.
我的个人价值和收入没有关系。资本不能决定价值。

Managers have less power than you think. Way less power. If you ever thing, why doesn't Manager XYZ fire somebody, it's because they can't.
经理们其实没多少权力。你看为啥从不见 XZY 开人?他并没有人事权。

Titles mostly don't matter. Principal Distinguished Staff Lead Engineer from Whatever Company, whatever. What did you do and what did you accomplish. That's all people care about.
头衔啥无所谓的。随便什么公司的『首席杰出带头大哥工程师』,爱啥啥。具体做的事情以及取得的成就才算数。

Speaking of titles: early in your career, title changes up are nice. Junior to Mid. Mid to Senior. Senior to Lead. Later in your career, title changes down are nice. That way, you can get the same compensation but then get an increase when you're promoted. In other words, early in your career (<10 years), title changes UP are good because it lets you grow your skills and responsibilities. Later, title changes down are nice because it lets you grow your salary.
说到头衔:职场早期,头衔越高越好。初级到中级到资深到首席。之后,头衔越低越好。这样你能拿同等工资,头衔再晋升时还能继续涨。换言之,10 年内,头衔晋升是好的,你的能力和权责都随之增长。10 年后头衔越低越好,因为方便涨工资。

Max out our 401ks.
利用好退休福利计划。

Be kind to everyone. Not because it'll help your career (it will), but because being kind is rewarding by itself.
与人为善。这对职业生涯也有好处。

If I didn't learn something from the junior engineer or intern this past month, I wasn't paying attention.
三人行必有我师。初级工程师或者实习生也肯定能教你些东西,除非你压根不留心。

Oops I'm out of wine.
诶,没酒了……

Paying for classes, books, conferences is worth it. I've done a few conferences, a few 1.5k courses, many books, and a subscription. Worth it. This way, I can better pretend what I'm doing.
在培训,书籍还有技术大会上花钱是值得的。我参加了若干场技术会议,超过 1500 块的各种课程,很多书还有订阅服务。值!这样我能装得更像回事……

Seriously, why aren't webdevs paid more? They know everything!!!
Md 为啥写网站的工资那么低?他们真的是无所不知啊!!!

Carpal tunnel and back problems are no joke. Spend the 1k now on good equipment.
手腕和后背痛不是开玩笑的。现在就去入至少价值 1k 的外设。

The smartest man I've every worked for was a Math PhD. I've learned so much from that guy. I hope he's doing well.
我共事过的最聪明的人是个数学博士。我从他身上学到了许多许多。希望他现在过得好。

Once, in high school, there was thing girl who was a great friend of mine. I mean we talked and hung out and shared a lot of personal stuff over a few years. Then there was a rumor that I liked her or that we were going out or whatever. She didn't take that too well so she started to ignore me. That didn't feel too good. I guess this would be the modern equivalent to "ghosting". I don't wish her any ill will though, and I hope she's doing great. I'm sorry I didn't handle that better.
高中时,我和一个女孩儿是很好的朋友。多年来我们经常聊天,出游,彼此分享。后来有了闲言碎语说我喜欢她,有不当举动什么的。她不太能接受于是开始避着我。那感觉不好,就像现在的『拉黑』一样。我不会怪她,希望她现在过得好。真希望当初我能好好处理。

I had a girlfriend in 8th grade that I didn't want to break up with even though I didn't like her anymore so I just started to ignore her. That was so fucked up. I'm sorry, Lena.
8 年级时,我不再喜欢当时的女友,但又不想正式分手,而只是不理睬她。这太差劲了……Lena,对不起。

You know what the best part of being a software engineer is? You can meet and talk to people who think like you. Not necessarily the same interests like sports and TV shows and stuff. But they think about problems the same way you think of them. That's pretty cool.
为啥当软件工程师是件好事?因为你能跟和你想法一样的人共事。不是说同样的兴趣爱好,而是思考问题的方式。这很酷。

There's not enough women in technology. What a fucked up industry. That needs to change. I've been trying to be more encouraging and helpful to the women engineers in our org, but I don't know what else to do.
技术圈里的女性太少了。这操蛋的行业,必须得改变。但除了鼓励和帮助业内的女工程师,我也不知道该怎么办。

Same with black engineers. What the hell?
黑人工程师的情形也一样。到底咋回事?

I've never really started hating a language or technology until I started becoming intimately familiar with it. Also, I think a piece of tech is good if I hate it but I simultaneously would recommend it to a client. Fuck Jenkins but man I don't think I would be commuting software malpractice by recommending it to a new client.
除非是已经深入了解,我不会讨厌一门语言或技术。并且如果技术本身是好的,就算我讨厌它,也会同时推荐给客户。除了 Jenkins,操他的,这根本就是对技术的亵渎。

That being said, git is awful and I have choice but to use it. Also, GUI git tools can go to hell, give me the command line any day. There's like 7 command lines to memorize, everything else can be googled.
话虽这么说,Git 也很恶心但我没得选。还有,任何图形化 Git 工具都可以去死。也就 7 个命令需要记住,其他的 google 就行了。

Since I work in data, I'm going to give a data-specific lessons learned. Fuck pandas.
我做数据的,行业相关教训:操你 * 的 pandas。

My job is easier because I have semi-technical analysts on my team. Semi-technical because they know programming but not software engineering. This is a blessing because if something doesn't make sense to them, it means that it was probably badly designed. I love the analysts on the team; they've helped me grow so much more than the most brilliant engineers.
我们组里有『准』技术分析师。他们会编程但不懂软件工程。这是件好事:如果他们搞不懂某样东西,通常说明这东西设计得烂。我爱他们;比起那些优秀的工程师,他们给我的帮助多得多。

Dark mode is great until you're forced to use light mode (webpage or an unsupported app). That's why I use light mode.
深色模式很好但许多网页或者 app 不支持。所以我默认用浅色模式。

I know enough about security to know that I don't know shit about security.
我有足够多网络安全的知识,所以我才知道自己这方面的水平就是坨 shi。

Crap I'm out of wine.
日,又没酒了……

Being a good engineer means knowing best practices. Being a senior engineer means knowing when to break best practices.
好的工程师知道最佳实践,资深工程师知道什么时候不用最佳实践。

If people are trying to assign blame to a bug or outage, it's time to move on.
对 bug 和掉线只会互相归咎的团队不适合长待。

A lot of progressive companies, especially startups, talk about bringing your "authentic self". Well what if your authentic self is all about watching porn? Yeah, it's healthy to keep a barrier between your work and personal life.
许多『进步派』公司,尤其是创业公司,喜欢谈『展现真实自我』。好吧,我的本性是爱看毛片,咋办?所以保持公私分明是件好事情。

I love drinking with my co-workers during happy hour. I'd rather spend time with kids, family, or friends.
闲暇跟同事喝酒挺好,但我更喜欢和家人朋友在一起。

The best demonstration of great leadership is when my leader took the fall for a mistake that was 100% my fault. You better believe I would've walked over fire for her.
上司替我犯的错背黑锅,这是对领导力的最佳诠释。我愿为她赴汤蹈火。

On the same token, the best leaders I've been privileged to work under did their best to both advocate for my opinions and also explain to me other opinions 'that conflict with mine. I'm working hard to be like them.
同样,最优秀的领导会竭力支持我的观点,同时也向我解释其他与之冲突的观点。我在争取成为那样的人。

Fuck side projects. If you love doing them, great! Even if I had the time to do side-projects, I'm too damn busy writing drunken posts on reddit
CNM 私活。有私活干,挺好。我没空,我的时间都 tm 用来写这篇帖子了。

Algorithms and data strictures are important--to a point. I don't see pharmacist interviews test trivia about organic chemistry. There's something fucked with our industry's interview process.
算法和数据结构固然重要——我没见过面试药剂师问有机化学问题的。我们这行的面试过程真操蛋。

Damn, those devops guys and gals are f'ing smart. At least those mofos get paid though.
搞 devops 的那些家伙们真 tnnd 的能干。挣得也多,操她妈的……

It's not important to do what I like. It's more important to do what I don't hate.
做自己喜欢的事情并不重要,重要的是做自己不讨厌的事情。

The closer I am to the product, the closer I am to driving revenue, the more I feel valued regardless of how technical my work is. This has been true for even the most progressive companies.
越贴近产品和营收,越能让人觉得受重视,工作的具体技术含量也无所谓了。即便在最进步的公司里也是这样。

Linux is important even when I was working in all Windows. Why? Because I eventually worked in Linux. So happy for those weekend where I screwed around installing Arch.
我工作中一直用 Windows,但 Linux 仍然很重要。为啥?因为我终究还是免不了用 Linux。怀念那些反复安装 Arch 的周末。

I've learned to be wary for ambiguous buzz words like big data. WTF is "big" data? I've dealt with 10k rows streaming every 10 minutes in Spark and Kafka and dealt with 1B rows batched up hourly in Python and MySQL. Those labels can go fuck themselves.
我会对那些模棱两可的流行词汇保持警惕,例如『大数据』。到底啥 tmd 叫『大』?我用 Spark 和 Kafka 搞过每10分钟1w行的数据流,还用过 Python 和 MySQL 批处理每小时10亿行的量,秒杀丫的。

Not all great jobs are in Silicon Valley. But a lot are.
硅谷之外当然也有好的职位,但多数还是在硅谷。

Finally, if you really want to hurt me, don't downvote I don't care about that. Just ignore this post. Nothing makes me sadder than when I wrote a long post and then nobody responds. So if you hate this post, just ignore.
最后,我不屑你拍砖。写这么长帖子最悲催的没人看没人转……

怎么看出是一个好猎头?要是他干这行超过 3 年,那他应该不咋样,否则早就去了大公司。

太有意思了。