What fundamental tenets of software engineering aren't being applied? Explain?
What are the 10 principles of software engineering?
1. Keep It Simple Simon
When coding your next big project, make sure your programming is simple and clear. The code should not make it difficult for people to edit or change it.
» Your methods must be small, no more than 40-50 lines.
» Each method should solve only one problem.
» Do you have a lot of conditions in your project? Make sure you break them up into smaller blocks of code.
Always Keep It Simple, Stupid (KISS) allows you and other programmers to quickly identify errors. It also helps you edit and make other changes to your code. It is one of the most common lean principles in agile software engineering.
2. You Won't Need It (YAGNI)
Most programmers fall into the trap of trying to implement all the features at once, right from the start. Eventually, some or most of these functions will become useless.
As an upcoming software developer, always start by adding a few methods to a class. As your project takes shape and new requirements emerge, you can add more features. This is how you achieve lean software development.
YAGNI saves the time, effort and expense that you would waste trying to understand or debug your code.
3. Measure twice and cut once
The requirements phase of the development lifecycle typically accounts for more than 50% of coding problems if not done well. So be prepared by developing a systematic approach to the coding process.
Double-check all project requirements to make sure you don't leave out or add too much in your code. Then create plans to guide you through the process to achieve high-quality coding. Always test your project from the beginning to make sure everything is fine.
This principle provides much more predictable results, especially if the cost of the project is already high. You'll save yourself the headaches that come with deleting or adding lines of code to meet requirements.
4. Don't Repeat (DRY)
Don't repeat yourself when writing code. This means that you should avoid copying and pasting the code in different places. Otherwise, future maintenance will be difficult. This is because you will need to make coding changes in these different places.
These changes will further require changes to the tests to make the results green. All this will require more time, effort and money.
To avoid such pitfalls, you can extract common logic into functions.
Additionally, if there are manual tasks you can automate, do so to keep your code lean.
In software development, the above steps will help in reusability of code without having to repeat it.
Step by step
Solved in 2 steps