iotaledger/iota-sdk

Make sure examples are consistent between languages

Closed this issue · 3 comments

Description

We should make sure we have the same examples for all languages and also that the have a similar structure. This makes it easier to use the same docs for the same example and also makes sure we try to support all languages equivalently. It may even help with DX as we can easily see if some examples are too verbous.

TODOs

Are you planning to do it yourself in a pull request?

No.

I created separate issues for all examples that need fixing.
Ideally, in one how-to section, we would always just explain one single task. Only the bare minimum in it. We could even just show the needed lines. But as a client for example is needed for certain examples to work, we might come up with a solution to only extract certain lines from an example. That way, examples still work, but the how-tos only contain the specific code lines.

Also, some examples contain too much code imo which could be split.
So my suggestion/plan would be:

  • Make sure all examples in all bindings describe the same features.
  • Remove unneeded secret managers and so on. Expect that the user already has the needed output IDs or a funded address and so on.
  • Add notes to the how-tos for requirements? So we could say for this you need an address, you can find a how-to for that here. Maybe @lucas-tortora could help here? We can also just add that to the PR once you fixed a certain example, and we are in the review state.
  • Once those PRs are merged, it's easy to split them up if needed, as all the info in all languages is available. We could then sort and group the how-tos accordingly similar as it was done in the wallet.rs docs

Can you add the children issues as bullet points in the description so we have an overview of what has been done please?

Sure thing