我在地铁上编程。
I Program on the Subway

原始链接: https://www.scd31.com/posts/programming-on-the-subway

## 地铁编程:最大化利用空闲时间 搬到纽约市大大减少了空闲时间,但作者发现了一个高效利用每日一小时通勤时间的办法:编程。尽管存在局限性——没有理想的设置,没有稳定的网络,以及难以测试代码——他们发现这种专注的环境出奇地有益。 由于潜在的干扰可能导致无法充分发挥能力,可以通过处理简单的任务(如系统配置或硬件初始化)来缓解。复杂的难题则在纸上勾勒出来。虽然存在被盗的风险(通过一台廉价、易于更换的笔记本电脑和Nix配置备份来解决),作者也发现了一个社交益处,引发了与同为技术爱好者的对话。 目前最大的障碍是找到座位,促使他们想出了一个古怪的解决方案:安装在裤子上的分体键盘,搭配AR眼镜。最终,作者提倡拥抱“地铁编程”,以此来夺回被浪费的时间,并培养对干扰的适应能力。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 工作 | 提交 登录 地铁编程 (scd31.com) 6 分,作者 evankhoury 1 小时前 | 隐藏 | 过去的 | 收藏 | 3 条评论 kevin_thibedeau 7 分钟前 | 下一个 [–] > 我甚至没有网络连接。 氛围编码者感到一股强大的力量波动。回复 cadr 15 分钟前 | 上一个 | 下一个 [–] 我过去在 BART 通勤时完成了很多工作。还用一个 25 键迷你 MIDI 键盘学习钢琴,直到我使用的学习程序需要第 26 个键。回复 abstractspoon 23 分钟前 | 上一个 [–] 在 80 年代,我会带着伦敦地铁往返于工作途中,处理成堆的扇折式代码打印稿。 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Programming some m68k assembler for my custom SBC at 1am on the subway. Sorry it's blurry!

Ever since moving to New York City, I've found my time to be in more demand than ever. Between work, meetups, and social events, I have noticeably less time for side projects than I had before moving here. At the same time, my commute is a massive time suck. It's 30 minutes each way, which doesn't sound that bad, but it means I'm wasting an hour every day.

These days, I use this time to program.

You don't get much, but that's good

On the subway, I'm missing a lot of my normal setup. I don't have multiple monitors or a fancy keyboard. I don't even have an internet connection. I don't mind this, though - in fact, I think the lack of distractions is quite beneficial to my focus. The only thing I can do is the exact thing I'm working on.

And if I really do need an internet connection, most subway stops have free WiFi, and I've found there's enough time to connect and briefly use the connection without getting off the train. I've done this before to download a package or quickly check some documentation.

You might not even get enough to run your code

A lot of my side projects involve low-level embedded code. Generally I don't bother writing simulators for my hardware, so when I'm on the subway I can't test my code beyond checking that it compiles. I'm generally a big proponent of a fast edit/compile/run cycle, but being forced to think deeply about your code and what it will do can be helpful. If I was doing this all day every day, it might be an issue, but if it's only for an hour a day or so, I don't think it's that bad.

You can't use 100% of your thinking capacity

The non-ideal environment of the subway means I can't use my brain fully. Keeping complex state machines in my head is risky, because it is very easy for e.g. a loud noise to cause it to disappear immediately. In practice, I don't find this to be much of an issue, because even complicated projects have a lot of busywork to do. Daemons I write need a systemd service created and Nix packaging, embedded devices need their hardware initialized, etc.

In the rare case I have nothing to do but something very complex, I generally keep my laptop in my bag and instead sketch out a diagram on a piece of paper of what I need to build and how I plan to build it. I always keep a small notebook in my bag for this reason.

It's (probably) safe?

My friends often joke that they're surprised my laptop hasn't been stolen yet. In practice I think this is probably a pretty unlikely thing to have happen. My laptop is a cheap ThinkPad that I bought used on Ebay a few years ago for a few hundred dollars. If someone wanted to steal it, they would have to do it at a station, where they could immediately get off the train. I think, though, that this would be risky, given that subway stops generally have a lot of people getting on/off the train in the first place.

So I'm not going to worry about it too much, and if it does happen it's a relatively simple matter of buying a new ThinkPad and rebuilding Nix from my config (thank you Nix)

You can make friends

I've had good conversations with strangers who have asked about what I'm working on. I think in general being a little weird is a good strategy to make friends, and programming in public has the additional benefit that you attract other people who like to program, plus you give them something to talk to you about!

You need a seat (for now...?)

The subway is busy, and especially during rush-hour, it can be tricky to find a seat sometimes. Right now this is the biggest limitation for me - it really sucks to be excited to work on something and then have to put it off because no seats are free.

Currently I am working on affixing a split keyboard to my pants, so that I can program while standing up. There are existing products that are essentially a pair of glasses with a screen inside of them, which I'd use as my display. This will give me more opportunities to program, although at the cost of looking a lot weirder (^:

You should program on the subway

If any part of this post resonates with you, you should program on the subway! It might feel weird at first, and it might take a bit of practice to get into a flow state, but I think it's worth it. Being resilient to distractions is a good skill to have outside of the subway, too!

联系我们 contact @ memedata.com