Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review the current interface of the SDK #106

Open
lsaether opened this issue Jun 28, 2021 · 1 comment
Open

Review the current interface of the SDK #106

lsaether opened this issue Jun 28, 2021 · 1 comment
Assignees

Comments

@lsaether
Copy link
Member

Please review the current interface of the SDK and think about the following questions:

  1. Does the current interface make intuitive sense from a developer-user point of view?

  2. Can the interface be improved? If so, how?

@saboonikhil
Copy link
Member

saboonikhil commented Jun 30, 2021

The purpose of the SDK lies in providing better interaction with zeitgeist.pm using minimalist possible clean functions. The current interface has four modules - models, storage, types and util.

I realise that my views slowly became clearer over time. Or if I put, one can divide the intuition based on the two types of users namely beginner and intermediate. Accordingly, I have summarised below points when I was trying to run createScalarMarket and reading the overall code.

As a beginner, when one reads the code for the first time without understanding the usage:

  • Proper comments at each significant process and
  • Documentation will improve the knowledge transfer.

And as an intermediate, when things slowly start making sense:

  • Breaking big functions into sub-functions
  • Better console logging
  • Better error visibility will enhance the working with the code.

Answering the questions:

  1. The current interface doesn't make intuitive sense when one looks at it for first few days.
  2. It can be improved using above mentioned points which will enable better management of interface as it grows in size over time. Segregation and connected functionalities is the key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants