Skip to content

Lesson Updates #8

@BrandonArmand

Description

@BrandonArmand

lessons.

  • Introduction
    • Basic description
    • Default Code
  • BST Insertion
    • Lesson
    • Default Code
    • Tests
  • BST Search
    • Lesson
    • Default Code
    • Tests
  • BST Depth First Search
    • Lesson
    • Default Code
    • Tests
  • BST Breadth First Search
    • Lesson
    • Default Code
    • Tests
  • BST Get Depth
    • Lesson
    • Default Code
    • Tests
  • BST Check Balance
    • Lesson
    • Default Code
    • Tests

More will be added. If you have a lesson idea that is not on here yet, you are welcome to add it.

Who can help

Anyone. If you think you can contribute to the development on a lesson, go ahead.

How do I build a lesson?

Each lesson should clearly describe the chapter's method through pseudo-code with thorough explanations on how and why every step is happening. It should be possible for a new developer to dive in and build the method using nothing but the lesson's explanation.

There is a very precise structure for creating a lesson.

Binari\src\views\Playground\chapters is where every lesson is laid out.

..\one
....\defaultCode.js
....\index.js
....\lesson.js
..\zero
....\defaultCode.js
....\index.js
....\lesson.js
..\index.js

Every chapter will have have it's own folder, and get referenced in index.js

import zero from './zero'
import one from './one'

export default [
    zero,
    one
]

lesson.js will be rendered in markdown
defaultCode.js will be wrapped in a string
index.js will reference these files.

When a new folder is added to Binari\src\views\Playground\chapters\index.js, it will automatically get added to the directory in the playground through this code.

This will not needed to be changed to add a lesson.

import chapter from './chapters'
const [page, setPage] = useState(0);
const [currentCode, setCode] = useState(beautify(chapter[page].defaultCode));
...
{chapter.map((el,i)=> <tr onClick={()=>changePage(i)} style={{background: page === i && "#222"}}><td>{i}</td><td>{el.name}</td></tr>)}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions