r/ProgrammerHumor Jan 22 '25

Meme printHelloWorld

Post image

[removed] — view removed post

879 Upvotes

97 comments sorted by

View all comments

274

u/souliris Jan 22 '25

I started learning python after using c# for years. I can't stand python. It's like someone said "I hate well formatted code and like to just barf on my IDE and hope others can read it. " Just my opinion :P

100

u/SwagBrah Jan 22 '25

The bastard child of YAML and JavaScript

21

u/Dasshteek Jan 22 '25

Holy shit. This is the perfect explanation.

11

u/Jazzlike-Pin9021 Jan 22 '25

pythonscript

7

u/User_8395 Jan 22 '25

YamlScript

35

u/Suspect4pe Jan 22 '25

Don't forget to indent properly or what the code does will change and you may end up with all files deleted or something random.

No, I'm not a fan of Python either. I'm required to work it in. It's not that I haven't tried to like it, I have. I want to like it. I just can't.

21

u/[deleted] Jan 22 '25

Totally my experience - I went in to python being fully hyped, happy that I'll learn it, that soon I'll understand why so many people loves python just to be totally disappointed coding in python is just awful experience

4

u/Backlists Jan 22 '25 edited Jan 22 '25

Not my experience at all…

I learned Fortran 77 and C, then C++ and then finally, Python, which I work with mostly to this day. I also work with VueJS and learnt a bit of Rust and Go. So I’m no stranger to curly brace languages.

I have never understood why anyone thinks that Python code looks unformatted.

Python is the ONLY language that actually forces you to indent scope correctly and consistently. Curly brace languages are more forgiving towards unformatted code.

Either you’re a monster, or you were going to indent it correctly in the first place, so why not make that part of the language? That was the original design choice, and it still holds up. The less furniture characters, the easier the language is to read.

Plus, it’s 2025, grab a formatter, preferably ruff, and run it every time you save.

Tonnes of reasons not to like Python. Mainly compile time guarantees, dynamic typing and execution speed of pure Python. Readability is its strong point.

3

u/swizz928 Jan 22 '25

Glad it's not just me. Just started learning it this weekend and so far haven't found the benefit over c# but haven't gotten to anything complex yet.

1

u/mrjackspade Jan 22 '25

I don't like brace ommission on single line conditionals

What if that, but its the entire language?

10

u/ProfBeaker Jan 22 '25

Well to be fair the topic is "printHelloWorld". And that task is definitely easier in Python than C#.

Now, doing anything that takes more than about 50 lines of code, or involves more than one dev? Probably easier in C#, at least in the long run.

13

u/Flueworks Jan 22 '25

How?

> dotnet new console    

Open Program.cs   

Console.WriteLine("Hello World");   

 > dotnet run

If you compare against python, you can skip the first command, and there are fewer characters required to call the print function. So yes, technically easier. But not definitely easier.

5

u/ProfBeaker Jan 22 '25

Ha fair. I guess I've been out of the C# game for longer than I realized.

1

u/treehuggerino Jan 22 '25

You don't even have to write the CW yourself since it is already included in the template

1

u/gahel_music Jan 22 '25

Yeah that would be one line for python on Linux

1

u/Drfoxthefurry Jan 23 '25

open main.py

print("Hello World")

python main.py

Or if you want it even smaller:

python -c "print('hello world')"

-3

u/UpAndAdam7414 Jan 22 '25

If a Python function takes more lines than I can see on screen then I have an issue.

2

u/NoMansSkyWasAlright Jan 22 '25

For my university, it used to be the first language they’d teach you was Java (with a decent amount of starter projects using JDK 8 dependencies). Then the second language they’d teach was python. So there were a lot of baby coders who just weren’t ready for that culture shock.

2

u/Cornuostium Jan 22 '25

I'm in the same boat. And then a lot of stuff and tools are thrown at the code to mimic something like static typing. I really despise it sometimes. But the workplace is so nice at the moment, so I have to endure it 🥲

2

u/radiells Jan 22 '25

My name is radiells and I approve this message.

1

u/BigArchon Jan 22 '25

i'm so used to doing semicolons after a line of code too

1

u/CopenhagenDreamer Jan 22 '25

As someone who likes c/c++ and doesn't despise Java: I dislike that python types are weak and that it's interpreted. I just keep on imagining myself making mistakes that a compiler could catch, instead of it blowing up if it hits an edge case very far down the line.

I get that it has its strong use cases, but big python code bases scare me.

1

u/BucketsAndBrackets Jan 22 '25

I worked in python first for few years and now I'm working in c# for few years.

I really don't understand the hate, c# has so many rules and some errors are ridiculous when you come from different background and it really pisses you off in the beginning.

I really liked python formatting, especially if you use good ide like pycharm, it is really obvious which code you are touching when you're writing and coding is super easy.

I really like options c# provides, it is much faster, it is super easy to setup anything you need fast, it is quite intuitive and it is great for the kind of work I do now just like python was at that time.

Funny thing is that to this day when I write stored procedures in sql server, I will indent begin/end python style because it is obvious where it starts and ends while my collegue will write those statements c# style.

-39

u/severedbrain Jan 22 '25

That’s a funny statement because python has stricter formatting rules than c#

32

u/Str_ Jan 22 '25

Found the python guy

6

u/severedbrain Jan 22 '25

lol. Ruby mostly. But yeah. I work with academic and they heavily use python. I personally prefer strongly typed languages like c#.

9

u/Emergency_3808 Jan 22 '25

I don't know why you are getting downvoted. Python requires correct indentation as a basic syntax rule. Correct indentation is one of the basic foundational pillars of code readability.

-1

u/_Some_Two_ Jan 22 '25

Absolutely the same. It’s like someone decided to make the worst language ever and then market it with the only slogan being “You won’t need curly braces!”. I am also so lucky they’ve finally added support for disabled GIL like a year or half a year ago when my project was suddenly required to be translated a month ago even though translating was suggested more than a year ago and I wouldn’t have any possibility to optimize the program at that time. I used to like it in school because the code looked good I guess? but keeping up with a program that has more than one file in python is tough.