Skip to content

SrivatsaAdarsh/get-programming-with-scala

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

141 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Programming with Scala

Code, exercises, and answers for the book Get Programming with Scala.

Lessons are grouped per unit. Each lesson is a standalone SBT project and it has the following three packages: listings, quickchecks, trythis.

Have a look at the Table of Contents for links to all the available lessons.

Installation Requirements

Make sure the following tools are installed:

  • JDK 8+
  • SBT

Running the Code

Code Snippets (Scala Worksheets)

Some lessons are simple snippets (files with extension *.sc) also called Scala Worksheets. They can be interpreted interactively from the REPL by IDEs with dedicated Scala support, such as IntelliJ IDEA and ScalaIDE.

If you a using a text editor or your IDE doesn't support Scala Worksheets, start the REPL from SBT:

sbt console

and evaluate the file as follows:

> :load /path/to/file.sc

Executable SBT Programs

Some lessons are fully fleshed-out programs (files with extension *.scala): in order to run them, they need to be compiled. First, navigate to the folder of the lesson you are interested in.

Suppose you want to review the code for lesson 8:

cd unit1/lesson8

Start SBT:

sbt

Compile and run the code:

> run

If a lecture isn't an executable program, please see section on running Scala Worksheets.

Table of Contents

  • UNIT 0: HELLO SCALA!

  • UNIT 1: THE BASICS

    • LESSON 4: Values and Variables
    • LESSON 5: Conditional Statements and Loops
    • LESSON 6: Function as the most fundamental block of code
    • LESSON 7: Classes as a representation of our world
    • LESSON 8: CAPSTONE 1
  • UNIT 2: OBJECT-ORIENTED FUNDAMENTALS

  • UNIT 3: HTTP SERVICE

  • UNIT 4: IMMUTABLE DATA AND STRUCTURES

  • UNIT 5: LIST

  • UNIT 6: ERROR HANDLING AND DATA STORAGE

    • LESSON 34: Set
    • LESSON 35: Map
    • LESSON 36: Either
    • LESSON 37: Try: an operation that can fail
    • LESSON 38: Working with Try
    • LESSON 39: Database queries with quill
    • LESSON 40: CAPSTONE 6
  • UNIT 7: CONCURRENCY

    • LESSON 41: Future
    • LESSON 42: Working with Future: map and flatMap
    • LESSON 43: Working with Future: for-comprehension
    • LESSON 44: Future and Promise
    • LESSON 45: CAPSTONE 7
  • UNIT 8: JSON (DE)SERIALIZATION

    • LESSON 46: Traits as composable block of codes
    • LESSON 47: Lazy values
    • LESSON 48: By Name Parameters
    • LESSON 49: Implicit functions and values
    • LESSON 50: The IO type
    • LESSON 51: JSON (De)serialization with circe
    • LESSON 52: CAPSTONE 8

About

Code for the book "Get Programming with Scala" (Manning)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Scala 98.9%
  • SuperCollider 1.1%