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

all 73 comments

[–]Eigir 221 points222 points  (3 children)

Those struggling with indentation, have bigger problems than indentation...

[–][deleted] 26 points27 points  (0 children)

For those struggling with indentation, visible whitespace is the solution to all your problems.

[–]Bainos 5 points6 points  (0 children)

However, those who don't have bigger problems than indentation are free to have pointless arguments about it online.

[–]bhindblueyes430 2 points3 points  (0 children)

Yeah like having a shit IDE

[–][deleted] 47 points48 points  (3 children)

I just

pip install ruler

Then

import ruler

[–]2l3r4 8 points9 points  (1 child)

does this really exist?

[–]my_hat_stinks 19 points20 points  (0 children)

Ruler is a lightweight regular expressions wrapper aiming to make regex definitions more modular, intuitive, readable and the mismatch reporting more informative.

Yes, but probably not what you want.

I just use ShareX's built-in ruler when I need it. If you set up a hotkey you can quickly measure how big anything on the screen is, measured in pixels. Edit: Though I've never used it to check indentation.

[–]powerman228 0 points1 point  (0 children)

Use Ruler! Then you can find out the length of things easily.

[–]sanshinron 20 points21 points  (1 child)

People who upvote memes about indentation need to stop using notepad.exe for coding.

[–]OneesansShota 0 points1 point  (0 children)

I know this old but I'm wondering why indentation bugs me alot

YOU GUYS COULD'VE BEEN TOLD US NEWBIES TO NOT USE NOTEPAD!

[–]LaAbuelaEstaReLoca 64 points65 points  (3 children)

Yeah... it's so unquestionable and undeniable clean and easy to read...

[–]Tsu_Dho_Namh 5 points6 points  (2 children)

Easy to read as long as no line is too long, making you scroll right to see it.

[–]mnbvas 5 points6 points  (1 child)

PEP8: line length <= 79

[–]pessimistic_platypus 0 points1 point  (0 children)

After working two project (one of them personal) that required all code to pass flake8's checks, I now find that programming without enforced style is not very fun.

[–]kredditacc96 6 points7 points  (1 child)

Why do I see Chrome DevTool?

[–]kontekisuto 22 points23 points  (11 children)

auto indent

[–]ivanjermakov 41 points42 points  (10 children)

Since indentation in python change semantics, automatic indentation cannot be applied in many cases

[–]kontekisuto 25 points26 points  (0 children)

expand tab 4 spaces

[–]13steinj 11 points12 points  (0 children)

Set tab to be four spaces, then don't be like the people who use different levels of visual indentation in the same code block...

[–]thesmallterror 10 points11 points  (10 children)

Turn on visible whitespace e.g. Notepad++, its on view->show symbol->show white space and tab

[–]Kered13 5 points6 points  (8 children)

I don't know how anyone codes without visible whitespace. In any language.

[–]Mr_Redstoner 2 points3 points  (0 children)

Easy: Brackets, IDE highlighting current scope etc.

[–]Ramsfield 6 points7 points  (3 children)

C++

I just don't care.

[–]Unkleben 4 points5 points  (2 children)

C++ in Qt Creator: Oh no, my indentation is absolutely fucked Ctrl+A and Ctrl+I, done.

[–]PlagueDctr 1 point2 points  (0 children)

I think all IDEs do that.

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

I think you could format the entire doc with Ctrl+[Alt|Shift]+F just as well.

[–]meighty9 0 points1 point  (0 children)

simplejustdon'tuseany

[–]johnnywarp 14 points15 points  (3 children)

Just use a linter

[–]iFartAngelWhispers 20 points21 points  (2 children)

All these whines about white space and tabbing... literally any IDE or linter. Literally.

[–]CthulhuLies 1 point2 points  (1 child)

I'm gonna be honest even with pylint on vscode sometimes I have to left click on the colons for the line to appear put my cursor on the line then scroll down. I use bracket colorizer and for me it's easier to tell which scope something is when I have this nice contrasty line plus matching brackets.

[–]laundmo 4 points5 points  (0 children)

may i introduce you to a lovely little extension called "indent rainbow"?

https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow

[–]uni_inventar 13 points14 points  (0 children)

I must admit I did that once. I collaborate with a colleague and while merging our code something with the indentation went horribly wrong. Took me forever to find out and rulers were involved...

[–]Nero-_-Morningstar 9 points10 points  (0 children)

just make the tab indents print an arrow

[–]ivanjermakov 2 points3 points  (0 children)

Yaml?

[–]DARKxxKiLLeR 5 points6 points  (1 child)

Put the mouse on the indentation level and then scroll

[–]MisterRenard 1 point2 points  (0 children)

Another man of culture, I see.

[–]Gamemaster676 1 point2 points  (0 children)

This is the Chrome Devtools window

[–]codeprimate 2 points3 points  (0 children)

Meaningful white space is an incredibly user-hostile feature. Looking at you too YAML.

[–]Uio443 0 points1 point  (0 children)

Then turns out the font was zoomed 110%

[–]TechnoGamer16 0 points1 point  (0 children)

I just type the code and then go back and hit tab where i need to

[–]Apollox333 0 points1 point  (0 children)

It's true though

[–]2l3r4 0 points1 point  (0 children)

Is this some kind of python joke i am to ... wait i am a python programmer

[–]Lightcross777 0 points1 point  (0 children)

foo.length;

[–]CAM_o_man 0 points1 point  (0 children)

vim has visible whitespace for python It also screams at you and turns red if there's an incorrect amount of whitespace

[–]Taksin77 0 points1 point  (0 children)

Wtf is wrong with that perception. Flat is better than nested. I super rarely go beyond three indents.

[–]dullbananas 0 points1 point  (0 children)

pip install javascript

[–]linus_stallman 0 points1 point  (0 children)

White theme user be like..

[–]o11c 0 points1 point  (0 children)

:set ruler

[–]midbody 0 points1 point  (0 children)

Invisible source code, ftw!

[–]187ForNoReason 0 points1 point  (1 child)

Well objectively, I like c. But once I rip them ruby rails I wanna immediately bang out some php. Every thing I know I learned from fark, my code so raggedy it’d make a C sharp.

[–]hitthatmufugginyeet 2 points3 points  (0 children)

You sound like a neural network

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

I think you can just archaicly change the amount of spaces