Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ebbc47

Browse files
author
Riley Martine
committed
Fix spelling errors
1 parenta442bd6 commit9ebbc47

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎README.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Never use `i` for the innermost loop variable. Use anything but. Use `i` liberal
131131
####Conventions Schmentions
132132

133133

134-
Ignore the[Sun Java Coding Conventions](http://web.archive.org/web/20091003224540/http://java.sun.com/docs/codeconv/), after all, Sun does. Fortunately, the compiler won't tattle when you violate them. The goal is to come up with names that differsubtlely only in case. If you are forced to use the capitalisation conventions, you can still subvert wherever the choice isambigous, e.g. use*both*_input**F**ile**n**ame_ and_input**f**ile**N**ame_. Invent your own hopelessly complex naming conventions, then berate everyone else for not following them.
134+
Ignore the[Sun Java Coding Conventions](http://web.archive.org/web/20091003224540/http://java.sun.com/docs/codeconv/), after all, Sun does. Fortunately, the compiler won't tattle when you violate them. The goal is to come up with names that differsubtly only in case. If you are forced to use the capitalisation conventions, you can still subvert wherever the choice isambiguous, e.g. use*both*_input**F**ile**n**ame_ and_input**f**ile**N**ame_. Invent your own hopelessly complex naming conventions, then berate everyone else for not following them.
135135

136136
####Lower Case l Looks a Lot Like the Digit 1
137137

@@ -188,7 +188,7 @@ Hungarian Notation is the tactical nuclear weapon of source code obfuscation tec
188188

189189
####Hungarian Notation Revisited
190190

191-
Onefollowon trick in the Hungarian notation is "change the type of a variable but leave the variable name unchanged". This is almost invariably done in windows apps with the migration from Win16:
191+
Onefollow-on trick in the Hungarian notation is "change the type of a variable but leave the variable name unchanged". This is almost invariably done in windows apps with the migration from Win16:
192192

193193
```c
194194
WndProc(HWND hW, WORD wMsg, WORD wParam, LONG lParam)
@@ -313,7 +313,7 @@ Maintenance programmers, in order to see if they'll be any cascading effects to
313313
#define local_var xy_z // in file ..\codestd\inst.h
314314
```
315315
316-
These defs should be scattered through different include-files. They are especially effective if the include-files are located in different directories. The other technique is to reuse a name in every scope. The compiler can tell them apart, but a simple minded text searcher cannot. Unfortunately SCIDs in the coming decade will make this simple technique impossible. since the editor understands the scope rules just as well as the compiler.
316+
These defs should be scattered through different include-files. They are especially effective if the include-files are located in different directories. The other technique is to reuse a name in every scope. The compiler can tell them apart, but a simple minded text searcher cannot. Unfortunately SCIDs in the coming decade will make this simple technique impossible, since the editor understands the scope rules just as well as the compiler.
317317
318318
#### Long Similar Variable Names
319319
@@ -370,7 +370,7 @@ This one gets fun when passing `g()` a `char*`, because a different version of `
370370

371371
#### Compiler Directives
372372

373-
Compiler directives were designed with the express purpose of making the same code behave completely differently. Turn the booleanshort-circuiting directive on and off repeatedly andvigourously, as well as thelong strings directive.
373+
Compiler directives were designed with the express purpose of making the same code behave completely differently. Turn the booleanshort-circuiting directive on and off repeatedly andvigorously, as well as thelong strings directive.
374374

375375
## Documentation
376376

@@ -386,7 +386,7 @@ You don't have to actively lie, just fail to keep comments as up to date with th
386386

387387
####Document the obvious
388388

389-
Pepper the code with comments like`/* add 1 to i */` however, never documentwooly stuff like the overall purpose of the package or method.
389+
Pepper the code with comments like`/* add 1 to i */` however, never documentwoolly stuff like the overall purpose of the package or method.
390390

391391
####Document How Not Why
392392

@@ -530,7 +530,7 @@ Lots of them. Move data between the arrays in convoluted ways, say, filling the
530530

531531
####Mix and Match
532532

533-
Use both accessor methods and public variables. That way, you can change an object's variable without the overhead of calling the accessor, but still claim that the class is a "Java Bean". This has the additional advantage of frustrating themaintenence programmer who adds a logging function to try to figure out who is changing the value.
533+
Use both accessor methods and public variables. That way, you can change an object's variable without the overhead of calling the accessor, but still claim that the class is a "Java Bean". This has the additional advantage of frustrating themaintenance programmer who adds a logging function to try to figure out who is changing the value.
534534

535535
####Wrap, wrap, wrap
536536

@@ -560,7 +560,7 @@ Instead of using a parameter to a single method, create as many separate methods
560560

561561
Make as many of your variables as possible static. If_you_ don't need more than one instance of the class in this program, no one else ever will either. Again, if other coders in the project complain, tell them about the execution speed improvement you're getting.
562562

563-
####Cargill'sQuandry
563+
####Cargill'sQuandary
564564

565565
Take advantage of Cargill's quandary (I think this was his) "any design problem can be solved by adding an additional level of indirection, except for too many levels of indirection." Decompose OO programs until it becomes nearly impossible to find a method which actually updates program state. Better yet, arrange all such occurrences to be activated as callbacks from by traversing pointer forests which are known to contain every function pointer used within the entire system. Arrange for the forest traversals to be activated as side-effects from releasing reference counted objects previously created via deep copies which aren't really all that deep.
566566

@@ -721,7 +721,7 @@ Nest as deeply as you can. Good coders can get up to 10 levels of `( )` on a sin
721721

722722
####Numeric Literals
723723

724-
If you have an array with 100 elements in it, hard code the literal 100 in as many places in the program as possible. Never use a static final named constant for the 100, or refer to it as`myArray.length`. To make changing this constant even more difficult, use the literal 50 instead of 100/2, or 99 instead of 100-1. You canfuther disguise the 100 by checking for`a == 101` instead of`a > 100`, or`a > 99` instead of`a >= 100`.
724+
If you have an array with 100 elements in it, hard code the literal 100 in as many places in the program as possible. Never use a static final named constant for the 100, or refer to it as`myArray.length`. To make changing this constant even more difficult, use the literal 50 instead of 100/2, or 99 instead of 100-1. You canfurther disguise the 100 by checking for`a == 101` instead of`a > 100`, or`a > 99` instead of`a >= 100`.
725725
Consider things like page sizes, where the lines consisting of x header, y body, and z footer lines, you can apply the obfuscations independently to each of these and to their partial or total sums.
726726

727727
These time-honoured techniques are especially effective in a program with two unrelated arrays that just accidentally happen to both have 100 elements. If the maintenance programmer has to change the length of one of them, he will have to decipher every use of the literal 100 in the program to determine which array it applies to. He is almost sure to make at least one error, hopefully one that won't show up for years later.
@@ -1209,7 +1209,7 @@ Make it so elaborate that no maintainer could ever get any of his or her fixes t
12091209

12101210
####More Fun With Make
12111211

1212-
Have the makefile-generated-batch-file copy source files from multiple directories with undocumentedoverrwrite rules. This permits code branching without the need for any fancy source code control system, and stops your successors ever finding out which version of`DoUsefulWork()` is the one they should edit.
1212+
Have the makefile-generated-batch-file copy source files from multiple directories with undocumentedoverwrite rules. This permits code branching without the need for any fancy source code control system, and stops your successors ever finding out which version of`DoUsefulWork()` is the one they should edit.
12131213

12141214
####Collect Coding Standards
12151215

@@ -1332,7 +1332,7 @@ At least one variable should be set everywhere and used almost nowhere. Unfortun
13321332

13331333
The people who design languages are the people who write the compilers and system classes. Quite naturally they design to make their work easy and mathematically elegant. However, there are 10,000 maintenance programmers to every compiler writer. The grunt maintenance programmers have absolutely no say in the design of languages. Yet the total amount of code they write dwarfs the code in the compilers.
13341334

1335-
An example of the result of this sort of elitist thinking is the JDBC interface. It makes life easy for the JDBCimplementor, but a nightmare for the maintenance programmer. It is far**clumsier** than the FORTRAN interface that came out with SQL three decades ago.
1335+
An example of the result of this sort of elitist thinking is the JDBC interface. It makes life easy for the JDBCimplementer, but a nightmare for the maintenance programmer. It is far**clumsier** than the FORTRAN interface that came out with SQL three decades ago.
13361336

13371337
Maintenance programmers, if somebody ever consulted them, would demand ways to hide the housekeeping details so they could see the forest for the trees. They would demand all sorts of shortcuts so they would not have to type so much and so they could see more of the program at once on the screen. They would complain loudly about the myriad petty time-wasting tasks the compilers demand of them.
13381338

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp