Technical Excellence
- 原创
- 2020-07-20 13:03:41
- Renee Teng
- 987
Note:
This blog is generated based on the webinar Spark DevOps Conference 2020 and mainly a reflection on
James Grenning's keynote speech on Technical Excellence.
It’s common that developers make mistakes during design and code. Bugs are prevalent, but still they need to fixed and a working software is the main measure of a project progress. This is also why the technical excellence is emphasized in 12 Principles behind the Agile Manifesto.
Problem in this industry
The industry suffered from defects, delays and frustration. Project managers in different countries tried to improve this situation and worked out different Agile methods to solve this problem. On February 11-13, 2001, at The Lodge at Snowbird ski resort in the Wasatch mountains of Utah, seventeen people gathered and Agile Manifesto emerged.
Scrum is an agile framework and "exposes every inadequacy or dysfunction within an organization's product and system development practices. The intention of Scrum is to make them transparent so the organization can fix them"(Kent Schwaber). However, incremental management and planning, without incremental engineering skill, is a recipe for pain. This is when Test Driven Development(TDD) is introduced.
Why use TDD?
Jeff Sutherland said "The biggest problem worldwide for scrum teams is getting shippable code at the end of every sprint." What happens if tests are saved for later until the end? As untested code accumulated, the risk grows drastically at the end. keep the cost of retest low and keep the system running.
This "test-after-the-development" work flow is designed to all defects. Look at the physics of Debug-Later Programming by James Grenning.
Image from James Grenning's blog, Physics of Test Driven Programming
It is obvious that the time to find the root cause of a bug increases as the time to find the bug increases. As T d increases, T find increases. T fix is usually short, but can increase with T d. The problem with DLP is that it takes a while to feedback and get back to the developer, which caused the delay of the plan.
What if we move the test upstream of the work flow? Now look at the Physics of Test Driven Development.
Image from James Grenning's blog, Physics of Test Driven Programming
With TDD, the feedback time cuts down. When T d approaches zero, T find approaches zero. In a test-driven development project, development and test can be concurrent and continuously prevent bugs. Not all the bugs.
The way to do TDD is to do unit testing. System-level testing cannot be thorough, but unit testing can be. It is the same reason that why tests have to be done at an early stage in a smaller chunk. Too much to test might cost the delay of a project.
Testing also has to be automated for agility. Test automation tools are available and can be integrated with agile tools, e.g. ZTF can be integrated with the CI feature in ZenTao ALM.
Clean Code and Code Quality
Technical excellence is not just about passing the test. Martin Fowler in Refactoring-Improving the Design of Existing Code says " Any fool can write code that the compiler understands, but it takes real skill to write code other programmers can understand." Make code readable for people is the ultimate goal of the craftsmanship of any developer. General rules to make code clean are
- follow coding standards or conventions agreed within your team;
- keep your code simple and reduce complexity; and
- always find the root cause of a problem.
The entire team is responsible for the code, and everyone works together to produce a product of quality. This is the collective code ownership and should be implemented in agile team.
Three halves of Agile
Iterative planning and technical excellence are the two halves of Agile. What is the third half? It is the respect for people. If you miss any, you miss a lot. This means you have to learn how to be a member of a team. Gerald Weinburg's view about the "egoless programming" explains what this it. The team needs to trust each other and be sufficiently mature to work together to build great software.
Conclusion
Technical excellence requires the adoption of techniques that help build better software faster, including extreme planning, Scrum, TDD, etc. Developers need to use the right tools, languages, and environment to product clean code for better quality. Also, the respect and mutual trust should not be ignored.
Reference
1. James Grenning, Techincal Excellence, Spark DevOps (virtual) Conference, Jum 25, 2020.
2. https://less.works/less/technical-excellence/index
3. https://www.thoughtworks.com/talks/thoughtworks-live-australia-2016-technical-excellence
4. https://www.softwaretestinghelp.com/bug-life-cycle/
5. https://www.ben-morris.com/how-do-you-foster-technical-excellence-in-an-agile-development-culture/
6. http://blog.wingman-sw.com/physics-of-test-driven-development
7. https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988cf8d29