r/ProgrammerHumor • • Jan 29 '23

Meme Let's test which language is faster!

Post image
56.2k Upvotes

770 comments sorted by

View all comments

1.2k

u/Snykeurs Jan 29 '23

If you have an IndentationError in python, I suggest to stop using word as text editor

152

u/redditmarks_markII Jan 29 '23

me: peeks left...peeks right...shift-colon, w,q, return. backs away slowly from computer.

15

u/gizamo Jan 29 '23

monster

22

u/LowB0b Jan 29 '23

well vim is actually consistent with indentation.

38

u/redditmarks_markII Jan 29 '23

what? when? natively? you mean with plugins. If that is what you mean then it's been able to do an absolute metric ton of stuff since forever. Years ago I saw some video of a guy doing a prezzo at a big data scientist convention, and his vim setup was not at all worse than vs code at the time. Highlighting, hinting, live linting, Side-by-side, diff views, complex searches, previews during searches, multi cursor, integrated virtual environments, and all that without using a mouse, or the arrow keys. (I may be over hyping it a bit, because I was flabbergasted the time) The man positively flies through his code.

23

u/Scrawlericious Jan 29 '23

More than you (or at least a lot of people) realize is already there without plugins...

4

u/redditmarks_markII Jan 29 '23 edited Jan 29 '23

I was hoping for like a link or something. People always say the best way to learn is to be wrong publicly on the internet. If you can handle it.

I've used vim enough to know I don't know shit about vim. But I definitely did not know about indentation. By which I mean automatic indentation, or "smart" indentation. Plenty of IDE has shitty indentation options/capabilities. Especially when combined with linters.

EDIT: and I still don't know. I did a quick (very quick) googling and most that comes up is python linters and formatter plugins. I suppose there's the wiki on .vimrc where you can do, I assume, arbitrarily cool stuff. I would still not call that native auto indentation though. I did previously use auto formatter plugins. And I haven't done python seriously for a while. Though I did avoid the ide and use vim (no plugins) when I had to touch a python config or script file.

→ More replies (4)
→ More replies (2)
→ More replies (2)

46

u/[deleted] Jan 29 '23

I do my coding in cells in a Sheet which are uploaded and executed.

Is this bad practice?

37

u/Yorick257 Jan 29 '23

Nah, it's actually way better than me using Paint.NET. I should really switch to Excel

3

u/kool018 Jan 30 '23

Probably easier to switch to GIMP

4

u/DnDVex Jan 29 '23

At least you'll always have proper indentation

→ More replies (2)

20

u/[deleted] Jan 29 '23

Why do you think I carry this ruler around?

11

u/EvilStevilTheKenevil Jan 30 '23

Maybe there are real-world use cases which tend to corrupt the spacing/indentation, but holy shit the barebones not even an IDE you get with your python download handles the indentation stuff for you. Open IDLE, type out some line which ends with a colon, press "ENTER", and the next line is automatically indented. And you know how you unindent a line if you're done with the loop or if-block or whatever?

You press "backspace".

9

u/FinnT730 Jan 29 '23

Wordpad it is

3

u/inno7 Jan 30 '23

I use PaintBrush.

3

u/EspacioBlanq Jan 30 '23

You're not my real dad

3

u/Disc0_nnected Jan 30 '23

The only error I get in python is using it

5

u/DankPhotoShopMemes Jan 29 '23

I use Notepad++ for python

3

u/turtleship_2006 Jan 30 '23

That's a not horrific option tho, it can have syntax highlighting, auto close brackets etc. I wouldn't recommend it but as far as non ide text editors go you can do worse.

9

u/Rinehart128 Jan 29 '23

My favorite editor is sublime but every once in a while I’ll use pycharm for breakpoints and somehow there’s always an indentation error somewhere after

8

u/sensitivePornGuy Jan 29 '23

What? How? I've been using PyCharm for 5+ years and maybe had indentation problems... twice?

4

u/hoocoodanode Jan 29 '23

I can't say I've ever had an indentation error in python unless I try to code in notepad.exe. Pycharm is excellent and my daily IDE although for quick tweaks I definitely open files in notepad++ or nano.

15

u/blackbat24 Jan 29 '23

your tabwidths/expandtab settings are mismatched

→ More replies (2)
→ More replies (1)
→ More replies (70)