理解到底发生了什么的重要性
The importance of understanding what the fuck is going on

原始链接: https://blog.jsbarretto.com/post/understanding

作者反思技术领导力、指导与不明复杂性的危险。为之前悲观的帖子道歉后,他们对比 Ian Duncan 的理想主义与 Justin Michael 的亲身经历,然后描述领导大型项目并帮助初级工程师。他们面对一个横跨抽象层与领域的庞大、文档匮乏的代码库。他们认为真正的工程师会调查异常行为而非将其视为神秘现象,尤其在“交给 Claude”这类 AI 快捷方式盛行时。理解隐藏原因比快速修复更重要;即使老板想要结果,开发者也必须保护学习空间。他们警告,系统变得过于复杂而无法理解会威胁民主,把人们变成崇拜者。一位资深同事通过追踪一次不可能的崩溃,发现其源自一个涉及未对齐 ELF 段和 ARM/Thumb 交互工作的旧动态链接器 bug,然后应用先前补丁。作者钦佩这种专长,并将指导与严谨调查视为职业亮点。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 理解到底发生了什么的重要意义 (jsbarretto.com) 11 分 由 notfried 2 小时前 | 过去 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

We have […] arranged things so that almost no one understands science and technology. This is a prescription for disaster. We might get away with it for a while, but sooner or later this combustible mixture of ignorance and power is going to blow up in our faces.

~ Carl Sagan

I apologise for the downbeat tone of my last post to all that came across it. As it turns out I’m human too and sometimes I have days where it feels like the world is slowly ending. This one has more spring to its step.

The other day I was reading Ian Duncan’s response to Justin Michael’s blog post and it hit me that both are talking about different things. Michael is speaking from experience and observation. Duncan, in contrast, is envisioning a world that could be; that he hopes is the one we live in; but ultimately is not real. This post is not a response to either, but I want to credit both for getting me thinking about the topics contained herein. And, for inspiring me to swear in my post title.


I have recently been blessed/cursed with the responsibility of being the technical lead for a large-ish project at my day job. There are nice things to say about this, although the stress of having to see one’s own ideas about how software engineering should be done put into practice is draining. It’s one thing to crow from the sidelines and quite another to be the person at which the buck stops. So far I feel happy that things are playing out broadly as I hoped, but I am not an optimist by nature, so this is not much of a reassurance.

As part of this work I’ve had the opportunity to spend time helping more junior engineers in the team develop their skills; all the way from those that are just a few years behind me in experience, to those fresh out of university. It’s quickly becoming apparent to me that the opportunity to be a part of their journey toward becoming accomplished engineers, and the chance to learn from them to improve myself, might end up being the thing I look back on as the high point of my career.

A large part of our job is the task of coming to terms with a very large codebase that pre-dates our involvement. By and large it is lacking documentation, but is nominally functional. Its complexity cuts across many lines of abstraction and its code refuses to be constrained to a single layer of the traditional software stack. I have days in which my conversations veer between topics as alien to one-another as capacitance, cache line invalidation, and JavaScript promise cancellation. It is often impenetrable, and the outputs it gives in its native environment are often perilously difficult to correlate with the inputs provided to it. Many of these challenges are inherent to the domain and are unavoidable. Some are not.


I have always maintained that the greatest skill a software engineer can have is the ability to resist sliding into mysticism, but this codebase has tested me like no other. In this god-forsaken industry with few standards, little regulation, and no social memory, it’s made me realise that the dividing line that separates mere programmers from genuine software engineers is their reaction to the unexpected.

How many times have you made a seemingly innocuous change only to see a long-standing bug vanish? How often have you tweaked a supposedly inconsequential tuning parameter only to see a system start dropping jobs at random? To a programmer, these are a sign from above: follow the hint and move on. For an engineer, they’re a clue to something deeper going on that warrants investigation.

It’s an uphill battle these days, and it seems like many have given up. ‘Give it to Claude’. If I could tell junior engineers anything, it’s to resist that siren call. Engineers are a patchwork of battle scars, and each one tells a story of a confrontation with the unexpected. Finding the solution might give you immediate joy, or it might make your boss happy, but you will learn so much more by uncovering the negative space that sits around the solution than you ever will by passing the problem on. In an age of ever-easier answers that no longer require even understanding the question, it’s critical to understand that the interests of your boss and your own career have diverged: you must fight for the space to learn.

My greatest fear is that we are creating a world that is too complex for its inhabitants to understand. That’s a problem not just for engineers, but for democracy. When a system becomes unknowable to its subjects, no matter how individually rational its constituents parts, the only means of reasoning with it is prayer. We may not be creating a god, but we’re certainly turning ourselves into worshippers. You should ask yourself whose interests this serves, and act appropriately.

Fides ex machina.


I also have the pleasure of working with a more senior engineer who’s been through it all before with a similar system. Sometimes I like to think myself an engineer, but then one of us will encounter an issue that, by all rights, seems impossible: perhaps a function being called with no caller in sight, or a machine that’s monologuing to itself instead of chatting to its neighbour. The temptation to revert the last change on a whim lingers in the air, but instead I turn to them for advice.

“Give me a moment”

5 minutes later and they’re back with an answer.

“Those symptoms look similar to something I found 5 years ago. Back then, I spent a day walking back through the system and traced the issue to a bug in the dynamic linker. It doesn’t handle unaligned ELF segments properly: if a segment other than .text contains ARM/Thumb interworking, the linker will misalign the code and the CPU will interpret your ARM function as Thumb. By chance, part of libc, which only gets inlined with these specific set of compiler flags, looks very much like a syscall instruction after it’s been offset by a half-word, and that’s why you’re seeing a crash on a syscall ID that doesn’t exist. I found the bug in the linker and patched it back then. Here’s the diff.”

I blink. The architecture on which this bug manifests does not even support GDB. They figured this out on the back of a single, disassociated log line from the kernel among a sea of noise. I struggle to imagine how, even with a century of experience, I could reach such heights.

I try their patch. It works.

联系我们 contact @ memedata.com