Preface This is part 5 of tutorials for first-time programmers getting into Scala. Other posts are on this blog, and you can get links to those and other resources on the links page of the Computational Linguistics course I’m creating these for. Additionally you can find this and other tutorial series on the JCG Java Tutorials page. This post is the first of ...
Read More »Home » JVM Languages »
Scala Tutorial – iteration, for expressions, yield, map, filter, count
Preface This is part 4 of tutorials for first-time programmers getting into Scala. Other posts are on this blog, and you can get links to those and other resources on the links page of the Computational Linguistics course I’m creating these for. Additionally you can find this and other tutorial series on the JCG Java Tutorials page. This tutorial departs ...
Read More »Scala Tutorial – conditional execution with if-else blocks and matching
Preface This is part 3 of tutorials for first-time programmers getting into Scala. Other posts are on this blog, and you can get links to those and other resources on the links page of the Computational Linguistics course I’m creating these for. Additionally you can find this and other tutorial series on the JCG Java Tutorials page. Conditionals Variables come ...
Read More »Scala Tutorial – Tuples, Lists, methods on Lists and Strings
Preface This is the second in a planned series of tutorials on programming in Scala for first-time programmers, with specific reference to my Fall 2011 course Introduction to Computational Linguistics. You can see the other tutorials here on this blog; they are also listed on the course’s links page. This tutorial focuses on Tuples and Lists, which are two constructs ...
Read More »Scala Tutorial – Scala REPL, expressions, variables, basic types, simple functions, saving and running programs, comments
Preface The is the first of several Scala tutorials I’m creating for my Fall 2011 graduate Introduction to Computational Linguistics course at UT Austin, loosely based on similar tutorials that Katrin Erk created for teaching Python in a similar course. These tutorials assume no previous programming background, an assumption which is unfortunately still quite rare in the help-folks-learn-Scala universe, and ...
Read More »Fun with function composition in Scala
The goal of this post is to show how a list of functions can be composed to create a single function, in the context of mapping a set of values using those functions. It’s a cute example that shows off some of the goodness that comes with functional programming in Scala. And, while this isn’t a tutorial, it might still ...
Read More »Scala use is less good than Java use for at least half of all Java projects
So, I made a post about agreeing with a post about Scala being “hard” for a large portion of Java developers. This post caused a fair amount of “discussion” much of which misinterpreted my post. I am making a post that I hope will be more clear in terms of the who, why, and my motivation. First, about me. My ...
Read More »Yes, Virginia, Scala is hard
Let me first say that I am a Scala lover and have been a Scala champion for almost 5 years. I’ve written books and articles on Scala. I’ve worked with dozens of companies that have launched Scala and Lift projects. I’ve code reviewed many dozens of Scala projects. I used to think that Scala was easy. It was, and continues ...
Read More »Testing with Scala
When learning a new language or framework one of my early questions is nowadays: What about testing? Obviously I asked that for Scala as well. If there is anything to complain about I guess it is once more the large number of options one has. JUnit Scala is highly compatible with Java and this includes the popular testing framework Junit. ...
Read More »