Agile software development is a group of software development methods based on iterative and incremental development, where requirements and solutions evolve through collaboration.
Agile mainly talks about improving processes; however for agile model to be successful in the long run, we need to support it with proper coding. Following the agile way of developing software without writing clean code, may significantly slow down the development of the system over years as the code gets messier. Qualities of clean code include readability, maintainability, efficiency, simple, all objects and methods have single responsibility etc.
Software craftsmanship is an approach to software development that emphasizes the coding skills of the software developers themselves.
The Software Craftsmanship Manifesto extends and challenges further the assumptions of the Agile Manifesto, drawing a metaphor between modern software development and the apprenticeship model of medieval Europe.
“Software Craftsmanship Manifesto
As aspiring Software Craftsmen we are raising the bar of professional software development by practicing it and helping others learn the craft. Through this work we have come to value:
Not only working software, but also well-crafted software
Not only responding to change, but also steadily adding value
Not only individuals and interactions, but also a community of professionals
Not only customer collaboration, but also productive partnerships
That is, in pursuit of the items on the left we have found the items on the right to be indispensable.
© 2009, the undersigned.
this statement may be freely copied in any form, but only in its entirety through this notice.”
Let us quickly try to answer few common questions that will introduce us to clean code and Agile Software Craftsmanship.
Is coding still significant?
Some people may argue that coding is no more significant and time is not far when the code will be automatically generated by business people from the specification using tools. However, the book “Clean Code” contradicts this and believes that code will be there to stay and will be still relevant. He supports his view with the fact that, not even humans, with all their intuition and creativity, have been able to create successful systems, from the vague customer requirements.
Which is more difficult – Identifying bad code or making it clean code?
Identifying bad code may be easy, but fixing it will require more skills. The book “Clean Code” calls this extra skill as “code-sense”, and promises to generate this “code-sense” in us.
Is it easy learning to write clean code?
Software craftsmanship is not very easy and will need a lot of hard work. The book “Clean Code” describes the kind of effort needed as follows: “Learning to write clean code is hard work. It requires more than just the knowledge of principles and patterns. You must practice it yourself and watch yourself fail. You must watch others practice it and fail. You must see them stumble and retrace their steps. You must see them agonize over decisions and see the price they pay for making those decisions the wrong way.”
Is knowledge or experience more important in writing clean code?
My answer would be “both”. You need to first gain the knowledge and then apply it in your work. According to the book “Clean Code”, there are two parts to learning craftsmanship: knowledge and work. You must gain the knowledge of principles, patterns, practices and heuristics that a craftsman knows and you must also grind that knowledge into your fingers, eyes and gut by working hard and practicing.
Is quality or schedule more important in delivering solutions? What if managers are only concerned about schedule, but not quality?
Answer to the first part would be both. But being a developer, you should never give up quality for meeting schedule. Managers may be more concerned about schedule. Developers should however defend quality, as they are the people who know the code and importance of quality of code better than anyone. The book “Clean Code” gives the example of a doctor doing all the washing and cleaning before going to do an operation. Even if the patient asks him not to waste time in cleaning hands and instruments, he will still do all of them as he is aware about the consequences, if they are not done properly.
The book “Clean Code” by Robert C. Martin is considered to be one of the best resource for learning to write clean code and learn about Agile Software Craftsmanship. This is the primary reference book for all most notes in this section.