Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3599206
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:20:21+00:00 2026-05-18T20:20:21+00:00

Consider an automated build system that stores results in a database and offers tabular

  • 0

Consider an automated build system that stores results in a database and offers tabular display of results via dynamic html in response to http GET requests. Lots of different users want to see different subsets of the results, so there are parsing scripts in PHP each of which accepts multiple optional filtering parameters and values. For example, (I’m leaving off the http part so nobody here actually clicks this example URL):

display_results.php?componenent_name=my_comp1&build_type=build_type1&build_owner=fred

Even if the list of all possible parameters and their permitted values are listed on some help page, when the user is creating a request URL, s/he may not have that documentation at hand. Instead, depends on memorizing the valid parameters (including their spelling) and the allowed values. Sometimes s/he will get that wrong.

Question

From the point of view of end-user usability as well as developer maintainability, which of the following options is best in response to such user errors:

  1. Ignore invalid parameters or values
  2. Ignore invalid parameters, return nothing for invalid values
  3. Return as much valid table data as possible plus an error message (with correct usage)
  4. Return just an error message (with correct usage)
  5. Make best attempt at auto-correction
  6. Other (explain)

For example, if the database contains data for build_type1 and fred and joe for three components called comp1, comp2, and comp3, and user (erroneously) writes:

display_results.php?name=comp1,comp2&build_type=build_type1&build_owner=john

  1. Would return all results (because ignored wrong parameter name “name”, invalid value “john”)
  2. Would return nothing because no data for john
  3. Would return all results for build_type1 plus messages “no build_owner = john” and “maybe you meant ‘component_name'”
  4. Would return just messages “no build_owner = john” and “maybe you meant ‘component_name'”
  5. Would return comp1 and comp2 results for build_type1 for joe
  6. Other (describe)

I’m defining usability as consistency with widely-used, well-behaved web apps that are out there — if users are happy with those they would be happy with the app I’m describing too.

I am asking this question because I am a key user of such scripts, make a good number of enhancement requests, and want to get some backing for further requests.

===
About the interface — free-form or “builder page”. Yes, I am talking about free-form. There is a “builder page” in the system but (a) it never offers all the options that all users seem to want and (b) I have not been able to push through a “create permalink” enhancement request.

===
Thanks for chosen answer — not enough space in comment:

Thanks @pygorex1! You gave an answer that puts my question in the context of a well-known software construct — the API. And gave a good (if perhaps exaggerated 😉 ) example of the impact of violating these principles. Finally, something had been bothering me about these scripts’ APIs, and when you mentioned “self-documenting”, you connected it up for me. What was bothering me was that when there’s little documentation (because it’s costly to keep up to date) and with partial results returned on user error (mine!), I don’t learn anything about the system. “Self-documenting” is probably the most succinct justification for the error-handling design you’ve recommended. Easier sell to users and maintainers!

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:20:21+00:00Added an answer on May 18, 2026 at 8:20 pm

    This sounds remarkably like an API. One of the hallmarks of a good API is a having a clear and consistent syntax so users can get predictable results. Violating the syntax should result in a error.

    Returning partial results even though the syntax is incorrect is a terrible design: when a user isn’t clearly stating what data they want there’s a good chance the data returned won’t be useful or will be discarded. Even worse, the data may be treated as being in a valid context even when it’s not.

    An example. The system is designed to ignore invalid parameters. A client sends a comoponent_name parameter (a misspelling of component_name) requesting all components of type ‘A’. Subsequently, the system returns components of all types (‘A’, ‘B’, ‘C’ … ‘Z’). The client treats these results as all being of type ‘A’ and bases internal calculations and business logic on these results. Chaos ensues, as management bases their business decisions largely on this internal data analysis, the client jumps head-first into the wrong market segment and goes bankrupt.

    Now, this is a doomsday scenario, but it illustrates a point: you can mitigate and even prevent systemic bugs by clearly defining your inputs and outputs.

    Before returning any data, verify input parameters. When an invalid parameter is encountered return an error message explaining the correct syntax. This way, the system is self-documenting and will return predictable results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider an automated build system that stores results in a database and offers tabular
I would like to ask you which automated build environment you consider better, based
Consider the following code that automates generation of Boost.MPL type sequences (list or vector).
I have a C console program in VS2010 that I would like to edit/debug/build
For a toy project, I want to implement an automated question answering system with
Consider the following code sending an HTTP 201 Created response to the client: String
Trying to build what I believe to be a contingency table, please consider the
I'm in need of a distributed file system that must scale to very large
I've been told several times that I should consider splitting parts of my app
I'm running a command line application from within the perl script(using system()) that sometimes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.