Git Product home page Git Product logo

curriculum's Introduction

DockYard Academy

The DockYard Academy curriculum is an open source Elixir curriculum built with Livebook. We're proud to offer our open-source curriculum free of charge for anyone to learn from at their own pace.

We also offer a paid course where you can learn from an instructor alongside a cohort of your peers. Applications will be accepted soon.

Email the instructor Brooklin at [email protected] or direct message @BrooklinJMyers on Twitter if you would like more information.

Prerequisites

While we strongly recommend the Visual Studio Code editor for its LiveShare capability, you may use any code editor you prefer.

This course is intended to be approachable to students with no computer science background.

Getting Started

Download and extract the Latest Release source code zip file.

Open the extracted curriculum folder in Livebook and open the start.livemd file to see all project lessons and exercises.

Optionally Create a GitHub Repository and follow the instructions on GitHub to manage your downloaded curriculum with Git and GitHub.

See the Troubleshooting Guide if you encounter issues setting up the curriculum.

Course Outcome

Our program is designed to produce highly qualified Elixir developers. Upon completion, students will possess a thorough understanding of Elixir fundamentals, project development using Elixir and Phoenix, LiveView, and OTP. They will have the expertise and problem-solving skills necessary to tackle complex coding challenges and continue to grow and excel in their careers. Graduates will be well-equipped to deliver idiomatic and well-tested features to production codebases.

Curriculum Outline

See start.livemd for a full breakdown of our lessons and exercises.

Elixir Fundamentals

  • Prerequisites
  • Course Tools
  • Basics
  • Data Structures And Intro To Pattern Matching
  • Control Flow And Abstraction
  • Modules And Structs
  • Enumeration
  • Built-in Modules
  • Comprehensions And Non-Enumerable Data Types
  • Reduce
  • Dates And Time
  • String Manipulation
  • Recursion

Mix Projects

  • Elixir Build Tooling
  • Testing With ExUnit
  • Documentation And Static Analysis
  • Executables

Advanced Syntax

  • Advanced Pattern Matching
  • Guarding
  • Protocols
  • Persistence Using The File System

OTP

  • Processes
  • GenServers
  • Testing GenServers
  • Supervisor Basics And Fault Tolerance
  • Concurrency With Tasks

Phoenix

  • HTML And CSS
  • APIs
  • Relational Databases
  • Phoenix
  • Group Project Blog
  • Phoenix And Ecto
  • Testing Phoenix
  • Phoenix Forms And Components
  • Phoenix And Ecto One-to-Many Associations
  • Phoenix Authentication
  • Phoenix And Ecto Many-to-Many Relationships
  • Phoenix And Ecto One-to-One Relationships
  • Tailwind
  • Deployment
  • Custom Feature
  • Group Project Presentation

Capstone Project Preparation

  • Capstone Project

LiveView

  • LiveView
  • LiveView And Ecto
  • LiveView Authentication
  • LiveView Image Uploads
  • PubSub
  • LiveView JS Interoperability And Pagination
  • Scheduling And Emailing With Swoosh And Oban

Bonus Topics

  • Performance Optimization
  • Benchmarking And Performance
  • Ecto Changesets
  • State Management With Agents And ETS
  • Metaprogramming
  • Queues
  • Worker Pools
  • Rubix Cube Project

curriculum's People

Contributors

aayushmau5 avatar aryanlath avatar belgoros avatar bigspaces avatar brooklinjazz avatar byronsalty avatar czrpb avatar devloglogan avatar drueck avatar enjoyneeringdev avatar houhoulis avatar iciacarrobarallobre avatar jmks avatar kianmeng avatar lgmfred avatar matt-humphrey avatar miguelbermudez avatar mraiih avatar mvkvc avatar nathanl avatar padmajs avatar pascalwengerter avatar paulo-valim avatar phaleth avatar rodneylab avatar srfowler avatar thegriffincircus avatar threetriangles avatar waranlogesh avatar zorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

curriculum's Issues

Add Raise Issue button from all livebooks

Similar to the Navigation feature now provided in all Livebooks I'd like to add a Raise Issue button so that beta testers and future
students can easily raise an issue.

image

Improve chapter navigation

At this moment in time, there is no way to get to instructions.md (the chapter list), navigate back and forth between chapters or jump to the top of the page (unless you expand sections). I have to hit the back button in my browser to get back to the contents page. Might be a local server limitation as not overly familiar with Livebook and how navigation works but good to let you know about.

Replace calls to Utils.feedback with the new Tested Cell

We need to replace all calls to Utils.feedback with the new smart cells.

There's the TestedCell which we can write tests directly in the livebook. See the Mad Libs exercise for an example.

image

There's also the ExerciseCell we can use to create custom smart cells. See madlib.ex and exercise.ex for an example. This has the added benefit of having the solution validated. However, it comes at the cost of creating a new smart cell (which could eventually be cumbersome in the Livebook Smart cell dropdown.)

Existing tests can be stolen and modified from feedback.ex. Some tests could use some work to produce simpler output for students to be able to read better.

Running Minor Issues List

Here's a running issues list of things I've found so far. Some of these may have already been fixed, but I plan on going through and fixing these via a PR in the near future, I just wanted to provide a location where it can be easily monitored.

  • Typo in calculate loading exercise, change "with" to "will". Previously on line 88 though this may not be the case anymore.
  • true OR ___ must evaluate to true. in boolean operators exercise challenge 3 this is being read (to me) as true OR ___ = false in the mermaid.js graphic.
  • Your Turn 2 in Learning/Maps, set the variable by default.
  • atom_maze does not exist in Exercises/Mazes, this is just due to the variable not being defined properly at the beginning. This should be a simple fix from string_maze to atom_maze in the variable name of the second line.
  • W1D4 calculate_force your turn should be mass * acceleration instead of mass * force.
  • W1D4 structs - missing example in functions as structs section.
  • W1D4 structs - secret_identity should be an atom in "Your Turn" description.
  • W1D4 rpg dialogue - consistency issue in :dagger and :daggers in RPG dialogue challenge. Should be consistent throughout document for readability and ease of implementation.

Additionally any of these fixes would make good first issues. I plan to tackle them when I have some spare time and add to the list, but anyone else is free to fix these as well. ๐Ÿ˜„

Provide better feedback when student solution crashes

When calling a student module for feedback, we currently show the crash. Instead, it would provide better feedback to the student to
attempt calling their module and show the input and the expected value if it crashes.

Rewrite `File` lesson to compensate for relative file path.

Describe the issue
Depending on where students run livebook from, or if they are using the Livebook Desktop Application, the File module may behave differently.

We need to verify this by starting livebook from a folder other than the curriculum folder with the File lesson.

Expected behavior
The File lesson should be consistent regardless of the student's current directory. Either we need to make a consistent relative File path (harder) or rewrite the exercise to be agnostic of the current directory (easier).

Expanding Navigation

A couple of ideas to expand the navigation section of each lesson and exercise:

  1. Adding a next lesson button to each livemd lesson to allow students to organically move from lesson to lesson in curriculum order without the need to return to the start.livemd file.

  2. Adding a "related exercises" button to lessons and "related lessons" button to exercises, allowing easier navigation between lessons and exercises.

Add/Fix History Section in IEx Reading

The History Section of the IEx reading was not working correctly.

History

You can retrieve previously run commands in the IEx shell by pressing the Up and Down arrow keys.

Each IEx session stores its history but not the history of previous IEx sessions.

If you would like to preserve history between IEx sessions, you can run the iex command
with the --erl flag.

$ iex --erl "-kernel shell_history enabled"

Alternatively, refer to the Shell History documentation
to enable shell_history for your whole system.

It needs to be redone.

Comparison operator form exercise at the end does not return results after evaluation

Overview

When evaluating the comparison operator form in the 'Comparison Operators' chapter, after completing it and reevaluating, there is no output to confirm what you entered was correct or not (true or false).

comparison_operator_form

Recreation steps

  1. On the code block, select 'Evaluate' to open the form (that's not immediately obvious by the way).
  2. Enter the operators into the form fields and once completed, select 'Reevaluate'.

Behaviour

Confirm there is no output to verify what you entered was correct.

Expected behaviour

There should be output to verify what you entered was correct.

Fix formatting keybinds in the 1. Course tools / livebook

image
In the 1. Course Tools / Livebook part there's an instruction that indicates that the "Ctrl + Shift + I " keybinding is used to format the code in livebook, however this keybind will prompt the browser element inspector to open

Include Git Instructions in each lesson.

Ideally, students should regularly create pull requests for each day of material to develop familiarity with Git and GitHub.

The start of each day should include instructions on how to make a new branch.

$ git checkout -b week-1-day-1

Then each reading and exercise should include instructions on how to add, commit, and push changes.

Commit Changes

$ git add reading/command_line.livemd
$ git commit -m "complete command line reading"

At the end of the day, students should make a PR, and merge their changes.

  1. Make a pull request.
  2. Merge the pull request.
  3. Pull changes locally:
$ git push -u origin week-1-day-1
$ git checkout main
$ git pull

This may require changing the start.livemd to separate each day into its own .livemd file.

Integers/maths exercise does not return results after evaluation

Overview

Similar to the issue reported in #5 , the Integer forms do not appear to evaluate the values input by the learner even after choosing reevaluate.

integers_exercise

Similarly, when doing the arithmetic exercises, there is no confirmation of what the answer should be, so it's hard to verify what you did was correct or not (without doing the maths yourself ๐Ÿ™‚). I think that seeing the answer you expect to return would help you figure out the right way to do the work. For example, if you had to do 10 divided by 3 and the answer expected was 3.3333333333333335, then you know you need to do 10 / 3 as opposed to div(10, 3) because the latter does not result in a floating point number. Helps cement the learning, unless I'm misinterpreting it?

Recreation steps

  1. On the code block, select 'Evaluate' to open the form.
  2. Enter a value into the form field and once completed, select 'Reevaluate'.

Behaviour

Confirm there is no output to verify what you entered was correct.

Expected behaviour

There should be output to verify what you entered was correct.

Utils.animate/1 never stops running in Livebook

Describe the issue
Code cells using Utils.animate/1 in Livebook never stop computing.

Reproduction Steps (If Applicable)
Steps to reproduce the behavior:

  1. Go to 'Arithmetic' section of curriculum in Livebook
  2. Scroll down to 'Integers'
  3. In the "Your Turn" section, click 'Evaluate' for the code cell (Utils.animate(:biggest_integer)
  4. Watch as the numbers start increasing and never stop

Expected behavior
Utils.animate/1 can/does stop at some point.

Possible solutions:

  • Utils.stop_animate/1
  • allow toggling animate on/off with evaluate and stop evaluate buttons?
  • ???

Screenshots
See it here: https://www.loom.com/share/5e528da9f48a44339d26fc91f34a6c63

Screen Shot 2022-07-29 at 4 26 12 PM

Utils.feedback(:boolean_diagram3, answer) returns false when the diagram looks for true

Stack trace:

 1) test boolean_diagram3 (:boolean_diagram3)
     utils/lib/feedback.ex:237
     Assertion with == failed
     code:  assert answer == false
     left:  true
     right: false
     stacktrace:
       utils/lib/feedback.ex:239: (test)

I don't believe there's a way to get the diagram to false either way. When I interpret the top-left portion as true or true that evaluates to true. It's like true or evaluates to true no matter what, only an and would get us into falsey territory.

This screenshot should illustrate this a little better:
Screen Shot 2022-04-14 at 7 07 36 PM

Livebook server not starting [Windows] (not WSL2)

Describe the issue
When livebook server start.livemd is called Livebook could not start distributed node.

Note: This is a Livebook known issue (196, 194, 1042) that happens when some erlang files don't show a dialog for its firewall approval on the first Livebook execution after being installed.

As there is no windows version for asdf, my tools setup was done with Chocolately and NVM.

Solution proposal
Add a Windows-specific solution for this behavior on documentation:

  • Before calling Livebook, execute on terminal iex --sname test
  • On appearing Windows firewall dialog, approve permission for epmd.exe
  • Both erl.exe and epmd.exe should appear on firewall-allowed apps

Environment
OS: Windows 11
Erlang/OTP: 24 [erts-12.0]
Elixir 1.13.3 (compiled with Erlang/OTP 22)

Reproduction Steps (If Applicable)
Steps to reproduce the behavior:

  1. Oen command line (CMD/PowerShell)
  2. From the beta_curriculum project folder execute livebook server start.livemd

Expected behavior
Curriculum Liveboook server should start and load the curriculum.

Actual behavior
Curriculum Liveboook is not started.

Screenshots/Logs

C:\Users\Oct\Elixir\DockYard-Academy\beta_curriculum>livebook server start.livemd

ERROR!!! [Livebook] Could not start distributed node: {{:shutdown, {:failed_to_start_child, :net_kernel, {:EXIT, :nodistribution}}}, {:child, :undefined, :net_sup_dynamic, {:erl_distribution, :start_link, [[:livebook_7isuoce5, :shortnames, 15000], false, :net_sup_dynamic]}, :permanent, false, 1000, :supervisor, [:erl_distribution]}}

Replace calls to Utils with the HiddenCell smart cell.

Anytime we make calls to the Utils library, we can instead make a hidden cell.

For example, the following in binary_search.livemd.

Utils.graph(:binary_search)

Could be replaced with a HiddenCell smart cell with the following content.

size = 600

widget =
  VegaLite.new(width: size, height: size)
  |> VegaLite.mark(:line)
  |> VegaLite.encode_field(:x, "number of elements", type: :quantitative)
  |> VegaLite.encode_field(:y, "time", type: :quantitative)
  |> VegaLite.transform(groupby: ["color"], extent: [2500, 6500])
  |> VegaLite.encode_field(:color, "type", title: "Big O Notation", type: :nominal)
  |> Kino.VegaLite.new()

init = 1
max = 500

logn = for n <- init..max, do: %{"number of elements": n, time: :math.log2(n), type: "log(n)"}

Kino.VegaLite.push_many(widget, logn)
widget

Smart cell editors are controlled by the :display_editors flag in Utils/lib/flag.ex.

defmodule Flags do
  @flags %{
    # Display Teacher-only editors in smart cells. Students should not see these editors when we launch.
    display_editors: false
  }

  def get(key) do
    @flags[key]
  end
end

Enable the flag to view the hidden cell editor. Ensure you do not commit this change as students should not see the editor.

Re-theme the Item Search exercise

After walking through the item_search.livemd exercise with a beta tester, we realized it would be more understandable if the exercise were re-themed to books instead of fantasy items.

  • re-theme to use books instead of fantasy items
  • potentially include step or suggestion to make a matches_filters(item, filters) function.
  • improve tests to be more understandable
  • improve the clarity of inclusive vs. exclusive search.
  • perhaps include runnable input/output examples below the exercise.

inconsistencies in family tree exercise guide

The guide says map will start as a person with a :name, :age, : status and :parents keys but there seems to be mistake later down on the fourth point where it describes as children and also its own keys.
image

Fix FontAwesome setup in Home Page exercise

The instructions for installing FontAwesome are incorrect in exercises/home_page.livemd.

<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">

We need to either use a different icon library or add the correct FontAwesome instructions.

Write a test to ensure to instances of "TestedCell.Control.show_editors" are found.

We don't want to accidentally commit calls to TestedCell.Control.show_editors that enable teacher-only SmartCell editors.

We need to write a "Teacher-only editors are hidden" ExUnit test in the Utils project. The test should:

  • Be in the utils_test.exs file.
  • Read all files ending in .livemd in the /exercises and ./reading folders.
  • Ensure the string "TestedCell.Control.show_editors()" is not found in each file.

Some considerations:

  • Don't load every file into memory. One file at a time is fine. Streaming files line by line is even better for avoiding memory issues.
  • You can use File to list files in the desired directories, read the contents of the file,
  • You can use String or Regex to check the contents of a string, and replace values in a string.

Comment on this issue if you are interested, and I'm happy to provide more direction.

Create "Up Next" sections in each .livemd file.

By reading the start.livemd file using the File module we can determine the order of reading material and exercises.

Once we have the expected order of reading material we could either

  1. write a script that automatically adds an "Up Next" section to each .lvemd file.
  2. manually add the "Up Next" section to each .livemd file and create a test to ensure each .livemd file includes a link to the next .livemd file.

For example, here's the first day of the course in start.livemd.

1. Course Tools

We would expect reading/command_line.livemd to include the following "Up Next" section:

Up Next

It may be more challenging, but I'd prefer to write this as a script to make it easier to modify the "Up Next" sections. For example, we may want to include the previous .livemd file.

Fix Kino.YouTube URLs

Kino Lab is about to drop support for using the YouTube video Id directly in favor of using the full URL: jonatanklosko/kino_lab@450c02f

We will need to find all uses of Kino.YouTube and add https://www.youtube.com/watch?v= before the video id.

Create Missing Solutions

Several exercises are missing a solution causing tests to fail.

  def rollable_expressions do
  end

  def caesar_cypher do
  end

  def classified do
  end

  def phone_number_parsing do
  end

  def convert_phone do
  end

  def obfuscate_phone do
  end

  def email_validation do
  end

  def cypher do
  end

  def metric_measurements do
  end

  def money do
  end

  def rock_paper_scissors_pattern_matching do
  end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.