"Any fool can write code a computer can understand. Good programmers wirte code humans can understand" - Martin Fowler
There is an infinite amount of possibilities how you can write code with a certain output. But which is the best one? The one you understand most easily. This book covers everything that I could think of. From naming to classes, comments, and even some small chapters on software architecture or requirements engineering.
Currently the book is about version 0.8. It is very well readable and has been mostly corrected using an AI tool, but it still has a few comments about things left to do. I would be very pleased with any feedback you could send to me.
Conditions of Use
This book is licensed under a Creative Commons License (CC BY-NC-SA). You can download the ebook Software Engineering Made Easy for free.
- Title
- Software Engineering Made Easy
- Publisher
- Leanpub
- Author(s)
- Marco Gaehler
- Published
- 2024-06-27
- Edition
- 1
- Format
- eBook (pdf, epub, mobi)
- Pages
- 465
- Language
- English
- License
- CC BY-NC-SA
- Book Homepage
- Free eBook, Errata, Code, Solutions, etc.
1. Introduction to Software Engineering Getting started 2. 3. One sentence summary 4. The short story behind this book Thanks to 5. Preface Who this book is for Writing this book A word about Copilot 6. Software Engineering The Life of a Software Engineer Writing correct code Cleaning up code Writing code for a purpose The five rules of software engineering 7. Good code: a list of rules The Zen of Python 8. Understandable code How Humans Think Spaghetti code Examples Copilot 9. Single Responsibility Principle Do not Repeat Yourself Advantages of the SRP Drawbacks of the SRP 10. Levels of abstraction Real world example Programming Example The Abstraction Layers Summary 11. Interfaces Real-world Interfaces Code Interfaces APIs Orthogonality Copilot 12. Naming The importance of Names How to name things Naming Antipatterns Copilot 13. Functions Do one thing only Temporal Coupling Number of Arguments Output arguments Return Values Summary Copilot 14. Classes Data Classes and Structs Private or Public Different Kinds of Classes Functions vs. Methods Constructors and Destructors Getter and Setter Methods Coupling and Cohesion Static Expression Drawbacks of Classes Conclusions Copilot 15. Inheritance Two Types of Inheritance Drawbacks of Inheritance Advantages of Inheritance Inheritance and Composition Conclusions 16. Data Types Lists Enums Booleans Strings Dictionaries Trees Pointers 17. Properties of Variables Compile-time constant Runtime Constant Mutable Variables Member Variables Static Variables Global Variables Comparison of Variable Properties 18. Introduction to Testing A short story about tests Test Example General Thoughts about Tests Number of test cases Stages of a Test Problematic Tests The Beyoncé Rule Exceptions and Tests Not Automatable Tests 19. Types of Tests Unit Tests Functional Tests Other Kinds of Tests When to run Tests Who should write Tests? The Testing Pyramid 20. Writing Better Code with Tests Unit Tests Integration and Functional Tests Testing Existing Code Assertions Test Driven Development Stubs, Fakes, and Mocks Summary Copilot 21. SOLID principles Single Responsibility Principle Open Closed Principle Liskov Substitution Principle Interface Segregation Principle Dependency Inversion Principle Summary 22. Software Engineering Principles Divide and Conquer Increase Cohesion Reduce coupling Increase abstraction Increase Reusability Design for flexibility Anticipate Obsolescence Design for Testability Pay Now or Pay More Later 23. Programming Paradigms Object-Oriented Programming Procedural programming Functional Programming Conclusions Copilot 24. Programming Languages Java and C++ Existing Programming Languages Code Examples Python C++ Copilot 25. Physical Laws of Code Entropy Correlation Quality 26. Bugs, Errors, Exceptions Syntax Errors Bugs Exceptions 27. Complexity Complexity of Code Estimating complexity Single line complexity Black magic code 28. Dependencies The Early Days The dependency graph Breaking up Dependencies Circular Dependencies 29. Decoupling 30. Software Architecture The end of Architecture Designing Interfaces Separate Libraries 31. Design Patterns Factory 32. Domain Driven Design Ubiquitous Language The Domain Model Domain Specific Language Domain Boundaries Building Blocks of DDD 33. 3rd party software 34. Refactoring Fundamentals There will be change Don’t Let Your Code Rot Levels of Refactoring When to Refactor What to Refactor Refactoring Process 35. Refactoring Techniques Where to start Breaking classes Renaming Scratch refactoring [WELC p. 212] Extract function Dependency Injector Copilot 36. Refactoring Legacy Code No Useful Interfaces No Tests Extremely Long Functions Seams Sketches How do I get the Code under Test? Sprout Method 37. Performance Optimization No Optimization Needed Optimization Maybe Needed Optimizing Certainly Needed 38. Comments Bad comments Useful comments Commenting magic numbers Summary Copilot 39. Logging 40. Data files CSV JSON XML HDF5 Databases Custom file format 41. Setting up a project Project Folder 42. Tools Version control software Command line IDE Continuous Integration Debugger Profiler Formatter Code quality checker Pip, cmake Ticketing system Wiki Docstring 43. Working in teams Team structure Developers work Communication Working with customers 44. Code review Drawbacks Conclusions 45. Agile Problems of Waterfall Agile was born Work planning Quality Assurance The Iron Cross Sprints Becoming agile 46. Requirements Engineering Stakeholders Goals, Context and Scope Use-Case Model 47. Planning Planning code 48. DevOps The early 2000s Benefits of DevOps 49. Mental health 50. Hiring and getting hired Hiring Getting hired 51. Examples Apple pie Paint 52. About Copilot Copilot and this book Issues Copilot and the future 53. Further reading 54. Outlook 55. Frequently used Abbreviations