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.