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/hbXLPZ
10. 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
Essential
19. 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
25. USE DESIGN PATTERNS
• They represent a higher abstraction
over coding details
• They simplify communications in the
team
• They are conceptual standard reusable
units
52. PUT PERFORMANCE &
EFFICIENCY SECOND
• We are not good at anticipating
resources issues
• We are not good at anticipating
performance issues
• KISS until otherwise proven
53. HAVE EXPECTATIONS
• Read (and understand) error messages
• Read (and understand) compiler warning
• Document and read documentation
• Know (and avoid) code smells (Keep a
document)
54. 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
55. 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
56. 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
58. 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
62. 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
64. USE YOUR BRAIN
• Say what you think
• Stick to your estimates
• Accept lower quality
as a legitimate
business decision
• Pick your battles
• Keep doing what you love
in acceptable conditions