Software Engineering Concepts- Brush up…
An in-depth understanding of the software engineering principles is required for producing code in the era of SaaS (Software as a Service). This means we design to code and not the other way around. The software is expected to be created for the user and code created for communication. Yesterday, I conducted a workshop to educate the software engineers in my organization . Here is a snapshot of the main “CODE QUALITY” principles as part of the software engineering concepts. This all can be well bought in for large products if you simply setup a new “REFACTORING” project.
- Refactoring – redesign the code without changing behavior of software.
- Polymorphism – different forms to be given to the same code.
- Extract Classes : Common code cluttering be extracted out and templates created to keep the framework around the objects clear instead of making everything utilities. This will give a sense of junk code and hence the software will become bulky and this doesn’t mean to disturb the business logic than as agreed in design.
- Generalizing from Specifics – Much said about extract classes, however whenever feasible, always use a general framework. Long functions and classes can be split to interfaces to bring in the generic behavior. This also meant design to code and not the other way round. The software is expected to be for user and the code is for communication.
- Naming Constructs – Is mandatory and not obligatory because it is communicated to another human though the final use is of course make a machine run with it. Hence naming of all data structures and artifacts used in code has to be dealt with carefully as per the programming language guidelines. Language is to be universal and hence must be in English.
- Comments in Code – the what and why of comment clearly should connect to the design of the software and not on the small fixes or logic.
Many and all of these techniques are derived majorly from Martin C Fowler and Demeter
I also plan to share some techniques to do away with software complexity. Until then, enjoy the legacy and maintain a clean code!!!