Loved by learners at thousands of companies
Get an introduction to the programming language Scala. You'll learn why and how companies like Netflix, Airbnb, and Morgan Stanley are choosing Scala for large-scale applications and data engineering infrastructure. You'll learn the basics of the language, including syntax and style, focusing on the most commonly used features in the Scala standard library. You'll learn by writing code for a real program that plays a computer version of the popular card game Twenty-One. You’ll get a taste of the value of a hybrid object-oriented and functional programming language, of which Scala is the foremost example. We recommend this course for learners with intermediate-level programming experience, which can be acquired in the listed prerequisites.
A Scalable LanguageFree
Welcome to Scala! You'll learn what Scala is, who uses it, and why you should use it. You'll explore four common data types: integers, floating-point numbers, logical values, and text, using the Scala interpreter.A scalable language50 xpWhat is Scala?100 xpWhy use Scala?100 xpWho uses Scala?50 xpScala code and the Scala interpreter50 xpWhat makes Scala scalable?100 xpScala is object-oriented100 xpReasons for programming in Scala50 xpImmutable variables (val) and value types50 xpDefine immutable variables (val)100 xpDon't try to change me100 xpMutable variables (var) and type inference50 xpDefine mutable variables (var)100 xpYou can change me100 xpPros and cons of immutability100 xp
Workflows, Functions, Collections
Discover two more ways of writing Scala code (writing a script and building an application) and popular tools that make writing these programs easier. Then, learn what functions do and how to use them, and structure your data using the Array and List collections.Scripts, applications, and real-world workflows50 xpCreate and run a Scala script100 xpBenefits of compiled languages50 xpFunctions50 xpWhat do functions do?100 xpIdentify the body of a function50 xpCall a function100 xpArrays50 xpCreate and parameterize an array100 xpInitialize an array100 xpAn array, all at once100 xpUpdating arrays100 xpLists50 xpInitialize and prepend to a list100 xpInitialize a list using cons and Nil100 xpConcatenate Lists100 xp
Type Systems, Control Structures, Style
Learn about Scala's advanced static type system. After learning how to control your program with if/else, while loops, and the foreach method, you’ll convert imperative-style code to the Scala-preferred functional style.Scala's static type system50 xpStatic typing vs. dynamic typing100 xpPros and cons of static type systems100 xpMake decisions with if and else50 xpif and printing100 xpif expressions result in a value100 xpif and else inside of a function100 xpwhile and the imperative style50 xpA simple while loop100 xpLoop over a collection with while100 xpforeach and the functional style50 xpIs Scala purely a functional language?50 xpConverting while to foreach100 xpSigns of style100 xpThe essence of Scala50 xp
Data Science Educator
David graduated from Queen's University with a dual degree in Chemical Engineering and Economics. After working for a year, he discovered online education (in the early MOOC era) and became enamored with its potential. He has since created content to help people navigate the space, including a DIY data science master's program, Class Central's Data Science Career Guide, courses for Udacity's Data Analyst Nanodegree program, and several DataCamp courses and projects. Visit his website to say hi!