r/shittyprogramming • • Sep 10 '17

[OC] Shitty programmers should always remember to flush their standard output.

Post image
227 Upvotes

20 comments sorted by

45

u/ranma1988 Sep 10 '17

... how is this flushing? new line is NOT directly connected to output flushing!

16

u/Behindthesailboats Sep 10 '17

Then I guess I chose the correct subreddit?

9

u/ThreeFx Sep 10 '17

Oh damn I thought I was in /r/ProgrammerHumor. Lol my bad

17

u/ThreeFx Sep 10 '17

Default is line buffering AFAIK. fflush(stdout) is better though, I agree

26

u/ziplokk Sep 10 '17

Jokes on you, I use stderr. Now if youll excuse me, I need to go pinch a fat log message.

12

u/interiot Sep 10 '17

Why would the shell pipe stdout into the stdin of another process? Ewww, gross.

2

u/[deleted] Sep 10 '17

Isn't that .. normal? I mean that's how a facility uses grep poop.

1

u/ziplokk Sep 10 '17

Like I always say, one pipe's out is another pipe's in.

7

u/HugoNikanor Sep 10 '17
putchar('\n');

5

u/threesevenths Sep 10 '17

All I see is a syntax error.

1

u/keppinakki Sep 10 '17

Not if it's octave script, then it's completely valid :)

1

u/threesevenths Sep 10 '17

Open quote and close quote characters are not valid. It must be a regular quote.

1

u/keppinakki Sep 11 '17

Well that's true

3

u/Dicckk Sep 10 '17

The amount of times outlook would turn my quotes into those "fancy quotes" and my uselss co-workers would struggle going "I just don't get why it says syntax error??????". Cretins.

2

u/ekolis Sep 10 '17

Won't compile without a semicolon. Might even give you colon cancer...

2

u/[deleted] Sep 10 '17

Also the nonstandard quotes would cause a compiler error.

Also lack of main method.

All signs of shit programming.

Also it's a sign.

1

u/__comrade__ Sep 17 '17

Where's the love for puts() guys?

1

u/__comrade__ Sep 17 '17

Where's the love for puts() guys?

0

u/GrantSolar Sep 10 '17

No carriage return?

0

u/[deleted] Sep 10 '17

[deleted]

14

u/Behindthesailboats Sep 10 '17

Quotes are because Word for large landscape printing. As for the semicolon- at first it bugged me when I realized, but then I figured it would be best to leave all colon matters (semi or otherwise) to the person sitting on the toilet.

8

u/ThreeFx Sep 10 '17
  • non monospace font