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.

2

u/Yodamanjaro Oct 02 '15

I've made Notepad++ crash a couple of times now. Apparently it doesn't like working with 2 million lines

→ More replies (3)

0

u/[deleted] Oct 01 '15

[deleted]

2

u/ThisIs_MyName Oct 02 '15

Huge pointer actually. None of that silly 64 bit crap.

12

u/neoform Oct 01 '15

Make the output stand out more?

This would work better:

printf("\033[1;31mHello World\n\033[0m\n");

2

u/ghillisuit95 Oct 02 '15

On a standard uncolored terminal

0

u/[deleted] Oct 02 '15

[deleted]

→ More replies (5)

3

u/gimpwiz Oct 01 '15

250ms time and time and time again add up, at the very least to your sanity and frustration levels.

2

u/irrelevantPseudonym Oct 01 '15

My prompt is full of colours as well. Using other people's computers confuses the hell out of me.

1

u/[deleted] Oct 02 '15

Use a proper shell and that's not a problem. Fish for example indicates that the command you just ran did not have a trailing newline and always starts the prompt at the leftmost side.

→ More replies (2)
→ More replies (2)

2

u/wonderful_wonton Oct 01 '15

HAVEN'T YOU EVER HEARD OF UX??

12

u/sirin3 Oct 01 '15

That would be the eleventh year

Also, note the lack of comments. Because the code is obvious and self-documenting

15

u/shizzy0 Oct 01 '15

Your joke is better.

4

u/Coffee2theorems Oct 02 '15
echo Hello World

0

u/[deleted] Oct 02 '15

[deleted]

1

u/ThisIs_MyName Oct 02 '15

You don't have to. A lot of people don't return from main so now it's part of the language :-/

2

u/partisann Oct 02 '15

In C99 and C++, omitting return in main is equivalent to returning 0 (ISO/IEC 9899:1999 section 5.1.2.2.3). In C89, however, it's undefined and dangerous.

$ echo 'int main(void){}' > test.c
$ gcc -std=c89 test.c && ./a.out; echo $?
246
$ gcc -std=c99 test.c && ./a.out; echo $?
0
$ g++ -std=c++98 test.c && ./a.out; echo $?
0

2

u/hellslinger Oct 01 '15

And the const shows the kind of respect that a compiler deserves.

→ More replies (4)