The goal of software craftsmanship is a mindset to produce software that is reliable, maintainable, and a joy to work with. It is based on the idea that software development is more than just writing code; it is a craft that requires skill, dedication, and a commitment to producing the highest quality work.
Some key principles of software craftsmanship include:
- Attention to detail: Paying attention to the small details can make a big difference in the quality of your work. For example, in software engineering, this might mean adding comments to your code to explain its purpose, using descriptive variable names, or properly formatting your code.
- Practice: The more you practice a skill, the better you will become at it. This is especially important in software engineering, where new technologies and best practices are constantly emerging. To stay up-to-date and sharp, it’s important to continuously learn and practice your skills.
- Use the right tools: Having the right tools for the job can make your work more efficient and accurate. In software engineering, this might mean using an integrated development environment (IDE) with features like code completion, debugging tools, and version control integration. It could also mean using specialized tools for tasks like testing, code review, or performance profiling.
- Collaborate with others: Working with others can help you learn from their expertise and bring a fresh perspective to your work. In software engineering, this might mean pair programming, using code review, or participating in team meetings and discussions. Collaboration can help you identify problems early on, share knowledge, and improve the overall quality of your work.
So, what is the difference with Agile practices?
First, the Agile Manifesto is a set of guiding values and principles for Agile software development. It was developed by a group of software developers in 2001 as a response to traditional, heavy-handed software development methodologies. The Agile Manifesto consists of four values and 12 principles:
- Individuals and interactions over processes and tools
- Working software over comprehensive documentation
- Customer collaboration over contract negotiation
- Responding to change over following a plan
- Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.
- Welcome changing requirements, even late in development. Agile processes harness change for the customer’s competitive advantage.
- Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.
- Business people and developers must work together daily throughout the project.
- Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.
- The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.
- Working software is the primary measure of progress.
- Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.
- Continuous attention to technical excellence and good design enhances agility.
- Simplicity–the art of maximizing the amount of work not done–is essential.
- The best architectures, requirements, and designs emerge from self-organizing teams.
- At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.
Software craftsmanship is a philosophy that emphasizes the importance of skill, professionalism, and pride in software development. It is based on the idea that software development is a craft, and that developers should strive to continually improve their skills and produce high-quality software.
Agile is a set of values and principles for software development that promotes flexibility, collaboration, and rapid delivery. Agile methodologies, such as Scrum and Lean, provide a framework for organizing and managing software development projects in a way that is responsive to change and focused on delivering value to the customer.
While software craftsmanship and Agile are related, they are not the same thing. Software craftsmanship is more of a philosophical approach to software development, while Agile is a specific set of practices and principles for managing and organizing development projects. That being said, many software craftspeople follow Agile principles and practices as a way to apply their philosophy in the real world.
I propose this list (non exhautive) of best practices for craftsmanship in software engineering:
- Use design patterns: Use design patterns to solve common problems in a reusable and scalable way.
- Follow SOLID principles: Adhere to the SOLID principles of object-oriented design to create maintainable and scalable software.
- Use code review: Use code review to improve the quality of your code and to catch mistakes early on.
- Use a linter: Use a linter to enforce coding standards and catch common mistakes.
- Use a code formatter: Use a code formatter to ensure that your code is consistently formatted.
- Use automated build and deployment tools: Use tools like Jenkins or Travis CI to automate your build and deployment process.
- Use dependency management: Use tools like Maven or Gradle to manage dependencies and ensure that the correct versions of libraries are used.
- Use continuous integration CI: Use continuous integration to automatically build and test your code on every change, ensuring that it is always in a deployable state.
- Refactor code: Regularly refactor your code to improve its design, readability, and maintainability.
- Continually learn and improve: Stay up-to-date with new technologies and best practices, and actively seek out opportunities to learn and improve your skills.
Finally, below few books on best practices in craftsmanship and software engineering that you might find helpful (do you know them?):
- “The Craftsman” by Richard Sennett: This book explores the importance of quality and practice in craftsmanship and offers practical advice for improving skills and craftsmanship.
- “Clean Code: A Handbook of Agile Software Craftsmanship” by Robert C. Martin: This book describes best practices for writing clean, maintainable code using Agile principles.
- “The Pragmatic Programmer: From Journeyman to Master” by Andrew Hunt and David Thomas: This book provides a comprehensive introduction to best practices in software engineering, including planning, design, development, testing, and maintenance.
- “Agile Software Development: Principles, Patterns, and Practices” by Robert C. Martin: This book presents the fundamental principles of Agile and how to apply them in software engineering practice.
- “The Software Craftsman: Professionalism, Pragmatism, Pride” by Sandro Mancuso: This book explores the importance of software craftsmanship and how to become a proficient professional developer by following Agile principles.
Are you a software craftman? Share your experience and give advices!