> I wore a suit to my very first interview for a dev position and very nearly didn't get the job because they were worried I wouldn't fit in
Yeah - I hate this. I had people at my last position give candidates negative points because they wore a suit and I went $%&#ing ape. In positions that I've held in the past it's been the appropriate action to wear a suit due to heavily corporate environments, and I see it as 110% normal that someone puts on a nice suit for an interview. The action of wearing a suit (or tie for that matter) to an interview should never be seen as a "cultural fit" problem - I'm looking at you SV...
Sorry that almost happened to you. That's some bullshit.
---
Overall a nice well-fitting button down + a pair of well-fitting dress slacks is what I would recommend. Personally, I wear a slim fit brand new white button-down (ironed), nice dark blue chinos (ironed, not pleated), and not-scuffed brown wing-tips. Often I also wear a tie, but am considering not thanks to a derelict SF "big-wig" grilling me in an interview as to "why are you wearing a tie?" All I wanted to say is "does it matter?" (offender: you're reading this don't do that again.)
Also get a solid hair cut, ensure you're shaved if male, and yeah - sit up and be confident while you're in the chair. Body language does matter, and your interviewer will subconsciously notice regardless if they're giving you a "pass" or not.