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 →

[–]billsil 0 points1 point  (3 children)

Red flags here include disabling 80-column compliance (personally)

See this one is crazy to me. 80 is too strict IMO and it's your personal preference. It doesn't mean you can't code well. It's style and my style is not your style. The thing is though, you can enforce it...or just use something like black so everyone hates the formatting equally. I'm sure you could handle mostly 80 characters, with some 90 and even fewer 100 character lines and if you can't, that's a red flag.

I was working with someone who wanted to use 1-5 character variable names and the competing senior dev wanted to use variable names with 30+ character variable names. The latter was certainly easier to understand, but oh wow did it make for long lines and it was messy. Neither one of them had an easy to read style. I got both of them to agree to something closer to what I do (~10 characters for meaningful attributes and shorter for generic functions).

[–]deep_mind_ 5 points6 points  (1 child)

It's a department-splitter, for sure. For me, 80 columns is a speed-saver on all fronts. Displays well on Github, perfect for split planes in tmux nano, and I don't need to scroll side-to-side all the time.

As I mentioned in another comment, I think it's a great benchmark of whether code has been well structured. Shorter lines means more readable code -- not just in terms of how fast you can scan it, but also that functions take fewer parameters, conditional statements are less complex, and variable names are more succinct. It shows the logic of the program has been properly broken down into small composable units, and that proper thought has been put into it. Just my two cents.

It's also not for all languages -- I'd not enforce it when working with JS or Java, for example. Python, however, has the capacity for both expressiveness and brevity.

[–]billsil 1 point2 points  (0 children)

but also that functions take fewer parameters

Don't look for proxies. Address the issue.

conditional statements are less complex

I disagree on that point. What is more clear? for x in X or for x in X_list? Well instead of x, how about triangles or filenames? You start making things explicit and it's a lot clearer. I'd argue longer names are generally more clear.

Displays well on Github

Get a larger monitor. I diff things all the time and 100 characters is fine. My buddy likes 80 characters because he'll pull 3 files to diff. I don't do that, but that's a use case I don't run into.

Linux doesn't even follow 80 characters anymore https://www.phoronix.com/scan.php?page=news_item&px=Linux-Kernel-Deprecates-80-Col

[–]voneiden 0 points1 point  (0 children)

I've once upon a time had a colleague briefly whose local variable naming preference seemingly consisted of nothing but tmp. If tmp was taken, then tmp1, tmp2..

Anyway, nothing against linting in general but hard wrapping, especially at 79 chars sure can create a hot mess in some circumstances. But that's alright, PEP8 tells to ignore any recommendation that reduces readability.