Ankush's Guide to
Clean
Code
Creating the cleanest codebase for you and your teams.
This series is currently in progress
Statistics about the series
Getting Started

Clean Code
constructing the simplest possible code that would solve your problem resulting in an increase in productivity by producing higher quality in less time.
Flat is better than nested
Leave when not okay
Avoid creating god classes and long methods
Minimalism
Avoid inventing algorithms and data structures
especially for maths
Remove un-necessary code
You ainโt gonna need it
Exception handling
and Logging with style
Leave it better than you found it
Atomic Habits applied to code. Thanks James Clear.
Clean Code Resources and Tools
Constructing the simplest possible code
Art of Reducing Lines of Code in Java/Spring Boot
Placeholder
Quick Refactoring Tips
Placeholder
Tips for working with `package.json`
Placeholder
Make your code configurable.
Things that should take 0 coding effort
Writing better commit with conventional commits
Placeholder
Writing cleaner logs by Disabling Stack Trace for Expected Response Exceptions
Placeholder
Writing better commits with Atomic Commits
Why small frequent commits leads to higher productivity
Leave Clues
Comments and Naming Conventions
Code Reviews and Pair Programming
Placeholder

A responseType field for all response classes
Practical Chaos Engineering Part 1

Making Object Immutable for Concurrency
It's best to start with immutable objects and then modify them if needed.
Separate Technical Code From Domain Code in both Frontend and Backend
Separate out technical code from business/domain logic for extreme reusability for code.

How to develop a robust plugin architecture?
Placeholder
Keeping database simple
Placeholder

Why do microservices need an API client sdk for HTTP and Messaging?
Placeholder
Writing Meaningful Log Messages
Placeholder
Code Review Checklist
Placeholder
Separating Connectors and Service (Business Logic) - A Key Principle for Service Reusability
Separating connectors from business logic in a service-oriented architecture promotes reusability and single responsibility.
Release and Development Snapshot Version Semantic Versioning with Maven
Placeholder
Clean Tests
Write Tests after Cleaning Code.
Placeholder

Thinking and writing cleaner tests with method/when/should blocks
A template for thinking and creating understandable uniform tests

Writing cleaner tests with Test Data Factories
Consolidating object creation, mock of methods and more.
Writing cleaner tests with Fluent Assertions
Fluent Assertions make tests highly readable and English-like, presenting a concise structure that simplifies comprehension

Writing cleaner tests with creative variable names
Creative variable names in tests can make them fun and interesting to read.

Write Cleaner UI Tests with Page Object Model Pattern
Page Object Model can be used with any testing framework to write cleaner and simpler tests that are fast to write.
Web Development

Keeping Web Dev Code proper
Placeholder
CSS Tips
Placeholder
Web Development Tip - Reverse Engineer by looking at DOM
Placeholder
Elements of Good REST API Design
Placeholder

Understanding & Using HTTP Status Codes
Placeholder

5 Step Process to Planning and Building a UI DOM Efficiently with Boxes, BEM and TDD
BEM, TDD, and thoughtful design supercharge web development by streamlining UI DOM planning for maximum efficiency.
Naming Things

3 Important Benefits of Good Naming in Programming / Software
The Naming convention is more important than any other part of clean code. Once you nail the name, everything else fits precisely!

6 Approaches to come up with good variables, methods, and class names to create a fluent codebase
Easy approaches to help you come up with descriptive clean names

How to generate and enforce naming conventions for you and your team?
Creating a good naming convention that can help you and your team maintain a clean codebase

Clean code - Naming convension for design patterns
Making it easy for future-code readers to understand
Have better variable and method names for technical layer by copying others
Placeholder
![Naming Convention for Indexes [Quick Read]](/images/naming-contention-database-redux-indexes.png)
Naming Convention for Indexes [Quick Read]
Create a clean descriptive index name