Giter Site home page Giter Site logo

fredrikappelros / coffee-adventure Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 828 KB

A Beginner's Guide to Programming in CoffeeScript

Home Page: https://fredrikappelros.github.io/coffee-adventure/

License: ISC License

CoffeeScript 68.89% Ruby 8.03% HTML 8.25% CSS 14.83%

coffee-adventure's Introduction

A Coffee Fueled Adventure

A Beginner's Guide to Programming in CoffeeScript

So, you want to learn how to code? Great! This tutorial aims to help you get the basics down. It's divided up into a bunch of chapters which teaches different core concepts of programming.

Within these chapters, besides a bunch of text, you will find small snippets of code. It's recommended that the reader not just read these, but actually copy them and run them interactively using the CoffeeScript REPL. This hands-on approach will allow the reader to get familiar with writing code. Eventually, the snippets will get more complex and you will want to move on to writing the code in separate files.

A text editor that works great for this is Atom, which incidentally is written in CoffeeScript itself. If Atom isn't your cup of coffee (okay, no more bad puns), you can take a look at the excellent Sublime Text editor. Or you can just use your own favorite text editor, if you already have one.

At the end of each chapter, there will sometimes be a few exercises for the reader to solve. Usually, these are also solved by using the REPL, or writing a small script, but in some cases they will require the reader to modify an existing application. These applications are constructed as examples of how several of the concepts taught in this tutorial can be used in concert to solve a particular problem, or just create a fun app.

Since these applications are often run in the browser, they cannot be started like the rest of the snippets and scripts in this tutorial. To aid with this, each application has been equipped with a fully automated build environment using gulp. This means that all you need to do is run the gulp command and let gulp do all the hard work for you.

Before you start the tutorial you will want to follow the installation instructions found below to get everything set up.

Chapters

  1. Types
  2. Operations
  3. Variables
  4. Functions
  5. Conditionals
  6. Data structures
  7. Loops
  8. Classes
  9. Errors
  10. More operations

Fun fact: Since the chapters are written as literate CoffeeScript files, you can actually run them! You can try it out with the following shell command:

coffee chapters/03-functions.litcoffee

Installation

First of all, Node.js needs to be installed. You can find installation instructions on the Node.js website. Then, install CoffeeScript, Bower and gulp globally, with the following shell command:

npm install -g coffee-script bower gulp

Next up, we need to grab a few submodules:

git submodule update --init

Each submodule uses npm and Bower to track their dependencies. You can install them all at once using this command:

git submodule foreach 'npm install && bower install'

Tip: If you need some more help with the installation; check out the wiki!

coffee-adventure's People

Contributors

fredrikappelros avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.