Styles and Conventions
Conventions, style guides or best practices came up naturally as more people collaborated in the same project. If everyone coded in their own unique way, it would be very cumbersome to work on someone else’s section.
To improve readability and maintainability, a development team should have agreed upon conventions for their source code. This will help any member of the team, new or otherwise, to more easily work in another part of the project even if they were not involved in that part. Conventions are language specific, so if a project has code in different languages, multiple conventions should be in play.
How can we make this agreement better?
We can do a couple of things to make sure that the convention is being followed. For starters, these rules need to be written down in a wiki or somewhere accessible for everyone to consult. This way the team knows exactly what should be followed. Even if the convention being followed is the one used at Microsoft or Google, it should be referenced internally.
Secondly, having a configuration file that can be imported into the IDE will help a lot. This ensures that all developers have the style and will make it very easy to follow, just trigger the “format” option on the IDE and should move things around to be consistent. An example of settings:
- Spaces or tabs (spaces rule, tabs drool!)
- Indentation depth for tabs
- Indentation styles
- Comment styles
- PascalCase vs camelCase
- Should private members start with an underscore?
- And more
Next, during the code review process code style should be part of the criteria that is considered. I understand that this part is difficult especially when there is a time crunch to get a hotfix out or when a project is hitting its deadline, but a clear review criteria will help.
Clever Code
All this works great for formatting and having consistent code throughout the project, but sometimes that is not enough. A developer can take shortcuts or use language features that while still following the agreed convention it’s still not readable. I’ll mention a few examples, but of course there are a lot scenarios where this pops up
- Ternary operators are great, they can make an if statement assignment quick and clear, however chaining ternary operators quickly make it confusing.
- Having too many inline conditions in an if statement. This one can have a performance impact, since if statements can “shortcut” once something is false, it can skip processing the next conditionals, so maybe a function can help make the code more readable.
- Don’t get me started on LINQ chaining.
Where to draw the line?
This is an interesting question. What some people call readable, others call bad code. A common example (in C#) of this is using var keyword instead of the explicit type.
For any confusion like this we can go back to our style guide, but if it’s not there a new rule should be added. The style guide should evolve as the project grows.
Conclusion
- Have an agreed style guide per language and be open to update it as new scenarios arrive
- Create a settings file to import into the IDE
- Integrate style guide criteria in the code review process
- Avoid clever code, but remember that different people have different definitions of what is readable

Comments
26 responses to “Code shouldn’t be clever, it should be readable”
https://shorturl.fm/2XzOB
https://shorturl.fm/X9PJL
https://shorturl.fm/wydtG
Roulette’s allure is fascinating – the probabilities are deceptively simple, yet outcomes feel random! Platforms like scatterna app download apk are evolving the experience, adding social elements & tournaments – a cool way to engage beyond solo play. It’s interesting to see gaming become more communal!
https://shorturl.fm/fEYkZ
https://shorturl.fm/H6dhd
hvihw9
https://shorturl.fm/zmLwo
https://shorturl.fm/KM21Q
Alright mates, checking out au88link! Heard some good things, hoping for some solid payouts. Wish me luck! au88link
https://shorturl.fm/kUEh9
https://shorturl.fm/nteM5
Really enjoying exploring music creation tools lately! It’s amazing how accessible it’s become – even on mobile! I stumbled across Sprunki and the visual feedback is super cool. Great way to unwind & be creative! ✨
Slotsph8, nice selection of slots! I found a few I really like. Could use a few more table games, but overall a good experience. Ready to spin? Check it out at slotsph8!
That’s a fascinating point about player psychology in competitive games! Seeing platforms like saklagame emphasize strategic bankroll management & verification is smart-it builds trust and skill. Really elevates the experience!
Bet365tiengviet is my go-to place for checking odds and getting the latest news! It’s super easy to navigate perfect for us Vietnamese players. Seriously, check it out if you are looking for a reliable source. You can find more information here: bet365tiengviet
Needed an alternative link the other day and found vao 12bet bong88. Worked like a charm! No hassle, straight to the action. Saved me a bunch of time. Big ups! vao 12bet bong88
https://shorturl.fm/sKRZ9
Merryphofficialwebsite is my go-to! It’s super easy to navigate and always has the games I’m looking for. Check it out! merryphofficialwebsite
If you are into football betting, bet888livefootball is a good place to check out. They have lots of live games and decent odds. Try bet888livefootball if you are a football fan!
Jiliwin11 is the main, nice payouts. Easy to use and the design is smooth, and no delays on the money. You gotta give it a look: jiliwin11
Claim Your Exclusive Bonus on AsterDEX https://is.gd/CGTnqR
Yo, just tried out kz999plataforma and it’s pretty slick! The games loaded fast and the bonuses seem legit. Definitely worth checking out for a bit of chill gaming. Check it out here: kz999plataforma
Been hearing some buzz about jl999 and decided to check it out. Worth the hype! Fun games and a decent overall experience. Take a peek: jl999
Boost your income effortlessly—join our affiliate network now!
Interesting points about responsible gaming frameworks! Seeing platforms like casino plus apk game prioritize PAGCOR licensing & KYC is a good sign for player protection & transparency. It’s key for sustainable growth!