Friday, January 12, 2024

Software complexity

The unpredictability of users is one of the key sources of software complexity. Since a web app is exposed to the entire internet, you have to consider numerous edge cases in addition to the nominal use case. People often underestimate the required effort because they typically consider only the app's normal use.

Consider the example of adding a commenting feature to an e-commerce site. The nominal case is the user writing a comment and submitting it. After admin approval, comment should be displayed on product page. Steps:
  1. User writes comment
  2. User presses submit button
  3. A message saying "comment will be visible after admin approval" is shown to user
  4. Comment is saved to database for admin approval
  5. Admin reviews and approves comment
  6. When product page is loaded, approved comments are shown
Additional considerations:
  • If the user is not logged in, they must login. If the user has no account, they must create an account. After login / account creation, they should be redirected back to same product page with "comment will be visible after admin approval" message. Do not show that message for normal product page loads.
  • After pressing submit button, user might want to edit or delete the comment.
  • Although admin approval prevents spam, a malicious user could still:
In addition to usability, performance, low resource usage and maintainability, these details make up most of software engineering work.

No comments:

Post a Comment