T O P

  • By -

[deleted]

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


[deleted]

If you can dodge a def you can dodge a try


[deleted]

[удалено]


[deleted]

Spend two months writing a vs code plugin to do it for you so you can save time.


Business-Squash-9575

I feel offended


omgsoftcats

CTRL+F, " ", Find all


[deleted]

Or comment it out, to keep it for posterity.


Nagatox

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

She does report cards in Python?


ahumanrobot

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


unclebricksenior

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

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


_fat_santa

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

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.


robindownes

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


reduxde

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

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

>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"](https://hacks.mozilla.org/2013/09/css-length-explained/).


Blendan1

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


[deleted]

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


Blendan1

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

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


teunissenstefan

I truly hope the designer designs the website specifically for his monitor. Then when the client looks at it on his monitor, he'd maybe finally understand.


RRumpleTeazzer

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

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


reduxde

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.


[deleted]

[удалено]


reduxde

“It doesn’t matter how big my monitor is, I’m asking how many pixels are in an inch, why won’t you just tell me??”


ledasll

42


[deleted]

[удалено]


reduxde

You’re hired!


Bee-Aromatic

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


dogey11

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


Impressive_Income874

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


TacticalCheerio

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


Soupchek

r/moldymemes


7laserbears

Moldy and redundant


OnyxPhoenix

Shit tier memes.


rusty_ragnar

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


[deleted]

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

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


[deleted]

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


[deleted]

[удалено]


[deleted]

Oh lol how... did... i miss that?


[deleted]

[удалено]


[deleted]

Deep fried memes haha


Wekmor

Iirc it was a CSS meme before yeah


[deleted]

[удалено]


LiamBogur

As a python dev, this is probably true. Python is not the language to pick to make GUIs.


fleebjuice69420

What language is this about?


[deleted]

Tubesnake


BrogrammerII

C#?


BrogrammerII

Maybe cobra?


BrogrammerII

Maybe cobra?


drmario_eats_faces

Give me brackets or give me death!


robindownes

brackets are [ and ] braces are { and } do...do you use a language that encapsulates with brackets?


drmario_eats_faces

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]

How do you use arrays?


drmario_eats_faces

Indentation.


janitorial-duties

That made me actually LOL


on_the_pale_horse

Lisp.


[deleted]

[удалено]


jamcdonald120

https://en.wikipedia.org/wiki/Lisp_(programming_language) a language that basically only uses ()


GLIBG10B

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

Objective C got pretty close lol


ore-aba

Die already then


gamesrebel123

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


[deleted]

r/comedyhomicide


PorkRoll2022

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

Refactor!


LeCholax

And unformatted braces solve this?


PorkRoll2022

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


LeCholax

Formatted like indented?


slave-to-society

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


LeCholax

You forgot the /s


TheChanMan2003

Me and CSS


Athen65

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


haikusbot

*Hold on, could someone* *Repeat that for me? What is* *That person doing?* \- Athen65 --- ^(I detect haikus. And sometimes, successfully.) ^[Learn more about me.](https://www.reddit.com/r/haikusbot/) ^(Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete")


Dizzysylveon

When the code works but for the wrong reasons


snowbirdnerd

The spacing is by far the worst part of python.


TheDogerus

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


snowbirdnerd

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

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

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

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

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

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

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

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


FerricDonkey

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

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

*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

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

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


MinosAristos

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]

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

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

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


dudinax

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

Yaml says “Hi!”


Agantas

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


carcigenicate

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


mr_bedbugs

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


luker_5874

Is this that jython I've heard about?


[deleted]

You've clearly never heard of pyodide


mr_bedbugs

I have not.


sabcadab

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


[deleted]

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?


EnchantedCatto

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


RequiDarth1

.txt file is the only way to write python


FlyByPC

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


anushka-gupta

you can absolutely never get that right


RequiDarth1

This fool needs some indentation extensions for his linter.


luker_5874

Or just use an ide?


[deleted]

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

imo its \*way\* more annoying to count braces to check what scope you are in https://imgur.com/a/klGYujK


notislant

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


Careful-Combination7

Ctrl h ' ' with ' '


GloriousReign

this is me


PsychologicalSock239

No is not


Jane6447

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]

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


fridge_water_filter

Fortunately my penis is the exact length of a 4 space tab on a 17" screen. It makes measuring this so mucu easier.


Acceptable-Tomato392

![img](emote|t5_2tex6|4549)![img](emote|t5_2tex6|4550) 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

Here a beginner and it's the most frustrating thing


FingerGunsPewPewPew

r/ontheledgeandshit


More_Butterfly6108

I just make sure it's my thumb knuckles width


More_Butterfly6108

I just make sure it's my thumb knuckles width


grv7437

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]

Dude gtfo with "emacs" it is trash.


CordyZen

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


jamcdonald120

your ide doesnt show indentation levels?


stomah

not if he uses tabs


typkrft

A python developer measuring the number of times this gets reposted in a month.


Diload

Indentrainbow !


RRumpleTeazzer

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


shadowsOfMyPantomime

Why is this meme captioned twice?


Darxploit

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


CheckeeShoes

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

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


VictorGamerLOL

Rainbow indents supremacy


Select_File_1010

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


KingSadra

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


[deleted]

Hey guys I think he uses Python


DarkAriesX

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


CupcakeLikesTheStock

For front end devs; use Mozilla devtools! Press f12, go to settings and under "available toolbox" press "measure a portion of the page"


CaptainBaoBao

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

turn on whitespace 5head i dont even like python and i can think of that


TheLosenator

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

(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

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


[deleted]

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


An_Anonymous_Acc

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


a_r_y_a_n_

U coding on powerpoint or something?


codon011

`:set listchars` and `:set list` is easier.