System Init
0%
LOADING_ASSETSv2.0.26
blogs/menerapkan-prinsip-solid-di-tongkrongan--part-2
//Khay
Baca Bahasa Indonesia

Applying SOLID Principles in Your Friend Group (Part 2)

ProgrammingSocialPhilosophy

I once said that applying SOLID principles (Single Responsibility, Open-Closed, Liskov, Interface Segregation, Dependency Inversion) to your friend group is mandatory if you do not want to end up with mental spaghetti code. A month has passed, and I want to share a testimonial from someone who actually tried doing this.

One of my IT major friends, let us call him J, actually refactored his friendship circle. He applied Dependency Inversion extremely. Where he used to always feel guilty if he did not join the Friday night hangouts (meaning his life was tightly coupled to the validation of his circle), he has now made his system loosely coupled.

Loose coupling simply means this: you and your friends still know each other, still follow each other, but you do not need their existence every single day to feel your life is complete. You are both independent modules that only interact through a clear API.

At first, J felt weird. His life suddenly became very quiet. No WhatsApp group notifications telling him to hurry up to the cafe. No drama over who has not paid their Netflix share. But on the other hand, his brain could actually run the background processes that had always been pending. He started working on his portfolio project, he read a book that had been collecting dust on his desk for a month, and he slept soundly.

This quiet phase is often misinterpreted by people as social depression. When in the software world, this is actually a very good idle state. Your server is not receiving weird external traffic, so your CPU load is low and you can allocate computational power for internal maintenance.

But of course, there are risks to applying SOLID principles if you are not good at communicating them.

For example, the Interface Segregation Principle (ISP). J did not want his programmer friends to keep complaining about love matters. So he blatantly refused to listen to his friend venting about his girlfriend. Eventually his friend thought J was anti-social and lacked empathy. When J's intention was, you are better off venting to your psychology friend who actually has an interface to handle emotional payloads, rather than telling me who can only give raw logic output that will actually just hurt you more.

This is where the art lies. We are humans, not machines that easily accept a connection reset by peer rejection. You still need to wrap this refactoring of yours with smooth UI/UX (read: etiquette).

How to apply it is easy: when your friend starts sending data that does not match your interface, just elegantly route the conversation in another direction. "Wow, your problem is really heavy bro. I do not understand that kind of stuff, but have you tried asking A? They understand this better."

The point is, applying a clean architecture to your life does not mean you become an emotionless robot. It is about knowing your capacity limits (capacity planning) and self-awareness.

If you force yourself to handle everything for other people, your system will explode. A good friend is a friend who knows when they should throw an exception, and when they should just stay quiet and listen.

  • Khay