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

  • Home
  • SEARCH
  • 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
  • 0 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, please this setup for a database backed application. ( in my case DB
Consider that we are given an isometric grid (consider something like Diablo) of tiles.
I have been assigned for automated testing of Web services to achieve the following
I'm writing a client/server application that requires the server needs to be able to
Consider MyClass.java: public class MyClass { public void firstfunction(double fwd[]) { fwd[0] = 42;
Consider the collection List<Person> people = new List<Person> { new Person{Name = A, SSN=1,
My project uses buildout to do primarily two things: automatically fetch dependencies and create
Shorter version of the rest of the question: I've got a problem, and an
Often do I find myself creating the same unit tests methods to getters\setters, c'tors
When compiled with either GNU Fortran (v4.4.3) or Sun Studio F95 (v8.3) and no

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.