> I am proposing writing clever code as a means of practice. Being at work is a job with coworkers who will not appreciate if your code is too clever.
We are what we pretend to be, so we must be careful about what we pretend to be.
Clever is, however, about all that a CS degree prepares you for. So you're going to be leaning on it for as long as it takes you to find someplace else to stand. Just don't take too long to get out of it.
"clever" is objective and cultural.
Some people will say ternary operators are overly clever. Other will say OOP patterns are overly clever. It depends on what paradigms and patterns you're used to.
When talking about code calling code "clever" typically means someone is needlessly complicated and unreadable code that (this is the accusation) serves mostly the purpose of showing off the skill of the programmer, and rhis usually means using more advanced language features. So when code is clever, people usually think it is too clever.
Sometimes code is also called clever undeservedly so. E.g. I don't think list comprehensions in python are necessarily harder to read than most for loops, but people unfamiliar with them might think of them as too clever.
> I am proposing writing clever code as a means of practice. Being at work is a job with coworkers who will not appreciate if your code is too clever.
We are what we pretend to be, so we must be careful about what we pretend to be.
Clever is, however, about all that a CS degree prepares you for. So you're going to be leaning on it for as long as it takes you to find someplace else to stand. Just don't take too long to get out of it.
Unironically giving that prime number routine as an example of clever code is not a great look. So bad on so many levels.
"clever" is objective and cultural. Some people will say ternary operators are overly clever. Other will say OOP patterns are overly clever. It depends on what paradigms and patterns you're used to.
I still dont know what clever means here.
> "I still dont know what clever means here."
Maybe a better term is "syntactic compression"
When talking about code calling code "clever" typically means someone is needlessly complicated and unreadable code that (this is the accusation) serves mostly the purpose of showing off the skill of the programmer, and rhis usually means using more advanced language features. So when code is clever, people usually think it is too clever.
Sometimes code is also called clever undeservedly so. E.g. I don't think list comprehensions in python are necessarily harder to read than most for loops, but people unfamiliar with them might think of them as too clever.