Principles of Software Engineering
Software engineering is not just about writing code — it’s about building reliable, efficient, and maintainable software in a smart and organized way. These principles help software engineers create high-quality software.
1. Modularity
-
Break big problems into smaller parts (modules).
-
Each part does a specific job.
-
Makes the code easier to understand, test, and maintain.
Example: In a school app, you might have separate modules for attendance, homework, and results.
2. Abstraction
Example: When you use a car, you just drive — you don’t worry about how the engine works.
3. Encapsulation
Example: A “student” object hides personal details and allows updates only through specific functions.
4. Separation of Concerns
Example: Design and logic are handled separately — like using HTML for layout and JavaScript for behavior.
5. DRY (Don’t Repeat Yourself)
Example: If two pages use the same login system, write the login function once and use it everywhere.
6. KISS (Keep It Simple, Stupid)
Example: Use clear names and write short, clean functions.
7. YAGNI (You Aren’t Gonna Need It)
Example: Don’t write code for voice control in a school app if no one asked for it.
8. Code for Change
-
Write code that’s easy to update in the future.
-
Software always changes, so make it flexible and maintainable.
Example: Use settings files or databases instead of hardcoding important info.
9. Testing and Debugging
Example: Check if your app works when internet is slow or unavailable.
10. Maintainability
-
Make your code easy to read, fix, and improve.
-
Use comments, proper structure, and consistent style.
Example: Other developers should understand your code even without asking you.