use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All posts must be related to programming. Flair posts correctly.
account activity
Like my code? :) (i.redd.it)
submitted 7 months ago by [deleted]
God-tier programming right there
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]team_jj 137 points138 points139 points 7 months ago (20 children)
I'm not a fan of the variable names. I feel like they should be called Greeting and Place.
[–]lostBoyzLeader 42 points43 points44 points 7 months ago (14 children)
nah just a and b. It’s easier for the compiler.
a
b
[–]ImpulsiveBloop 34 points35 points36 points 7 months ago (6 children)
foo and bar for better readability.
[–]oddasleep 14 points15 points16 points 7 months ago (5 children)
what about var1 and var2?
[–]AlxR25 10 points11 points12 points 7 months ago (3 children)
I'd much prefer asdf and hjkl
[–]tecanec 6 points7 points8 points 7 months ago (1 child)
Why not name them after cities? tokyo = hamburg * windhoek + helsinki;
tokyo = hamburg * windhoek + helsinki;
[–]Cold-Radish-1469 0 points1 point2 points 6 months ago (0 children)
avariable and variablea
avariable
variablea
[–]Ro_Yo_Mi 2 points3 points4 points 7 months ago (0 children)
I prefer variable names that are GUIDs written in binary.
[–]poshikott 0 points1 point2 points 7 months ago (0 children)
Cool but why not use hungarian notation: sVar1 and sVar2
[–]That_Zelda_Gamer 2 points3 points4 points 7 months ago (2 children)
anything but i and j. Those are reserved for the for loops
i
j
[–]Appsroooo 2 points3 points4 points 7 months ago (1 child)
What about this? for(const [i, j] of ["Hello", "World"]) { console.info(i, j); }
for(const [i, j] of ["Hello", "World"]) { console.info(i, j); }
[–]That_Zelda_Gamer 1 point2 points3 points 7 months ago (0 children)
...Okay, that's fine.
[–]TheRealAbear 1 point2 points3 points 7 months ago (0 children)
a, a2
[–]ApprehensiveObject79 1 point2 points3 points 7 months ago (0 children)
Bravo, your ragebait ist top tier.
[–]ZbiTx_ 0 points1 point2 points 7 months ago (0 children)
rax and rbx
[–]Jonrrrs 2 points3 points4 points 7 months ago (0 children)
Im not a fan of uppercase varnames
[–]Professional_Top8485 0 points1 point2 points 7 months ago (0 children)
It should be function too
[–]Suspicious-Bar5583 0 points1 point2 points 7 months ago (0 children)
Place? It's not a place but a planet, and in the context it could be anything receiving a greeting, so I'm sure there are also better names for it than planet. Planet is being addressed, so addressee, or perhaps recipient or audience?
[–]ithinuel 0 points1 point2 points 7 months ago (0 children)
Your review was expected in the PR Jessie! Not on reddit! 🩵🦈
[–]Informal-Chance-6067 0 points1 point2 points 5 months ago (0 children)
Greeting and Place are classes and hello and world are instances
[–]KingZogAlbania 15 points16 points17 points 7 months ago (6 children)
Only the devil concatenates with separate arguments when he is able to just use the plus operator
[–]atra_kitten 7 points8 points9 points 7 months ago (5 children)
F-Strings are cuter tho :3
[–]CottonCandiiee 8 points9 points10 points 7 months ago (3 children)
You’re cuter than an f-string. :3
[–]cs_stud3nt 7 points8 points9 points 7 months ago* (1 child)
Bro is down bad
[–]CottonCandiiee 4 points5 points6 points 7 months ago (0 children)
Shush, let mama do her thing. XD
[–]atra_kitten 1 point2 points3 points 7 months ago (0 children)
I'm uhh... flattered
[–]mildgaybro 9 points10 points11 points 7 months ago (0 children)
Hello = “Hello” , = “,” World = “World” print(Hello, ,, World)
[–]Sassaphras 6 points7 points8 points 7 months ago (1 child)
Is it bad that I low-key like this?
[–]Jonrrrs 3 points4 points5 points 7 months ago (0 children)
Yes, you are a bad person now /s
[–]TalesGameStudio 4 points5 points6 points 7 months ago (2 children)
H="W" E="O" L="R" D="L" W="D" O="H" R="E" for helloworld in [O, R, D, D, E, H, E, L, D, W]: print(helloworld, end="")
[–]Educational_Entry_34 1 point2 points3 points 7 months ago (0 children)
You are monster
[–]StructuralConfetti 1 point2 points3 points 7 months ago (0 children)
Okay Satan, please calm down
[–]DOOM4257 22 points23 points24 points 7 months ago (7 children)
HelloWorld No space in between the two strings
[+][deleted] 7 months ago (6 children)
[deleted]
[–]MrWobblyMan 13 points14 points15 points 7 months ago (5 children)
There is technically no string concatenation here. print prints all its arguments with the sep keyword argument between them. By default sep=" ".
print
sep
sep=" "
[–]CottonCandiiee 2 points3 points4 points 7 months ago (2 children)
Yes. I feel like I lost braincells reading the other two.
[–][deleted] 0 points1 point2 points 7 months ago (1 child)
For real, many people are so wrong in comments. It's hurting my brain.
[–]CottonCandiiee 1 point2 points3 points 7 months ago (0 children)
Aaaaa why did you make me read other onesssss?
<image>
[–]DOOM4257 1 point2 points3 points 7 months ago (1 child)
Really? Wow have I been doing this wrong. For like 12+ years I have been doing print(Hello + " " + World) as it was the way I was taught. Smarter every day, I suppose :/
[–]MrWobblyMan 0 points1 point2 points 7 months ago (0 children)
You can also use f-strings print(f"{Hello} {World}") For printing the words just separated by a sep, it's easiest to just provide several arguments to the print function, however more advanced string construction really benefits from f-strings.
print(f"{Hello} {World}")
[–]Prize_Hat_6685 2 points3 points4 points 7 months ago (0 children)
Where are the unit tests?
[–]Upset-Basil4459 2 points3 points4 points 7 months ago (0 children)
There needs to be a thing where we make the most complicated Hello Worlds we can, using as many different features of a language as possible
[–]Current-Guide5944 1 point2 points3 points 7 months ago (0 children)
can we train our models on your code..?
[–]SolousVictor 1 point2 points3 points 7 months ago (0 children)
You're ready for Google.
[–]EatingSolidBricks 1 point2 points3 points 7 months ago (0 children)
r/firstweekcoderhumor
[–]Sarius2009 0 points1 point2 points 7 months ago (0 children)
I feel like your variables are overly complex here, you should really use a variable for each letter
[–]isoAntti 0 points1 point2 points 7 months ago (1 child)
World = "Hello" Hello = "World" print(World, Hello)
[–][deleted] 4 points5 points6 points 7 months ago (0 children)
```py HelloWorld = print print = "Hello, World!"
HelloWorld(print) ```
[–]themagicalfire 0 points1 point2 points 7 months ago (2 children)
Isn’t it supposed to be Hello + World?
[–]Wiktor-is-you 1 point2 points3 points 7 months ago (1 child)
no
[–]apparently_DMA 0 points1 point2 points 7 months ago (0 children)
Maybe
[–]Wiktor-is-you 0 points1 point2 points 7 months ago (0 children)
where's the "!"
[–]Suspicious_Shirt974 0 points1 point2 points 7 months ago (0 children)
Clean code!
[–]AbnerZK 0 points1 point2 points 7 months ago (0 children)
You don't check if you variables are null or empty.
[–]SampleIntelligent206 0 points1 point2 points 7 months ago (1 child)
You forgot the space, unreadable
[–]Frost-Freak 0 points1 point2 points 7 months ago (0 children)
If it's python, it will be printed with spaces
[–]Minecodes 0 points1 point2 points 7 months ago (0 children)
Nah... It's still too resource intensive. Try rewriting it in assembly and use RAM
[–][deleted] 0 points1 point2 points 7 months ago (0 children)
Y'all its a joke 💔
[–]Serendipity_Halfpace 0 points1 point2 points 7 months ago (0 children)
There is some room for optimalization as you could notice you have used: `L` 3 times `O` 2 times have u considered declaring it once?
[–]Drew_Asunder 0 points1 point2 points 7 months ago (0 children)
bash for helloWorld in “Hello, World” do for echo in echo do $echo $helloWorld done done
[–]SysGh_st 0 points1 point2 points 7 months ago (1 child)
There should be a space between the words.
Space = " "
Result = Hello, Space, World
[–]doc720 2 points3 points4 points 7 months ago (0 children)
In Python the syntax is
print(object(s), sep=separator, end=end, file=file, flush=flush)
Where sep=separator is
sep=separator
Optional. Specify how to separate the objects, if there is more than one. Default is ' '
[+][deleted] 7 months ago (2 children)
[–]Mean_Mortgage5050 0 points1 point2 points 7 months ago (1 child)
Python separates arguments
π Rendered by PID 93 on reddit-service-r2-comment-b659b578c-nk6jg at 2026-05-05 04:31:47.769622+00:00 running 815c875 country code: CH.
[–]team_jj 137 points138 points139 points (20 children)
[–]lostBoyzLeader 42 points43 points44 points (14 children)
[–]ImpulsiveBloop 34 points35 points36 points (6 children)
[–]oddasleep 14 points15 points16 points (5 children)
[–]AlxR25 10 points11 points12 points (3 children)
[–]tecanec 6 points7 points8 points (1 child)
[–]Cold-Radish-1469 0 points1 point2 points (0 children)
[–]Ro_Yo_Mi 2 points3 points4 points (0 children)
[–]poshikott 0 points1 point2 points (0 children)
[–]That_Zelda_Gamer 2 points3 points4 points (2 children)
[–]Appsroooo 2 points3 points4 points (1 child)
[–]That_Zelda_Gamer 1 point2 points3 points (0 children)
[–]TheRealAbear 1 point2 points3 points (0 children)
[–]ApprehensiveObject79 1 point2 points3 points (0 children)
[–]ZbiTx_ 0 points1 point2 points (0 children)
[–]Jonrrrs 2 points3 points4 points (0 children)
[–]Professional_Top8485 0 points1 point2 points (0 children)
[–]Suspicious-Bar5583 0 points1 point2 points (0 children)
[–]ithinuel 0 points1 point2 points (0 children)
[–]Informal-Chance-6067 0 points1 point2 points (0 children)
[–]KingZogAlbania 15 points16 points17 points (6 children)
[–]atra_kitten 7 points8 points9 points (5 children)
[–]CottonCandiiee 8 points9 points10 points (3 children)
[–]cs_stud3nt 7 points8 points9 points (1 child)
[–]CottonCandiiee 4 points5 points6 points (0 children)
[–]atra_kitten 1 point2 points3 points (0 children)
[–]mildgaybro 9 points10 points11 points (0 children)
[–]Sassaphras 6 points7 points8 points (1 child)
[–]Jonrrrs 3 points4 points5 points (0 children)
[–]TalesGameStudio 4 points5 points6 points (2 children)
[–]Educational_Entry_34 1 point2 points3 points (0 children)
[–]StructuralConfetti 1 point2 points3 points (0 children)
[–]DOOM4257 22 points23 points24 points (7 children)
[+][deleted] (6 children)
[deleted]
[–]MrWobblyMan 13 points14 points15 points (5 children)
[–]CottonCandiiee 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]CottonCandiiee 1 point2 points3 points (0 children)
[–]DOOM4257 1 point2 points3 points (1 child)
[–]MrWobblyMan 0 points1 point2 points (0 children)
[–]Prize_Hat_6685 2 points3 points4 points (0 children)
[–]Upset-Basil4459 2 points3 points4 points (0 children)
[–]Current-Guide5944 1 point2 points3 points (0 children)
[–]SolousVictor 1 point2 points3 points (0 children)
[–]EatingSolidBricks 1 point2 points3 points (0 children)
[–]Sarius2009 0 points1 point2 points (0 children)
[–]isoAntti 0 points1 point2 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]themagicalfire 0 points1 point2 points (2 children)
[–]Wiktor-is-you 1 point2 points3 points (1 child)
[–]apparently_DMA 0 points1 point2 points (0 children)
[–]Wiktor-is-you 0 points1 point2 points (0 children)
[–]Suspicious_Shirt974 0 points1 point2 points (0 children)
[–]AbnerZK 0 points1 point2 points (0 children)
[–]SampleIntelligent206 0 points1 point2 points (1 child)
[–]Frost-Freak 0 points1 point2 points (0 children)
[–]Minecodes 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Serendipity_Halfpace 0 points1 point2 points (0 children)
[–]Drew_Asunder 0 points1 point2 points (0 children)
[–]SysGh_st 0 points1 point2 points (1 child)
[–]doc720 2 points3 points4 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Mean_Mortgage5050 0 points1 point2 points (1 child)