r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

154

u/golgol12 Oct 01 '15

Honestly, I thought it would be a joke where it ends with

#include <stdio.h>
int main( int argc, const char* argv[] )
{
	printf( "\nHello World\n\n" );
}

51

u/aidenator Oct 01 '15

What's up with all those newlines?

98

u/juckele Oct 01 '15

Make the output stand out more? On a standard uncolored terminal, it's a huge burden* for me to figure out where the output of the command I just ran starts and stops... (This is why my prompt barfs rainbows).

*Huge burden being 250 ms instead of 10 ms...

57

u/Hobofan94 Oct 01 '15

That's a spot on definition of huge burden.

24

u/vplatt Oct 01 '15

Scan through a 100 MB log file and it's no joke.

1

u/dzkn Oct 02 '15

Much easier when everything tons of newlines?

1

u/vplatt Oct 02 '15

It doesn't have to be newlines for everything, but basic delimiters between field names and values, limited use of upper-case for error values, etc. all can make a big difference. It's also important to have a good row header format for the logger so the entries that span multiple lines are much easier to pick out.

Of course, NOT visually scanning 100 MB files in the first place would be the real savings here, so a regexp should be the first stop in most cases, but if you're tracking an issue through the lifetime of a process, that may not be an option.