I've done some coding on trains (who am I kidding, playing games mostly) and my experience is screen and screen hinge are an issue. Unless you're on some kind of perfectly smooth monorail, you're going to have a bouncy ride. So a small screen is good, less wobble.
On the other hand, a larger screen makes it easier to see under stereotypically bad lighting conditions.
I found it much more difficult to concentrate on the train than in my nice quiet cubicle. Those suffering in open plan most likely would consider the worst train car ever to be blissful calm compared to "work". Just saying your needs for calm are hard to predict over the internet. I had to put on earbuds on the train, but I can see those used to a more abusive workplace might not be bothered by train and passenger noises at all.
Personally I always locked the thing up and was uncomfortable a couple times on commuter rail even when just going to the bathroom. So you might want to think about, if I fold this thing up can it fit in a giant coat pocket or something. Would you be comfortable taking this device to the bathroom with you, because you're probably going to have to, sooner or later. So smaller/lighter would be better.