Pune Software
Craftsmanship
Promoting professionalism and
craftsmanship among software professionals
Pune Software Craftsmanship
IMPROVE EXISTING CODE WITH CONFIDENCE, BACKED BY AUTOMATED UNIT
TESTS!
This Photo by Unknown Author is licensed under CC BY-NC-ND
Agenda
Craftsmanship Good practices
Software entropy
Improve existing
code
Meet
and
greet!
4
The organizers
We are former
colleagues drawn
together by the shared
belief in software
craftsmanship
5
The
Manifesto
6
Why?
Need of the hour:
Professionalism &
Craftsmanship
7
Professionalism
WHAT DOES IT MEAN FOR SOFTWARE
PROFESSIONALS?
HOW OFTEN DO WE DISCUSS IT?
ARE WE HELD ACCOUNTABLE FOR IT?
8
Therac-25
9https://en.wikipedia.org/wiki/Therac-25
Therac-25
10https://en.wikipedia.org/wiki/Therac-25
Ariane 5
11https://blog.bugsnag.com/bug-day-ariane-5-disaster/
Ariane 5
12https://blog.bugsnag.com/bug-day-ariane-5-disaster/
Code of
Ethics
13https://www.computer.org/web/education/code-of-ethics
Code of
Ethics
14https://www.computer.org/web/education/code-of-ethics
The world we live in
15
Today, software has a large
role in shaping human life
experiences
Medicine, government,
industry, commerce,
entertainment, etc
Good software = good
outcomes for human beings*
Inversely, bad software = bad
outcomes for human beings
A challenging time for
Indian IT (protectionism,
competition, automation)
A lot of entry-level jobs will
vanish without us reinventing
ourselves in multiple fronts
Software quality including
maintainability is becoming
a centrepiece in business
strategies
Responding to changes
ahead of competition
requires the ability to make
quick software changes
Higher lifetime profit
(software is typically
maintained for 10 years
according to studies)
Reliability and efficiency
essential to sustain and grow
businesses
Our world
needs
software
craftsmen
16
Efficient – Build and deliver great
solutions when they are needed within
budget
Reliable – great quality all the time!
Integrity – protect the users and
customers, do the right thing!
Knowledgeable – capable of building
cutting-edge solutions that give a
competitive edge to employers and
customers
A few
good
practices
17
Leave the
code
better than
how you
found it
18
Maintain your
surroundings
19
Always
maintain
the code!
20
http://wiki.c2.com/?FixBrokenWindows
Make it easy
to do the
right thing
and hard to
do the wrong
thing!
21
https://twitter.com/GoLeanSixSigma/status/952328692386025472
22
“Lack of pattern or organization; disorder”
- https://www.dictionary.com/browse/entropy
Software Entropy
23http://www.agile-
process.org/change.html
Bad news!
You are experiencing entropy! 24
Do you find it more and more difficult to maintain your codebase?
Do you find your teams taking more and more time for doing similar work as time
goes?
Do you find it harder and harder to give a reasonably accurate estimate for work
items?
Do you find your teams become more and more hesitant to change code?
Improve existing code
25
UNDERSTAND THE
CODE
1
PROTECT WITH
TESTS
2
REFACTOR WITH
CONFIDENCE
3
1. Understand the
code
HTTPS://GITHUB.COM/HEMANTPANDE/PUNECRAFTSMANSHIPCOMMU
NITY.GIT
26
Create a mental model 27
You cannot
improve something
you do not
understand!
What is the code
telling you? What is
it doing?
Steps in the algorithm
Observable behaviors
Post-conditions
Interactions by the code -
who all does it collaborate
with?
Sequence diagram is a
good tool
2. Protect with tests
UNIT TESTS!
28
29
Prepare – use tools to remove dead code and decouple code
using Extract Interface (sequence diagrams help!)
Prepare
Test each observable behavior/post condition in
sequence
• Comment the specific code
• Add a failing test
• Uncomment code
• Verify test passes
Test
3. Refactor with
confidence!
30
Our vision
Build a rock-solid group of
motivated software
craftsmen who will raise the
bar continuously for our
profession!
31
Our mission 32
Learn & practice
▪ Professionalism for
software professionals
▪ Software
craftsmanship
▪ Technical excellence
Develop change agents
▪ Knowing what is good is
one thing; convincing
others is a totally
different game!
▪ Capability to drive
improvements based on
data
o Cost of maintainability
(lack of)
o Measurement of
maintainability
o Agility (responding to
change, automated
QA)
Support adoption
▪ Facilitate awareness
and Q&A sessions for
organizations and teams
▪ Define and establish
reusable awareness and
training material
▪ Facilitate large-scale
events, conferences, &
competitions
▪ Inspirational talks, code
retreats, meetup for
student and
professionals (example
– what Technogise
does)
Future community themes 33
ThankYou
Do the right thing and do
it right!
- PuneSoftwareCraftsmanship
Contacts
Jim Joseph
Hemant Pande
Dattatray Kale
35

Improve existing code with confidence, supported by unit tests