You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ It's a good practice apply the [Boy Scout Rule](http://programmer.97things.oreil
54
54
55
55
56
56
<aname="chapter2">
57
-
## Chapter 2 - Meaningful Names
57
+
<h1>Chapter 2 - Meaningful Names</h1>
58
58
</a>
59
59
60
60
Names are everywhere in software. Files, directories, variables functions, etc. Because we do so much of it. We have better do it well.
@@ -241,7 +241,7 @@ In an imaginary application called “Gas Station Deluxe,” it is a bad idea to
241
241
Shorter names are generally better than longer ones, so long as they are clear. Add no more context to a name than is necessary.
242
242
243
243
<aname="chapter3">
244
-
## Chapter 3 - Functions
244
+
<h1>Chapter 3 - Functions</h1>
245
245
</a>
246
246
247
247
Functions are the first line of organization in any topic.
@@ -356,7 +356,7 @@ So if you keep your functions small, then the occasional multiple `return` , `br
356
356
357
357
358
358
<aname="chapter4">
359
-
## Chapter 4 - Comments
359
+
<h1>Chapter 4 - Comments</h1>
360
360
</a>
361
361
362
362
Nothing can be quite so helpful as a well-placed comment. Nothing can clutter up a module more than frivolous dogmatic comments. Nothing can be quite so damaging as an old comment that propagates lies and misinformation.
@@ -673,7 +673,7 @@ Short functions don’t need much description. A well-chosen name for a small fu
673
673
Javadocs are forpublicAPIs, in nonpublic code could be a distraction more than a help.
674
674
675
675
<a name="chapter5">
676
-
## Chapter5-Formatting
676
+
<h1>Chapter5-Formatting</h1>
677
677
</a>
678
678
679
679
Code formatting is important. It is too important to ignore and it is too important to treat religiously. Code formatting is about communication, and communication is the professional developer’s first order of business.
@@ -836,7 +836,7 @@ Every programmer has his own favorite formatting rules, but if he works in a tea
836
836
A team of developers should agree upon a single formatting style, and then every member of that team should use that style. We want the software to have a consistent style. We don't want it to appear to have been written by a bunch of disagreeing individuals.
837
837
838
838
<a name="chapter6">
839
-
## Chapter 6 - Objects and Data Structures
839
+
<h1>Chapter 6 - Objects and Data Structures</h1>
840
840
</a>
841
841
842
842
### Data Abstraction
@@ -943,7 +943,7 @@ The method should not invoke methods on objects that are returned by any of the
943
943
The quintessential form of a data structure is a class with public variables and no functions. This is sometimes called a data transfer object, or DTO. DTOs are very useful structures, especially when communicating with databases or parsing messages from sockets, and so on. They often become the first in a series of translation stages that convert raw data in a database into objects in the application code.
944
944
945
945
<a name="chapter7">
946
-
## Chapter 7 - Error Handling
946
+
<h1>Chapter 7 - Error Handling</h1>
947
947
</a>
948
948
949
949
Many code bases are completely dominated by error handling. When I say dominated, I don't mean that error handling is all that they do. I mean that it is nearly impossible to see what the code does because of all of the scattered error handling. Error handling is important, but if it obscures logic, it's wrong.
@@ -966,7 +966,7 @@ If you are tempted to return null from a method, consider throwing an exception
966
966
Returningnull from methods is bad, but passing null into methods is worse. Unless you are working with an API which expects you to pass null, you should avoid passing null in your code whenever possible.
967
967
968
968
<a name="chapter8">
969
-
## Chapter8-Boundaries
969
+
<h1>Chapter8-Boundaries</h1>
970
970
</a>
971
971
972
972
We seldom control all the software in our systems. Sometimes we buy third-party pack- ages or use open source. Other times we depend on teams in our own company to produce components or subsystems for us. Somehow we must cleanly integrate this foreign code with our own.
@@ -1015,7 +1015,7 @@ Interesting things happen at boundaries. Change is one of those things. Good sof
0 commit comments