The most I've ever done was nearly 500 lines of C++ in a single day, around the year 2005. The domain was capital markets. The code complied the first time and ran with only a few bugs. The code was spread across several functions, but no classes or other abstractions. Only business logic and I/O operations. Written on vi. Not even vim (no syntax highlighting). On a telnet session to a server about a 100 meters away. There were no meetings that day. Never been able to replicate this feat since.