Tag Archives: unit testing

Back to the Basics: Coding and TDD

I’ve been working for the past year on building the Scrum Team Assessment (yes, you can still go get it for your team 🙂 ).  I’ve been doing all the work on it personally and it has been great fun.  The best part of it has been that I’m back into coding.  And, with that, of course I have had to take my own advice about Test-Driven Development and the other Agile Engineering Practices.  But it hasn’t been easy!

I’m using PHP for the web front end, and Python with OpenERP for the back end.  My testing tools include Selenium for Acceptance Testing and PHPUnit for unit testing.  And… nothing yet for the Python back-end.  This is still a sore point with me.  Normally, I would find the back end TDD process easier… but OpenERP has been a HORRIBLE BEAST to use as a development platform.  Well, I might exaggerate a bit on that, because it is really just the complete lack of well-written API documentation and sample code.  Which is funny, because there are tons of open-source extensions for OpenERP written.  Anyway, I don’t want to complain about it too much, because in many other ways it is a fantastic platform and I wouldn’t easily switch it for anything else at this point.

Back to testing.  Last week, a client using the Scrum Team Assessment found a bug… and it was one of those ones that I know made them consider not using the tool anymore. Fortunately, our contact there has the patience of a Redwood, and is helping us through the process of fixing the system.  How did the bug happen?

Because I didn’t do _enough_ TDD.  I skimped.  I took shortcuts.  I didn’t use it for every single line of code written.

<Failure Bow>

The question for me now, is “why”?  Fortunately, the answer is simple to find… but solving it is not as easy as I would like.  I didn’t follow my own advice because I was learning about too many things at the same time.  Here’s what I was learning all at once over a three week period in December when I was doing the real heads-down development work:

  1. PHP and PHPUnit
  2. Python
  3. OpenERP (APIs for persistence and business logic)
  4. RML (a report generation language)
  5. Amazon EC2, RDS and Route 53
  6. Some Ubuntu sys admin stuff
  7. VMWare Fusion and using VMs to create a dev environment
  8. Postgresql database migration
  9. Oh, and refreshing on Selenium

Like I said, FUN!  But, a bit overwhelming for someone who hasn’t done any significant development work since 2006-ish.  As well, because of learning about so many things, I also didn’t have a good setup for my development, testing and production environments.  Now I have to clean up.  Finally, I also forgot about another important Agile Engineering practice that is used when you have lots of intense learning: the Architectural Spike.

I have to make sure that I take all that I’ve learned and create a truly good dev and test environment (because that was a huge hinderance to my work with both Selenium and PHPUnit).  And I have to take the time to learn to do the testing in Python (I would love suggestions on a good unit test framework)… and go back over that code, even though most of it is simply declarative of data structures, and make sure it is well-covered by unit tests.  Ideally, I might even consider throwing some code away and starting from scratch.  One possibility I’ve considered is to get rid of PHP entirely and build the whole system with Python (I’d love some thoughts on that too!)

Why am I doing all this?  Well, I really think that the Scrum Team Assessment is an awesome tool for teams that maybe can’t afford a full-time coach.  It certainly isn’t a complete replacement, but I’ve poured my knowledge and experience into it in the hopes that it can help a bunch of people out there do Scrum better… and more importantly, create great teams that produce awesome business results and where people love to come to work every day.


Affiliated Promotions:

Try our automated online Scrum coach: Scrum Insight - free scores and basic advice, upgrade to get in-depth insight for your team. It takes between 8 and 11 minutes for each team member to fill in the survey, and your results are available immediately. Try it in your next retrospective.

Please share!
Facebooktwittergoogle_plusredditpinterestlinkedinmailFacebooktwittergoogle_plusredditpinterestlinkedinmail
Berteig
Upcoming Courses
View Full Course Schedule
Team Kanban Practitioner® (TKP) [Virtual Learning]
Online
C$1195.00
May 12
2021
Details
Certified ScrumMaster® (CSM) [Virtual Training]
Online
C$1595.00
May 18
2021
Details
Critical Steps on how to be an Effective Colleague/Manager in the Digital Age - Lunchtime
Online - Instructor Led
C$0.00
May 18
2021
Details
Advanced Certified ScrumMaster® (A-CSM) [Virtual Learning]
Online
C$1695.00
May 20
2021
Details
The Crash Course in Agile Estimation - Lunch Session
Online - Instructor Led
C$0.00
May 24
2021
Details
Certified Scrum Product Owner® (CSPO) [Virtual Learning]
Online
C$1795.00
May 26
2021
Details
Certified Leadership Writing Workshop [Virtual Learning]
Online
C$495.00
May 26
2021
Details
Boost Efficiency and Flow on Your Scrum Team - Kanban for Scrum Masters
Online - Instructor Led
C$149.00
May 27
2021
Details
Kanban Systems Improvement® (KSI) [Virtual Learning]
Online
C$1795.00
Jun 1
2021
Details
Certified ScrumMaster® (CSM) [Virtual Training]
Online
C$1595.00
Jun 1
2021
Details
Values Based Leadership: Vision, Mission & Values - Lunch Session
Online
C$0.00
Jun 1
2021
Details
ICAgile Certified Professional in Adaptive Org Design® (ICP-ORG)
Online
C$1995.00
Jun 1
2021
Details
Seven Design Thinking Tips for Product Owners - Lunch Session
Online
C$0.00
Jun 2
2021
Details
Leadership for Managers
Online
C$149.00
Jun 3
2021
Details
Advanced Certified Scrum Product Owner® (A-CSPO) [Virtual Learning]
Online
C$1695.00
Jun 4
2021
Details
Team Kanban Practitioner® (TKP) [Virtual Learning]
Online
C$1015.75
Jun 8
2021
Details
Practicing Agile Estimation Techniques
Online
C$149.00
Jun 8
2021
Details
Deadlines Are Dead To Me - Dealing with Deadlines in Agile Teams
Online
C$149.00
Jun 10
2021
Details
Foundations of Leadership - Lunch Session
Online
C$0.00
Jun 10
2021
Details
Certified ScrumMaster® (CSM) [Virtual Training]
Online
C$1355.75
Jun 14
2021
Details
Dealing with Slackers, Idiots and Subversives in Agile Teams - Lunch Session
Online
C$0.00
Jun 16
2021
Details
Kanban Your Projects - Kanban for Project Managers
Online - Instructor Led
C$149.00
Jun 16
2021
Details
Certified Scrum Product Owner® (CSPO) [Virtual Learning]
Online
C$1525.75
Jun 17
2021
Details
Advanced Certified ScrumMaster® (A-CSM) [Virtual Learning]
Online
C$1440.75
Jun 22
2021
Details
Find Focus - Dealing with Slackers, Idiots and Subversives
Online
C$149.00
Jun 30
2021
Details
Certified ScrumMaster® (CSM) [Virtual Training]
Online
C$1355.75
Jul 6
2021
Details
Team Kanban Practitioner® (TKP) [Virtual Learning]
Online
C$1015.75
Jul 8
2021
Details
Certified Scrum Product Owner® (CSPO) [Virtual Learning]
Online
C$1525.75
Jul 13
2021
Details
Kanban System Design® (KSD) [Virtual Learning]
Online
C$1525.75
Jul 14
2021
Details
Advanced Certified Scrum Product Owner® (A-CSPO) [Virtual Learning]
Online
C$1440.75
Jul 15
2021
Details
ICAgile Certified Professional in Agile Coaching (ICP-ACC)
Online
C$1995.00
Jul 19
2021
Details
Certified ScrumMaster® (CSM) [Virtual Learning]
Online
C$1355.75
Jul 19
2021
Details
Advanced Certified ScrumMaster® (ACSM) [Virtual Learning]
Online
C$1440.75
Jul 22
2021
Details
Foundations of Leadership - Lunch Session
Online
C$0.00
Aug 19
2021
Details
Kanban Systems Improvement® (KSI) [Virtual Learning]
Online
C$1795.00
Sep 15
2021
Details
ICAgile Certified Professional in Leading With Agility® (ICP-LEA)
Online
C$1865.75
Sep 28
2021
Details