Saturday, January 16, 2021

Write bad code to win a prize



Get a chance of winning a prize by writing code with ONE error that Friendly-traceback cannot properly analyze, in one of three categories:

  • SyntaxError: invalid syntax
  • SyntaxError: some message, where some message is not recognized.
  • Any case of NameError, AttributeError, ModuleNotFoundError, UnboundLocalError, ImportError, IndexError, KeyError that is not recognized or is given an incorrect explanation by Friendly-traceback.

Submitted issues about bugs for Friendly-traceback itself are also considered for this contest.

Links: Github issue

Friendly-traceback documentation

The prize

There will be one prize given drawn randomly from all eligible submissions. The prize consists of one ebook/pbook of your choice with a maximum value of 50 USD (including delivery for pbook) as long as I can order it and have it delivered to you. Alternatively, a donation for that amount to the open source project of your choice if it can be made using Paypal.

The details

Each valid issue will get one entry for the contest. Valid issues contain code that might be expected to be written by a beginner or advanced beginner. It excludes code that uses type annotations as well as the use of async and await keywords.  The code is expected to contain ONE mistake only and not generate secondary exceptions.

The code can be run either using the friendly-console, or running in a Jupyter environment or from an editor as described in the documentation.

For a given valid submission, a bonus entry will be given if a link can be provided to an actual example from a site (such as StackOverflow, /r/python or /r/learnpython, etc.) where a question had been asked prior to this contest.

Exceptions that are not recognized by Friendly-traceback or for which the explanation (in English or French) is wrong or misleading are considered to be valid issues.

Submissions that are considered to be duplicate of previously submitted cases (because they basically have the same cause) will not be considered.

Honor code

I would ask that you do not read the source of Friendly-traceback with the sole intent of finding ways to write code that is designed to lead it to provide incorrect explanations.

End of contest

The contest will end on Monday January 25, at 8 AM Atlantic Standard Time.

No comments: