3 ms·
Consistent style is more important than each block of code being perfectly pretty. You can still argue aesthetics, but they need to be applied across the entire
by a_t48 6y ago
Consistent style is more important than each block of code being perfectly pretty. You can still argue aesthetics, but they need to be applied across the entire codebase. Never having to bother someone because their PR doesn't meet the formatting guidelines is well worth it.
- waheoo 6y agoPeople at work nit: my code all the time. I just straight up ignore them. If they ask me why, I tell them to add an autoformat to our ci or shut the hell up. Fwiw, i use an auto formatter but its got problems with certain rules so i switch them off. The reason we dont have it turned on in ci is because these rules break code.
- a_t48 6y agoYeah, auto formatter (or at least format validation) is a must.
- ergothus 6y ago> Consistent style is more important than each block of code being perfectly pretty "Pretty", yes, but we're literally talking about using language to communicate. Consistency taken to extremes is harmful to communication. I don't understand the worship that people have for consistency. STUPID inconsistencies are bad, yes, and yes, there are certainly arguments that about subjective matters that are a waste of time. But distilling everything down to the lowest common denominator of grunt-talking is very consistent and terrible communication. (Does that feel like a strawman? I'd love for it to be! Once people stop talking about consistency uber-alles we'll be discussing the things that I consider important.) Right now, the most common reaction is to dismiss any idea of communication through language as irrelevant, subjective, and a waste of time."
- xondono 6y agoI’d agree that 100% consistency is harmful to communication, but the primary communication happening in programming is with a computer. Even when it comes to other developers looking at your code, their internal process is “let me simulate what the computer understands”. Unless you are enforcing weird autoformat choices, everything should look pretty enough.
- davedx 6y ago> the primary communication happening in programming is with a computer Working in a team with 15 people on the same code base I disagree with this. Count the computer as one teammate
- VectorLock 6y ago"Style" means things that the human sees. If it changes execution its not style any more. This is what tests are designed to enforce.