#333 in Computers & technology books
Reddit mentions of Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition
Sentiment score: 8
Reddit mentions: 10
We found 10 Reddit mentions of Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition. Here are the top ones.
Buying options
View on Amazon.comor
Used Book in Good Condition
Specs:
Height | 9.25 Inches |
Length | 7.25 Inches |
Number of items | 1 |
Weight | 2.6 Pounds |
Width | 1.25 Inches |
You absolutely can become productive in Scala in much less than six months. For reading material, I suggest you go through Programming in Scala, Second Edition by Martin Odersky, the creator of Scala. Skip the stuff on Actors though, since Scala Actors aren't thing any more (they have been replaced by akka actors).
In addition, I recommend you read Functional Programming in Scala, and probably not before Programming in Scala.
You may also want to check out the Coursera course Functional Programming Principles in Scala, also by Martin.
Links to these resources (and more) are available in the sidebar.
Edit: Wrong link
I'm not sure I'm quite over the gap yet but what's brought me this far is probably unhealthy levels of enthusiasm coupled with trial-and-error.
Truth be told it took a while, but we started out on different terms. I started learning Scala the same week I started learning C-sharp for a new employment some 3.5 years ago. Digging into the now a bit dated second edition of Programming in Scala was for me a timely decision as my hobby helped me in my professional work.
Scala and modern C-sharp have some similarities in that they use high level abstractions to process collections. Things like map, flatMap, filter (Select, SelectMany and Where in C#) are commonplace and the times I reach for foreach, let alone a lowly for-loop, are easily counted.
There are some details that differ in how collections are handled: .NET has them lazy by default and everything end up an IEnumerable<OfSomeType> whereas Scala is mostly eager. Both variants have pros and cons but I must say I prefer .NET here, it feels like the "more functional" way of doing things and also interestingly enough the way Java 8 has decided to do it. A lot of people like to argue about this, which is a good thing as it means we'll see development in both aspects.
Anyway, the message that I am trying to convey is that you need to know how it works, and why it works, before you can understand why it's slow. That Scala runs on the JVM by default doesn't mean its constructs are equal, no matter how similar they may seem. Scala's for-comprehensions, for example, are not analogous to a vanilla Java
for
or even foreach. Rather, they are literally a way of expressingflatMap
,map
andfilter
in a more linear fashion. They are functional and carry an overheadI'll agree with both the enthusiasts and the pessimists and say that Scala gives you more than enough rope to shoot you in your foot. Maybe unfortunately so as we are much more likely to screw up spectacularly while transitioning from one language to a seemingly similar language, as we are a couple of years down the road.
To round off, getting over the gap is as much about taking in as it is about letting go. It is an investment in spare time: a worthwhile investment in my experience.
Finally a few tips:
Sorry for the rant!
addendum: Yes! I feel I am more productive in Scala compared to both Java and C#, even for bigger projects. The ability to try ideas and flesh out code is much faster once you get used to how the type inference works (and doesn't work in some instances)
I think things would be much easier with a small team of average developers, primarily because converging on any given set of things you want to do/want to avoid in the language is much cheaper from a communication-cost perspective. If the group is small enough (say 5-10 people), you can probably get 50,000-foot agreement, at least, over a nice lunch, and hash out the details on a Wiki or something.
Scala's great strength remains that it goes out of its way to accommodate you whether you're treating it as "Java without semicolons" or "Haskell without pervasive laziness and with much poorer type inference." Given that, your biggest question, regardless of the size of your team, is: what kind of software development culture do we have/want to create?
Let me sketch a few example scenarios:
HttpRequest =&gt; HttpResponse
that "does some stuff," so it's actually anHttpRequest =&gt; F[HttpResponse]
whereF
is aMonad
, but they don't run screaming into the night; they want to know more. You decide to do a Proof of Concept with http4s for the REST stuff and Doobie to talk to good ol' PostgreSQL (because not all of your tech choices can be totally nuts). You might have a look at this example to get you started, and one of the things you notice about it immediately is... how straightforward and unscary the code actually is, strongly resembling what you'd write in any other language. But when you change the code, the compiler, way more often than not, tells you how you screwed up, before your code even can run.All of these scenarios are, in my opinion, completely reasonable, even if I got a little tongue-in-cheek on the last one. :-)
I second this. Great course to get you started. This book is also amazing (main author is the father of Scala himself, the same man that did the coursea course - M. Odersky).
It depends on taste. If you want the taste of functional while having the comfort of your object oriented world available, I'd recommend Scala, as it lets you do functional stuff while remaining sorta in the Java-sphere. A lot of people just use Scala as "Better Java". For learning Scala, I'd recommend "The Staircase Book" by Martin Odersky (https://www.amazon.com/Programming-Scala-Comprehensive-Step-Step/dp/0981531644). Looking at the cover, you'll probably figure out why it's known by that name.
If you want to properly try on functional programming, I'd go straight for Haskell with the help of a suitable book. Learn You a Haskell for Great Good is available online at http://learnyouahaskell.com/chapters and should work well enough for the purpose.
'Programming in Scala' is a good book I'd recommend (http://www.amazon.co.uk/Programming-Scala-Martin-Odersky/dp/0981531644)
If you want to learn Scala, the best reference book is Odersky's: http://smile.amazon.com/dp/0981531644
Dean Wampler's book is very good and more accessible:
http://shop.oreilly.com/product/0636920033073.do
Finally, if you want the full on FP experience, then you probably want:
https://www.manning.com/books/functional-programming-in-scala
If you're looking for a functional programming library on top of Scala (which is not at all the same thing as Scala the language), there are a number of options available, but they are constantly shifting -- last I heard, cats and shapeless are being actively worked on.
Absolutely, it's a very clean and easy to use language. It is object oriented and functional which allows someone who has never done functional programming to ease themselves in. Before I started learning scala I only knew python so it was nice that brackets and semicolons weren't really necessary. Higher-order functions are fantastic. /u/bananaboatshoes brings up a good point that scala builds on the jvm so it's usability is the same as java. It also allows you to use java libraries in scala pretty easily. Once you have learned scala going back and picking up java is fairly easy if you find it necessary.
&nbsp;
I'll see if I can't conjure up a few resources.
Scala website
The book I read
A good book on functional programming
&nbsp;
I hope this all is formatted correctly I'm fairly new to commenting on reddit.
*Edited my formatting
Check out Program Development in Java: Abstraction, Specification, and Object-Oriented Design. One of the best intro to OO books, which just happens to use Java to demonstrate the concepts. Probably the easiest way to learn Scala's OO roots.
After that, also check out Programming in Scala by Odersky et al. Very well written and explanatory, a good Scala-specific followup to Program Development.
Good article on books & resources for learning Scala from scala-lang.org: http://www.scala-lang.org/node/1305
I'm in the same position as you and I've taken up learning Ruby. I'm also really interested in Scala (this book is coming next week), but Ruby is an "easy to learn, and learn it right now" kind of language. Scala will take a bit of studying to get the hang of, even though I already have many projects in mind.
The appeal of Ruby comes from having to slog through Java all day and jump from this big multi-module mess of Java code from work in a big, ugly, slow, eclipse environment that's stuffed with plugins...
into this clean little SublimeText window with clean, small, easy-to-read Ruby code. It might not be offering me any technical solutions, but it's theraputic.
There's also Groovy, which is a JVM language that's sort of in-between Java and Scala. It's like poor-man's Scala and a lot of Java code translates into Groovy 1:1 and vice-versa. They're very similar.