index

A

abstraction boundaries 5657

alert command 156

algorithms

Big-O notation 1718

defined 1518

analyze prompt 239

anti-patterns 93

abstraction boundaries 5657

bad code 83

breaking code 55

changing code 54, 62

classes 76

clean code 6465

code rigidity 5455

comments 8890

enums 7678

erasing and rewriting 6162

example web page 5960

gotos 8588

If/Else constructs 8385

inheritance 7476

inventing 7174

isolating common functionality 5759

leveraging functions 9092

naming 90

repetition 6670

reusing vs. copying 7071

structs 7882

technical debt 60

upgrade scenarios 6264

writing from scratch 61

applicability 224

architectural changes, refactoring 124, 126, 136

arrays 2324

async code 219220

multithreading 219220

sync code and 219

async I/O 193196

async/await semantics 195196

callback functions 194195

compiler warnings and 196

async keyword 217218

Async suffix 217

attributes 173

automated tests 96

await keyword 216218, 220

B

Badge class 180

BDD (behavior-driven development) 105106

BeginRead function 194

benchmarking 172175

Big-O notation 1718

binding redirects 63

Boolean expressions, evaluating 182183

boundary conditionals 109

branch prediction 187

branch prediction, CPUs 187189

breaking code 55

Brooks, Fred 5, 199

bugs 241

debugging 236241

dump diving 237240

printf() debugging 236237

rubber duck debugging 240241

exceptions

crashes and 227229

errors vs. 234235

exception resiliency 229233

overview 225227

triaging 223224

unknown errors 224235

business layer 58

byte data type 184

C

caching

CPUs 185

dictionaries 162163

performance and 196197

call stacks 30

callback functions, async I/O 194195

callback hell 195

Capitalize function 67, 6970

CapitalizeEveryWord function 69

CapitalizeFirstLetter function 69

captcha 161162

catch block 225, 227229, 233

CDNs (content delivery networks) 233

churn 46

class keyword 81

classes, avoiding 76

clean code 6465

clock cycle 177

cloud storage 164165

code coverage 110111

code reviews 95

code rigidity 5455

code, extracting into shareable parts 128129

comments, avoiding 8890

compiled programming languages 31

compiler warnings, async I/O and 196

components, identifying for refactoring 126

composition 74

computer science theory 52

algorithms

Big-O notation 1718

defined 1518

data structures 1930

arrays 2324

call stacks 30

dictionaries 2628

HashSets 29

linked lists 2526

lists 24

queues 26

stacks 29

strings 2023

types 3052

frameworks 3740

nullable or non-nullable 4147

performance 4749

proof of validity 3237

reference types vs. value types 4952

strongly typed and weakly typed 3252

understandability 4041

Concurrent* thread-safe data structure 205

Connection class 215

connection pool 211

Console.WriteLine() function 236

constant time 18

Contains method 181

content delivery networks (CDNs) 233

Content Security Policy (CSP) 159

ContinueWith task method 218

copy-paste programming 66

CopyAsync task object 195

CopyToAsync function 196

Count property 208

CPUs 183185

branch prediction 187189

caching 185

pipelining 185187

SIMD 189191

crashes, exceptions and 227229

CreatedOn struct 44

CSP (Content Security Policy) 159

CSPRNG (cryptographically secure pseudorandom generator) 169

CSRF (cross-site request forgery) 159163

caches 162163

captcha 161 – 162

captcha alternatives 162

floods 161

culture 22

cycle 177

D

data structures 1930

arrays 2324

call stacks 30

dictionaries 2628

HashSets 29

linked lists 2526

lists 24

queues 26

stacks 29

strings 2023

databases

avoiding database connections 211215

NOLOCK hint 209211

ORM 214215

DateTime class 108

DateTimeOffset class 99, 101, 108

DbContext instance 214, 218

deadlocks 202

Debug configuration 102

Debug.Assert method 102103

Debug.WriteLine() function 237

debugging 236241

dump diving 237240

printf() debugging 236237

rubber duck debugging 240241

defer statement 88

dependency 54

dependency inversion principle 74, 130

dependency reception 130

designing with security in mind 146147

destination 126

DI (dependency injection) 130135

dictionaries 2628

dirty data 210

DivRem function 172173, 175, 178

DMA (direct memory access) 193

DoS (denial of service) 161

dotnet command 164

dotnet dump command 237239

double data type 76

DownloadFile method 228

dump diving 237240

E

else statements 84

Entity Framework library 47

enum construct 76

enum parameter 120

enums 7678

Equals() method 3435

Error label 87

error() function 8788

errors

exceptions vs. 234235

unknown errors 224235

everyWord parameter 67, 71

exceptions

crashes and 227229

errors vs. 234235

exception resiliency 229233

overview 225227

ExpectedResult values 104

extension method 99

Extract method 92

F

File.Create method 118

File.OpenRead method 118

File.OpenWrite method 118

filename parameter 68

fixed salts, avoiding 168

float data type 39

floods 161

for/while loops 85

FormatFilename function 71

FormattableString interface 154

FromSqlInterpolated function 154

functions

callback functions 194195

leveraging 9092

G

Garbage Collector 50

gardening activity 62, 64

get method 205

GET request 231

get_ prefix 180

GetBadgeNames() function 181

GetHashCode method 2728, 34

GetHashCode() function 29, 165

GetTrendingTags function 117

GetUserId function 149

gotos 8588

GUIDs (globally unique identifiers) 169

H

happy path 84

HashCode class 28

hashing 27

hashmaps 26

HashSet<T> data structure 181

HashSets 29

heap 49

hot paths 112

Html.Raw statement 158

HtmlString type 158

HTTP POST request 233

HttpClient object 218

I

I/O 191196

async I/O 193196

async/await semantics 195196

callback functions 194195

compiler warnings and 196

speeding up 191193

if statements 68, 108, 110, 187, 234

If/Else constructs, avoiding 8385

IHtmlContent type 158

immutability 21

Immutable* thread-safe data structure 205

impact 224

indexer property 208

inheritance, avoiding 7476

Instance property 206207

int data type 39, 76, 116117, 184, 189

integration tests 96

interpreted programming languages 31

IoC (inversion of control) 130

IsVisible property 179182

J

JavaScript injection 155

JDK (Java Development Kit) 125

K

Kafka, Franz 222

key-value things 26

L

LazyInitializer class 207

leaked data 165

LIFO (Last In First Out) 29, 78

linked lists 2526

List<T>.Contains() function 181

lists

linked lists 2526

overview 24

lock statement 201, 206207

lock-free data structures 204

locking feature 199209

logic layer 58

long data type 76

M

Main method 174, 219, 229

manual testing 95

Math.DivRem() function 172174

MemoryCache class 197

Messages table 60

Metamorphosis (Kafka) 222

microbenchmarking 173

MITM (man-in-the-middle) 148

Mono 125

monolith 220221

MoveResult type 41

multiple inheritance 74

multithreading 30, 193194, 219220

Mythical Man Month, The (Brooks) 5, 199

N

nameof operator 113

naming

naming conventions 90

tests 120121

nested loops 179181

.NET Compact Framework 125

.NET Framework 125

.NET Standard 125

NOLOCK hint 209211

NOLOCK query 210211

Not Invented Here Syndrome 71

nullable value types 42

nulls 4147, 113116

O

object relational mapping (ORM) 134, 214215

ON ERROR GOTO statement 85

onComplete() function 194

onRead handler 194

onRead() function 194

OOP (object-oriented programming) 74

operator overloads 34

optimization 197

benchmarking 172175

caching 196197

CPUs 183185

branch prediction 187189

caching 185

pipelining 185187

SIMD 189191

evaluating Boolean expressions 182183

I/O 191196

async I/O 193196

speeding up 191193

nested loops 179181

performance vs. responsiveness 175176

sluggishness 177178

string-oriented programming 181182

ORM (object relational mapping) 134, 214215

overflow 65535

P

parameterization 152154

parameterized queries 152

parameterized tests 104

Parameters object 152

[Params] attribute 173

Pareto principle 112

password hashing 165166

PBKDF2 (Password-Based Key Derivation Function Two) 166

performance

responsiveness vs. 175176

sluggishness 177178

PID (process identifier) 238

pipelining, CPUs 185187

placid_turn value 150

pointers 49

polymorphism 24

popping 29

POST request 159160, 231

preemption 216

printf() debugging 236237

priority 224

production, testing in 9697

proof of validity 3237

pushing 29

Q

query plan cache pollution 152

queues 26

R

race condition 201

random values, security and 168169

ReadAsync function 195

ReadByte() function 191

record types 46

refactoring 139

architectural changes 124136

composition and 129

dependency injection (DI) 130135

estimating work and risk 127128

extracting code into
shareable parts 128129

final stretch 135136

identifying components 126

purpose of 123124

testing 136137

when not to refactor 138

reference types 4952

regression 54

repetition 6670

return statement 8486, 218

return/break/continue statements 85

rubber duck debugging 240241

S

scalability

databases

avoiding database connections 211215

NOLOCK hint 209211

ORM (object relational mapping) 214215

locking and 199209

monolith 220221

overview 199

threads 215220

security 170

cross-site scripting 155159

common pitfalls 157158

CSP 159

preventing 156157

SQL injection and 155156

CSRF 159163

caches 162163

captcha 161162

captcha alternatives 162

floods 161

dangers of implementing your own 148149

designing with security in mind 146147

exploiting vulnerabilities 141142

security by obscurity 147148

SQL injection attacks

overview 149152

parameterization 152154

storing secrets in source code 163169

cloud storage 164165

comparing strings 166168

fixed salts 168

leaked data 165

minimizing unnecessary data collection 165

password hashing 165166

random values 168169

UUIDs (universally unique identifiers) 169

threat modeling

overview 142146

pocket-sized threat models 144146

writing secure web apps 146159

security by obscurity 147148

SELECT query 210

setthread command 239

severity 224

SIMD (single instruction, multiple data) 189191

sluggishness 177178

smoke testing 113

software development 13

overview of book

themes 12

what this book isn't 12

problems of 712

black boxes 10

focus on own stack 11

paradigm-driven 910

stigma against menial work 1112

too many technologies 89

underestimating overhead 11

street coders

defined 34

qualities of 47

what matters in 23

source code and security

cloud storage 164165

comparing strings 166168

fixed salts 168

leaked data 165

minimizing unnecessary data collection 165

password hashing 165166

random values 168169

UUIDs 169

space complexity 18

SQL injection attacks

overview 149152

parameterization 152154

SqlCommand class 150

stack pointer 30

stacks 2930

StatsController class 59

Stream class 196

street coders

defined 34

qualities of 47

embracing complexity and ambiguity 67

high-throughput 6

questioning 5

results-driven 56

string data type 39

string-oriented programming 181182

String.Concat() function 22

strings 2023

StringValue class 113

strongly typed 3132

structs 51, 7882

submit action 85

Submit function 91

suite class 174

Sum() function 231

switch expression 235

System.Diagnostics namespace 102

System.Runtime.Caching package 197

System.Uri class 112

T

Task.Wait() function 219

TDD (test-driven development 101, 105106

technical debt 60

TestCase attributes 104

testing 121

avoiding writing tests 112113

choosing tests wisely 112113

nonexistent code 112

deciding what to test 107111

code coverage 110111

respecting boundaries 107110

letting compiler test code 113120

eliminating null checks 113116

eliminating range checks 116118

eliminating valid value checks 118120

naming tests 120121

refactoring 136137

sample test 99105

TDD and BDD 105106

types of 9598

automated tests 96

choosing methodology 9798

manual testing 95

production, testing in 9697

writing tests 106107

thread-safe 199

threads 215220

async code 219220

multithreading 219220

overview 219

sync code and 219

threads command 239

threat modeling

overview 142146

pocket-sized threat models 144146

tight coupling 74

time complexity 18

TimeSpan function 109

ToLower function 68

ToString() function 35

ToUpper function 68

Trace.WriteLine() function 237

triaging 223

try block 225, 227

try/catch block 228229, 234

Turing machine 223

types 3052

frameworks 3740

nullable or non-nullable 4147

performance 4749

proof of validity 3237

reference types vs. value types 4952

strongly typed and weakly typed 3252

understandability 4041

U

uint integers 16

unit tests 96

unknown errors 224235

unknown state 226

UPDATE operation 232

upgrade scenarios 6264

Username class 115, 158

UUIDs (universally unique identifiers) 169

V

ValidateAntiForgeryToken attribute 160

value types 4952

Vector type 189190

Vector<T> instance 190

ViewModel class 158

virtual calls 24

virtual memory 49

void return type 217

W

weakly typed 3132

WebClient instance 228

WriteAsync function 195

writing secure web apps 146159

X

XSS (cross-site scripting) 155159

common pitfalls 157158

CSP 159

preventing 156157

SQL injection and 155156

Z

zombie processes 30

zone 98

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.85.175