Software Development in Practice by Bernie Fishpool

Software Development in Practice by Bernie Fishpool

Author:Bernie Fishpool
Language: eng
Format: epub
Publisher: BCS Learning & Development Limited
Published: 2020-05-15T00:00:00+00:00


Refactoring

It is not a trade industry secret to say that code is often developed at a reasonably frantic rate. This leads to technical shortcuts, a lack of appropriate (i.e. rigorous) testing and, to be honest, less-than-ideal additions to a production codebase. The usual suspects include:

vulnerable code with insufficient data or data type checking;

overlong (or overcomplicated) functions;

functions which break the SRP (single responsibility principle): performing more than one core task;

badly designed classes, particularly ones that have grown too large and unwieldy;

orphan functions which possibly should belong elsewhere;

unnecessary code duplication: WET vs DRY;

short-term ‘hacks’ which are used to patch a codebase’s behaviour temporarily;

obsolete and/or potentially misleading comments which no longer reflect the code they accompany;

over-engineered code which attempts to predict future need (more on this later) and becomes needlessly layered and overcomplicated;

badly named identifiers – too short, too long or simply do not meet team standards;

‘God’ lines, where a single complex line of code possibly defies easy maintenance or breaks coding standards (e.g. recommended maximum line length).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.