A story · Friday, 23:10一个故事 · 周五 23:10
"I just want to know when the build breaks."“我只想知道构建什么时候挂了。”
Ray maintains a small open-source library. Every night the CI runs, and every morning he opens his laptop to find out whether it broke. Notifications are useless: they sit among forty other ones.阿哲维护着一个小开源库。CI 每晚跑一次,他每天早上都得打开电脑才知道挂没挂。推送通知没用,它总是淹没在另外四十条通知里。
So on Friday night he types one line to the box on his shelf:于是周五晚上,他对书架上的那个盒子打了一句话:
Make me a little cat that sits on my desk. Ears glow red if last night's CI failed, green if it passed. Press its head to rerun.给我做只小猫放桌上。昨晚 CI 挂了耳朵亮红灯,过了亮绿灯。按一下脑袋就重跑。
CtenoPlan: ESP32-S3 Pod board, 2 RGB LEDs, 1 button, coin cell. I'll write firmware on the Pod protocol, generate a cat shell in OpenSCAD, slice it for your printer, and wire it to your repo's CI. Printing takes about 2h40m. Approve the print?方案:ESP32-S3 Pod 主板、2 颗 RGB 灯、1 个按键、纽扣电池。我按 Pod 协议写固件,用 OpenSCAD 生成猫形外壳,给你的打印机切片,再接上仓库的 CI。打印大约 2 小时 40 分。开始打印吗?
Approve开始
What happened overnight这一夜发生了什么
- 23:14Writes a parametric cat shell (OpenSCAD), leaving a slot for the Pod board and a hole for the button.写好参数化猫形外壳(OpenSCAD),给主板留槽,给按键留孔。
- 23:20Slices it and sends it to the printer over the LAN. Progress shows on the status lamp.切片,局域网发给打印机。打印进度显示在状态灯上。
- 23:31Generates the firmware: two output events (led.set), one input event (button.press). Builds and waits for USB.生成固件:两个下行事件(led.set),一个上行事件(button.press)。编译好,等 USB 插上。
- 23:40Adds a webhook for the CI and a rule: failed → red, passed → green, button → rerun (asks first if it's a release branch).接上 CI 的 webhook,写好规则:失败亮红,成功亮绿,按键重跑(发版分支先问一句)。
- 02:02Print done. Leaves a note: "Plug the board in, I'll flash it."打印完成,留言:“把板子插上,我来烧。”
Saturday morning, Ray drops the board in, snaps the shell shut, plugs in USB. Thirty seconds later the ears glow green.周六早上,阿哲把板子塞进去、扣上外壳、插上 USB。三十秒后,猫耳朵亮起了绿灯。
He hasn't opened his laptop before breakfast since.从那以后,他再也没在早饭前打开过电脑。
A peripheral used to be a product someone else had to ship. Now it's something you ask for on Friday and use on Saturday.过去,一个外设是别人要量产、要上架的产品;现在,它是你周五提出来、周六就能用上的东西。