r/programmingmemes 17d ago

writingHelloWorldWithoutAllTheGear

Post image
434 Upvotes

108 comments sorted by

203

u/LimpRepresentative11 17d ago

25

u/cakeuucappa 17d ago

I ran out of free awards so here. I hope this works 👏

8

u/patrlim1 17d ago

🏆

58

u/masterflappie 17d ago

Oh good, next time the client orders an app that prints a single hardcoded sentence to the console I'll definitely choose python 

4

u/Scharrack 17d ago

Frankly in that case I'd probably go with JavaScript as I can be reasonably sure the customer now's how to open a browser but might have problems installing a runtime environment.

5

u/FallenDeathWarrior 17d ago

But why JS, when you can just write it in html?

5

u/Scharrack 17d ago

Because my head was all "programming language" when writing this😅

22

u/Tuborgat_nylle 17d ago

The python one should be the one with all the unnecessary gear. And a simple C printf would fit much better with the stripped version.

3

u/DescriptorTablesx86 16d ago

Had the same thought. Both Java and a python are pretty heavily equipped.

The guy on the right should be Chris Sawyer writing Rollercoaster Tycoon in asm nearly alone.

110

u/Anon_Legi0n 17d ago

Python devs are really insecure about their normie programming language

-11

u/tigrankh08 17d ago

Dogmatist programmers are really insecure about their needlessly complicated syntaxes and can't see the merits of both Python and [insert random uncarefully-designed C-derived language name here]

1

u/ohYuhtBoutMagine 14d ago

It’s not needlessly syntactic, Python is just abstracting the syntax away. It converts to C. Dictionary? Just a hash table in C

1

u/tigrankh08 13d ago

Python is translated to bytecode interpreted by C code in the case of CPython. C is translated to Assembly, which is translated to machine code. So maybe use Codon? It's a Python-like language that's normally compiled rather than interpreted. Many developers who start with C get confused about what pointers do, yet those who start with Assembly rarely ever find themselves in that situation. So really, we all should start with Assembly? Or maybe we should start with machine code to never get confused about opcodes? What even is the point you're making? You're just regurgitating a point said by many that makes no sense.

1

u/ohYuhtBoutMagine 13d ago

Because syntactically better and just an abstraction are two different things

1

u/tigrankh08 13d ago

Yes. Although be careful with the wording here, because languages basically are abstractions in and of themselves.

However, again, yes, requiring the entry point of the program to be defined in a function defined in a class (a la old Java), vs. code entirely constituent of the entry point being valid syntax in a given language (a la Python), absolutely is an arbitrary choice.

-6

u/IslamDunk 17d ago

I went from Java to C# to Python and I’ve never been happier 🙏

7

u/Lightning-Shock 16d ago

Do you have an actual job in the field?

-19

u/REDthunderBOAR 17d ago

Almost like they do different jobs. Python being a C++ offshoot.

24

u/Luk164 17d ago

More like wrapper

7

u/Obmanuti 17d ago

C++ offshoot is crazy lmao. Wrapper is generous enough.

1

u/cheese_master120 16d ago

Idk why people make such a big deal of Python using C under the hood. As far as I'm concerned, C uses ASM under the hood so wouldn't that make C a ASM wrapper as much as Python is a C wrapper?

2

u/Comfortable-Light754 15d ago

Yes and ASM is just a wrapper for binary.

1

u/ohYuhtBoutMagine 14d ago

Yeah and binary is just a wrapper for logic gates

1

u/Luk164 14d ago

Tell me you don't know how compilers work without telling me lol

Modern compilers are a sight to behold, being able to automagically optimize your code for, strip unused pieces etc. etc. They are basically magic as far as I am concerned

72

u/Sage_With_A_Letter 17d ago

Do a for loop without numpy and let me know how that goes lol.

2

u/Healthy_BrAd6254 17d ago

skill issue if you don't know how to use jit

-6

u/Willing_Parsley_2182 17d ago

Your joke: “If you don’t use the best practices / features of a programming language to make it worse, then that language isn’t very good… GOT EEM”

Well, duh? Isn’t the Java JIT mainly C++? “Take out the JIT compiler and then write a for loop and let me know how that goes…”

14

u/Obmanuti 17d ago

I think you missed the point. Of which there are many, one being that the things that make python easier to use are made easier because they are hidden from you. Either through requiring a library thats probably written in something else since python is abysmal performance wise, or because natively the language abstracts it away. In some ways the image should be reversed, python is the language with all the assistance and abstractions. Both languages use another language to help, but they do it at very different levels and youre comparison above is pretty silly as a result.

-6

u/Willing_Parsley_2182 17d ago

You’re proving the exact point you’re trying to criticise.

Every language abstracts things away. Java abstracts memory management and JIT compilation. C++ abstracts assembly. Assembly abstracts machine code. That’s literally how software engineering works… layers of abstraction. It’s also strange to insinuate Python is uniquely dependent on libraries when C++, Java, Rust, Go, etc. all heavily rely on libraries too. Boost exists for a reason…

If I need threading, or maximum performance everywhere, I’ll use C++. Otherwise, Python does the job in most cases. It’s undeniable Python has grown massively while Java’s popularity has generally declined relative to newer ecosystems. Why is that?

Don’t worry, you’re still very clever and “Python bad”. Good job.

7

u/Obmanuti 17d ago

Oh I love the popularity argument! The classic....

I would agree, something being easy to use, especially for those outside the domain like data scientists, does in fact lend itself to being popular.

The good news is, its also totally irrelevant. Ive seen this meme god knows how many times over the years. And yet, there Java goes still running on billions of devices.

Python is easy to use, I use it on occasion myself for ductaping shit together. Its great for that. But im not going to pretend its equivalent to any of the languages designed for large scale high performance applications. And the tired joke that implies superiority because it can print hello world easier gets old. I cant remember the last time I needed to print hello world in a real application. I can however remember the last time I needed to write a high throughput backend service that leveraged concurrency in a serverless environment with complex data modeling and access patterns. Something that even if python could do (maybe they've made a c lib for it I dunno) it shouldnt.

Its okay that python is good at certain things and not at others. Its stupid to compare it to a language that serves an entirely different audience and purpose.

-5

u/Willing_Parsley_2182 17d ago

3 arguments made there, you focussed on one which was a minority point, then basically reversed your whole narrative in the last paragraph…

Whatever, you have a weird obsession with Python for arbitrary reasons. Nothing I’ve said has been meaningfully challenged.

6

u/Obmanuti 17d ago

Because it feels like Im arguing with an intern. If you cant see how pythons library dependence is meaningfully different. Im not going to convince you. If you cant see how theres a difference between building on top of a language i.e. C++ using C or the Java compiler using C vs importing a C library that python can then run, theres nothing I can say to convince you.

You contend that python does the job in most cases. Maybe thats true for you. And if so, great! Im glad you found a language that meets your needs.

The vast majority of the software engineering world is not so lucky. For some, if not most, performance matters, organization matters, type safety matters, compute cost matters. Most senior devs that I know would not build an enterprise application on python. If you would, I wish you the best.

My narrative hasn't changed at all, Java as verbose as it is, has persisted for a reason. Python has become popular for a reason. These memes are stupid, and drastically oversimplify the comparison.

My error here is engaging in good faith and assuming you would do the same. You want to be right, youre not interested in being correct.

-3

u/Willing_Parsley_2182 17d ago edited 17d ago

Read the actual words that have been written. Original commenter: “without imports Python bad”. Me: “That’s meaningless as it does have imports”. You: “Akshually…”

You’re having an argument with yourself. Nobody criticised Java. On performance, you’re rehashing what I said (that I’d use C++ over Python if I needed performance).

You’ve not entered any new information, meaningfully challenged any of the assertions, and you’ve misconstrued what has been said.

7

u/Obmanuti 17d ago

Cool 👍 Good luck in your endeavors regardless of the language they use!

3

u/Sage_With_A_Letter 17d ago

It’s funny because this whole time you still don’t get it. I’m not saying imports are bad. I’m saying a dynamically typed language with a JIT interpreter will always have issues. Look at the assem output and how much shit is between simple add calculations. The only reason numpy works as well as it does is because it effectively introduces types back in. If pythons performance works for you, great. But it doesn’t for many.

To address the c++/c comment. If you really knew c or c++, you wouldn’t add in for performance. You would just program in that language. The reason you use Python is because you don’t. You proclaim much about software while knowing very little about it.

1

u/Willing_Parsley_2182 17d ago

To be clear: I’ve not once bashed Java. If you’re programming an app or an IDE, it’s clearly one of the best choices.

However, I’m laughing at your “don’t know C++” comment, as it’s clear you’ve not used the ecosystem from your reply:

  • 99% of organisation aren’t coding their REST API interfaces with C++, which is why you don’t use it for everything. Even Netflix uses Python Flask APIs all over the place (and Java too).
  • You also don’t want a small feature taking 3 weeks to develop over 1 week in Python, if you don’t need to save that 50ms.
  • When needed, write a library and integrate it with Pybind. That’s been the accepted pattern for years. That’s where all my heavy pricing logic lives.
  • As a use case: Large scale vectorised columnar operations on tabular data. Using Polars in Python (Rust-based but still) will usually beat Java performance-wise for large operations on a dataframe. It’s open source and rust/based so optimised for these workloads. Reinventing in Java will also take a long time. You get this performance game using Python ecosystem out of the box.

The arguments you used is a strawman and ad-hominem, as you don’t understand the use cases or trade-offs.

Regardless of all the above, most enterprise Data Engineering teams predominantly use Python. The premise Python can’t build high performance distributed systems is observably false.

At its core, the lack of wider ecosystem knowledge this sub has shown makes me think they’re silo’d in their roles, abstracted from the business and likely low impact. Also, the inability to comprehend and process the words/ arguments (whilst they repeat the same ones), shows it’s not worth continuing dialogue.

→ More replies (0)

3

u/LifeIsAnAdventure4 16d ago

Bro, Java pays the bills.

0

u/Willing_Parsley_2182 16d ago

Very true! I’m honestly more confused why people think I hate Java, haha. It’s a versatile and very performant language. The JIT compiling is amazing and JVM has progressed well.

Why is everyone assuming I think Java is bad?

0

u/dfczyjd 17d ago

"Python depends too much on importing stuff!"

5 minutes later

imports stuff to do basic CLI I/O

14

u/my_new_accoun1 17d ago

Python is wrong

```python

!/usr/bin/env python3

def main() -> None: """ Prints hello world. """

print("Hello world")

if name == "main": main() ```

-4

u/NichtFBI 17d ago

No, it isn't. You don't need to be doing all of that in a notebook which most of python is being ran.

8

u/my_new_accoun1 17d ago

Same with java 🤷‍♂️

21

u/Sol_Nephis 17d ago

Java and it's clear superior C# can both do one liners now.

10

u/Luk164 17d ago

Except any serious project quickly switches back to the full syntax. It is good for first timers though

2

u/Devatator_ 16d ago

Not really, it's really useful for small stuff. I typically use it for C# scripts (dotnet script.cs) since they're all single files (and it uses top-level statements by default)

3

u/Luk164 16d ago

I do not dispute that, but I also wouldn't call a simple script "serious project", though I understand my wording was a bit arbitrary

1

u/Sol_Nephis 17d ago

Generally. I still use top level statements but if it's a single file project I'll use .NET 10s single file scripting.

7

u/AibofobicRacecar6996 17d ago

I'll keep that in mind when I'll get a job at the Hello World company

12

u/Helen83FromVillage 17d ago

I thought in Java 17+, you could do the same on lines.

And of course, it is strange using Java when we have Kotlin.

5

u/Skepller 17d ago edited 17d ago

Java 17+ reduced boilerplate, but even better, in Java 21+ (preview) or 25+ (standard) you can use Java for single-file scripts like Python (simply run with java file.java)

You don't need to declare a class, just a 'dry' main. Like this:

void main() { println("Hello, World!"); }

1

u/Sufficient_Risk_8127 17d ago

what is Kotlin, a deez nuts joke?

3

u/Helen83FromVillage 17d ago

https://en.wikipedia.org/wiki/Kotlin

Second language support by Spring, primary language for Gradle scripts and primary language for Android. 

4

u/Sufficient_Risk_8127 17d ago

so it's Java++

2

u/Dic3Goblin 17d ago

I had a feeling a joke was around the corner, I applaud you l.

1

u/Helen83FromVillage 17d ago

No… The syntax is different.

2

u/Sufficient_Risk_8127 16d ago

so it's Java++

-5

u/App1e8l6 17d ago

What’s actually running Java anywhere near that version though?

3

u/Skepller 17d ago

Most things, as its literally the most used version lmao

It'll be overtaken (if it hasn't already) by the newer Java 21 this year. The Java release adoption problem is much less of an issue for a while now.

3

u/shamshuipopo 17d ago

lol everything in production on critical systems I have touched in the last 2 years

2

u/AibofobicRacecar6996 17d ago

What version are you running?

1

u/Devatator_ 16d ago

Only actual Java codebase I've touched is Minecraft and Mojang does keep it up to date quite well. The current version uses Java 25. My main version (1.21.1) uses Java 21

-8

u/INoMakeMistake 17d ago

Wondering why people still stick with Java. Make the move man!!!

6

u/disposepriority 17d ago

Yeah the majority of big tech companies are stupid poo-poo heads!!!

4

u/Affectionate_Cell340 17d ago

and taking like 10 mb of ram

6

u/ianthisawesome 17d ago

java void main() { IO.println("Hello, World"); } works in Java 25+

10

u/MinosAristos 17d ago

As a frequent user of Python, I'll almost always just do the if __name__ == "__main__:" these days. It's nice not to have functional code dangling in the module scope.

5

u/Sufficient_Risk_8127 17d ago

as a Java dev this scares me

4

u/itemluminouswadison 17d ago

Yet, python code is consistently worse written than Java. Dict abuse everywhere

2

u/TheOwlHypothesis 16d ago

It's because the "weird trick" to pass a lot of popular Leetcode problems is a dict.

1

u/Dic3Goblin 17d ago

Not in the dict!

2

u/asmanel 17d ago

What about other languages ?...

3

u/Dic3Goblin 17d ago

Rust is still compiling. ;)

2

u/BoRIS_the_WiZARD 17d ago

Shouldn't be reversed since python does everything for you compared to Java?

2

u/mjeffreyf 17d ago

Definitely the other way around

1

u/why_so_sergious 17d ago

I dislike python because there's always some dependancy that fucks it up somehow.. python, py3, pip, pip3, conda and all that dependancy hell

1

u/AcolyteNeko 17d ago

python: allocate a module allocate a context allocate a string call the print function deallocate string deallocate context deallocate module

C: puts("hello world");

🤷‍♀️

1

u/jort93 17d ago

Turkey guy still using the same 5000 dollar Bluetooth enabled pistol to be fair.

1

u/Simple-Olive895 17d ago

public c + tab

p + tab

sout Hello World!

Is all you have to type for the Java code. Also yeah comparing one line of code in a language with no boiler plate vs one with boiler plate is gonna make it look like a massive difference.

1

u/_Frydex_ 16d ago

C# 9+: Console.WriteLine("Hello, World!");

1

u/lSanik 16d ago

php  echo "hello, world"; 

1

u/DrJoshWilliams 16d ago

Python stealing all the high level R syntax...

1

u/Outrageous-Machine-5 16d ago

You're joking,  right? Do you know how much magic is happening beneath that one liner

1

u/TheOwlHypothesis 16d ago

It's funny because it's actually the opposite.

1

u/mrkouhadi 16d ago

Go: 🤡

1

u/gay_annabeth 16d ago

... pretty sure java can be that short now too? I think? Or maybe that was an upcoming thing, idk

1

u/Mysterious_Value4624 16d ago

i think you need uint64_t for an age verification program

1

u/No-Whereas8467 16d ago

So am I supposed to laugh? Haha so funny? Do I do it correctly?
Search for Compact Source Files and Instance Main Methods and spend more time in making a meme instead turning off your brain and keep repeating old boring things.

1

u/AintNoGodsUpHere 16d ago

Let's talk about __MAIN__?

1

u/Jimmyfartballs 15d ago

C would make more sense instead of Python

1

u/neoverdin 15d ago

Nah man, no one is stopping me and my homies from writing mystandardOutputHelloWorldSingletonFactoryListener in Java.

You guys seeing this?

1

u/Cautious-Diet841 14d ago

Who up votes these?

1

u/ConnectedVeil 17d ago

I just KNOW this meme pissed some comments off, ain't even gotta look

2

u/Dic3Goblin 17d ago

The Java vs Python one is pretty funny not gonna lie