What distinguishes a code that simply "works" from one that is "maintainable and scalable"?
Follow the DEVteam for more discussions and online camaraderie!
For further actions, you may consider blocking this person and/or reporting abuse
What distinguishes a code that simply "works" from one that is "maintainable and scalable"?
Follow the DEVteam for more discussions and online camaraderie!
For further actions, you may consider blocking this person and/or reporting abuse
Jonas Scholz -
Kudzai Murimi -
Ravin Rau -
Abdulqudus Abubakre -
Top comments (9)
A code that simply works, is a code that do exactly what we want and we program it to do it without taking care of some principles that make our code more readable, more understandable...
A code that is maintainable and scalable, is a code that do exactly what we want, but we program it with best practices, trying to make it reusable, easy to read and understand. Why? Because some day we are going to add new functionalities or refactor the code and it needs to be easy to fix, easy to improve...
For example:
Hey @algorodev
You can pass the code type in your block code and turn your code cool! As below:
Edited, now it’s prettier! Thanks @renancferro for the tip!
Lets understand with example
An application like calculator which does arithmetic operations that works as expected,
Whereas, maintainability is when i add new features to the calculator, how easily it can be added with minimal damage like fixing existing bugs easily and less chances of introducing new ones.
I’m on of those engineers who was learning the ropes when it was en vogue to talk/write about things in terms of craft and craftsmanship.
While this isn’t always the best way of thinking about things it does give you some good metaphors to talk about things like this.
Think about a workshop. You have a lot of tools on your bench and need somewhere to store them. The desired functionality here is storing tools.
A box is functional. It does the job of storing your tools as well as anything else. But not particularly maintainable or scalable. If get more tools and need to store them what do you do? Get a bigger box? Another box? Also the UX of a box isn’t great either. Things aren’t sorted or particularly easy to retrieve.
Now a rack to hang tools from is better. Certainly more scalable. Need to store more tools? Add more hooks! Also more maintainable since it offers easier access and modification of its components. The points of failure tend to be much more atomic.
Functionality is a requirement. Maintainability is a non-functional requirement.
"...a code..."? "...one that is..."? Did you proofread this?
"a piece of code", if you'd like that more :-)
Not the most helpful comment.