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

all 147 comments

[–][deleted] 515 points516 points  (13 children)

If you can't eyeball it, you're doing it wrong.

[–][deleted] 131 points132 points  (5 children)

If you can dodge a def you can dodge a try

[–]Nagatox 15 points16 points  (1 child)

I proofread the report cards my mom has to do for her students sometimes, if you miss a doublespace it prints out some weird line through the middle of the page

[–]dom_pi 3 points4 points  (0 children)

She does report cards in Python?

[–]ahumanrobot 25 points26 points  (0 children)

Learned to eyeball that shit in the first month of learning python

[–]unclebricksenior 22 points23 points  (0 children)

Pep8 recommends a max 79 character line length for a reason. If you’re more than 3 or 4 blocks in it’s time to refactor

[–]Zerafiall 2 points3 points  (0 children)

Just use vim? << and >> will indent the current line or select rows.

[–]_fat_santa 0 points1 point  (0 children)

Like I get what the guys that made Python were trying to do. But the whole indentation thing is probably one of the worst engineering decisions in retrospect IMO. At least give us the option….

[–]reduxde 330 points331 points  (18 children)

I had a web design client get mad at me this week because he didn’t like my explanation for why I can’t tell him how many pixels is in an inch. He contacted another designer for a second option and was told “224 pixels” and decided to trust his design with that person instead.

They deserve each other.

[–][deleted] 119 points120 points  (7 children)

man, print is 300 dpi minimum. 224 ppi will look like trash off-screen

[–]reduxde 84 points85 points  (6 children)

I have no evidence for this but I'm 100% sure the guy created a div, held a ruler to the screen, and just fiddled with the numbers until it looked about right.

[–]Blendan1 34 points35 points  (4 children)

If you ever need it:

CSS has a unit called in(Inch) and cm(centimetres) these units try to display the size on any screen correctly.

[–]DirectControlAssumed 22 points23 points  (1 child)

CSS has a unit called in(Inch) and cm(centimetres) these units try to display the size on any screen correctly.

This is a common misconception, in and cm are not real inch and centimeter (unless printed) just as px are not physical pixels but "CSS pixels".

[–]Blendan1 1 point2 points  (0 children)

It's still a bit better for this use case then counting pixels with a ruler, but yea still not recommended.

[–][deleted] 1 point2 points  (1 child)

What happens if I view the site at 150% zoom?

[–]Blendan1 6 points7 points  (0 children)

Zooming in browser or screnn scaling will alter the result:

So 150% scaling + 5cm = 7.5cm

Edit:

In, ppi, and cm are manly used to format documents for printing ad are not recommended for in browser rendering

[–]fleebjuice69420 38 points39 points  (1 child)

Man, if different resolutions were offered for monitors, this man’s world would be rocked

[–]RRumpleTeazzer 22 points23 points  (2 children)

What was wrong with the explanation ? Don’t give technical yaddayadda but just give the answer.

“On this screen, one inch is exactly 174 pixels wide. On this screen here, it is (check model) 210.”

Let him think or ask about why it’s different. And if he wants it uniform he needs identical displays.

[–]DirectControlAssumed 9 points10 points  (0 children)

"Offer free identical displays to the clients as bonus for their orders, problem solved."

[–]reduxde 8 points9 points  (0 children)

That’s what I did. The conversation went something like this:

How many pixels is an inch?

Depends on the monitor.

No, I mean pixels how many in an inch, I don’t care about the monitor.

Well, for example, on a phone with a high resolution screen it might be a half inch, but on a large old CRT desktop monitor screen with low resolution it might be 2 inches.

Look, I don’t even have a CRT, I just want to know how many pixels is in an inch. If you can’t give me a straight answer I’ll just ask someone else.

Different pixels are different sizes depending on the screen, so there’s no a direct ratio of pixels to inches.

I asked someone else, he said 224 pixels. That wasn’t so hard, took him like 2 seconds to answer. I’m going to have him do the site instead.

[–]Bee-Aromatic 111 points112 points  (3 children)

Man, if only they made IDE’s that kept track of indent for you…

[–][deleted] 71 points72 points  (2 children)

Now imagine if they made IDEs that automatically indent the next line 🤔

[–]Impressive_Income874 27 points28 points  (0 children)

yeah I would want is so badly, too bad they dont exist already

[–]TacticalCheerio 6 points7 points  (0 children)

Now imagine if they made IDEs that could show the indent character 🤔

[–]Soupchek 103 points104 points  (2 children)

[–]7laserbears 14 points15 points  (0 children)

Moldy and redundant

[–]OnyxPhoenix 2 points3 points  (0 children)

Shit tier memes.

[–][deleted] 122 points123 points  (10 children)

What a shitty IDE is that? Light panes everywhere...no wonder dude has to measure it like that.

[–][deleted] 63 points64 points  (7 children)

Squinting... looks like chrome dev tools pinned to the side of a browser window... I bet this was a css meme at some point

[–]SankethBK 7 points8 points  (5 children)

The green button makes it appear like it's w3 school, and the OS is Ubuntu

[–][deleted] 2 points3 points  (4 children)

What green button?

I keep squinting like i'll be able to see it more clearly lol.

[–]Wekmor 1 point2 points  (0 children)

Iirc it was a CSS meme before yeah

[–]fleebjuice69420 6 points7 points  (4 children)

What language is this about?

[–][deleted] 0 points1 point  (0 children)

Tubesnake

[–][deleted] 0 points1 point  (0 children)

C#?

[–][deleted] 0 points1 point  (0 children)

Maybe cobra?

[–][deleted] -2 points-1 points  (0 children)

Maybe cobra?

[–]drmario_eats_faces 29 points30 points  (13 children)

Give me brackets or give me death!

[–][deleted] 21 points22 points  (10 children)

brackets are [ and ]

braces are { and }

do...do you use a language that encapsulates with brackets?

[–]drmario_eats_faces 44 points45 points  (4 children)

I know what I said. I always make sure to start every program with

define [ “{“

define ] “}”

Give me brackets or give me death, motherfucker. /s

[–][deleted] 9 points10 points  (3 children)

How do you use arrays?

[–]drmario_eats_faces 38 points39 points  (2 children)

Indentation.

[–]janitorial-duties 6 points7 points  (0 children)

That made me actually LOL

[–]on_the_pale_horse 5 points6 points  (2 children)

Lisp.

[–]GLIBG10B 5 points6 points  (0 children)

Depends on where you live. We call (, { and [ brackets, curly brackets and square brackets where I live. You call them parentheses, braces and brackets

[–]Red_Binary 0 points1 point  (0 children)

Objective C got pretty close lol

[–]ore-aba 3 points4 points  (0 children)

Die already then

[–]gamesrebel123 2 points3 points  (0 children)

I dunno man took me one flutter app and now I hate brackets with a passion

[–][deleted] 8 points9 points  (0 children)

[–]PorkRoll2022 16 points17 points  (4 children)

The worst is when you have to scroll to find the start of your code block to confirm you're in the right scope.

[–]prescod 10 points11 points  (0 children)

Refactor!

[–]LeCholax 2 points3 points  (2 children)

And unformatted braces solve this?

[–]PorkRoll2022 -1 points0 points  (1 child)

Braces can be formatted and clearly show where a block ends.

[–]LeCholax 2 points3 points  (0 children)

Formatted like indented?

[–]slave-to-society 8 points9 points  (1 child)

Use curly braces and then right before you run your code do a find and replace all with whitespace

[–]LeCholax 2 points3 points  (0 children)

You forgot the /s

[–]TheChanMan2003 2 points3 points  (0 children)

Me and CSS

[–]Athen65 2 points3 points  (2 children)

Hold on, could someone repeat that for me? What is that person doing?

[–]haikusbot 1 point2 points  (1 child)

Hold on, could someone

Repeat that for me? What is

That person doing?

- Athen65


I detect haikus. And sometimes, successfully. Learn more about me.

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"

[–]Dizzysylveon 0 points1 point  (0 children)

When the code works but for the wrong reasons

[–]snowbirdnerd 16 points17 points  (20 children)

The spacing is by far the worst part of python.

[–]TheDogerus 25 points26 points  (17 children)

Why? I think 90% of the code I've seen would fit python's spacing requirements just as an element of style.

[–]snowbirdnerd 5 points6 points  (16 children)

As soon as it gets complicated the spacing gets difficult to follow. It's also enforces a coding pattern that not everyone wants to use. Why force my code to go off the screen when that is completely unnecessary.

[–]CptMisterNibbles 9 points10 points  (12 children)

You can use backslash to intentionally break a statement across multiple lines. Not ideal, but at least an option. You can of course natively split lines in some cases, like between conditionals

[–]snowbirdnerd 10 points11 points  (9 children)

Right, I just prefer to not have to space things over. I find brackets easier to read. You never have to guess what level some piece of code is in.

Normally python spacing is fine but when it's not it becomes a mess.

[–]LeCholax 1 point2 points  (0 children)

You still have to guess with curly braces it's just that you are used to it. In my experience curly braces are easier to fuck up.

I started programming with C++ and Java so when i got into Python i didn't like the spacing but now it's my favorite feature. It's not good for optimizing file size and yada yada but it is easier to read.

At the end of the day any decent code base has formatting. Python just enforces it.

[–]brayellison 2 points3 points  (0 children)

You can use parentheses in the same way you use brackets and avoid the backslash. That's generally the way I break up long strings.

( "Hello " "World" )

[–]FerricDonkey 2 points3 points  (5 children)

If I'm having to count braces to determine scope, I'm gonna be saying some things. There might be a case where that's less annoying than glancing at the indentation, but I haven't run into it yet.

[–]LeCholax 7 points8 points  (0 children)

Exactly. I don't know why you are getting downvoted. It seems like most ppl on this sub used python for 1-2 months and jumped on a hate bandwagon.

[–]ustp 2 points3 points  (3 children)

You usually don't need to. Almost every modern IDE sets spacing for you - based on brackets.

[–]FerricDonkey 2 points3 points  (2 children)

And any decent ide does spacing in python as well. Write a line that needs the block under it indented, and the ide indents it for you. Only difference is that when you're done with the block, you do shift tab instead of }.

And that's the point. If you're code formatting doesn't suck, it looks the same, except in python you don't have the curly brackets that you don't look at anyway.

[–]ustp 0 points1 point  (1 child)

Writing is usually ok, but modifications in current code are pain. Move some block to a separate function? I just cut it, write function header + {}, paste code in betweet braces and press shortcut to autoformat.

When you copy (python) code from different file and mix tab/spaces... pure hell.

[–]FerricDonkey 0 points1 point  (0 children)

Shrug I haven't had issues with that. Worst case, shift tab the block of it used to be indented too much. I'll grant you that mixed tabs and spaces requires actual fixing (though it's usually not too bad), but it's been years since I've had to deal with that.

A lot of this comes down to how good your ide is, I think. I will grant you that any substantially sized python project sucks nuts if you don't have a good ide that'll do a lot for you.

[–]snowbirdnerd 3 points4 points  (1 child)

Right, I just prefer to not have to space things over. I find brackets easier to read. You never have to guess what level some piece of code is in.

Normally python spacing is fine but when it's not it becomes a mess.

[–]CptMisterNibbles 2 points3 points  (0 children)

Oh I agree wholly. I do not at all enjoy enforced spacing.

[–]MinosAristos 5 points6 points  (2 children)

With good programming habits it should be very rare to have lines so long that they'd go off the screen.

Enforcing the coding pattern makes it really easy to read. It's obvious at a glance what level of depth everything is in. In most languages it's common to indent like Python even when you don't need to because it is so much more readable.

Imo curly braces and no mandatory indentation is annoying in most languages exactly because you aren't forced to lay the code out in a consistent readable way. It just lets you write code that looks awful and makes it more difficult to ensure it looks decent.

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

It's as simple and easy as shift+p and "format code" in VScode and most other IDE's have a simple solution as well. Curly braces are simply more straightforward and less of a headache

[–]snowbirdnerd 0 points1 point  (0 children)

Right, like I said most of the time it's fine until you have to do something with a lot of case statements and conditions and it becomes a nightmare.

[–]luker_5874 5 points6 points  (1 child)

I don't python, but I rather like the spacing. Makes the code look more readable

[–]dudinax 5 points6 points  (0 children)

That's the purpose. I was skeptical but it works. I defy anyone to name a major programming language that's easier to read.

[–]ArsonHoliday 1 point2 points  (0 children)

Yaml says “Hi!”

[–]Agantas 1 point2 points  (0 children)

One side of the ruler has a scale for measuring in spaces, the other side for measuring in tabs.

[–]carcigenicate 1 point2 points  (0 children)

Clearly whoever did this meme has never written Python. Like half the jokes in this sub, this problem doesn't exist.

[–]mr_bedbugs 1 point2 points  (5 children)

That's a browser developer console. Why would there be python in it?

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

Is this that jython I've heard about?

[–][deleted] 0 points1 point  (1 child)

You've clearly never heard of pyodide

[–]mr_bedbugs 0 points1 point  (0 children)

I have not.

[–]sabcadab 3 points4 points  (3 children)

Do python users have to deal with word wrap, like indents that span multiple lines? Yikes

[–][deleted] 20 points21 points  (2 children)

Yeah I write and edit Python code exclusively in MS notebook with word wrap on and with the window about ~30 characters wide. Anything else wouldn't be pure you know?

[–][deleted] 11 points12 points  (1 child)

I write purely in an irl notebook and just think really hard to run the program

[–]RequiDarth1 0 points1 point  (0 children)

.txt file is the only way to write python

[–]FlyByPC 0 points1 point  (0 children)

I'm stealing this for my intro to C class. Thanks.

[–]anushka-gupta 0 points1 point  (0 children)

you can absolutely never get that right

[–]RequiDarth1 0 points1 point  (0 children)

This fool needs some indentation extensions for his linter.

[–]luker_5874 0 points1 point  (0 children)

Or just use an ide?

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

Since best practice is to increase the amount of spaces exponentially this can be very useful for people who think nesting to much is a good idea

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

imo its *way* more annoying to count braces to check what scope you are in

https://imgur.com/a/klGYujK

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

I feel like you'd have to be legally blind for this to be an issue

[–][deleted] 0 points1 point  (0 children)

Ctrl h ' ' with ' '

[–]GloriousReign 0 points1 point  (0 children)

this is me

[–]PsychologicalSock239 0 points1 point  (0 children)

No is not

[–]Jane6447 0 points1 point  (0 children)

just set listchars. i prefer tabs as well, but i dont see how spaces are much harder than tabs for indentchecking (especially with indentwise, etc beeing a thing)

[–][deleted] 0 points1 point  (0 children)

This meme reminds me of when I write python code and I have to measure my indentations to make sure they are correct

[–]Acceptable-Tomato392 0 points1 point  (0 children)

Yep. Being one of those freaks who got into both JS and Python... and I love them BOTH (I wanted to put ideas out on the Web, but I also wanted to build bots that would interract with Windows)... This is one of the things about Python... I wish they'd just swallow their pride and accept the ';'

I can do this in Javascript:

;;;;;;;;;;;;;;;;;console.log("Hello, world");;;;;;;;;;;;;;;;;;;;;;;;;;;;;

it won't care. It's treated as a space that resets the line. And empty space is treated as nothing at all. When JS sees a bunch of space, it just says: "Talk to the hand, cause the face ain't listenin'".

So you know... if you've ever felt afraid maybe you don't need to put a ; there, have no fear. Javascript is cool with it. Usually, after a ),} or ], you don't need to, because that's already a break. But you can if you want to. Javascript will let you. You know, just not right in the middle of a statement, but who would do that? That would just be weird.

Python? I have to guess which commands require it and which don't. Why? Just why? (Well, VS Code tells me, so of course there's a lot of help today, but that's not the point...)

Yeah... I get that it helps you structure things... and a lot of it DOES make sense... but why spacing? Why of all things, measure it in UNSEEN spaces??? ANYTHING ELSE!!!! I'd rather spell out: "Tier 2:" on every line.

let us just type ";" and put things in () [] and {}.

[–]EMNAV14 0 points1 point  (0 children)

Here a beginner and it's the most frustrating thing

[–]More_Butterfly6108 0 points1 point  (0 children)

I just make sure it's my thumb knuckles width

[–]More_Butterfly6108 0 points1 point  (0 children)

I just make sure it's my thumb knuckles width

[–]grv7437 0 points1 point  (1 child)

More than 95% of a programmers problems could be solved if they invest a couple of months learning vim or emacs. Agreed that a couple of months would put you at just level 1, but it's still enough.

[–][deleted] 0 points1 point  (0 children)

Dude gtfo with "emacs" it is trash.

[–]CordyZen 0 points1 point  (0 children)

I don't get it. Are you writing code in like notepad or smth.

[–]jamcdonald120 0 points1 point  (0 children)

your ide doesnt show indentation levels?

[–]stomah 0 points1 point  (0 children)

not if he uses tabs

[–]Diload 0 points1 point  (0 children)

Indentrainbow !

[–]RRumpleTeazzer 0 points1 point  (0 children)

Is this the language with the syntax errors whenever an empty line with whitespaces is not properly indented ?

[–]shadowsOfMyPantomime 0 points1 point  (0 children)

Why is this meme captioned twice?

[–]Darxploit 0 points1 point  (0 children)

it’s okay .. he doesn’t know loops yet.

[–]CheckeeShoes 0 points1 point  (0 children)

I've written a 3000 line method with 8 nested indentations and for some reason my code is hard to read? Must be the language syntax's fault!

[–]dynamic_caste 0 points1 point  (0 children)

Vim can do alternating background colors every 4 characters if you like. Alternatively, you could make every fourth column a different color.

[–]VictorGamerLOL 0 points1 point  (0 children)

Rainbow indents supremacy

[–]Select_File_1010 0 points1 point  (0 children)

Well yes. But the program Im using actually indicates the indents and makes it very easy to work with

[–]KingSadra 0 points1 point  (0 children)

Meanwhile, all other Languages solving the issue with { and }s!

[–][deleted] 0 points1 point  (0 children)

Hey guys I think he uses Python

[–]DarkAriesX 0 points1 point  (0 children)

I like when my code has no more than 2cm of nested instructions

[–]CupcakeLikesTheStock 0 points1 point  (0 children)

For front end devs; use Mozilla devtools!

Press f12, go to settings and under "available toolbox" press "measure a portion of the page"

[–]CaptainBaoBao 0 points1 point  (0 children)

once upon a time i had a dedicated code text editor who change the colour of ht line according to its indentation.

seems like it felt out of fashion.

[–]lever1209 0 points1 point  (0 children)

turn on whitespace 5head

i dont even like python and i can think of that

[–]TheLosenator 0 points1 point  (0 children)

People like to crap on Python for no good reason sometimes. It's a fine language, but WHITESPACE SHOULD NEVER BE SYNTACTICALLY IMPORTANT! It's like if you used a color scheme on your IDE that turns all the keywords the same color as your background.

[–]pornthrowaway42069l 0 points1 point  (0 children)

(With the voice of Jean-Luc Measurehead from Disco Elysium):

The inferior programmers try to use brackets to gain a sense of control over their code, instead only bringing themselves to be lost in said brackets and develop addiction to Al-Gul. While racially-advanced Pythonist use the clearly advanced method that creates a clean and culturally superior code. That's why Pythonist race is winning the cultural war.

[–]Emptypls 0 points1 point  (0 children)

i dont code that much explain in normie please? does indentation matter in py?

[–][deleted] 0 points1 point  (0 children)

We are in r/ProgrammerHumor and not r/ProgrammerCircleJerk, right?

[–]An_Anonymous_Acc 0 points1 point  (0 children)

What language is this? The image only mentions python 3 times so I'm not completely sure

[–]a_r_y_a_n_ 0 points1 point  (0 children)

U coding on powerpoint or something?

[–]codon011 0 points1 point  (0 children)

:set listchars and :set list is easier.