In many articles that I've read I came across with this word / term 'complexity'. But those articles or posts was discussing different subjects concerning CS. According to all those articles I believe that this term has two meanings.
- How hard or easy is to grasp / understand a piece of code or software or programming related concept.
- The study of all solutions or ways to solve a certain problem.
But maybe I'm misunderstanding this term. Would you please make this clear? 😆😆😆
Thanks.
Top comments (3)
That’s a very interesting topic. The way I see it, complexity and simplicity are two sides of the same coin. What is simple for you today might have been very complex yesterday.
My goal is to always make the code look really simple to me. If there’s any part of it I can’t understand in a glimpse, it’s too complex and I’ll try to break it down to something I can understand better. Code reading should be as effortless as reading an fine article.
The upside of that is, paradoxically, that keeping code really simple enables me to do very complex applications... It’s really hard o build on top of something complex, but very easy to build on top of simple things. And when the new feature adds complexity to the code, I’m going to break it down again until it’s simple enough.
Every complexity in my code comes from something I didn’t quite understand, be it the requisite, the framework, the language, the modeling... And if I’m writing code about something I don’t really understand, it has a great chance of failing...
So I guess the bottom line is that I pursue simplicity so I can better manage the underlying complexity.
Guess I went a bit off topic, but thanks for the opportunity to think about that!
Wow. I never thought about that in the same way. Makes a lot of sense... Complexity as a way to get your code clear enough so that you can still work on it. Actually I'm quite opposite 😂😂 I'm Machiavellic [Side projects only], it doesn't matter the way I take, what really matters is the final result... But sometimes I tend to love to write clean code that is very easy to grasp... Thanks
Required reading: dev.to/mattkocaj/what-junior-devs-...