I’ve used both approaches and I can’t disagree more. Writing code first might feel faster but it isn’t. It’s great for surface level issues but just muddies the waters for any consequential feature.
IMO this is very dependent on the risk of cutting once, so to speak. I'd imagine that at PostHog, the idea is there's little risk of cutting many times - iterating - and more damage is done by the measuring taking far too long.
This is true but there is another cost. If you carelessly write you can end up with a system which is a mountain of bandaid fixes; an incoherent and unmaintainable mess.
Measure(communicate) twice, cut(build) once.