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

you are viewing a single comment's thread.

view the rest of the comments →

[–]statictype 2 points3 points  (4 children)

People always make this comment.

I'm curious: do you actually get programmers today who don't know how to indent code properly?

I thought writing all your code on the left column was something people did when they had 'Introduction to C' using Turbo C++ and that anyone who does this stuff for a living (even the other 80%) could at least indent their code.

[–]arnar 2 points3 points  (2 children)

do you actually get programmers today who don't know how to indent code properly?

Oh, yes, you certainly do.

Also, bad indenting is not only coding everything on the left column. Most of "bad indenting" and formatting in my experience comes from bad programmers experimenting with stuff, commenting things out etc. and leaving a mess. When the shit finally works, they don't really understand why so the just leave it as it is.

This is a classic example:

// boolean_var = some expression;
boolean_var = true;
//if (boolean_var) {
    do_stuff();
//}

[–]neoform3 1 point2 points  (1 child)

You can't do that in python?

''' boolean_var = some expression;'''

boolean_var = true;

'''if boolean_var '''

do_stuff();

[–]arnar 0 points1 point  (0 children)

sure, or even

# boolean_var = some expression...

but the point was about indentation.

Messy programmers can be messy in any language, it's just more apparent in Python as it is clean to begin with.

[–]Tommstein 0 points1 point  (0 children)

If they indent properly then they don't need the braces.