sofware craftsmanship code complete
DESCRIPTION
Writing better code and managing complexity following the principals of the all times programming classic Code Complete by Steve McConnell Check out the video: http://goo.gl/hbXLPZTRANSCRIPT
![Page 1: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/1.jpg)
NEW PERSPECTIVE
Asher Barak
![Page 2: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/2.jpg)
PART ONEne principle to rule them all
![Page 3: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/3.jpg)
1920 - 2012
one of the founders of the cognitive psychology field
GEORGE A.
MILLER
![Page 4: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/4.jpg)
THE
MAGICAL
NUMBER
±27
![Page 5: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/5.jpg)
1930 - 2002
Dutch computer scientist
Edsger W.
Dijkstra
Go To Statement Considered Harmful
![Page 7: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/7.jpg)
MANAGING
COMPLEXITY
Your #1 goal should be
![Page 8: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/8.jpg)
ARISTOTLE
Geek philosopher
384 – 322 BCE
![Page 9: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/9.jpg)
Essential
Accidental
vs
![Page 10: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/10.jpg)
SOFTWARE COMPLEXITY
• Computers speak a binary language
• Computers are batch machines
• There is a wide gap between coding
and running software
• Computers are terrible with
concurrency
• Computers have physical limitations
• Computer software model a complex
world
Accid
entalEssential
![Page 11: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/11.jpg)
ONE THING AT A TIME
![Page 12: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/12.jpg)
CARE ABOUT LESS
• Do as little as possible
• Divide (& conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 13: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/13.jpg)
LANGUAGE
FUNDAMENTALS
![Page 14: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/14.jpg)
Class
Method
Procedural Code
![Page 15: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/15.jpg)
Layer
Module
Class
![Page 16: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/16.jpg)
USE INTERFACES• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 17: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/17.jpg)
CODING PRACTICE
S
![Page 18: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/18.jpg)
THINK OF YOUR AUDIENCE
(It’s not the compiler)
Always
![Page 19: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/19.jpg)
NAME STUFF•With the right name
• In a standard way
•Methods – For what they do
• Functions – For what they return
• Classes – For what they represent
•Modules – For what they pack
![Page 20: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/20.jpg)
USE CONVENTIONS
Any convention is better than no convention
Every convention is one less thing to think about
![Page 21: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/21.jpg)
USE CONVENTIONS• Naming Conventions
•Method parameters conventions
• Resources placing conventions
• Documenting conventions
• Code layout conventions
•Meeting conventions
• Everything conventions
![Page 22: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/22.jpg)
USE CONVENTIONS
Interface
Event Args
Constant Class
Local Variable Static Property
Instance Property
Exception
Istance
Class Variable
![Page 23: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/23.jpg)
USE DESIGN PATTERNS• They represent a higher
abstraction over coding details
• They simplify communications in the team
• They are conceptual standard reusable units
![Page 24: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/24.jpg)
TDD• Promotes better divisions
• Promotes better abstractions
• Promotes better documentation
• Promotes better personal character
• Restrains complexity
![Page 25: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/25.jpg)
DESIGN BEST
PRACTICES
![Page 26: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/26.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 27: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/27.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 28: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/28.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 29: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/29.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 30: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/30.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 31: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/31.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 32: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/32.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 33: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/33.jpg)
![Page 34: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/34.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 35: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/35.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 36: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/36.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 37: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/37.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 38: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/38.jpg)
• Do as little as possible
• Divide (And Conquer)
• Hide the details - Work with layered abstractions
• Reduce the noise
![Page 39: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/39.jpg)
PART TWOMake it your own
![Page 40: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/40.jpg)
PROGRAMMING IS DONE SOLO
Creating a culture requires communication
![Page 41: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/41.jpg)
FACE THE TRUTH
Some people program
for the wrong reasons
![Page 42: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/42.jpg)
ACTIVELY ENCOURAGE SOCIALIZINGPreferably of people who like
their job
![Page 43: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/43.jpg)
TALK ABOUT THE
PROCESS
![Page 44: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/44.jpg)
BE OPENLY EXCITED ABOUT
GOOD CRAFTSMANSHIP(With tears if
possible)
![Page 45: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/45.jpg)
TALK ABOUT READABILITYIs it good for readability or is it bad?
![Page 46: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/46.jpg)
TALK ABOUT ABSTRACTIONS
Try splitting discussion the way code is split
![Page 47: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/47.jpg)
ACTIVELY ENCOURAGE MORE DESIGNThis is hardly ever a problem
![Page 48: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/48.jpg)
ACTIVELY ENCOURAGE
DESIGN CONSULTING
Everyone ends up smarter
![Page 49: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/49.jpg)
PUT PERFORMANCE &
EFFICIENCY SECOND
Maintainability first
![Page 50: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/50.jpg)
PUT PERFORMANCE &
EFFICIENCY SECOND
•We are not good at anticipating resources issues
•We are not good at anticipating performance issues
• KISS until otherwise proven
![Page 51: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/51.jpg)
HAVE EXPECTATIONS• Read (and understand) error messages
• Read (and understand) compiler warning
• Document and read documentation
• Know (and avoid) code smells (Keep a document)
![Page 52: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/52.jpg)
TALK ABOUT CONVENTIONS• Keep a document
•Make newbie's read the document
• Discuss conventions with your team
•Make any code feel at home to everyone in the company
![Page 53: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/53.jpg)
TALK ABOUT CODE• Code reviews
• Code analysis sessions
• Talk about code when you give advice
• Talk about code when you take a break – be creative
![Page 54: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/54.jpg)
TALK ABOUT CODE• Talk about your experience
with the code
• This made me expect that…
• From this I understood right away that…
• This was misleading/ did not follow the standard/ was too long / short
![Page 55: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/55.jpg)
DON’TTALK ABOUT
CODEWhen you cannot understand it
![Page 56: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/56.jpg)
USE TOOLING• To measure (size, relations complexity etc.) – do not count lines
• To enforce quality standards and conventions
• To boost productivity
• To avoid human errors
![Page 57: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/57.jpg)
MAKE SURE
EVERYONE READS CODE COMPLETE
![Page 58: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/58.jpg)
PART THREETrade secrets
![Page 59: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/59.jpg)
CULTURE CLASH
SW Business and SW craftsmanship
are not the same
![Page 60: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/60.jpg)
THINGS ARE IMPROVING• Human factor weighs in
• AGILE – development as a partnership
• Costs and benefits of quality are better understood
• SW management is more experienced
![Page 61: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/61.jpg)
STILL, THIS
Is sometimes applicable to the quality of your code
![Page 62: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/62.jpg)
USE YOUR BRAIN• Say what you think
• Stick to your estimates
• Accept lower qualityas a legitimate business decision
• Pick your battles
• Keep doing what you lovein acceptable conditions
![Page 63: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/63.jpg)
KEEP CALM !!!
![Page 64: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/64.jpg)
THANK YOU,
![Page 65: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/65.jpg)
972-54-8003775
Asher . Barak @ gmail . com
CONNECT WITH ME
![Page 66: Sofware Craftsmanship Code Complete](https://reader033.vdocuments.us/reader033/viewer/2022051209/548ddcefb479590e028b465d/html5/thumbnails/66.jpg)
GET THE SLIDEShttp://goo.gl/AWWUKf
If you want to reuse the slides for your talk, Please contact me first.