Giter Club home page Giter Club logo

coconut-tutorial's Introduction

Coconut Tutorial

Coconut is a functional programming language written to expand and improve the styling of modern functional programming techniques in Python. This project is the development site for the new tutorial for the Coconut language.

Coconut Language: http://coconut-lang.org/

Contributors: Thomas Dickstein, Nma Mbeledogu, Maya Minier, Anthony Seto, and Parnika Sharma

Live Tutorial Links

The official Coconut tutorial can be found here.

The most recent version of the new Coconut tutorial can be found here.

Architecture

The Coconut tutorial uses simple HTML pages for the written tutorial, formatted through CSS and Javascript. Individual HTML pages were chosen over a styling tool such Sphinx for the ability to fine-tune pages inherent in custom HTML. The embedded interpreter and Gitter chatroom are implemented through Javascript:

Architecture

Prerequisites

  • Git
  • Node, a server environment allowing the website to run the interpreter
  • live-server, an http server to host the website in a local website that automatically updates based on changes made to the code

Installation

Once you've installed the above prerequisites, type the following commands in the command line:

  1. git clone https://github.com/hmcfabfive/coconut-tutorial.git
  2. cd coconut-tutorial
  3. live-server

The command live-server should automatically open the website in your web browser.

Functionality

Rewritten tutorial steps

The Coconut tutorial content was rewritten so first-time users would find it easy to understand. It is split up into different sections and pages that introduce the basics of Coconut to a user before jumping into more complex case studies. The tutorial content is also interactive.

Pagination

Show Solution Dropdowns

The Coconut tutorial contains show solution dropdowns. These are buttons that, when clicked, will reveal either the solution to a problem or a hint pertaining to the solution.

Show Solution Dropdowns

Menu

The menu page contains links to the main sections of the tutorial and other Coconut resources such as the Coconut Github page and the Coconut documentation.

Menu Page

Sidebar Navigation

The sidebar navigation can be revealed by clicking the tribar symbol in the upper left corner of the tutorial pages. It allows a user to see an overview of the Coconut tutorial on any page and easily move through the tutorial’s sections and pages as desired.

SideNav

Embedded Interpreter

The Coconut interpreter created by CS121 Team Panda is embedded into many of the tutorial pages.

Interpreter

Copying Code into the Interpreter

The tutorial contains automatic code loading functionality. Simply double-click on a code snippet, and it will be copied into the interpreter.

Gitter

Gitter is a chatroom service for Github users. Coconut has a Gitter chatroom that gives Coconut users a way to talk to Evan Hubinger, Coconut's creator, directly. The chatroom can be accessed by clicking the tab at the bottom right of the page.

Gitter

Branch Guide

master

The master branch contains the most recently updated files pertaining to the tutorial's web interface. These are the HTML files for the tutorial pages, the CSS styling files for the website and for functional elements of the tutorial, and the Javascript files that help run additional functionality in the tutorial website.

gh-pages

This branch is where the files for the live version of the new Coconut tutorial reside. It is similar to the master branch, however it is updated less often and only when major changes to the interface have been polished and finalized.

tutorials

This branch is devoted to the content of the tutorial. It contains Markdown files with final written versions of the tutorial content.

firstdrafts

This branch contains Markdown files with drafts of the written tutorial content. The tutorials in this branch are incomplete or in need of peer-review. Once these steps have been taken, the content is moved to the tutorials branch.

Issues

See Issues for more information.

Known Problems

  • Code snippets require double click to load instead of a single click

References and Acknowledgements

The embedded Coconut Interpreter is one of the most significant contributions to this project. It was created by CS 121 Team Panda. The link to the interpreter's project pages can be found here.

For more Coconut resources, see the following:
Coconut Github
Coconut Documentation
Coconut Gitter

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

coconut-tutorial's People

Contributors

nma-m avatar etsoh avatar tdicksteinpomona avatar minierm97 avatar psharma16 avatar thomasyoungson avatar

Stargazers

David C. Lambert avatar  avatar  avatar Vikram Kalabi avatar ShalokShalom avatar Evan Hubinger avatar  avatar

Watchers

James Cloos avatar Evan Hubinger avatar  avatar

coconut-tutorial's Issues

Interpreter vs Screenshots

Communicate with interpreter team to see if their system can be integrated into our tutorial system.

As a client, I would like to create a cohesive interpreter tutorial system so that the tutorial can feel more hands on for the new users.

Establish Tutorial Format

Interactive? Guided? Textbook-ish?

As a user, I need a comprehensive but approachable tutorial format so that I can learn the language and its benefits effectively.

Create Recursive Factorial tutorial pages

Create html pages for this section of the tutorial: add the content, link the pages together with the next and previous buttons, add link to the pages in the side navigation and front-page menu, etc.

Rewrite Tutorial Sections

--> to be split into individual sections for each assignee once sections are determined during group meeting.

Add Tutorial Examples

Things like "try writing a simple pipeline" --> follow formatting of beginner coding tutorial websites like Codecademy (i.e. in length and in style).

Create Lazy List tutorial pages

Create html pages for this section of the tutorial: add the content, link the pages together with the next and previous buttons, add link to the pages in the side navigation and front-page menu, etc.

Bottom bar on menu page

Very low priority, and dependent on menu page being finished. May not happen this sprint—is not part of MVP

Page with embedded interpreter - Zoom and header issue

Window magnifier - as you zoom out, content on the left half of the page doesn't extend all the way to the interpreter
The content should start below the hamburger; the hamburger shouldn't cover any text when you scroll down

Create Tutorial UML

As a developer, I need to create a general layout of the new tutorial so that I know what outline I need to follow.

Collect User Testing Feedback

A catch-all place for feedback collected during a user testing session, which can later be broken into separate issues.

Bugs

Main content and side nav icon doesn't move

Reviewer: Monica Acosta
Reproduction:

  1. Go to Iterator title page
  2. Click on side navigation icon

Code snippet indentation level

Reviewer: Grace Breckenridge
Repro steps: check all code snippets
Additional comments: We want indentation to be 4 spaces

Suggestions

  • Code snippet colors clashes with background color; make background plain, to do that make editor and output white, make background of text the background color of the editor
  • Text color in side nav the same as the background color of the editor
  • Next links on final section pages should go to next section; maybe pro
  • Font-weight on Next and Previous buttons to light, hard to read
  • Make tutorial solutions hidden
  • On each tutorial interpreter page, have a brief introduction to what the page wants to accomplish
  • "rather than add-ons.," typo
  • The Interpreter is called "Coconut Editor", but in the tutorial content we refer to the interpreter
  • Button that pastes sample code into interpreter input
  • Don't make assumptions in the wording (e.g. "This might be familiar")
  • Define "cookiebox" in iterator_p1 (perhaps by renaming x cookie box)
  • For pipeline_p2, list functions for people to try pipelines on
  • Home page not menu, but rather gives a description of Coconut and link to the menu page
  • Give direction to user on the home page so they know where they're going (e.g. "to start click next," "look in the side nav for tutorial")
  • Try rewriting iterator_p1 without a list iterator so that we won't get error
  • Don't close side nav when going to a new page
  • Page transition smoother so page reload is undetectable
  • In-line code snippets
  • Load previous code into next page's interpreter

suggestions

  • pipe operators have documentation on the tutorial, but it doesn't feel like there should be documentation, maybe use a different code block to denote (distinction between what to read/type in the interpereter)
  • recursive factorial intro, maybe explain why show the final product? Notice something interesting.

Create feedback form for Tutorial

As a developer, I need to have a set number of things to respond to and look out for as I go through the tutorial so that my group can easy reconcile all of our opinions.

Notify interpreter team about next() bug

Input:
x = iter(["chocolate chip", "oatmeal raisin", "sugar"])
x.next()

Output:
AttributeError: 'list_iterator' object has no attribute 'next'

We get the same error with generators (AttributeError: 'generator' object has no attribute 'next')

Create Pipeline tutorial pages

Create html pages for this section of the tutorial: add the content, link the pages together with the next and previous buttons, add link to the pages in the side navigation and front-page menu, etc.

Fix sidenav and content adjustment

Right now the sidenav is only moving content over if it has been split into the right and left sections. On the section title pages, when the page is not split, that is not working.

Deal with User Testing Feedback

  • Main content and side nav icon doesn't move
  • Go to Iterator title page
  • Click on side navigation icon
  • Code snippet indentation level
  • Repro steps: check all code snippets
  • Additional comments: We want indentation to be 4 spaces
  • Code snippet colors clashes with background color; make background plain, to do that make editor and output white, make background of text the background color of the editor
  • Text color in side nav the same as the background color of the editor
  • Next links on final section pages should go to next section; maybe pro
  • Font-weight on Next and Previous buttons to light, hard to read
  • Make tutorial solutions hidden
  • On each tutorial interpreter page, have a brief introduction to what the page wants to accomplish
  • "rather than add-ons.," typo
  • The Interpreter is called "Coconut Editor", but in the tutorial content we refer to the interpreter
  • Button that pastes sample code into interpreter input
  • Don't make assumptions in the wording (e.g. "This might be familiar")
  • Define "cookiebox" in iterator_p1 (perhaps by renaming x cookie box)
  • For pipeline_p2, list functions for people to try pipelines on
  • Home page not menu, but rather gives a description of Coconut and link to the menu page
  • Give direction to user on the home page so they know where they're going (e.g. "to start click next," "look in the side nav for tutorial")
  • Try rewriting iterator_p1 without a list iterator so that we won't get error
  • Don't close side nav when going to a new page
  • Page transition smoother so page reload is undetectable
  • In-line code snippets
  • Load previous code into next page's interpreter
  • suggestions
  • pipe operators have documentation on the tutorial, but it doesn't feel like there should be documentation, maybe use a different code block to denote (distinction between what to read/type in the interpereter)
  • recursive factorial intro, maybe explain why show the final product? Notice something interesting.

Create Case/Match/Else tutorial pages

Create html pages for this section of the tutorial: add the content, link the pages together with the next and previous buttons, add link to the pages in the side navigation and front-page menu, etc.

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.