question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add missing stubs to exercises

See original GitHub issue

The problem

Right now for some exercises, a student is required to read the tests to know which functions they should implement. This is annoying, time consuming and might discourage people from doing the exercise entirely. We should provide stubs for all exercises. Stubs should provide the signature of functions and classes, just so the student is immediately ready to start writing the custom logic. This is an example of a stub, from the Raindrops exercise:

class RaindropConverter {

    String convert(int number) {
        throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
    }

}

All stubs must follow this format.

Contributing to this issue

This is a big issue that will require changes to a lot of exercises. The good news is that you don’t need to fix this is all exercises to contribute to this issue! PRs fixing this in just one exercise at a time or a couple of exercises at a time are more than welcome.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:21 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
andrerfcsantoscommented, Oct 24, 2022

@PakkuDon I think they are all pretty much open 😃

1reaction
andrerfcsantoscommented, Jul 7, 2022

It seems here in the Java track, all “medium” difficulty exercises or above don’t include stubs, so probably those are a good start, but there might be more. A quick jq query for exercises that are medium difficulty or above gives me this:

jq query
$ jq '.exercises.practice | map(select(.difficulty >= 4)) | map(.slug) | sort' config.json
[
  "affine-cipher",
  "all-your-base",
  "allergies",
  "alphametics",
  "anagram",
  "atbash-cipher",
  "bank-account",
  "beer-song",
  "binary-search",
  "binary-search-tree",
  "bob",
  "book-store",
  "bowling",
  "change",
  "circular-buffer",
  "clock",
  "collatz-conjecture",
  "complex-numbers",
  "connect",
  "crypto-square",
  "custom-set",
  "diamond",
  "diffie-hellman",
  "dominoes",
  "error-handling",
  "etl",
  "flatten-array",
  "food-chain",
  "forth",
  "go-counting",
  "grade-school",
  "grep",
  "hangman",
  "house",
  "isbn-verifier",
  "isogram",
  "kindergarten-garden",
  "knapsack",
  "largest-series-product",
  "linked-list",
  "list-ops",
  "luhn",
  "markdown",
  "matching-brackets",
  "matrix",
  "meetup",
  "minesweeper",
  "nth-prime",
  "nucleotide-count",
  "ocr-numbers",
  "palindrome-products",
  "parallel-letter-frequency",
  "pascals-triangle",
  "phone-number",
  "pig-latin",
  "poker",
  "prime-factors",
  "proverb",
  "pythagorean-triplet",
  "queen-attack",
  "rail-fence-cipher",
  "rational-numbers",
  "rectangles",
  "rest-api",
  "robot-name",
  "robot-simulator",
  "roman-numerals",
  "rotational-cipher",
  "run-length-encoding",
  "saddle-points",
  "satellite",
  "series",
  "sieve",
  "simple-cipher",
  "simple-linked-list",
  "spiral-matrix",
  "sublist",
  "sum-of-multiples",
  "tournament",
  "transpose",
  "tree-building",
  "triangle",
  "twelve-days",
  "two-bucket",
  "variable-length-quantity",
  "word-count",
  "word-search",
  "wordy",
  "yacht",
  "zebra-puzzle",
  "zipper"
]

There might be other exercises marked as easy that might not have stubs, so it might be worth to also double-check those.

About other tracks…I don’t know the state of stubs in other tracks other than the Go track, which has them. Also note the inclusion of stubs is something that each track can decide independently, some tracks might decide to not include them on purpose. If you are thinking on contributing a similar change to other tracks, please confirm the stance of each track on including stubs before proceeding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add stubs for all exercises · Issue #238 · exercism/discussions
I propose making stubs a requirement on all exercises on all tracks. My reasons are: Consistency: A few drive for me is to...
Read more >
Exercise 4 - Generate Stubs for Missing or Undefined Functions
Open the Execution> General tab on the new user-defined configuration and confirm that the Test execution flow field is set to Generate stubs....
Read more >
Stubs in Hint pages - Contributors - The freeCodeCamp Forum
I've noticed that a number of hint pages for exercises have “This is a stub ... It didn't explicitly get marked as locked,...
Read more >
Active data and exercises | Android Developers
With ExerciseClient , your app can control when an exercise is in progress, add exercise goals, and get updates about the exercise state...
Read more >
Common Abbreviations & Acronyms Used In Workers ...
ADA. Americans with Disabilities Act. AME. Agreed Medical Exam. (Injured worker has an attorney; all parties have to agree on evaluation).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found