10
@RaduVunvulea Clean Code Naming

TSM, Clean code - Naming

Embed Size (px)

DESCRIPTION

clean code, naming, TSM

Citation preview

Page 1: TSM, Clean code - Naming

@RaduVunvulea

Clean CodeNaming

Page 2: TSM, Clean code - Naming
Page 3: TSM, Clean code - Naming

{“name” : “Radu Vunvulea,“company” : “iQuest Group”,“userType” : “enthusiastic”“technologies” : [“Azure”, “.NET”, “JS”, “Web”, “Mobile”, “WPF”, “SL” ],“expertise” : [“enterprise”, “pharma”, “automotive”, “home automation”, “e-Commerce” ],“blog” : “vunvulearadu.blogspot.com”,“email” : ”[email protected]”,“socialMedia” :

{“twitter” : “@RaduVunvulea”,

“fb” : “radu.vunvulea”}

}

Who am I?

Page 4: TSM, Clean code - Naming

Why? AwarenessTips on how to producebetter codeReadabilityThe ‘boy scout rule’

Page 5: TSM, Clean code - Naming

Smart vs ProfessionalSmart developer• Difficult code• Has a great

developer skills

• Example:‘r’

Professional developer• Readable code• Maintainable code• ‘Clarity is king’

Page 6: TSM, Clean code - Naming

Smart vs ProfessionalSmart developer• Difficult code• Has a great

developer skills

• Example:‘r’

Professional developer• Readable code• Maintainable code• ‘Clarity is king’

• Example‘lowecaseUrlOfCurrentPage’(lowercase url)

Page 7: TSM, Clean code - Naming

Naming

Reveal your intension

Avoid Disinformati

on

Make Meaningful Distinctions

Use Pronounceab

le Names

Use Searchable

Names

Avoid Encoding

Avoid Mental Mapping

Page 8: TSM, Clean code - Naming

Class

•Noun• ‘Car’• ‘Engine’

Method

•Verb• ‘Start’• ‘Stop’

Page 9: TSM, Clean code - Naming

Question

Answers

Page 10: TSM, Clean code - Naming

Thank you{ “name” : “Radu Vunvulea, “blog” : “vunvulearadu.blogspot.com”, “email” : ”[email protected]”, “socialMedia” : {

“twitter” : “@RaduVunvulea”,“fb” : “radu.vunvulea”

}}