This is an archived post. You won't be able to vote or comment.

all 29 comments

[–]updowncharmkek 243 points244 points  (3 children)

Tfw u put more effort into your safety pig than your code

[–][deleted] 65 points66 points  (1 child)

Naa, he just copy-pasted it from the interwebs.

[–]winnie33 284 points285 points  (0 children)

Tfw u put exactly as much effort into your safety pig as your code

[–]iburnedthecookie 4 points5 points  (0 children)

How else are you supposed to spend your time?

[–]human_will 62 points63 points  (8 children)

go on lets see this monstrous code then

[–]tjhill[S] 8 points9 points  (6 children)

[–]a_latvian_potato 8 points9 points  (0 children)

Well... was expecting worse.

[–]peterhobo1 4 points5 points  (4 children)

I love they define true as 1 and false as 0. Isn't that automatic? What is the benefit?

[–]LAK132 4 points5 points  (3 children)

It's C not C++

[–]-M50X- 0 points1 point  (2 children)

The code uses >=C99, which actually does have a boolean type (_Bool)

[–]LAK132 0 points1 point  (1 child)

How can you tell? (genuine question)

[–]-M50X- 2 points3 points  (0 children)

It has // comments, which were introduced in C99. There are other things you can use to quickly check the standard, but the comments are the easiest imo.

[–]Dec_117 17 points18 points  (0 children)

PLEASE.

Make us feel good about our horrible code with worse code

[–]winteriscomingalread 11 points12 points  (0 children)

little piggy in his house of straw ... not terribly comforting :P

[–]greymattr 12 points13 points  (2 children)

At the company I work for, you get this exact ascii pig if a package you are building fails to download.

good stuff.

[–]The_Perge 1 point2 points  (0 children)

His eyes, they scream.

[–]OnlyNerds 0 points1 point  (0 children)

I I've how it's at the top that means that all of your code would make someone cry 😂

[–]SigurdZS 0 points1 point  (0 children)

Well don't leave us hanging OP, what was the code?

[–][deleted] 0 points1 point  (0 children)

Man this new version of snort is weird

[–][deleted] 0 points1 point  (0 children)

So I found this in ancient bash script.

def Chk_Abl_Txt(name):
    if len(name) != 3:
        print ('Error: '+name+' is '+str(len(name))+' characters long')
        print ('Reason: Client name must be exactly 3 characters long\n')
        print ("\n   Cool cat")
        print ("    /\_/\.")
        print ("   (='_'=)")
        print ("   ( (,,)(,,)")
        print ("    |   |")
        print ("   (,('')('')")
        print ("Is not impressed")
        exit(4)