Famously, JK Rowling wrote the Harry Potter books (or part of them) at various cafes, because at the time she was poor and needed somewhere warm and dry to work. I noticed that that nearly all the websites that tell this story say "in" a cafe rather than "at". And I think that probably helps people understand the meaning BUT what really makes it clear is that they use the verb "to write" and not the verb "to work", because people (waiters, cooks, etc) who work in cafes don't 'write'. It's a bit more difficult with a computer programmer because I don't think we have a clearly understood verb ('he programs' or 'he codes' aren't really that universally understood). You'd have to say what he does, maybe "He uses his laptop in a cafe."