How to start learning Scala?
Why Scala?
Whether you are interested in gaining some skills in a new language or you are already professionally coding and want to take your career one step further, Scala is an excellent choice.
It is perfect for introducing you to the exciting functional programming paradigm and community.
Scala Advantages
Scala joins functional programming and object-oriented programming into a powerful language. Scala’s complex features promote better coding and offer a performance increase.
Here are some reasons why I recommend Scala.
Object-Oriented and Functional Coding Paradigms
We can take advantage and benefit from the power of both paradigms. This is an easy-going way to transition compared with other purely functional languages.
I prefer a trend towards the paradigm and the beautiful world of functional programming.
Java Compatibility and Interoperability
Scala allows us to use the power of JVM like administrative tools, profiling, garbage collector to name a few.
Provide complete compatibility and interoperability with the most used and tested Java libraries to build enterprise applications.
Inherently Immutable Objects
Immutable objects are simply objects whose state cannot change after construction. It can sound simple but in a big application, having the control of object build and the security that other components don’t change our initialization, can be a great feature to avoid bugs and solve problems faster.
Scalability
We can use Scala to build powerful reactive, highly concurrent, fault-tolerant and distributed systems. Therefore, we can use the actor model of Akka, Monix, ZIO to name some among many.
Great for Data Analytics
Often, software engineers who want to become experts in these subjects(Big Data, Machine Learning). Scala can be a great choice for data analytics with support from tools like Apache Spark, among others.
Great Job Opportunities
Scala engineers with a business mindset are highly demanded profiles nowadays. Between the most common roles that the companies are looking for are: Backend Developers, Data Scientist, and Full Stack Developers.
The Scala Developers are in the list of the best paid in various countries in the world(StackOverflow Developers Survey 2019), this is a great point to keep in mind when we have to choose a professional career.
Learning curve
The learning curve with the Scala language depends a lot on each personal context but in general, when you adopt advanced features on functional programming it is usually high. This is why my intention is to encourage you to continue improving yourself and learning new features every day.
Everything will depend on your dedication. Here are some materials that were very helpful to me.
Improving your Scala coding skills
My recommendation to improve your coding skills with Scala is to read! Advanced books, articles and tutorials, etc. Do more courses online or on-site. Attend Scala conferences and meetups, such interaction can generate many quality discussions.
Dive into your local meetups lineup and the worldwide conference’s list.
Here, you have a list with a summary of different resources that can help you to learn a little bit more about Scala.
- Scala Programming Language with the official site features of Scala
- Scala Tour — the tour contains the most frequently used features of Scala.
- Scala coding exercises — an Open Source project by 47 Degrees for learning technologies based in the Scala.
- Typelevel Blogs — Typelevel is a great contributor to Scala.
- Functional Programming in Scala Specialization —Course taught by Martin Odersky
- Scala Best Practices — here Nicolas Rinaudo compiled a complete list of all best practices when he was learning Scala language.
- Functional Programming, Simplified — Alvin Alexander, writes about his problems trying to understand FP.
- Practical FP in Scala: A hands-on approach — Gabriel Volpe develops a purely functional application using the best libraries in the Cats ecosystem.
- Functional and reactive domain modeling book — Debasish Ghosh teaches you how to think about the domain model in terms of pure functions.
- Functional Programming Principles in Scala — by Martin Odersky the Scala creator. In this course, you will discover the elements of the functional programming style and learn how to apply them usefully in your daily programming tasks.
- Scala with Cats book — a book by Noel Welsh and Dave Gurnell is recommended for people who are looking to extend their developer skills with functional programming abstractions.
- Getting Func-ey — Matt Fournier writes a series of articles that explain advanced concepts of functional programming.
You will learn about Scala and the functional programming for sure if you get something out of the above list. And remember, the best way of learning programming is by practicing more programming.
Scala has a highly qualified and friendly community willing to discuss ideas and help new users. If you want to be up to date with all Scala news and content, you should add to your list the following mediums.
- Scala Times — A Weekly Scala Newspaper. Also, you can follow the account on Twitter.
- 47 Degrees — is a great contributor to Scala that publishes very interesting news about functional programming. Also, you can follow the account on Twitter.
- SoftwareMill Scala blog posts — is a great contributor to Scala and publish very interesting articles.
- Martin Odersky — Creator and lead designer of Scala.
Also, I recommend taking a look at the following Scala libraries
- Typelevel Projects — Cats, Cats-Effect, Shapeless
- Akka — Akka is the implementation of the Actor Model allow us to build powerful reactive, concurrent, and distributed applications more easily
- Http4s — Typeful, functional, streaming HTTP for Scala
- ZIO —A type-safe, composable library for async and concurrent programming in Scala
- Circe —A JSON library for Scala powered by Cats
- FS2 —Purely functional, effectful, resource-safe, concurrent streams for Scala
- Doobie —Functional JDBC layer for Scala.
- Monocle — Optics library for Scala
- Monix — Asynchronous Programming for Scala and Scala.js.
- Refined — Simple refinement types for Scala
- ScalaCheck — Property-based testing for Scala
- Finch — Scala combinator library for building Finagle HTTP services
- Hammock — Purely functional HTTP client
- PureConfig — A boilerplate-free library for loading configuration files
- Tapir — Typed API descriptions
- sttp —The Scala HTTP client
Conclusion
To end up, keep your current habits of how to learn and how you have learned other languages and apply all this knowledge to Scala. I can tell you that functional programming is a really beautiful and interesting world.
I hope this article helps you to improve your Scala programming skills.