2. What is Clean Code?
code whose attributes make your software reliable, secure, and
maintainable.
Definitions
• Clean Code attribute: A characteristic that contributes to
Clean Code. Attributes are grouped under four main
categories: consistent, intentional, adaptable, and responsible.
Code is considered Clean Code when it has these attributes.
• Software quality: A characteristic of software that contributes
to its lasting value. There are three software qualities: security,
reliability, and maintainability.
• Issue: A problem in your code that prevents it from being
Clean Code. Each issue is linked to one Clean Code attribute
which is associated with one or more software qualities, each
with a level of severity.
3. Consistent
The code is written in a uniform and conventional way. All the code
looks similar and follows a regular pattern, even with multiple
contributors at different times.
Consistent code is formatted, conventional, and identifiable.
•Formatted: The code presentation is systematic and regular. Non-
semantic choices, such as spacing, indentation, and character
placement, remain consistent throughout the codebase, maintaining
uniformity across files and authors.
•Conventional: The code performs tasks with expected instructions.
Faced with equally good options, the code adheres to a single choice
across all instances, preferring language conventions. This includes
using the appropriate programming interfaces and language features.
•Identifiable: The names follow a regular structure based on language
conventions. The casing, word separators, suffixes, and prefixes used in
the identifiers have purpose, without arbitrary differences.
4. Intentional
The code is precise and purposeful. Every instruction makes sense, is
adequately formed, and clearly communicates its behavior.
Intentional code is clear, logical, complete, and efficient.
•Clear: The code is self-explanatory, transparently communicating its
functionality. It is written in a straightforward way that minimizes
ambiguity, avoiding unnecessary clever or intricate solutions.
•Logical: The code has well-formed and sound instructions that work
together. It is free of explicit errors, contradictions, and commands that
could be unpredictable or objectionable.
•Complete: The code constructs are comprehensive, used adequately
and thoroughly. The code is functional and achieves its implied goals.
There are no obviously incomplete or lacking solutions.
•Efficient: The code utilizes resources without needless waste. It
prioritizes economical options when available, avoiding unnecessary
consumption of memory, processor, disk, or network resources.
5. Adaptable
The code is structured to be easy to evolve and develop with
confidence. It makes extending or repurposing its parts easy, and
promotes localized changes without undesirable side-effects.
Adaptable code is focused, distinct, modular, and tested.
•Focused: The code has a single, narrow, and specific scope. Each unit
should have only one concise purpose, without an overwhelming
accumulation of instructions or excessive amounts of complexity.
•Distinct: The code procedures and data are unique and distinctive,
without undue duplication. The codebase has no significant repetition
where it could be decomposed into smaller shared segments.
•Modular: The code has been organized and distributed to emphasize
the separation between its parts. The relationships within the code are
carefully managed, ensuring they are minimal and clearly defined.
•Tested: The code has automated checks that provide confidence in the
functionality. It has enough test coverage which enables changes in
implementation without the risk of functional regressions.
6. Responsible
The code takes into account its ethical obligations on data, as well as
societal norms.
Responsible code is lawful, trustworthy, and respectful.
•Lawful: The code respects licensing and copyright regulation. It
exercises the creator’s rights and honors other’s rights to license their
own code.
•Trustworthy: The code abstains from revealing or hard-coding private
information. It preserves sensitive private information such as
credentials and personally-identifying information.
•Respectful: The code refrains from using discriminatory and offensive
language. It chooses to prioritize inclusive terminology whenever an
alternative exists that conveys the same meaning.
7. What are our choices?
1. GitHub
2. GitLab
3. Veracode:.
4. JFrog:
5. Snyk:
6. Checkmarx:
7. Qualys
8. Sonatype:
9. Codacy:
10. Synopsys:
11. SonarSource
What is my choice and why?
SonarSource