1
1
# clean-code-javascript
2
- Software engineering principles, from Robert C. Martin's book
3
- [ * Clean Code* ] ( https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 ) ,
4
- adapted for JavaScript. This is not a style guide. It's a guide to producing
5
- readable, reusable, and refactorable software in JavaScript. Enjoy!
6
2
7
3
## Table of Contents
4
+ 0 . [ Introduction] ( #introduction )
8
5
1 . [ Variables] ( #variables )
9
6
2 . [ Functions] ( #functions )
10
7
3 . [ Objects and Data Structures] ( #objects-and-data-structures )
@@ -14,6 +11,33 @@ readable, reusable, and refactorable software in JavaScript. Enjoy!
14
11
7 . [ Formatting] ( #formatting )
15
12
8 . [ Comments] ( #comments )
16
13
14
+ ## Introduction
15
+ ![ Humorous image of software quality estimation as a count of how many expletives
16
+ you shout when reading code] ( http://www.osnews.com/images/comics/wtfm.jpg )
17
+
18
+ Software engineering principles, from Robert C. Martin's book
19
+ [ * Clean Code* ] ( https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 ) ,
20
+ adapted for JavaScript. This is not a style guide. It's a guide to producing
21
+ readable, reusable, and refactorable software in JavaScript.
22
+
23
+ Not every principle herein has to be strictly followed, and even less will be
24
+ universally agreed upon. These are guidelines and nothing more, but they are
25
+ ones codified over many years of collective experience by the authors of
26
+ * Clean Code* .
27
+
28
+ Our craft of software engineering is just a bit over 50 years old, and we are
29
+ still learning a lot. When software architecture is as old as architecture
30
+ itself, maybe then we will have harder rules to follow. For now, let these
31
+ guidelines serve as a touchstone by which to assess the quality of the
32
+ JavaScript code that you and your team produce.
33
+
34
+ One more thing: knowing these won't immediately make you a better software
35
+ developer, and working with them for many years doesn't mean you won't make
36
+ mistakes. Every piece of code starts as a first draft, like wet clay getting
37
+ shaped into its final form. Finally, we chisel away the imperfections when
38
+ we review it with our peers. Don't beat yourself up for first drafts that need
39
+ improvement. Beat up the code instead!
40
+
17
41
## ** Variables**
18
42
### Use meaningful and pronounceable variable names
19
43
0 commit comments