Skip to content

jyothsnayekkanti/women-who-code-scala-intro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Women Who Code Scala Intro

This is a short introduction to Scala for the Women Who Code meet up in Workday's Dublin office.

This introduction is based on the book Atomic Scala by Bruce Eckel and Dianne Marsh. The fist half of this book is available free online.

The Plan

  • We are going to setup a Scala development environment.
  • Then then we will explore basic Scala syntax in the REPL (Scala Shell).
  • Next we will look at classes and objects.
  • Before finishing looking at collections and functional programming.

Development Environment

To keep things simple I am going to use git, sbt and the atom editor for this introduction. There is also a docker image containing the code and a full command-line development environment.

Or just use a online Scala REPL

Online Scala REPL

There are a number of online Scala REPLs that will let you work through this code.

Java

Scala is a JVM language you will need to install the Java Development Kit to follow this tutorial. If installing this for the first time select version 8. You can also use version 7 if its installed already.

Git

The source code for this tutorial is available on github. Ensure that git is installed on you local machine, there are detailed instructions here.

Then to download the code use the following command line

git clone https://github.com/IainHull/women-who-code-scala-intro.git
cd women-who-code-scala-intro

TODO

If you cannot use Git you can download the source code for each step as a zip file here.

SBT

SBT is the Scala build tool once it install and configure our scala commandline environment.

Full details on how to download and install SBT are here. If you do not want to install SBT onto your system follow the manual instructions to download and run SBT from a temp directory.

Run SBT from the command-line, then in the SBT shell run compile and console. Console runs the Scala REPL. To exit the REPL type :quit. To exit the SBT shell type 'exit'

$ sbt

> compile

> test

> console

scala> :quit

> exit

Atom

I am using the Atom editor, its a friendly open source editor. You are free to use what ever IDE or editor you like.

Docker

Pull and run the women-who-code-scala-intro docker image. Be warned this image is about 800Mb, download this in advance.

docker pull iainhull/women-who-code-scala-intro
docker run -it iainhull/women-who-code-scala-intro

Now run sbt from the docker command-line.

# sbt

Tutorial

  1. Basics
  2. Case classes
  3. Collections

FAQ

Do I need to know Scala?

Absolutely not. Experience with any object oriented or functional language will do. I will introduce all the scala features as we use them.

How functional is this?

Using types for correctness is common functional technique, but it can just as easily be applied to object oriented code. The code we will be working on will be very simple, but time allowing we will explore more advanced functional concepts like type-classes.

What should I bring?

A laptop and a sense of adventure.

What tools will we use?

The source code we will hack on will be provided in a github repo.

License

All code and documentation is licensed under the Creative Commons Attribution 3.0 Unported License. See LICENSE.md for more information.

About

Short scala introduction for the Women Who Code meetup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%