craeyeons / pe

0 stars 0 forks source link

Command prefixes. #10

Open craeyeons opened 1 year ago

craeyeons commented 1 year ago

image.png

I feel that -n and -name (one "-") should both work. To add, the error message shouldn't be "Invalid Command Format". It should at least tell the user what he/she left out. This makes the programme very slow to use when small mistakes are made.

Steps to reproduce:

  1. execute add person -name Joe -p 12345678 -e hello@gmail.com
nus-pe-script commented 1 year ago

Team's Response

Thank you for the suggestions!

In response to your feedback about the dashes for the flags, we actually designed our flags to take in one dash for the short forms of the flags, and two dashes for the long forms of the flags. This is in accordance with popular command line software like Git and Unix shell, where short and long flags are designated with "-" and "--". Since our product's target users are software engineering students, we feel that adhering to widely accepted standards when it comes to CLI syntax is a sensible choice as they are likely to be familiar with such syntax. This makes it easier for our target users to familiarise themselves with our application's command syntax. For those who may not be familiar with such syntax or use CLI programmes, it is still indicated clearly in our UG that the long versions of the flags should have two dashes instead of one.

In response to your feedback about the error message, as per the screenshot you have provided, we feel that the error message provided is accurate and sufficient as it prompts/directs the user to input add --help to view a more detailed help message. In the help message shown in the screenshot below, it is explained to the user that add is not an actual command, and suggests to the user that they might be trying to run add person or add task instead.

image.png

Once again, thank you and have a good reading week ahead :)

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: I would agree with your design rationale. However, I do not agree that the error message is adequate. To add, I think the input blocking added to the cause.

I agree that my screenshot was inaccurate, I apologise for that due to the lack of time during PE.

However, I would like clarify that my bug report still holds. That is

  1. there is no point differentiating "-" and "--"

  2. the feedback message is inaccurate.

Consider the improper feedback message below.

When the user makes the mistake of - and --, the error messages shows this:

image.png

try executing: add person -name Joe -p 12345678 -e hello@gmail.com (the command given above in my initial bug report)

  1. The user does not know what went wrong.

  2. Using --help only adds to amount of manual checking the user has to do because the user has to:

    1. delete his input

    2. add --help

    3. re-enter his input

    Hence this is overzealous input blocking in my honest opinion.

  3. Input blocking is bad. It should either:

    1. should it be better if your application is able to just accept "-name" or "--n"? This brings me back to the first point as to why there is no point to differentiate between "-" and "--". OR,
    2. since your software is to emulate the CLI, I do not understand why a more proper error message is not shown.

image.png

image.png