Unfortunately, it didn't work at all. Even though the nominal agreement was that during "work hours" I wasn't to be disturbed so I could be productive, and my wife agreed that was necessary and ok, in practice little things inevitably came up each day that broke flow and made it nearly impossible to get anything important done. I ended up switching jobs after a few months to a BigCo with an office in large part to regain that separation between work and personal life, to the benefit of both.
I'd still like to work from home, but I'm not sure that it's possible with my current life situation.
I wouldn't recommend this for junior devs though. You need to be around experienced people to fast track your learning.
Coffee/Break room chats and other social gatherings would help in building rapport with other devs and eventually you would be learning from each other. Unless the place you work is extremely toxic, I would say just give it time. My 2c.
Relatedly, I would design a 100% colocated team around basically the same workflow as a 100% distributed team.
Offices may still hold the upper hand here, a lot of people have mental barriers about messaging coworkers vs casually wandering by their office.
That said, I've done a lot more collaborative work at other times and definitely got more benefit from working mostly in an office. Also, although I know times and communication mechanisms have changed, I really have trouble imagining that I'd have either enjoyed or done well with working from home when I first graduated.
There is no template that fits all.
I have almost the same situation, 1,5h (one way) train + bicycle or buss trip to work. However my employer gives me the choice to work remote from home as much as I like.
I usually go to the office one or two times a week, and this is perfect for me right now, It might change in the future, who knows?
My strong believe in this subject is that you, as an employee, will more likely stay happy and perform better in your work if your employer gives you the flexibility of working remote.
What's real nice is to have the ability to find the right balance for yourself, if you have the luxury of a company that's relaxed about such things.
I live in the New Jersey suburbs and have an approximately 2 hour (one way) door-to-door train (includes a 20 minute walk from Penn station) commute to get to my office in Manhattan. For me, I like to be able to work at home 2-3 days a week. I do like to go into the office and see my co-workers and friends. I would feel out of it and lonely if I didn't have that. I just don't want to do it 5 days a week. Thankfully I have that luxury now. Situations change all the time and nothing is forever, but it's great at the moment.