🚦 Naming in Clean Code
Positive names are usually clearer:
✔️ isActive() > isNotActive()
✔️ Avoids double negations
✔️ Easier for the brain to process
But it’s not a 100% rule:
🔹 Domain-specific cases
🔹 Common patterns
🔹 Special scenarios
In our case, positive naming →…
🚫 Clean Code parameter rules:
No function should need >3 params
Don’t use boolean flags (split functions instead)
Don’t pass/return null
Avoid output parameters
Fewer parameters are better. 2 parameters are golden, 3 maybe, and 4 are bad
🚦 The Stepdown Rule
Every function should read like a story: each step leading to the next, one level of abstraction at a time.
- Robert C. Martin, Clean Code
Do you agree?
"The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that. Functions should not be 100 lines long. Functions should hardly ever be 20 lines long."
ROBERT C. MARTIN, CLEAN CODE
1. Method and classes
- Short names for long scope
- Long names for short scope
2. Variables and parameters
- Long names for long scope
- Short names for short scope
🚀 Package/Module/Namespace Design Principles: Cohesion + Coupling
🎯 COHESION PRINCIPLES
(group what belongs together)
1️⃣ CCP – Common Closure Principle
- Classes in a module should change for the same reason.
- One kind of change should not affect other modules.
- Related…
Relying on getters & setters can break the Single Responsibility Principle.
A class should change for one reason and keep its logic cohesive.
Exposing variables via getters/setters invites scattered changes & weakens SRP.
#CleanCode#SRP#OOP
Using getters and setters can break the Tell, Don't Ask principle.
Don't ask an object for its data and act on it - tell it what you want it to do.
#CleanCode#TellDontAsk#OOP
"Data structures expose their data and have no meaningful functions."
"Objects hide their data behind abstractions and expose functions that operate on that data."
Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship
#Software
Tell, Don’t Ask Principle
I connected this software design principle to a situation from last week.
My friend had an issue at a holiday event and wanted a refund. I had paid on their behalf, but the problem was theirs, so they asked me to call the organizer. Instead, I told…
Fikir / Problem tanımı – Ne çözüyorsun, kimin için?
PoC – Teknik olarak mümkün mü? (gerekirse)
Prototype – Kullanıcı deneyimi ve akışı nasıl olacak?
MVP – En kritik özelliklerle pazara çık.
Product – Pazarda tutunursa büyüt, optimize et, ölçekle.
The OAuth 2.0 Playground will help you understand the OAuth authorization flows and show each step of the process of obtaining an access token.
oauth.com/playground/
33 Followers 29 FollowingOnce, I flew above the clouds guiding others through the skies as a paragliding pilot.
Now, I help creators rise - not with wings, but with inspiration.
106 Followers 643 FollowingThe most important relationship in the world is the one you have with yourself, but it would be great if someone could fall in love with the one you love
141K Followers 843 Following🔑 Sharing AI Prompts, Tips & Tricks. The Biggest Collection of AI Prompts & Guides for ChatGPT, Grok, Claude & Midjourney AI → https://t.co/vwZZ2VSfsN
9K Followers 828 FollowingOfficial global Twitter account of EPAM Systems Inc. (EPAM), a leading #DigitalTransformation services and #ProductEngineering company.
33 Followers 29 FollowingOnce, I flew above the clouds guiding others through the skies as a paragliding pilot.
Now, I help creators rise - not with wings, but with inspiration.
4.3M Followers 3 FollowingOpenAI’s mission is to ensure that artificial general intelligence benefits all of humanity. We’re hiring: https://t.co/dJGr6Lg202
1.6M Followers 2K FollowingProfessor of Neurobiology and Ophthalmology at Stanford Medicine • Host of Huberman Lab • Focused on science and health research and public education
76K Followers 811 FollowingKripto paralar üzerine yaptığım çalışmaları ve analizlerim doğrultusunda oluşan görüşlerimi paylaşıyorum
Ön satış ve coin tanıtımı reklamlarını kabul etmiyorum
136K Followers 486 Following🎓Adj. Prof. at Montclair State University, ex-CryptoQuant
❝❞Bloomberg | CNBC | Yahoo Finance | CoinDesk
✍️Her gün veriye dayalı 1 analiz
54K Followers 83 Following🧠 Tenured brain, fresh daily takes. Maximum citations but sanity questionable. The prof your prof follows for daily research & AI takes. Quality wins.
946K Followers 158 FollowingWe're a community of millions of people who are building new skills and getting new jobs together. A 501(c)(3) public charity. Tweets by @abbeyrenn.
129 Followers 243 FollowingWeb of Things Expert at Siemens Munich. Member of W3C WoT Working Group. Opinions are my own. He/him
https://t.co/gQxbPMHlKP
4.0M Followers 0 FollowingThe universal platform for crypto, blockchain apps, stablecoins & decentralized tech. An account about the Ethereum ecosystem maintained by @ethereumfndn.
307K Followers 86 FollowingMacro Addict | Investor| Libertarian...I try to help people increase their wealth/freedom. 700k+ subs on Youtube. Media requests: [email protected]
374K Followers 755 FollowingMaster shape rotator, tweeting the things you think about but are too scared to tweet (+0m followers on TikTok, never been acquired, not a parody)