News for hackers. Stuff that matters.
Re:What is "good taste" in software engineering? by zx8080 on Monday September 29, 2025 @03:43AM (#45411253)
Theere are two quite a widespread classes of not readable code:

Some code is not readable by _anyone_. That's not readable code.

Some code is readable by its author only (be it AI or a human). That's also not readable one.

Saying readability is not a concept is really strange.

Re:What is "good taste" in software engineering? by mojuba on Monday September 29, 2025 @03:52AM (#45411302)
I have a formal proof for you that it is a non-concept. If code can be read and interpreted by a computer, it means it can in principle be read by a human. There are of course some edge cases like obfuscated JavaScript or binary executable that some people are able to read and understand.

The question comes down to being reasonably readable and we are back to square one: "reasonable" is very relative. In my early days I could read 8086 binary code (in hex) and understand what it does, it was literally at the very edge of readability but it wasn't unreadable.

Re:What is "good taste" in software engineering? by atoav on Monday September 29, 2025 @04:38AM (#45411559)
Sure, but we do agree that Hello World is MORE¹ readable in Python compared to the equivalent program in say Brainfuck?

  print("Hello World")  
  
vs

  ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.  
  
¹: more readable means easier/faster to read for most human beings that know the language
Re:What is "good taste" in software engineering? by eithed on Monday September 29, 2025 @09:39AM (#45413647)
I can't reasonably read whether this comment agrees or disagrees with the parent
Re:What is "good taste" in software engineering? by RHSeeger on Monday September 29, 2025 @12:55PM (#45416003)
You are using a different definition of readable than most people are. Most people are using it to mean "the target audience can read and understand the code, and do so in a way/context that allows them work with it". Your definition seems to be "can read the symbols on the screen".

I can read Assembly. I can, in some cases, figure out what that Assembly is doing. I can not, however, work productively with it. I can read Assembly but would not consider it readable.

Re:What is "good taste" in software engineering? by epolanski on Monday September 29, 2025 @04:19AM (#45411455)
Readability to a certain degree is heavily influenced to the reader's experience and familiarity.

If somebody has spent lots of time in specific patterns he/she'll find them natural to read and mentally process.

To others, they'll be unreadable.

Re:What is "good taste" in software engineering? by Yoric on Monday September 29, 2025 @04:32AM (#45411520)
I'll have to disagree.

Developers coming from functional programming and developers coming from C programming, for instance, have very different definitions of "readable", and neither is obviously wrong.

Similarly, developers used to channel-based, async-based or mutex-based concurrent programming will all have very different criteria for "readable" code, again none of them obviously wrong.

Re:What is "good taste" in software engineering? by skydhash on Monday September 29, 2025 @06:39AM (#45412159)
Those are just paradigms, ways of solving problems. There’s a difference between familiarity and readability. Sometimes you have to learn stuff before understanding them. Readability is how easy it is to do that, given familiarity with the base concepts that the code use.
Re:What is "good taste" in software engineering? by Yoric on Monday September 29, 2025 @11:18AM (#45414902)
You are correct.

Yet it's pretty easy to find people who consider that `map()` or `filter()` are simply not readable – or, on the other side of the aisle, that having a loop variable is detrimental to readability.

And of course, these criteria change with time, industry and programming language used.