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

Implement ICP improvement requests #16

Open
17 of 19 tasks
moritzfelipe opened this issue Jun 25, 2023 · 0 comments
Open
17 of 19 tasks

Implement ICP improvement requests #16

moritzfelipe opened this issue Jun 25, 2023 · 0 comments

Comments

@moritzfelipe
Copy link
Member

moritzfelipe commented Jun 25, 2023

We got feedback from ICP to update the course.

Update the hackmd and the boilerplate code:
https://hackmd.io/Kfx6JVOBSvWRlC3BHPH5Dg
dacadeorg/ICP-azle-boilerplate#1

Moritz will update the content on the website:
https://github.com/dacadeorg/dacade-course-data/tree/main/couse-data/azle-development-101

Feedback

  • #17

  • ic: Type used for creating an Internet Computer data structure. That's not what the ic object does, the ic object is an object that gives you access to many IC APIs

  • $query;
    export function getMessages(): Result<Vec, string> {
    return Result.Ok(messageStorage.values());
    }
    There's no reason that I can see to use a Result here
    Unless you're trying to do it for consistency with the other methods for some reason
    I'll repeat that everywhere else, I would only use Results if they need to be used
    $update these are not decorators, they are annotations

  • (MORITZ) In the description of the course on the homepage, TypeScript/JavaScript isn't mentioned anywhere - The learning objectives also don't mention anything about TypeScript, I wonder if they should

  • (MORITZ) Grammar - the grammar here seems a bit off
    After finishing the learning materials you will:
    Understanding the unique features of the ICP platform and how it differs from other blockchain platforms.
    should be "understand" instead, same for the other bullet points
    For example the learning objectives that @moritzfelipe already mentioned, but also here: https://staging-dacade.netlify.app/communities/icp/courses/icp-azle-development-101/learning-modules/44cce1fc-5415-4573-ab71-f50ba8b0eb8a
    "Get to know Internet Computer most important technical concepts." should be more like "Get to know the Internet Computer's most important technical concepts."
    Also its is possesive, it's is the contraction of it is
    "It's history, mission and unique functionality." should be "Its history, mission and unique functionality."
    "How Do Cansiters Work?" canisters is spelled incorrectly, I would suggest a thorough grammar and spelling review of the entire course

  • (MORITZ) It's not clear in the code examples where the dev should be putting them. Are they all supposed to go in the index.ts file? I would consider progressively adding to the code in each snippet (NOT SURE WE SHOULD DO THIS BUT MAKE MORE CLEAR WHAT CODE COMES NEXT)

  • (MORITZ) I would recommend putting the full final code first, and then break down each section (NOT SURE WE SHOULD DO THIS)

  • I don't think you need to be so specific as to tell people to right click on things and click New File
    I would strip as much of that away as possible and get to the code ASAP
    IMO devs learn very well from seeing simple code examples

  • In the node.js section I would not recommend the devs to download Node from the website: Node.js: Make sure you have Node.js (version 18 or higher) installed on your computer. This is necessary for running the DFINITY SDK and the project itself. If you don't have Node.js installed, you can download it from here. The point of nvm is to avoid the issues with doing that, and since it was mentioned that you would show the dev how to setup nvm, I wouldn't link to the node.js.org website
    That section should explain how to use nvm

  • "main": Specifies the entry point of our canister (src/index.ts), where we write our TypeScript code.
    main is not a property for Azle canisters in the dfx.json, that should just be removed
    "root" and "ts": Direct DFX to the src folder and src/index.ts file respectively for our code.
    This isn't for dfx, these are azle-specific properties

  • The package.json file shown is very complicated
    I suggest removing absolutely everything that's not necessary
    for example, @dfinity/agent and @dfinity/candid aren't used in the tutorial
    keywords, author, license, etc a lot of these things aren't necessarily needed and I think it makes the tutorial unnecessarily complicated and confusing for new devs

  • $query: Function enabling us to retrieve information from our canister. $query and $update are annotations that mark functions, they are not functions themselves

  • The tutorial doesn't use consistent casing
    For types
    type Message = Record<{
    id: string;
    title: string;
    body: string;
    attachmentURL: string;
    created_at: nat64;
    updated_at: Opt;
    }>
    attachmentURL and created_at don't use the same casing

  • I recommend using let instead of const as a convention indicating that the variable's value is mutable: const messageStorage = new StableBTreeMap<string, Message>(0, 44, 1024);

  • 2.9 Developing the Delete Message Function references updateMessage instead of deleteMessage
    I think 2.9 is supposed to be for updating a message

  • "Azle: Azle is a framework used for developing decentralized applications on ICP. It aids in writing, deploying, and interacting with canisters - the basic unit of computation on ICP."
    There's no mention of TypeScript here

  • Is the course open source? It would be great to have a liberal license like MIT/BSD

  • I would like to see a more prominent mention of Azle's beta status and a link to the disclaimer: https://demergent-labs.github.io/azle/azle.html#disclaimer . The What is Azle section is prety good, perhaps a link to the disclaimer in that section would work

  • In the final Discord link, I would suggest linking to the typescript channel where most of the Azle conversations happen

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

1 participant