Advertisment

Crafting the right code

author-image
CIOL Bureau
Updated On
New Update

"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."

Advertisment

BANGALORE, INDIA: The above words form some sort of guideline for software creation – in other words, they form the Manifesto for Software Craftsmanship. It is not some sort of a rebellion against current and modern methods of coding – it is more of a general ‘code of conduct’ that coders can abide by, to ensure that their code is well crafted. So what does ‘well-crafted’ really mean?

Software craftsmanship is defined by some as an approach to software development that emphasizes the coding skills of the software developers themselves. It is a response by software developers to the perceived ills of the mainstream software industry, including the prioritization of financial concerns over code quality.

The precise reason that Software craftsmanship lays its emphasis more on the individual coding abilities of the professional, devoid of financial concerns like direct remuneration, ability of the code to translate into financial gain – short term or otherwise – and the overall ‘health’ of a software code, has seen its popularity among Open Source enthusiasts.

Advertisment

According to Open Source developers, the core ideals of Software Craftsmanship go back right to the basics of coding, and one aspect stands out from the rest – collaboration. Ironically, Collaboration comes across as one of the most modern concepts of software creation that demands shorter life cycles and faster testing and development.

Interestingly, productive partnership was one of the earliest ‘values’ of code creation. Of course, this was mainly to eradicate bugs, and ensure a clean program, built as a result of brainstorming by engineers who share similar competencies.

Interestingly, the Open Source community also admits to the fact that somewhere down the line, the industry has seen an overdose of licensing, certification, precise predictability, and mathematical precision which shifted the onus of the code to processes and tools, and so much on the individual who actually writes the code.

Advertisment

Thankfully, the Agile Software Development Methodology helped developers ‘pull up their socks’ by propagating the fact that requirements and solutions evolve through collaboration between self-organizing cross functional groups.

The fact that both the requirement and solutions are created within the same pool of individuals ensures the fact that the question and the answer is understood equally well, and problems of ‘disconnect in understanding the business need’ scenarios are reduced to a great extent.

Add to this a scenario where a larger pool of individuals cutting across software development languages, platforms unite together to ‘solve’ a requirement. Ensuring a certain consistency between the separate lies of codes created by different individuals towards solving the larger requirement is a core element of the Software Craftsmanship philosophy.

Advertisment

Although a great deal of the enthusiasm for Agile development initially grew from software developers, much of the current focus in Agile circles has moved to on organizational aspects, product management and soft skills. Craftsmanship has long been a quality and a metaphor applied to software development, but more recently software craftsmanship has emerged as a more explicit movement and branding focused on reclaiming and re-emphasising the importance of the detail, of how to code and how to do it well.

A parallel school of thought that encourages Software Craftsmanship – especially during the current times of economic recovery -- is part of the Agile methodology which lays more emphasis on ‘Responding to change’ than ‘Following a plan’. Shorter time-to-market’ targets which in turn demand faster code generation, faster testing and faster tweaking can benefit heavily from incorporating this methodology, without letting it interfere with an individual’s basic style of coding behaviour.

Another popular method of incorporating craftsmanship into your code is to do affecting Code Refactoring. Defined as process of changing a computer program's source code without modifying its external functional behavior in order to improve some of the nonfunctional attributes of the software, Refactoring has many advantages that include improved code readability and reduced complexity to improve the maintainability of the source code, as well as a more expressive internal architecture or object model to improve extensibility.

Regular code developers and maintainers do believe that instead of paying too much attention to adding new features, it is more important to maintain continuity, and updating the existing code.

tech-news