r/scalastudygroup • • Oct 13 '15

Week 1 Day 2: Variables, Functions & Literals

9 Upvotes

r/scalastudygroup • • Oct 12 '15

Week 1 Day 1: Introduction to Scala

9 Upvotes

What is Scala and Why scala?

Why should I learn Scala?(Blog)

What is the purpose of Scala?(Stackoverflow)

Why Scala?(Blog)

Scala or Java? Exploring myths and facts(Blog)

Oops.add(functional)

Object-Oriented Meets Functional(Slide)

Scala as a Functional OO Hybrid(Blog)

Scala and JVM

The best thing about Java is not the language but the JVM. A JVM is a fine piece of machinery, and the Hotspot team has done a good job in improving its performance over the years. Being a JVM language, Scala integrates well with Java and its ecosystem, including tools, libraries, and IDEs. Now most of the IDEs ship with the Scala plug-in so that you can build, run, and test Scala applications inside the IDE. To use Scala you don’t have to get rid of all the investments you’ve made in Java so far. Instead you can reuse them and keep your ROI coming.

Scala compiles to Java byte code, and at the byte-code level you can’t distinguish between Java code and Scala code. They’re the same. You could use the Java class file disassembler javap to disassemble Scala byte code as you could for Java classes.

Another advantage of running Scala on a JVM is that it can harness all the benefits of JVM-like performance and stability out of the box. And being a statically typed language, Scala programs run as fast as Java programs.

extract from Scala In Action

Installation

Scala Environment Setup(Tutorial)

REPL(Read-Evaluate-Print Loop)

Scala Interactive Interpreter(Blog: Check the REPL segment)

12 Things, Part 1: The Scala REPL

Ammonite: Scala REPL alternative(github)


r/scalastudygroup • • Oct 07 '15

Topics for Week 1

9 Upvotes

Hi everyone,

After going through a lot of reading materials I have collected, I have narrowed the topics that we can learn for the first week. For the people who are already halfway into learning scala, these may be redundant but you can help us by sharing things that we might have missed.

Following the topics

Day 1 - Introduction(I hate it too, but has to be done)

  • What is Scala

  • Why scala

  • Oops.add(functional)

  • Scala and JVM

  • Installation

  • REPL

Day 2 - Variables, Functions & Literals

  • var vs val

  • Function definition

  • Named parameters

  • Anonymous functions

  • Literals

Day 3 - List, Tuple & Array

Day 4 - Control Structures

  • If

  • While

  • For

  • Foreach

Day 5 - Pattern Matching

  • A Simple Match

  • Matching on Type

  • Matching on Sequences

  • Matching on Tuples (and Guards)

  • Matching on Case Classes

  • Matching on Regular Expressions

  • Binding Nested Variables in Case Clauses

Day 6 - Class & Object

  • Constructors

  • Abstract Classes

  • Nested Classes

  • Objects and companion objects

Day 7 - Case Class

If you think, I have not covered any topic, please let me know in the comments I'll add them here or will add them in the following weeks.

Suggestions are most welcome.


r/scalastudygroup • • Oct 06 '15

println("hello world!")

9 Upvotes

Hello Everyone,

I have created this subreddit to help us learn scala as group and at the same time capture whatever we are doing, so that it can helpful to others who are joining us later.

I am thinking of creating a plan for us to move forward. Later this day, I'll list down all the topics that we will be covering in the following weeks. Everyday, I will create a post with a topic from the list and few links which explains the topic in detail. Anyone can post more links to the same post as comments. We can also use the comments for clarifying our doubts.

During weekends, I'll add a couple of extra posts as assignment for us to get our hands dirty with the topics that were covered during the week.

Towards the end, lets do a project(or a few) as a group to cement our knowledge base and give back to the scala community.

Meanwhile, I'll interact with the moderators of /r/scala and will try to get a couple of scala experts to oversee things around here and help us with our doubts and clarifications.

Please introduce yourself in the comments(atleast languages known, timezone) and feel free to throw in suggestions.


r/scalastudygroup • • Sep 06 '21

Scala For Beginners - Crash Course - Part 4

Thumbnail
blog.codekaro.info
7 Upvotes

r/scalastudygroup • • Jan 23 '18

Top 15 Scala Libraries for Data Science in 2018

Thumbnail
activewizards.com
6 Upvotes

r/scalastudygroup • • Oct 19 '15

Week 1 Day 7: Case classes

6 Upvotes

r/scalastudygroup • • Jul 04 '20

First scala backend project

5 Upvotes

I think I learned Scala well, so I want to create any backend (and maybe complete service with frontend later) to test my skills and learn more. Do you have any good ideas about the topic of the project? Like a messenger (it's my first thought). I already have some experience in backend development using Django REST Framework (2 test tasks and 1 internship), so I'm not a complete newbie in web development


r/scalastudygroup • • Apr 04 '16

Self-made lecture notes on Twitter Scala school (Lesson - 1)

Thumbnail
github.com
5 Upvotes

r/scalastudygroup • • Oct 18 '15

Week 1 Day 6: Class & Object

5 Upvotes

r/scalastudygroup • • Oct 14 '15

Week 1 Day 3: List, Tuple & Array

5 Upvotes

r/scalastudygroup • • Sep 14 '21

Scala Vs Python Syntax Cheat Sheet

Thumbnail
blog.codekaro.info
4 Upvotes

r/scalastudygroup • • Sep 13 '21

Scala For Beginners - Crash Course - Part 5

Thumbnail
blog.codekaro.info
4 Upvotes

r/scalastudygroup • • Sep 02 '21

My Scala Notes - Scala For Beginners - Crash Course - Part 3

4 Upvotes

My notes from 3 months back when I started learning scala on functional programming.

https://blog.codekaro.info/scala-for-beginners-crash-course-part-3


r/scalastudygroup • • Sep 12 '20

Learning Scala as first programming language?

4 Upvotes

A couple of weeks ago I started learning Java as part of a post graduate course and got really into programming, I'm very motivated. Is a very entry level course and as it's about to end I started digging around some other learning resources to enroll and stumbled into a Scala course at MOOC.
I never heard of Scala before and after reading some stuff I'm thinking that maybe Scala would be a better option to go into instead of focusing on Java, but I'm not sure.

So... Would you recommend learning Scala instead of Java? Or maybe I could do both in parallel?

Some background : I have a degree in graphic design and come from a third world country and would like to make a living of programming and UI design in the future.


r/scalastudygroup • • Aug 04 '20

Scala String Interpolation.

4 Upvotes

Checkout my blog on Scala String Interpolation.
https://thecodersstop.com/scala/scala-string-interpolation/


r/scalastudygroup • • Jan 05 '17

Best place to learn scala for spark

4 Upvotes

I've been messing about with scala learning some of the basics. I'd like to now learn about how to use scala in spark. Any tips or links to tutorials?


r/scalastudygroup • • Apr 14 '16

Dependency injection in Play Framework using Scala

Thumbnail
schibsted.pl
4 Upvotes

r/scalastudygroup • • Oct 17 '15

Week 1 Day 5: Pattern Matching

4 Upvotes

r/scalastudygroup • • Oct 15 '15

Week 1 Day 4: Control Structures

4 Upvotes

The topics today are pretty straight forward. Anyone with basic programming language knowledge might already know most of it. The standout among these is the For loop.

If

Scala if then else syntax

While

While & Do While

For

Scala: For loop version 2.0

How does yield work?

Scala "<-" for comprehension

Foreach

The foreach method takes a function as an argument. The function you define should take an element as an input parameter, and should not return anything. The input parameter type should match the type stored in the collection. As foreach executes, it passes one element at a time from the collection to your function until it reaches the last element in the collection.

The foreach method applies your function to each element of the collection, but it doesn’t return a value. Because it doesn’t return anything, it’s said that it’s used for its "side effect."

As an example, a common use of foreach is to output information:

scala> val x = Vector(1, 2, 3)

x: scala.collection.immutable.Vector[Int] = Vector(1, 2, 3)

scala> x.foreach((i: Int) => println(i))

1

2

3

That’s the longhand way of writing that code. For most expressions, Scala can infer the type, so specifying i: Int isn’t necessary:

args.foreach(i => println(i))

You can further shorten this expression by using the ubiquitous underscore wildcard character instead of using a temporary variable:

args.foreach(println(_))

In a situation like this, where a function literal consists of one statement that takes a single argument, it can be condensed to this form:

args.foreach(println)

For a simple case like this, the syntax in the last example is typically used.

Extract from Scala cookbook


r/scalastudygroup • • Dec 03 '20

My Hakyll Blog - Polymorphic Effects in Scala

Thumbnail timwspence.github.io
3 Upvotes

r/scalastudygroup • • Jun 29 '20

FP for Sceptics: Option Type in Practice

Thumbnail
last-ent.com
3 Upvotes

r/scalastudygroup • • May 25 '20

ADTs in Practice. How to model a Web API using Algebraic Data Types

Thumbnail
last-ent.com
3 Upvotes

r/scalastudygroup • • May 25 '20

Why You Should Learn Scala in 2020?

3 Upvotes

r/scalastudygroup • • Mar 25 '20

Find a course buddy during quarantine!

3 Upvotes

Hi! One of the best things you can do during quarantine is learning a new framework, programming language or something entirely different.

But doing these courses feels kinda lonely and often you just stop doing them so I thought I’d create a site where you can find buddies to do the same course with (frankly this quarantine is becoming really boring).

The idea is that you talk regularly about your progress and problems you're facing so you can learn and grow together.

If you’re interested, take a look at Cuddy and sign up for the newsletter!

If enough people sign up I’ll be happy to implement the whole thing this week.

Also if you've got questions or feature ideas please do let me know in the comments! :)

Let's destroy this virus together and take it as an opportunity to get better at what we love!