Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » What's the funniest code we can think of?
- Jonathan50
-
Scratcher
1000+ posts
What's the funniest code we can think of?
That's because Windows TCP/IP stack is based on the BSD one./etc/hosts, not sure what the equivalent is for windows.lol. where's hosts.etc?if pong was a hostname…You can add ping to your hosts.etc (is that the file?) and the code will work
bash:ping pong
Ironically, also in /etc/hosts - but you have to navigate to C:\Windows\System32\drivers first.
- liam48D
-
Scratcher
1000+ posts
What's the funniest code we can think of?
Yeah, I checked later./etc/hosts (aka HOSTS file), you mean?if pong was a hostname…You can add ping to your hosts.etc (is that the file?) and the code will work
bash:ping pong
- JonathanSchaffer
-
Scratcher
1000+ posts
What's the funniest code we can think of?
from weird import so-dumb from time import sleep while True lol("nothing") if (Im mad) crash the computer take no responsibility move to("china") take over("python 3") print("What the..") sleep(2) print("I know python")
- NoMod-Programming
-
Scratcher
1000+ posts
What's the funniest code we can think of?
Actually wouldn't you need to add “pong” to your hosts file (not ping)?Yeah, I checked later./etc/hosts (aka HOSTS file), you mean?if pong was a hostname…You can add ping to your hosts.etc (is that the file?) and the code will work
bash:ping pong
- liam48D
-
Scratcher
1000+ posts
What's the funniest code we can think of?
Yeah.. idk why my post was so bad lol.Actually wouldn't you need to add “pong” to your hosts file (not ping)?Yeah, I checked later./etc/hosts (aka HOSTS file), you mean?if pong was a hostname…You can add ping to your hosts.etc (is that the file?) and the code will work
bash:ping pong
- Gaza101
-
Scratcher
500+ posts
What's the funniest code we can think of?
>>> class Expectations(Exception): def __init__(self): super(Expectations,self).__init__("raised") >>> raise Expectations Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> raise Expectations Expectations: raised
- Dylan5797
-
Scratcher
1000+ posts
What's the funniest code we can think of?
You can't have hyphens in import names. Variables can't have spaces. You have to have a colon after while True and if (Im mad)from weird import so-dumb from time import sleep while True lol("nothing") if (Im mad) crash the computer take no responsibility move to("china") take over("python 3") print("What the..") sleep(2) print("I know python")
- OSimulators
-
Scratcher
68 posts
What's the funniest code we can think of?
My random code:
Yeah.. I was bored XD.when green flag clicked
move [How is this possible? v] steps
forever
forever
forever
forever
forever
forever
forever
forever
forever
forever
forever
say [hi v] for [a billion v] secs
end
end
end
end
end
end
end
end
end
end
end
- Spooikypok_Dev
-
Scratcher
100+ posts
What's the funniest code we can think of?
make sure you're root!
sudo sudo sudo (unnecessary repetitions removed by moderator - please keep it brief)
sudo sudo sudo (unnecessary repetitions removed by moderator - please keep it brief)
Last edited by Paddle2See (April 18, 2016 17:14:04)
- liam48D
-
Scratcher
1000+ posts
What's the funniest code we can think of?
make sure you're root!That was.. unnecessary.
sudo sudo sudo sudo sudo […]
- Spooikypok_Dev
-
Scratcher
100+ posts
What's the funniest code we can think of?
Yup!make sure you're root!That was.. unnecessary.
sudo sudo sudo sudo sudo […]
- Jonathan50
-
Scratcher
1000+ posts
What's the funniest code we can think of?
make sure you're root!Only the first one was necessary
sudo sudo sudo (unnecessary repetitions removed by moderator - please keep it brief)

- -Radical-
-
Scratcher
500+ posts
What's the funniest code we can think of?
sudo sudo sudo (unnecessary repetitions removed by moderator - please keep it brief)
WDYM unnessessary—you can never be too root!
- DigiTechs
-
Scratcher
500+ posts
What's the funniest code we can think of?
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
This is too true. Like, I'm a fan of OOP but when it gets to some crazy level like that it just gets pointless. For example, if I were to write that code, I'd have three classes:
- Translator (for translating ‘Fizz’ and ‘Buzz’ or any other string I'd need. It would use .pot files to provide the translations.)
- Main (because the program needs an entry point)
- FizzBuzz (to do the actual work of the program)
I'm a fan of small, extendible classes which are functional.
Last edited by DigiTechs (April 19, 2016 15:33:00)
- Jonathan50
-
Scratcher
1000+ posts
What's the funniest code we can think of?
This is too true. Like, I'm a fan of OOP but when it gets to some crazy level like that it just gets pointless. For example, if I were to write that code, I'd have three classes:The fact that you'd have any classes other than Java's required main class for such a trivial application is almost disturbing
- Translator (for translating ‘Fizz’ and ‘Buzz’ or any other string I'd need. It would use .pot files to provide the translations.)
- Main (because the program needs an entry point)
- FizzBuzz (to do the actual work of the program)
I'm a fan of small, extendible classes which are functional.
(use gettext)
Last edited by Jonathan50 (April 19, 2016 22:10:12)
- scratchisthebest
-
Scratcher
1000+ posts
What's the funniest code we can think of?
Ohhhhhh my goodness someone's making something extendable. Call the cops.This is too true. Like, I'm a fan of OOP but when it gets to some crazy level like that it just gets pointless. For example, if I were to write that code, I'd have three classes:The fact that you'd have any classes other than Java's required main class for such a trivial application is almost disturbing
- Translator (for translating ‘Fizz’ and ‘Buzz’ or any other string I'd need. It would use .pot files to provide the translations.)
- Main (because the program needs an entry point)
- FizzBuzz (to do the actual work of the program)
I'm a fan of small, extendible classes which are functional.
(use gettext)
- Dylan5797
-
Scratcher
1000+ posts
What's the funniest code we can think of?
>>> def ish(a, b): return 0 - a * b >>> multiply = 0 >>> multiply-ish(4, 7) 28
- Firedrake969
-
Scratcher
1000+ posts
What's the funniest code we can think of?
yeah we need to extend the fizzbuzz program
somehow
idk how tho
(disclaimer - I have no experience in Java)
somehow
idk how tho
(disclaimer - I have no experience in Java)














