News for hackers. Stuff that matters.
Re:The Importance of Humility in Software Development (2020) by semitones on Wednesday May 12, 2021 @02:53PM (#27133815)
imo unclever code != poorly designed / spaghetti code

Reusing variables in a way that is confusing is a code smell, and rather than being "unclever", I would characterize it more as just "bad".

In my mind, an example of code that is "too clever" looks more like this:

  while (*dest++ = *src++); 

Unless you've seen that exact pattern many times, when trying to understand it you will have to unwrap it in your mind into something that looks more like the longer, "unclever" version anyway.

There are no comments on this comment yet.