Category Archives: Software Engineering

How to Quickly and Reliably Fix a Bug

Problem:

It may take you much effort to fix a bug. The fix may not be reliable. How can you avoid this situation?

Solution:
  1. Try to reliably reproduce the bug. It is okay if this may not be successful.
  2. Search for an existing solution using the error message, the library or framework name and version, and the operating system name and version. This can save us a lot of effort.
  3. Debug and log messages to identify the exact location of the source code that causes the issue. In order to to this we need to do the followings.
    • Identifying the flow of the data, i.e. the use case, the entry point and the exit point.
    • Trying to understand the programming language syntax. Do not guess anything.
    • Trying to understand the purpose, inputs and outputs of a library function. Again, do not guess anything.
    • Trying to understand the data structure and a part of the database schema related to the use case.
    • Trying to review some values inside the database if possible.
    • Trying to understand the concepts, algorithms and architecture related to the use case.
    • These steps may be done in parallel and iteratively.
  4. Guess a cause of the problem based on the information retrieved in the third step.
  5. Try to isolate the issue, i.e. try to reproduce the issue using specific code and unit tests, if possible.
  6. Search for or propose a solution for the cause, i.e. propose a fix.
  7. Test the fix.
  8. Repeat from Step 4 to 7 if needed.

Topic 15 – Advanced Software Design

Why do I need to learn about advanced software design?

I think that I already learned about software design in the Topic 12 – Introduction to Software Design.

Now your task is not just to build a house.  Your task is to build a city. 

The situation is similar to when you create complex software. Now, you are responsible for creating a software system containing about 10,000 classes for 5,000 people to use in 15 years. The maximum system downtime must be less than 5 minutes per year.
Image that you have to create a system that serves millions of people simultaneously like Facebook or YouTube or Amazon or Office 365 or GMail. Are you able to create one?
Image that you are tasked to create a web framework for developers to extend such as ASP.NET Core or Yii or React.js. Are you confident in creating one?
If you are not sure how to fulfill these tasks then probably, you should learn how other people crafted similar systems and adapt their experiences to your case. Advanced software design knowledge will then be useful for you.

What can I do after finishing learning advanced software design?

You will know how to design a complex software system that satisfies not only functional requirements but also security, modifiability, scalability, reusability, extensibility and reliability requirements.

That sounds interesting! What should I do now?

Advanced software design requires a lot of reading. Please do review the software design knowledge introduced to you in the Topic 12 - Introduction to Software Design first.
Nowadays software can be applied to many fields. Each of them requires specific advanced software design knowledge. In this topic, we only focus on enterprise software due to its popularity.
Before you design a complicated system you must thoroughly  understand its sophisticated requirements. This is a critical step when building a large system.

Please read this David C. Hay (2002). Requirements Analysis: From Business Views to Architecture. Prentice Hall PTR book to learn how to capture requirements for an enterprise system.
After that please read 
- this Deepak Alur, Dan Malks and John Crupi (2003). Core J2EE Patterns: Best Practices And Design Strategies. Prentice Hall PTR book, and
- this Martin Fowler et al. (2002). Patterns Of Enterprise Application Architecture. Addison Wesley book, and
- this Philip A. Bernstein and Eric Newcomer (2009). Principles of Transaction Processing. Second Edition. Morgan Kaufmann book.
After that please read 
- this Eric Evans (2003). Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison Wesley book, and
- this Jimmy Nilsson (2006). Applying Domain-Driven Design and Patterns: With Examples in C# and .NET. Addison-Wesley Professional book, and
- this Dino Esposito and Andrea Saltarello (2014). Microsoft .NET: Architecting Applications for the Enterprise. Microsoft Press book, and
- this Vaughn Vernon (2013). Implementing Domain-Driven Design. Addison-Wesley Professional book.
After that please read 
- this Cloves Carneiro and Tim Schmelmer (2016). Microservices From Day One. Apress book, and 
- this Sam Newman (2016). Building Microservices - Designing Fine-Grained Systems. O'Reilly" book.

After finishing the books please click Topic 16 – Calculus to continue.

Topic 13 – Software Project Management

Why do I need to learn about software project management?

Knowing how to create software does not mean that you will create software SUCCESSFULLY. Creating software successfully means that you satisfy all customer's REQUIREMENTS ON TIME, ON BUDGET with HIGH QUALITY while making both the customer and yourself HAPPY. Especially, your software must create REVENUE for the customer.

Have you ever wondered why many software projects failed; why Microsoft, Oracle, Google, Apple, Amazon and IBM abandoned many projects?
Software project management will provide you knowledge so that you could improve the success probability of your software projects and mitigate all the project risks.

What can I do after finishing learning about software project management?

You will know how to plan a project, including scoping, estimating time and resources, creating a schedule or an adaptive release plan, identifying and responding to risks.

You will know how to create software using the mindset of a specific methodology (i.e. Waterfall, Rational Unified Process, Iterative and Incremental Development, Agile Methods, Scrum, Extreme Programming, Kanban, PMI, PRINCE2).

You will know how to perform project configuration management, how to combine development and operations to release software faster, how to control project changes, how to report project status, how to control product and process quality.

You will know how to collaborate with others to create software, how to motivate your team members.

Uh-oh! I am a developer. I do not want to be a project manager. Do I really need to know about project management?

If you have a doubt about the usefulness of project management knowledge then just review the situations below. If you can overcome all of them then congratulation, you already have enough project management knowledge that a developer needs.
- You are asked by your manager when you can finish your tasks. Unfortunately, the tasks are new to you. The requirements are vague. It is even worse that you have not found technical solutions for them.
- You are required to finish a task requiring a collaboration with other team members. Conflicts arise frequently. You do not want to work with them anymore but you still have to complete the task.
- You cannot complete a task on time due to many incidents.
- You are given only a project idea and asked to create a product. The difficulty is that you do not know where to start.
- Most of your projects cannot be complete on time and on budget and you do not know what are the root cases.
- Most of your customers do not want to partner with your team again although their projects were finished on time with high quality by your team.

Alright! What should I do now?

Software project management requires a lot of reading.
In order to get familiar with software project management concepts please read this Jennifer Greene and Andrew Stellman (2005). Applied Software Project Management. O'Reilly book.
After that please read this Steve McConnell (2006). Software Estimation: Demystifying the Black Art. Microsoft Press book to learn how to estimate effort, time and cost for a software project.
After that please read 
- this Frederick P. Brooks, Jr. (1995). The Mythical Man-Month: Essays on Software Engineering. Addison-Wesley Professional book to learn the timeless principles of software project management, and
- this Tom DeMarco and Timothy Lister (2013). Peopleware: Productive Projects and Teams. Addison-Wesley Professional book, and 
- this Zachary Wong (2007). Human Factors in Project Management: Concepts, Tools, and Techniques for Inspiring Teamwork and Motivation. Jossey-Bass book to learn how to deal with human side of project management.
After that please read this Tom DeMarco and Timothy Lister (2003). Waltzing with Bears: Managing Risks On Software Projects. Dorset House book to learn how to deal with software project risks.
After that please read 
- this Philippe Kruchten (2003). The Rational Unified Process: An Introduction. Addison-Wesley Professional book, and 
- this Per Kroll and Philippe Kruchten (2003). The Rational Unified Process Made Easy: A Practitioner's Guide to the RUP. Addison-Wesley Professional book, and
- this Scott W. Ambler et al. (2005). The Enterprise Unified Process - Extending the Rational Unified Process. Prentice Hall book to learn how to develop software using a managed process.
After that please read 
- this Ken Schwaber (2004). Agile Project Management with Scrum. Microsoft Press book, and
- this Jonathan Rasmusson (2010). The Agile Samurai: How Agile Masters Deliver Great Software. Pragmatic Bookshelf book, and
- this Kenneth S. Rubin (2012). Essential Scrum: A Practical Guide to the Most Popular Agile Process. Addison-Wesley Professional book, and
- this Mike Cohn (2010). Succeeding with Agile: Software Development Using Scrum. Addison Wesley book, and
- this Dean Leffingwell (2011). Agile Software Requirements. Lean Requirements Practices for Teams, Programs, and the Enterprise. Addison-Wesley Professional book, and
- this Mike Cohn (2005). Agile Estimating And Planning. Pearson Education book, and
- this Kent Beck and Cynthia Andres (2004). Extreme Programming Explained: Embrace Change. 2nd Edition. Pearson Education book, and
- this James Shore and Shane Warden (2008). The Art of Agile Development. O'Reilly book, and 
- this Esther Derby and Diana Larsen (2006). Agile Retrospectives: Making Good Teams Great. Pragmatic Bookshelf book, and 
- this Eric Brechner (2015). Agile Project Management with Kanban. Microsoft Press book to learn how to develop software using an agile mindset.
After that please read 
- this Jessica Keyes (2004). Software Configuration Management. Auerbach Publications book to learn how to perform software configuration management, and
- this Len Bass, Ingo Weber and Liming Zhu (2015). DevOps: A Software Architect's Perspective. Pearson Education book to learn how to release software faster.
After that please read 
- this Project Management Institute (2017). A Guide to the Project Management Body of Knowledge. Sixth Edition. Project Management Institute book, and
- this Kathy Schwalbe (2017). An Introduction to Project Management. 6th Edition. Schwalbe Publishing book to review the techniques developed by the Project Management Institute (PMI).
If you are interested in taking a PMP exam then please read 
- this Kim Heldman (2018). PMP Project Management Professional Study Guide. Sybex book, and 
- this Joseph Phillips (2018). PMP Project Management Professional Study Guide. McGraw-Hill Education book.
After that please read 
- this Steve McConnell (1996). Rapid Development: Taming Wild Software Schedules. Microsoft Press book to review classical methods and techniques of software development
- this Murali K. Chemuturi and Thomas M. Cagley Jr. (2010). Mastering Software Project Management: Best Practices, Tools and Techniques. J. Ross Publishing book to review approaches to software project management, especially when organizational-level processes and practices establish a platform on which a software project is managed.
The information in these 2 books may help you in some specific situations.
 After finishing the books please click Topic 14 - Introduction to Database Design to continue.

Topic 12 – Introduction to Software Design

Why do I need to learn about software design?

What will you do if you are tasked to build a house. You will need to sketch its first and build the house based upon the sketch. Otherwise you may build a house that may collapse in a few weeks or cannot be decorated due to errors.

The situation is similar when you create software. You need to plan how you will build it first by deciding how many components and objects will be used and what are their responsibility, how they work together, how data will be organized, how data will be flowed within your application, how users will interact with the application, etc.

Software design knowledge will show you how to do these tasks.

What can I do after finishing learning software design?

You will know how to create a design for an application including static and dynamic structure, data organization, business processing workflows, etc.

Is is really useful? I feel that you can write the code right after having the requirements and I could refactor my code when needed.

That's great if you can do it like that. Just return to this topic
(i) when you do not know how to write the code for a feature or 
(ii) when you cannot refactor your code because only a small change breaks the whole application or 
(iii) when you write a software system together with 20 other developers and you do not know how to integrate results of all developers into one solution or 
(iv) when you software system serves 20 users simultaneously very well but it stops when serving 2,000 users simultaneously and you do not know how to fix it.

Alright! What should I do now?

Software design requires a lot of reading. Each application type (enterprises, games, desktop, web, mobile, security, etc.) require specific design knowledge. At this point we focus only on the basic elements of software design.
In order to get familiar with software design please read these 3 books below in parallel:

- Grady Booch et al. (2005). The Unified Modeling Language User Guide. Addison Wesley Professional

- Craig Larman (2004). Applying UML And Patterns. 3rd Edition. Prentice Hall

- Robert C. Martin (2003). Agile Software Development - Principles, Patterns, and Practices. Pearson
After that please read this Erich Gamma et al (1994). Design Patterns Elements Of Reusable Object Oriented Software. Addison-Wesley Professional book.

Please focus on the Motivation section of each pattern. You can skip a pattern if the problem presented in its Motivation section is not relevant to your situation.
After that please read this Frank Buschmann et al. (1996). Pattern-Oriented Software Architecture: A System Of Patterns. John Wiley & Sons Ltd book.
After that please read 
- this Meilir Page-Jones (1988). The Practical Guide to Structured Systems Design. Pearson Education book, and 
- this Bertrand Meyer (1997). Object-Oriented Software Construction. Prentice Hall book, and
- this Grady Booch et al. (2007). Object-Oriented Analysis and Design with Applications. Pearson book, and
- this David Budgen (2003). Software Design. Pearson book
to learn how to design software systematically.
After that please read this Robert C. Martin (2017). Clean Architecture: A Craftsman’s Guide to Software Structure and Design. Pearson Education book to learn how to create a real world architecture for enterprise application.
After that please read 
- this Len Bass, Paul Clements and Rick Kazman (2012). Software Architecture in Practice. Addison-Wesley book to review software architecture aspects, and
- this Paul Clements et al. (2010). Documenting Software Architectures: Views and Beyond. Pearson book to learn how to document an architecture so that it can be used for communicated, built and maintained, and
- this Humberto Cervantes and Rick Kazman (2016). Designing Software Architectures: A Practical Approach. Addison-Wesley Professional book to learn how to create an architecture systematically.
- this Nick Rozanski and Eoin Woods (2012). Software Systems Architecture: Working with Stakeholders Using Viewpoints and Perspectives. Addison-Wesley Professional book to learn how to apply theory to create an architecture systematically in real world.
After finishing the books please click Topic 13 - Software Project Management to continue.

Topic 11 – Software Testing

Why do I need to learn about software testing?

Just image that a user installs your application, opens it and "BOOM!", it crashes. Is it good?
An even worse case is when your software operating an airplane suddenly hangs up while the airplane is still flying in the sky. Can you image what may happen?

How do you ensure that your application solves your customer's problems? How do you know if your software meets its users' requirements? How do you give your users' confidence about the correctness, reliability and security of your software?

In order to answer these questions adequately you need to learn about software testing.

What can I do after finishing learning software testing?

You will know how to design and write a test case, how to prepare test data, how to test software structurally and correctly, how to automate testing tasks, how to report bugs.

I am a programmer. I am not a tester. Do I really need to know how to test software?

Many application capabilities must be tested by a programmer.
Many software testing tasks can only be done by a programmer.
Therefore you have to master software testing knowledge.

Alright! What should I do now?

Please read 
- this "Cem Kaner et al. (1999). Testing Computer Software. 2nd Edition. Wiley" book and 
- this "Lee Copeland (2004). A Practitioner's Guide to Software Test Design. Artech House" book, and
- this "Chaminda Chandrasekara and Pushpa Herath (2019). Hands-On Functional Test Automation: With Visual Studio 2017 and Selenium. Apress" book, and
- this "Arnon Axelrod (2018). Complete Guide to Test Automation: Techniques, Practices, and Patterns for Building and Maintaining Effective Software Projects. Apress" book.

After finishing these books please click Topic 12 - Introduction to Software Design to continue.

 

Topic 10 – Software Construction

Why do I need to learn about software construction?

Knowing how to write code does not mean that you know how to create real-world software. In real world, you will need to know how to manage your code, how to read the existing code, how to write code following standard styles, how to ensure that your code is working, how to automate your the process of building, testing and deploying your code, how to handle error in your applications, how to optimize your code for speed, how to write secure code, how to avoid code duplication, how to create readable code, how to create code faster. That's why you need to learn about software construction.

What can I do after finishing learning software construction?

You will know how to create software in a real world team and environment.

Hmm! Is it really useful?

If you have a doubt about its usefulness then you can delay learning it until you are tasked to create a software system and you complete a half of it and are stuck there because when you add one more feature you will get tons of bugs due to the new code. After you finish fixing 1 bug, you get 3 other bugs due to the modified code that fixes the bug.
Another scenario is that when it takes another person 6 months to read and understand the code that you wrote in 3 months in order to fix a bug or to add a new feature.

Alright! What should I do now?

Software construction requires a lot of reading. In order to get familiar with software construction you will need to read at least below books.

Please read this Steve McConnell (2004). Code Complete. Microsoft Press book first.

After that please read this Jon Loeliger and Matthew McCullough (2012). Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development. O'Reilly Media book.
Alternatively, you can read  this Ben Collins-Sussman et al. (2011). Version Control with Subversion book.

After that please read this Kent Beck (2002). Test Driven Development By Example. Addison Wesley book. This is an important book in this topic. Please read this book carefully.

After that please read this Martin Fowler et al. (1999). Refactoring Improving The Design Of Existing Code. Addison Wesley book and its newer version Martin Fowler (2019). Refactoring. Improving the Design of Existing Code. 2nd Edition. Addison-Wesley Professional also. These 2 books are very important for software construction. Please read it carefully.

After that please read this Elton Stoneman (2020). Learn Docker in a Month of Lunches. Manning Publications book.

After that please read this "Continuous Integration: Improving Software Quality and Reducing Risk" book. 
After that please read this "Diomidis Spinellis (2003). Code Reading: The Open Source Perspective" book.

After that please read this "Michael C. Feathers (2004). Working Effectively with Legacy Code" book.

After that please read this "Suhas Chatekar (2015). Learning NHibernate 4" book.

After that please read this "Matt Perdeck (2010). ASP.NET Site Performance Secrets" book.
After finishing the books please click Topic 11 - Software Testing to continue.

 

Topic 9 – Software Requirements

Why do I need to learn about software requirements?

Your software can only be successful if it helps people do their work better, faster, with a lower cost. In order to achieve this objective, it must fulfill the need of various users.

To fulfill users' needs you need to be able to identify their context, problems and desires, then propose software solutions for their issues.
Your software solutions must be built based on its users' requirements. So you need to be able to collect, document, manage and validate their requirements. Software requirements engineering will provide you knowledge for completing these tasks.

Do not waste your time to create software that NO ONE will use. Your software will only become useful if its requirements are correctly engineered.

What can I do after finishing learning software requirements engineering?

You will know how to elicit, document, manage and validate software requirements so that they can be used for creating your software.

Hmm! Is it really useful?

If you have a doubt about its usefulness then you can delay learning it until you are tasked to create a software system but you do not know where to begin or what are the inputs for your coding.
Another scenarios that may suggest that you should come back to this topic is when you will have created an application but then you, unfortunately, find that no one wants to use it.

Alright! What should I do now?

Please read this Suzanne Robertson and James Robertson (2012). Mastering the Requirements Process. Addison Wesley Professional book.

After that please read this Karl Wiegers and Joy Beatty (2013). Software Requirements. Microsoft Press book.

After that please read this Joy Beatty and Anthony Chen (2012). Visual Models for Software Requirements. Microsoft Press book.

After that, please read this Alistair Cockburn (2001). Writing Effective Use Cases. Addison-Wesley book.

Then please review this "ISO/IEC/IEEE 29148:2011(E)" standard so that you could create a quality software requirements specification.
After that, please read this Mike Cohn (2004). User Stories Applied: For Agile Software Development. Addison-Wesley Professional book.

After that, please read this Jeff Patton and Peter Economy (2014). User Story Mapping. O'Reilly Media book.

After that, please read this Dean Leffingwell (2011). Agile Software Requirements. Lean Requirements Practices for Teams, Programs, and the Enterprise. Addison-Wesley Professional book.
After finishing the books please click Topic 10 - Software Construction to continue.

Lessons learned 1:

Problem: Incorrect requirements and constant change of requirements.

Solution: Our goal is to ensure project' success and client's satisfaction.

In order to achieve this goal our delivered solution must solve our client's problems and satisfy our client's needs.

Analysis and communication are critical to ensure that our deliverables match with client's needs.

It does not matter whether we use RUP or Agile process for development. It does not matter whether we use UML, or boxes and lines, or text, or coded prototypes or paper and pen for describing the problems that need to be solved. Our client and analyst must review, refine and confirm problem specification regularly.

Otherwise formal requirements should be modeled, reviewed and approved before design begins to ensure that our project will deliver solution to the right problems.

Lessons learned 2:

Problem: Vague requirements.

Solution: Our goal is to clarify our client's problems and needs.

Again analysis is an important tool to clarify our client's problems and needs. It should be done properly using use cases, user interfaces and workflows.

Sometimes we are stuck at analysis, especially when we analyze integration or enhancement needs. In this case a proof of concept or small technical exercises should be done.