WorstPlans.com updates every Monday!

Your weekly source for terrible plans and ideas!

Tag: python

Errors-by-Mail: the new feature in computer operating systems! It supports the printer industry and makes it easier for you to keep track of any problems with your computer!

The issue:

When clicking “OK” on an error message on a computer or phone, it’s easy to instinctively dismiss the message and then later wonder what it said.

Unfortunately, the moment has passed, and there’s usually no way to read the message again!

This is especially true with phones, since an error message typically takes over the entire screen while it is displayed, making it impossible for a user to just put the error message into a corner and deal with it later (or never).

Proposal:

All logged errors on a computer could be sent to the user by physical mail (as in Figure 1), as follows:

  1. An error occurs on a system
  2. The system sends the error and the user’s postal address over the Internet to Errors-by-Mail, a hypothetical hip startup in the San Francisco Bay Area.
  3. Errors-by-Mail prints the error message and puts it in a regular envelope, then puts it in the mail.
  4. A few days later, the user has a hard copy of any error that occurred on their system. The user can then re-read this message at their leisure.

 

error-message-by-mail.jpg

Fig. 1: Here, a python error message has been helpfully mailed to the user. With this service, you would now have a record of any error messages that you encountered on your phone or computer.

PROS: Supports “Big Printer,” lets users easily keep a physical record of any problems with their computer or phone.

CONS: Postage could add up. But perhaps this is a positive feature, as it would encourage users to never do anything that might generate an error.

Throw away your current barbaric programming language! Programming Emoji is the future of computation.

Background:

Essentially all major programming languages exclusively use keywords written in English. (For a couple of exceptions, see the addendum at the end.)

But this doesn’t have to be the case!

Proposal:

By using symbols instead of words, we can convey a concept both more concisely and more easily across languages.

See below for a few suggested changes:

while-true

Fig 1: This image of a snake eating its own tail is a much more visceral and obvious representation of an endless cycle than the words “WHILE TRUE.”

if-else

Fig 2: “IF” and “ELSE” have specific meanings in English. But “Else” is also a Scandinavian name! By using these unambiguous symbols, we avoid any existing meanings that might confuse people.

data-types

Fig 3: Data types (“integer” / “floating point number” / “text string”) can be replaced by these intuitive images instead. This also avoids the issue of having multiple synonyms for each type. For example, a non-integer number could be called a “float,” a “real,” a “double,” etc.—but there’s only ONE symbol to represent this concept.

 

foreach

Fig 4: Some languages use “for” to create a loop, while others use “foreach” (or “forEach,” or “for (item) in (set)”). To prevent confusion, we can standardize on a single symbol (above) to convey the idea of iteration through a loo.

Conclusion:

Don’t write another line of code in your old-fashioned text-based programming language! Programming emoji is the future.

PROS: More easily seen at small font sizes. Works across languages, and prevents any misunderstanding arising from a word having an existing unrelated-to-programming meaning (e.g. “float” meaning “to rise to the surface of water” in addition to “a ‘floating point’ number”).

CONS: Requires new custom fonts and/or Emoji support.

programming-emoji

Fig 5: An extended set of proposed replacements for basic programming terms. Color is optional, but recommended.

Addendum:

Here are a couple of programming languages that can make use of non-ASCII symbols:

  • APL,” a language created in 1964, is well known for making use of a special set of symbols. Here is an example from Wikipedia: (~RR∘.×R)/R1ιR . It is actually possible to order a keyboard with these symbols printed right on the key caps!
  • Perl 6 supports numerical characters like “” (a fraction) or “” (a Roman numeral), as documented here.

 

 

How to destroy a programming language (or natural language?) that you don’t like in one easy step with three difficult sub-steps

The issue:

Sometimes, you don’t like a programming language (like Perl or Python), or a natural language (like English or Spanish).

You might have your reasons, or maybe not—maybe you just want to destroy it completely for no reason at all!

 

Proposal: Here’s a simple way to go about wreaking destruction on the language in question while leaving no one the wiser:

  1. Propose a “new and improved” version of the language. Example: “Perl 6 will be so much better than Perl 5!” Or: “Esperanto: it’s like English, but the spelling is much more regular!”
    1. Make sure it’s very similar at first glance, but annoyingly incompatible in key regards.
    2. Next, make sure there are a few bonus features, but not enough to actually justify the switching cost.
  2. For programming languages, start creating software in this language. For natural languages, start creating novels, newspapers, and works of art in this language.
  3. Make sure there is a HUGE delay in switching; “everyone should learn English 2.0, but it isn’t ready quite yet… so in the meantime, English 1.0 is deprecated.”
  4. Finally, you just have to wait! Instead of switching to the “upgraded” language, people will probably switch to an entirely different one.

 

Great examples in history:

  • Successful destruction: Perl 5 –> Perl 6
  • To be determined: Python 2 –> Python 3
  • Failure: English –> Esperanto

PROS: Lets you surreptitiously destroy the language that has drawn your wrath.

CONS: None!