I Program on the Subway

(scd31.com)

132 points | by evankhoury 5 days ago

35 comments

  • dackle 4 hours ago
    Here is a description of the daily commute by Michael Milken, 1980s junk bond king, as told in "Predator's Ball" by Connie Bruck:

    At 5:30am each weekday in the early 1970s, a bus pulled up to a stop in Cherry Hill, New Jersey, and a young man lugging a bag that bulged with papers mounted its steps. He was making the two-hour commute to New York City, where he worked at the investment­ banking firm of Drexel Firestone. The train would have provided a more comfortable and faster ride; but, for those very reasons, it also offered more opportunity to meet other Wall Street acquaintances. They would want to engage in the kind of idle small talk that commuters share to pass the time. The thought must have been intolerable. He did not wish to be rude, but he wanted no interrup­tion.

    As soon as he had settled into his seat, being sure to take one with an empty one adjacent, he unloaded a mountain of prospectuses and 10ks (annual Securities and Exchange Commission filings) onto the seat next to him. On winter mornings the sky was still pitch black and the light on the bus was too dim for him to be able to read. He wore a leather aviation cap with the earflaps down; he had been bald for years, and although he wore a toupee his head always felt cold on these frosty mornings. Now over his aviation cap he fitted a miner's headlamp -- strapped around the back of his head, with a huge light projecting from his forehead.

    • gotezk 3 hours ago
      [flagged]
      • snake42 3 hours ago
        Why would you ever think this an acceptable thing to say?
  • ziofill 5 hours ago
    When I was living in Paris I had a 20 min ride from home to work each day. I picked up the habit to read during those 40 total minutes and I was going through books like I had never been able to, because while 40 min is not a lot, it’s about 150h per year. One easily underestimates the power of consistency.
    • bitmasher9 4 hours ago
      I read many books a year by reading for 20-30 minutes per night before sleeping. A habit with multiple benefits (winding down and reading or commuting and reading) is very powerful for getting the most value out of your time.
      • bbkane 50 minutes ago
        Until the book gets really good and you have to keep reading past your bedtime to learn what happens (or maybe that's just me)
        • druskacik 6 minutes ago
          It's not just you, I hear this often, but I am always suprised people can read for so long in bed. No matter how interesting a book is, I can rarely read more than 20-30 minutes before the urge to fall asleep becomes too strong.

          But I can sometimes code until like 4AM. Weird.

    • prinny_ 46 minutes ago
      I also used to read my commute but stopped it after I finished "for whom the bell tolls". I was so moved that I ended up crying in the bus and I would have liked to experience that feeling in the privacy of my home rather in the morning bus with 9 hours still on the clock.
    • systems 1 hour ago
      how can you read in 20 minutes, for me 20 minutes is only good enough to stare out the windows and ... zip zip 20 minutes are gone

      i need a couple of hours to do any technical reading

      20 minutes, maybe, maybe .. good enough if i am reading fiction or something

      • scubbo 46 minutes ago
        > how can you read in 20 minutes

        > good enough if i am reading fiction or something

        Looks like you got there in the end.

    • theshrike79 3 hours ago
      I commute to the office 1-3 times a week, it's about 30 minutes on the train + some walking.

      I've gone through so many books it's crazy :)

      With audiobooks I can start listening the second I step out of the door and stop while I take my jacket off in the office. With e-books I usually just read on the train.

      Most books aren't that long, around 5 hours a week of reading just during your commutes is quite a bit.

    • ipaddr 3 hours ago
      For one year I read every free moment averaged a book every 3 days mostly biographies many on wrestling. The year I got an e-reader (alura tech). Stopped after the screen broke.

      The book that stood out the most. Sugar Barons.

  • teddyh 3 hours ago
    Many years ago, before mobile internet was reasonable and before wireless internet was available, and before even electrical outlets were something which could be counted on to be present on trains, I took a 6 hour train ride. I had no laptop. I printed out, on paper, the entire source code of the project I was working on, and brought a red pen. I read through the whole thing, from start to finish. Many subtle bug fixes, refactorings, and efficiency improvements were made that day.
  • incanus77 32 minutes ago
    About 20 years ago, I landed my first real, high-impact job at an upstart consulting agency in Washington DC that came from the ashes of the Howard Dean campaign. Unfortunately, I had also just signed a lease on an apartment in the town I lived in, a two hour drive from downtown DC.

    I spent the first year at that job commuting into DC 2-3 days/week, which involved about an hour drive, then an hour regional commuter train, then some Metro transfer and walking — then back again in the evening. I spent that train time offline (as it was 2004) learning the Apple Cocoa frameworks, as in another twist of fate, the company was entirely Apple laptop-based, which was fairly rare for 2004, and I built tools for the team and myself. The focus possible because I was offline, with comprehensive docs, was pretty intense and was a huge part of many aspects of my career to follow.

    • j_bum 29 minutes ago
      Sounds like an incredible period. Do you miss it at all?

      I’ve had phases of my life where I was lucky to have periods of absolute and undisturbed focus (grad school, summers during college, etc.). It’s easy to forget how valuable that type of focus time is until it goes away!

  • komali2 4 hours ago
    > 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.

    I've seen a phone jacking in this exact scenario and nobody moved to stop the guy running. Nobody on the train can help cause the doors have closed, and nobody on the platform has any idea anything just happened, or if they do the guy is well gone before they can put two and two together.

    For me I always pocket my phone or e-reader at each stop, unless I'm in Japan or Taiwan.

    • btrettel 2 hours ago
      Here's my experience with (attempted) theft on a train:

      I once was on a MARC train at DC Union Station. Some train cars have electrical sockets, so I plugged in a bike light I had since I'd be taking a bike for the last part of the trip. The train hadn't left the station yet. I was standing near the seat with the socket. Some unassuming looking guy was walking through the train car, like probably 100 did before him, when he grabbed the light, unplugged it, and kept walking. I immediately confronted him (I was in his path) saying something like "What are you doing?" Without a word, he handed me the light and walked off the train. I found a conductor like 15 seconds later and they called security, who apparently detained the guy.

      This guy was way more brazen about stealing something of little value than I had expected. I was standing near the seat and watching it! I guess he didn't expect me to be the owner.

      • DANmode 42 minutes ago
        He didn’t expect you to confront him before he was gone.
    • ibejoeb 1 hour ago
      I'm not worried about the laptop. Pretty much everyone knows that any valuable laptop is a tracking device anyway.

      You should be worried about getting actually robbed, or even being attacked for no reason, while you're not paying attention.

      Also, yes, nobody's going to help you. Some of it is because of general unawareness, as you point out. Then, it's difficult to know who's the aggressor. Even if that's all crystal clear, you're almost certainly going to deal with months or years of legal hell if you intervene. Successful interventions often lead to prosecutions.

    • afavour 1 hour ago
      I also code on the subway from time to time and this does occur to me. But there are locations in an NYC subway car you can sit that would make it very difficult for someone to grab your laptop and exit the train before the doors close. It's still a risk but it's not uncommon to see people with all kinds of valuable items (e.g. shopping bags from premium fashion stores) out in the open on the subway.

      Crazy to think back to 2007 when iPhone users were advised to buy black earphones so the white ones wouldn't give them away as targets for theft. How far we've come/how commoditized our electronics have become.

    • schoen 3 hours ago
      I wonder what you could usefully do with a Kensington lock on the train. I bought one for use in cafés although I haven't used it most of the time.

      You could attach it to something bulkier or something that you could put under the seat, maybe. I don't remember if New York subway seats have an exposed bar underneath that you could lock it to. I'm sure locking it to the vertical poles in the center of the car would be extremely antisocial.

      • ms-fellag 1 hour ago
        Wear it like a belt while attaching it to the laptop (If you don't mind looking a bit ridiculous).

        Although I'd highly recommend putting some cloth around it, or fitting it through the belt loops of jeans/trousers to soften the inevitable 'yank' when it comes.

      • avidiax 2 hours ago
        Just my opinion, but I feel Kensington locks have little value.

        Sure, maybe it will deface the stolen item when it gets ripped off, but for a thief, the device is still usable, and it can be sold for parts or at a discount. We are talking about the sorts of people that steal bicycle wheels and seats.

        Their utility is in keeping honest people honest. For example, keeping office workers or customers from just walking off with or moving assets.

        https://www.youtube.com/watch?v=t6wRhrWl_2M

        • schoen 2 hours ago
          Here we're literally talking about protecting the device while the user is actively using it! Just preventing someone from grabbing it by hand for 5 seconds is a huge win.
    • trinix912 4 hours ago
      True, but a laptop is much more of a hassle to quickly grab and run with than a phone.

      What also helps is having one that's full of stickers or overall looks fairly (ab)used. A pristine MacBook is going to be much more of a target than a random ThinkPad with a sticker, greasy keyboard and 20 scratches.

      • Spooky23 4 hours ago
        Depends on where and when you are. Some hyped up dude is fixated on the next fix and lacks the executive function to discriminate. The more professional thieves are more discriminating.
        • bitmasher9 4 hours ago
          I agree that it’s just a matter of when it’s stolen, not if it’s going to be stolen.

          The article suggests the laptop is about $300, and he uses it about 1hr/day.

          If the laptop is stolen less than once a year he spends less than $1/hr for coding on the go, which I would consider a fair deal.

      • hopelite 4 hours ago
        There’s probably no market for it, but it might be interesting to make a MacBook case/cover and/or stickers that make it look old, cracked, scratched, and dirty.

        It would be interesting to see if that would deter a thief.

  • mncharity 41 minutes ago
    > I've had good conversations with strangers

    Laptops sometimes have stickers. For a time, I instead had a transparent slip cover, to vary the sticker set, user-test alternatives, and throttle conversations. Science education topics (Boston/Cambridge subway). Anti-patriarchy stickers drew proto-MAGAs. Some backpacks now have low-res screens built into the back, suggesting new possibilities.

    One Laptop Per Child, at its peak, generated fun continuous crowd conversations.

    > a pair of glasses with a screen inside of them

    I've no idea what current tech is like, but I use to proselytize aphysical UIs, where a small head motion results in larger screen motion, to reduce neck swiveling.[1]

    > weirder

    Laptop harness walking desks are a thing. And one can do hand and head tracking[2] (I had that setup at a meetup where the swag was little stick-on privacy shutters for laptop webcams :). Boston/Cambridge is perhaps culturally a best case for such games - I've not tried them in NYC... hmm.

    > but something very complex, [...] instead sketch out a diagram on a piece of paper [...] keep a small notebook in my bag

    Same. I've tried swapping in an iPad, but it hasn't stuck.

    [1] silly old demo, 5k on a bus: https://x.com/mncharity/status/1225091755667853318 [2] https://imgur.com/a/keyboard-cam-Z1VipaL

  • kevin_thibedeau 5 hours ago
    > I don't even have an internet connection.

    Vibe coders feeling a great disturbance in the force.

    • DoctorOW 4 hours ago
      Not immediately of course, you have to wait until the robots are trained on this blogpost.
    • venturecruelty 3 hours ago
      Using your brain and skills to program is so 2021.
    • mohamez 5 hours ago
      Nomophobia is the word for that lol
      • anthk 2 hours ago
        Or plain incompetence...
  • don-code 1 hour ago
    Doing connected work from the subway has gotten much, much easier in the last few years. I attribute that to three things:

    1. Cell service has become low-latency. This is very different from "fast", which it has also become! When I started working from the train (on HSPA+), pings in the hundreds of milliseconds were the norm. My first step was usually to SSH to a remote machine, and let just the text lag on me. Nowadays, I can run a Web browser locally without issue.

    2. Cell service has, at the same time, become ubiquitous in subway tunnels. When I started, there were some areas that dropped down to EDGE (unusable), and some areas that had no service at all. Now, there is exactly one place on the Boston transit system - Back Bay Station - where I lose cell service.

    3. Noise cancelling tech has gotten better. It's not just about noise cancelling headphones: both of my laptops (a 2024 MBP and a ThinkPad P14s) have microphones that can filter out screeching wheels and noisy teenagers quite well. That means I can take meetings without making them miserable for the people on the other end.

    These, honestly, are a huge game-changer for me. The ability to take a 30 minute meeting while commuting, where otherwise I would've had to get in early or stay late at work, actually does wonders for my ability to have a life outside of work.

    • isaacdl 41 minutes ago
      > The ability to take a 30 minute meeting

      At the small cost of making everyone around you miserable.

  • saagarjha 5 hours ago
    I used to do work on Caltrain, which used to be like 3 hours of my commute and didn't have any internet, so I would carefully plan what I could do beforehand. My code deploys to a machine that's very different from my laptop, but I had a Docker container set up to cross compile things and loaded up the docs beforehand, so as long as I planned out what I wanted to do.

    These days Caltrain is faster and has occasionally frustrating, but fairly good Wi-Fi, so now my constraints are that I don't have a large monitor but not really much else.

  • btreesOfSpring 3 hours ago
    When I was part of a team developing a highly durable texting protocol, those of us in NYC would regularly test messaging while riding the subway. Between stations, you didn't have network access but different devices upon entering the next station would handle and recover from the interruptions in various ways.

    The subway produced so many repeatable network connection edge case problems. It was fantastic.

  • nicbou 4 hours ago
    My entire stack is meant to let me work offline in random locations. Until recently it was meant to run smoothly on a 12" Macbook. The output is also made for users on spotty internet connections. This comes from years of working while travelling. I can work offline for weeks if needed.

    I sometimes do "iPad work", which is essentially researching, reviewing and annotating content on my iPad Mini. I will hop on my bike and work an hour or two in different locations, over coffee or in the sun. It's a relaxing break from working on a computer at a desk.

    I do think that people should work in different places. Perhaps we'd have apps that work better on slow internet.

    • theshrike79 3 hours ago
      IIRC there are some actual studies that say changing your physical location will actually affect your performance.

      In my previous $dayjob I was That Guy who was getting pinged on chats and emails and people dropped in for "just a quick question". When I had to get work done on a deadline, I went to a cafe down the street, turned off the chats, got a massive bucket of coffee, put on my noise cancelling headphones and just ... worked. Later when the office got bigger (multiple stories in the same building), I "hid" on a couch at a complete different department for the same purpose.

      That was almost 10 years ago and still my brain connects couches and cafes as deep work places :D

      • nicbou 3 hours ago
        It was mostly to fit my travel habits, but you might be right. Nowadays I work at a cafe with friends every Monday. It's a nice break from WFH.
  • allkushdiet 56 minutes ago
    I used to do this as I commuted on the train between school and my hometown in the early 2010s. As a way to learn and pass the time.

    No access to internet so mostly hacking from memory. I could use man pages for C, but Haskell was a bit more tricky.

    Sometimes I’d just end up sketching things out on paper, but eventually I could complete entire modules without looking anything up. Was always a bummer to be stuck on something that I knew could be answered online in mere seconds. Good times.

  • cadr 5 hours ago
    I used to get so much done on my BART commute. Also learned piano on a little 25 key midi keyboard until the program I was learning from started needing a 26th key.
    • firefax 5 hours ago
      I used to get frustated that the train shook so loud that in combination with the sound of the train I struggled to listen to podcasts, kudos to you.
      • cadr 4 hours ago
        I sometimes would bring ear-protection headphones that I'd wear over my earbuds to muffle the train noise.
    • gozzoo 5 hours ago
      That's so cool. Can you share more about this. What program and keyboard did you use? Did you proceed with more serious learning?
      • cadr 4 hours ago
        I used an Akai LPK25 with my iPhone (using the Camera Connection Kit and a combined usb hub/dac) and an app called Simply Piano. They make a wireless version of that now that would simplify the setup a great deal. It is a mini keyboard and the keys are quite small, but in my experience it was fine for the beginner stuff (and the keyboard is useful in general later). As I said before, I stuck with this until the app started using keys outside the range I had.

        Now, as for "did I proceed with more serious learning" - I alternate though a ton of hobbies. So I moved on after that, though still go back to it from time to time. But I also have other musical interests and it was helpful to those as well.

        Also did a lot of music on the commute on my iPhone with Korg Gadget (and Caustic before that). Sometimes with a keyboard, sometimes without.

  • ghostly_s 4 hours ago
    Did this for a couple years on a 45 minute CTA commute in Chicago while I was learning to code outside my day job, it honestly made that commute not even feel burdensome. Key was that I was 1.) on the brown line, which was still running the 3200-series cars with plentiful seats, and 2.) at an early enough stop to reliably get one. And can confirm an old Thinkpad (x220 at the time) is the king of commute coding.
  • macNchz 3 hours ago
    I recently bought a GPD MicroPC 2, a 7” laptop with a real keyboard. It runs Linux just fine, and it has been a fun experience of having a “real” computer with me much more often than I otherwise would. My version of programming on the subway has been programming on a park bench—it fits in a jacket pocket, or even the back pocket of some of my pants. The keyboard is tiny but easy enough to use with thumbs, or, with some practice, two-handed touch typing on a flat surface.

    It’s nice to be less tethered to a desk, while also not having to carry a backpack and heavier full laptop, but still able to remote in and do what I need to do. I really enjoy having a fully capable Linux PC in my pocket vs a smartphone.

  • Myzel394 3 hours ago
    I was in Philadelphia for a week and also used my commute time (2 hours in total each day) to program. As a web developer who uses Github Copilot and often checks documentation online, I did not have such a good experience as OP had. Mobile data is pretty much nonexistent in Philadelphia in the subway and there are also no wifi Hotspots. Sure, it was better than nothing, but I would quite often find myself waiting for the subway to arrive at stations and hoping that there is at least some internet connectivity there.
  • abstractspoon 4 days ago
    Back in the 80s I would work on stacks of fanfold code printouts on my trips on the London underground to and from work
  • Wowfunhappy 4 hours ago
    I’ve done this before, but you need a relatively long subway ride without any transfers. IMO, 30 minutes is just barely at the edge of being worthwhile, and only if you can get a seat right when you get on, and only if the seat isn’t so cramped that it’s actually possible to get your laptop out of your bag. This happens rarely.

    But on longer trips from e.g. upper Manhattan to deep Brooklyn, particularly at off-peak hours when I have room to spread out—yeah, I’ve had some very productive sessions.

  • almost_usual 5 hours ago
    I work/program on CalTrain but that’s pretty common. NYC subway or BART seems a bit more challenging.

    It’s overall time much better spent than being stuck in a car.

  • trinix912 4 hours ago
    I've done it a few times on city busses which I'd say are worse than subway. Less legroom, bumpier ride, more people passing by. My 13" laptop barely fit.

    It's not something I'd want to do on the daily but if you really need to get something done and are running out of time (those busses get stuck in traffic for half an hour or more), it's doable.

  • internet2000 3 hours ago
    30 minutes is enough? I hope this person doesn't complain about "flow state" when I interrupt him by dropping by at his desk then!
  • neomantra 4 hours ago
    I love to program on my commute. When I took NJ Transit bus, when I took NY Ferry, when I took MetroNorth.

    But I’ve never felt comfortable opening a laptop on the NYC subway. It wasn’t about the safety that OP describes. It was about the culture and the physical configuration (facing middle with strap hangers vs facing front/back). It just didn’t feel right in the subway.

    I do miss the MetroNorth Bar Car! I could drink and code and it was jovial.

  • gregsadetsky 3 hours ago
    Reminds me of this metafilter thread [0] where people asked/shared less usual work locations. Hotel lobbies are a great one, as have laundromats sometimes been in the past.

    An intercity train with wifi/cell service (and tea!) is an incredible focussing function as well. You got 3 hours and a beautiful not too distracting view. Go!

    P.s. I also suggested to Stephen that he gets a Nathan Fielder “laptop harness” for his subway work..? Has anyone tried this?

    [0] https://ask.metafilter.com/316039/Ideas-for-workspaces-pleas...

    • theshrike79 3 hours ago
      Louis Rrossmann[0] had a massive tirade against Macbooks over a decade ago because they didn't have a battery hump in the back.

      Why you ask?

      I'll tell you. He edited videos on the NY subway using his Lenovo(?) laptop with a massive extra battery hump in the back, which he used as a handle to hold on to with one hand while he typed with the other.

      [0] https://www.youtube.com/@rossmanngroup

  • horizion2025 4 hours ago
    I have always enjoyed it. I have even gotten comments "can you really do anything in such a short period of time" but i have found that even 20 min sessions on a commute can be effective. For a major project I did the final push on such a commute just hoping the push could complete before the train reached the tunnel without coverage, and it did
  • mlhpdx 4 hours ago
    Not often, and not recommended, but I have coded on the cockpit table while single-handing a sailboat. Interrupting a conference call with “sorry, one moment, I have to tack out of the fleet” is its own special joy.
  • Chinjut 3 hours ago
    I love making money for my employer with every spare moment of my life.
    • htk 3 hours ago
      If you took the time to read the first paragraph instead of typing this snarky comment, you'd know he's working on his personal projects.
      • venturecruelty 3 hours ago
        Not paying attention on the train, even in 2025 girliepop-influencer-Instragram-latte-art New York, is not the smartest. You're probably better off during rush hour, but being aware of your surroundings is never a bad idea, even in "safe" New York.
    • ipaddr 3 hours ago
      Do your work today and tomorrow you can fool around and have some fun. Do the minimum today so you can do the maximum tomorrow rarely makes sense.
  • helterskelter 2 hours ago
    I do my best thinking on the bus.
  • jonlam92 4 hours ago
    With some noise cancelling headphones, it may actually help with focus. I'm a fan of doing things on the subway.
  • ktzar 3 hours ago
    I developed a big chunk of my Scumm games decompiler in London's central line. I was lucky (or unlucky) enough to go far enough each day to always hand an empty seat and enjoy 30 minutes of me time each way.

    All on a Chromebook with crostini. Cheap, long battery life and decent keyboard.

  • bitwize 3 hours ago
    I used to program on the Boston T. I had my little MSI Wind netbook and I coded a game on my commutes to and from work. I eventually ported that game to Android.
  • MuffinFlavored 4 hours ago
    > Between work, meetups, and social events, I have noticeably less time for side projects than I had before moving here.

    Lucky you. :) Good problem to have.

  • venturecruelty 3 hours ago
    This is how transplants get mugged, but okay. Why not just enjoy your hour of zen instead of constantly working?
  • 65 4 hours ago
    Eh. My preferred subway activity is to listen to music and stare at the ground. I don't know... do I really need to stare at my computer screen every waking moment?
  • pinkroute 5 days ago
    [dead]
  • chrischen 5 hours ago
    With coding agents AI almost never manually type code anymore. It would be great to have a code editor that runs on my phone so I can do voice prompts and let the coding agents type stuff for me.
    • lbrito 5 hours ago
      That sounds awful
      • xnx 5 hours ago
        Similar to a product or engineering manager giving directions on a call from the golf course.
        • lbrito 4 hours ago
          Golf course isn't bad; I witnessed a CEO join meetings from the subway and packed airport concourses lol
          • Spooky23 4 hours ago
            Early in my career I drew the short straw to fetch a C level exec who was running a critical incident from a strip club and too drunk to drive.

            I had to pay the $90 three drink minimum to get in. Getting that reimbursed was fun.

          • trinix912 4 hours ago
            But hey, look how productive they are with their time! :)
    • llbbdd 5 hours ago
      I have been doing this with GitHub's copilot agent web interface on my phone; word-vomit voice prompt + instructions to always run the tests or take screenshots so I can evaluate the change works really well.
    • breckenedge 5 hours ago
      Claude does this, at least on an iPhone. They added Code to the app about a month ago. I used it to get a Pebble Watch project started.
    • venturecruelty 3 hours ago
      I thought this was a joke until I read your profile. I hope you get better. <3