Demystifying dashboards in Tableau

In the data-centered world we live in, understanding data is the key to making the best decisions for any business owner or consumer. There is an overwhelming amount of data available today and is…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




SOLID Design Principles redefined

Thousands of years ago, the massive armies of Business, Client and Analysts were standing in front of the developers with questions about deadlines, estimations and delivery.

At that time, a renowned power programmer like Arjun started to shiver like a coward, as he was trapped in feelings of apprehension & doubt.

Stop! I can’t take it anymore”, Arjun cried out loud.

Krishna, the calm & composed Architect was waiting for this moment since the very first day when Arjun wrote his first “if” condition.

“Relax, it is bound to happen. This confusion of yours is because of all the clutter that is there in this system. You need abstraction. Hey Parth (Son of earth), abstraction is like a river that quenches the thirst of every being without asking about the origin, nature, size, or any other factor”, right after saying this Krishna gestured Arjun to pass the jug of water to quench his thirst.

To give you all a brief overview, Arjun wasn’t actually a coward. He had grabbed many accolades, but here in front of these armies being trapped in ignorance he had turned away from his duty & responsibility.

At this moment, Arjun was like being swallowed by a quicksand and needed some key rules to get out of it.

The way Bear Grylls got out of the swamp using a stick, Arjun also wants to find a tool so as to avoid the swamp creation.

What do you mean by abstraction?” Arjun asked cluelessly.

Abstraction is an entity which is defined in such a way that multiple entities can extend it. Abstraction holds some functionalities which need to be implemented by the extender. The extender may use the pre-defined rules, properties or functionalities the way they are present, or redefine them based on the needs. This way an abstraction serves as guidelines, structure and help resolve the clutter.

Can I use the abstractions as it is?” Arjun was now starting to be aware of his ignorance and thus asked questions to help resolve his doubts.

The human mind with its limited capacity is unable to comprehend the abstract information. Some concrete extension is required for the abstraction to be used, always!

Arjun gulped down some water quickly, as he couldn’t wait to know it all.

Things should be simple. Simplicity reduces the clutter. It comes when you do not complicate things. Complications occur when a single entity tries to do multiple things. It’s good to be able to handle such stress smoothly, but when it comes to correct one part of that complex structure, it becomes difficult. Hence a single entity should have a single responsibility. That’s it!

Open for extension, closed for modification.

Well, having learned the first principle religiously, makes understanding this one quite simple. If you keep only one entity for a single work, you have managed to achieve single responsibility. Along with that one must also ensure that, any extension can be easily incorporated in it.

Understanding the second part is a little tricky. Closed for modification! A system which is made with thought, knowledge, and consciousness will be fulfilling the single responsibility for which it has been created. There would be other systems which would be making use of this system.

In the heart the pulmonary artery carries blood from heart to lungs for oxygenation & pulmonary vein carries blood from lungs back to the heart. Now since the heart & the lung both make use of these independent entities, any modification in these two will have effect on the functioning of the dependent systems. Ensuring the original behaviour of lungs & the heart will be an additional task.

Why couldn’t Liskov name it something which would make more sense? I can blink my eyes; I should rather start calling it Krishna’s Blinking art. Anyway, substitution means “re-placement”. It’s basically the art of putting a thing at such a place from where it can be directly accessed without going in the depths of abstraction.

One thing to ensure while substituting is that the original behaviour should not be changed. (Nobody likes to change)

One classic example of how to substitute things is while solving a Rubik’s cube where with each consecutive step it is to be ensured that the previous states remain intact.

Segregation basically means separation. As a social animal, you respect peace, follow rules and live a healthy life. We socialise as well, go out, meet new people. If you are hanging out with a group of friends and they all consume alcohol, it doesn’t necessitate that you also do the same. Systems should also be made in such a way that if some entity doesn’t require any particular functionality, then it shouldn’t be forced to define or adopt it.

Here, I would like to take you back to from where it all got started. The part where we talked about abstractions. The part where abstractions aren’t easily comprehended by the limited capacity of human mind in its original form. But abstractions are very important. We wake up every day in the morning, do some physical exercises, meditate, take a bath, have our meals, some of us even cycle to go to different places, take small breaks during the day to keep fuelling our bodies to keep it going. There is abstract thing that we are trying to achieve by doing all this, i.e., to stay fit, to take care of our physical state. This is the abstraction which when defined globally leads to all these tasks. Hence, everything should be dependent on some form of abstraction!

Woah! I am enlightened Krishna. I know I’ll be all good now.” Arjun picked up his laptop & went on to conquer it all.

These are just the guidelines, rules that need to be followed. You can learn them, but it requires great dedication and practice to achieve them. Go on practice it as much as you can” Krishna started twirling his car keys as he said this.

Thanks for reading!

Add a comment

Related posts:

The Woes of Solana

Solana has had a rough time recently, so rough in fact that the price of the coin has seen a significant drop and at the time of this writing is only at $153.93. Alarms are going off, panic has set…

Screw the Guidelines

Antes de pular as ondinhas do fim do ano, vamos abrir um pacote de Cheetos Bola, deixar este maravilhoso aroma encher a sala e então conversar sobre os meus dois anos na Apple Developer Academy. Eu…

The couple who bought a World War II ship on eBay

Going through eBay looking at market listings for broken-down boats is something of a ritual for Simon Robins, who dedicates much of his leisure time to rescuing and refurbishing crumbling vessels…