Home > Articles > Web Development > Perl

Like this article? We recommend

Like this article? We recommend

Lessons Learned

Why should you care about the story of BRP/P and its users? Even if you were hired into the company in which this story takes place, you would probably never encounter BRP/P—it lives in its own remote little universe, tended to by a small and dedicated user base mostly unknown to the rest of the world.

However, I think there are a number of interesting lessons to be learned or demonstrated by this anecdote. These lessons are generally applicable, and we would do well to internalize them, lest we inadvertently end up building the next BRP/P.

Interactivity Leads to Iterative Use

In many ways, BRP/P is such an interesting case study because it is based on totally different assumptions than the standard Unix (or Unix-inspired) working environment we take for granted today.

Basically all forms of interactivity are missing. Not only is all output directed to files but there is also no way to communicate even tiny bits of information (such as filenames) to BRP/P outside of a full BRP/P program. Taken together, the effect is almost deadly; the absence of instantaneous error reporting in particular was surprisingly painful.

It does make sense, however, when we imagine the original situation that BRP/P was designed for: Cards were punched, fed to the machine, and (much later) a new set of cards was generated as output. Keeping logs and results in separate stacks of cards makes sense; you also wouldn’t expect the system to shred the (paper!) cards from the previous run—it just generates a new stack.

Although on modern hardware, turnaround time was almost immediate, the characteristics of the environment still strongly influenced the way programmers interacted with the system. There was little exploratory programming, and people tended to develop narrow, specialized skills. Since it was so hard to get a new program up and running, existing programs would be tweaked forever. And a lot of time was simply spent on routine operations.

I think there is a hidden cost here to take note of(besides the obvious lack of efficiency): namely, the "opportunity cost." By discouraging exploratory, interactive programming, the environment discouraged people from thinking "outside the box" and to explore new ideas. What you saw was all you got.

Data Formats: Extensibility and Flexibility

Something we haven’t talked about at all yet is the format of the result (.OUT) files. These files were intended for humans, and so were nicely formatted reports, with tables as rows and columns (even with some ASCII art to delimit different sections). It looked quite nice. But it made any attempt to do anything with BRP/P output almost impossible—be it to do some post-processing via a Perl script or to generate a graphical display using a plotting program. There seems to be a rule: "Data formatted for humans will stress a computer to the breaking point." (And vice versa, as the Obfuscated C Code Contest demonstrates—human pattern recognition and computer language parsing are entirely different activities!)

Again, in the ’60s, it may have been a great service to provide a printed report as output, rather than a stack of punch cards. And in an environment in which interactive and therefore iterative programming is impractical, there is little lost in discouraging the use of the previous run’s output as input to the next. But on a modern Unix workstation, the cost of this assumption is high.

It’s the old story again of presentation and contents. The .OUT files forced a certain presentation on the contents, thereby making other uses of it almost impossible. Any form of mark-up format (even in its simplest incarnation, namely TAB-delimited!) would have left the choice of interpretation of the data to a separate program—be it human-readable rendering or any form of programmatic post-processing. Hard-wiring this choice into the main program itself severely limited the capability to do unexpected things with the results.

Mark-up has its own costs, among them the need for proper tools. The most important one is a good, interactive, and truly ubiquitous viewer, be it a web browser or groff. Note how BRB/P’s archive files would have been much less of a hassle if a viewer had been provided!

Good Design Is a Barrier to Entry, or: "Don’t Be Afraid to Get It Wrong"

Given the enthusiastic reaction with which doBRP was met by the BRP/P users, I found it odd that nobody had come up with a similar idea before. For some of the BRP/P operators, the reason was clear: they had never seen anything but BRP/P in their lives and therefore had neither the vision nor the (programming) skills to conceive of something different. But some members of the group had previous experience in programming, not so different from mine. Why didn’t they come up with a similar tool long before me?

One member of the group, for example, was an experienced Unix user and adept Python programmer who was suffering mightily under BRP/P’s shortcomings and later kicked herself for not coming up with the idea herself. Why didn’t she? At the risk of inviting a lot of controversy, I believe the answer lies (at least partially) with Python—specifically with Python’s attitude that "There should be one—and preferably only one—obvious way to do it."

The problem, of course, is that "the way" may not be obvious at all—particularly at the very beginning of a new, ad-hoc, exploratory project with an indeterminate value proposition. In such a situation, I want as many ways of doing things as possible, to keep the barriers to entry low to the point of being nonexistent. From my experience, I find that Python always requires a certain amount of up-front planning, which is certainly good on a larger project or when I know what I am doing. But it does impose a start-up cost.

I think there is a very important corollary to this observation: When doing something new, don’t be afraid to get it wrong! Once the idea shows sufficient promise, the case can be made to invest more resources to get it right. Attempting to get it right on first pass is not likely to be successful and stifles innovation. (This is an application of Fred Brooks’ dictum: "Plan to throw one away—you will, anyhow.")

And another corollary is the statement that in computing, as in much else, the larger the toolbox, the larger the set of problems one considers solvable.

Even a Trivial User Interface Requires Thought

I spent a long time thinking about the user interface to doBRP, in particular once I combined the two functions of 1) running a BRP/P program, and 2) viewing a BRP/P archive into a single tool. This may seem ironic, since the entire "User Interface" of doBRP consisted of its command-line arguments!

In a first version, I had the user indicate which mode he or she wanted to operate doBRP in (run or view) by specifying a flag, such as -r and –v, for instance. But that never seemed right. The mode was always obvious from the context: run a program file; view an archive file. So, I did away with the flag and had doBRP figure out the mode from the extension of the filename provided (a useful naming convention was already strictly adhered to —otherwise, I would have attempted to determine the filetype from the first few bytes). Hence: "Don’t make the user provide information that the system already knows" (Rick Lemons, after "More Programming Pearls").

I also wanted to give users the option to limit both the number of rows and the choice of columns when showing the contents of archives, again without having to specify a bunch of pesky command-line options (for example, -n 50 -f archive -k1 -k2, and so on). In the end, I avoided the need for most command-line flags by enforcing a particular order on the arguments: If the first argument was numeric, it was interpreted as the number of rows to print. The first non-numeric argument was interpreted as the filename, and all subsequent arguments were interpreted as column names. (If the numeric argument was missing, a default value was used.) Finally, there also were some "real" command-line flags, starting with a hyphen, for less-commonly-used options. If they were present, they had to follow the doBRP command immediately (standard convention). So the user interface could be made simpler and smaller by doing the following:

  • Anticipating the most common uses
  • Exploiting the natural format of the input (numeric, filename extensions)
  • Following the user’s thought process (first the filename, then the column names)

In a way, it is surprising that even the user interface of a simple, text-only tool actually offers any design choice at all! But it does. Having some user interface is easy; having one that makes sense is harder. The most absurd example of a user interface with no thought given to its suitability was a program that expected input of a wall-clock time as seconds since midnight UTC! That may be fine if the potential users are programmers themselves, but which was most definitely not true in this case.

I think in the quality of interfaces (user interfaces and APIs) one can see the true values of an organization: are people going the extra mile to anticipate future uses and failure cases, or are they satisfied with the next best thing? Do they exchange developer time for user time (and potentially, clean-up required because of bad user input)?

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020