Skip to content

Commit

Permalink
Removed Trap()
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidThielen committed Oct 3, 2024
1 parent 08228fb commit 803ed75
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ These are some classes I created to extend a number of basic classes.

The StringExtensions has some pretty specific methods that we use to extract metadata from search strings. Included here because this is used by many apps for their tags, etc. It can extract [tag], {tag}, (tag), and @tag from a string. The @tag does not allow spaces (the space is the end delimiter).

## Debug

Trap() is a construct I discuss in my book No Bugs! Basically you place this when you write new code, at the entry to each function, inside every if, else, where, case, etc.

When you first run that new code it will drop you in to the debugger at each trap. Mark that Trap() to be deleted and then single step through the new code. 90% of the time the code is fine. 10% of the time the code will do something unexpected and you can then fix the issue.

The way I mark the traps I hit is to put a * at the beginning of that line
```csharp
* Trap();
```
That way the line numbers don't change so the debugger is in sync with the source code. But when your debug session is complete, a compile will fail until you remove those traps you've now walked through.

## Unit Tests

Not all of these have unit tests. But all have been tested thoroughly in use in our applications.
Expand Down
2 changes: 1 addition & 1 deletion TradeWindsCommon/TradeWindsCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable><Version>1.0.0.2</Version>
<Nullable>enable</Nullable><Version>1.0.0.3</Version>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>Basic utility classes</Title>
<Authors>DavidThielen</Authors>
Expand Down

0 comments on commit 803ed75

Please sign in to comment.