Coder Social home page Coder Social logo

eescala's Issues

Swap the `Calculation` exercise for something else?

The principle of using types as constraints is good, but Calculation is a huge exercise for such a short course.

Possibly replace it by implementing an itemAt method on IntList, identifying the NullPointerException, and then resolving it with an Option-like type:

trait IntList {
  def itemAt(index: Int): ???
}

Need better example of method-that-takes-function-as-parameter

The andThen example in the code is a little complex -- people tend to have difficulty with the syntax for the later examples.

Probably need to add an example with simpler syntax, e.g. a method that accepts a function and returns something other than a function.

Need better examples of where to write pattern matching in code

There are two ways of implementing pattern matching solutions to many of the exercises in the slides:

  1. Put the match expression in a method in a companion object;
  2. Put the match expression in the super-trait.

We should have an explicit example of each before we start using them in solutions.

Add syntax crib sheets

There's a lot of syntax to take in over the duration of the course, and not enough time to properly reinforce it. A crib sheet may help alleviate this problem.

Rejig start - case classes first, objects later

The start is confusing and time consuming for such a short course. This order may work better:

  • introduce classes first, before objects:
    • provide a complete example with field definitions;
    • exercise 1 is cats as regular classes;
  • introduce case classes next:
    • exercise 2 is cats as regular classes;
  • introduce objects third:
    • possibly no example;
  • skip the bit about "classes abstract over objects" (perhaps mention in the part 1 summary);

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.