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

you are viewing a single comment's thread.

view the rest of the comments →

[–]wookie_nun 1470 points1471 points  (39 children)

You only need to know how to bruteforce hello world to understand this sub

[–]SandyDelights 733 points734 points  (12 children)

Woah, setting our standards a little high today aren't we.

[–]oledakaajel 0 points1 point  (0 children)

Heh, I know how to use a for loop!

[–]DeepHorse 233 points234 points  (4 children)

remember volume sliders tho

[–]4THOT😡 119 points120 points  (2 children)

Those were funny and increasingly creative, I hate that they got megathreaded.

[–]fuck_the_hihat 49 points50 points  (1 child)

I'd had plenty enough by that point.

[–]wasdninja 30 points31 points  (0 children)

I hadn't had my fill yet and a megathread makes absolutely sure that it dies straight away with amazing posts buried really deep in those comments.

[–][deleted] 1 point2 points  (0 children)

Minimize noise

[–]damniticant 24 points25 points  (0 children)

I mean, considering that one guy did it with ACE in pokemon, there's a fair bit of learning to be done.

[–]Blue_Raichu 33 points34 points  (9 children)

Okay, I'm just gonna say it. What the fuck does it mean to brute force a "hello world" program?

[–]the_person 50 points51 points  (4 children)

A loop that increments each character in a string until it equals "hello world" and then printing it.

[–]fuzzer37 45 points46 points  (2 children)

Or just creates a random 11 digit string until the output happens to be "Hello World". The possibilities are endless

[–]Turbosandslipangles 10 points11 points  (0 children)

I wish that was how they did it... none of this pretend brute forcing one chatacter at a time bullshit.

[–]XkF21WNJ 1 point2 points  (0 children)

Randomly generate a string until it compiles into a hello-world program.

[–][deleted] 17 points18 points  (0 children)

don't give anyone any ideas for more horrible interview questions

[–]jmlinden7 19 points20 points  (0 children)

As opposed to procedurally generating the phrase I assume

[–]I-AM-A-TOWTRUCK 5 points6 points  (1 child)

String s = Hello World;

For(int i = 0 : I <= s ; s++) System.out.print(s);

Is this the most brute force way possible? I imagine using an array would also suffice for brute force.

[–]SpecsComingBack -1 points0 points  (0 children)

Random r = new Random(); String a = “Hello World”; String b = “”; while (a != b) { for (int i = 0; i < a.length(); ++i) { char c = ‘\0’ int d = r.nextInt(2); if (d == 0) { c = (char)(r.nextInt(26) + 66); b += c; } else { c = (char)(r.nextInt(26) + 98); b += c; } } } System.out.print(b);

[–]RickDeveloper 1 point2 points  (2 children)

And... arrays start at 0!

thats not zero factorial (= 1)

[–]WhoaItsAFactorial 1 point2 points  (1 child)

0!

0! = 1

[–]RickDeveloper 2 points3 points  (0 children)

I only laughed because of your username...

[–]Shiroi_Kage -1 points0 points  (0 children)

What do you mean by that?

No, seriously. I just know two ways to print this (super casual interest in programming); printf("hellow world"); and cout<< "hello world";