r/github • • Nov 27 '21

Sorry guys

I pushed my ugly code and they decided to put the whole site down when they saw how horrible it was...

187 Upvotes

19 comments sorted by

10

u/gogo94210 Nov 27 '21

Update : apparently my O(n!) search algorithm was so bad they even took down GitHub Pages because they don't want to be associated with the demonic horror I made.

2

u/[deleted] Nov 27 '21

[removed] — view removed comment

10

u/gogo94210 Nov 27 '21

It's the big O notation, it's a term used in computer science to describe the complexity of an algorithm.

O(n!) means that for a list of n elements, my algorithm will take n! (1 x 2 x 3 x ... x n) steps to find an element in the list, which is the worst complexity possible.

2

u/Krypton_Rimsdim Nov 28 '21

Reminds me of Richard's code from Silicon Valley.

2

u/rafaelement Nov 27 '21

Set n to 100 and it'll run but set it to 1000 and it'll run till the end of time

1

u/briang_ Nov 28 '21

I don't think the difference in runtime for n=100! and n=1000! matters much.

11

u/Chritoble5000 Nov 27 '21

its alright man

10

u/Chritoble5000 Nov 27 '21

i lied... its not okay

3

u/pcgamerwannabe Nov 27 '21

/u/gogo94210

F U AND UR CODE I NEED THIS THING WORKING

6

u/gogo94210 Nov 27 '21

Ye but man, my new homemade O(n!) search algorithm is still on their server

122

u/gastrognom Nov 27 '21 edited Nov 27 '21

Haha, I just imagine someone coming into the CEOs office after seeing your commit.

"Did you see that?"

looking somewhat disgusted "Yep"

"What do we do?"

"Just... just shut it down. It's over."

8

u/Chritoble5000 Nov 27 '21

lmfao, BRO THIS COMMENT DESERVES AN AWARD

1

u/Khyta Nov 27 '21

lol, this made me chuckle

1

u/Less_Ocelot_2556 Nov 27 '21

uf! I thought it was mine

0

u/[deleted] Nov 27 '21

we will start a GitHub v2 without you now lol >:(

0

u/napolitain_ Nov 28 '21

For real tho, so many idiots in classrooms still push binaries and .O on GitHub which always annoys me quite a lot. I wish git init initialized a universal gitignore for those dudes!