#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.

Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition
Buying options
View on Amazon.com
or
Used Book in Good Condition
Specs:
Height9.25 Inches
Length7.25 Inches
Number of items1
Weight2.6 Pounds
Width1.25 Inches

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 10 comments on Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition:

u/joshlemer · 28 pointsr/scala

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

u/teknocide · 10 pointsr/scala

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 expressing flatMap, map and filter in a more linear fashion. They are functional and carry an overhead

I'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:

  • Use the REPL to explore snippets of code;
  • Use worksheets in either IntelliJ or Scala IDE to explore slightly longer pieces of code, unless you're comfortable with copy/pasta;
  • Try to get a good grasp of Scala's type system; learn to love higher kinded types;
  • Do not be afraid of implicits;
  • Daniel Westheide wrote an excellent guide to Scala. It is quite brief; there's also
  • Twitter's Scala school, used internally I imagine. It might be coloured by how Twitter uses Scala;
  • Look/ask on StackOverflow if you have concrete problems; it helps the knowledge base grow and be accessible in a beautiful way;
  • Google the heck out of everything

    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)
u/paultypes · 5 pointsr/programming

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:

  1. You have a non-trivial existing codebase in Java and Spring. You're excited about Scala, maybe are reading Programming in Scala or taking a Coursera course, and this typifies your team. You've looked around for information about how to use Scala with Spring, and found that information is thin on the ground, at best, and when you ask in the #scala IRC channel or on mailing lists, the response is "Yeccch. Don't." Not very helpful with your existing codebase! For this, I would say: work at whatever comfort level with Scala you have, and take advantage of spring-scala (full disclosure: I took over maintenance of spring-scala from the folks at Pivotal Labs who did the actual heavy lifting).
  2. You have the opportunity to do a greenfield project, maybe because you're refactoring your organization's monolith to be microservice-based, and you get to implement one of your organization's first microservices. You've heard great things about using Scala for microservices, but you still fall into the "reading books and taking Coursera courses" category in 1), so important factors here are availability of semi-pre-packaged solutions, community, documentation, etc. Here I would suggest looking at Lightbend's Activator and its templates for opportunities to quick-start a microservice, like the Akka HTTP microservice. Then you can gradually add functionality as requirements and/or your learning curve permit.
  3. You've heard a lot about pure functional programming in Scala, maybe you're reading Functional Programming in Scala, maybe you have at least one team member who's an intermediate-to-advanced Scala developer and/or you have a clear direction in HR to find them. Your colleagues might look at you funny when you say that a REST microservice is obviously just a HttpRequest => HttpResponse that "does some stuff," so it's actually an HttpRequest => F[HttpResponse] where F is a Monad, 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. :-)
u/guiness88 · 3 pointsr/scala

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).

u/Kalanthroxic · 3 pointsr/AskProgramming

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.

u/mlin6436 · 2 pointsr/scala

'Programming in Scala' is a good book I'd recommend (http://www.amazon.co.uk/Programming-Scala-Martin-Odersky/dp/0981531644)

u/amazedballer · 2 pointsr/scala

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.

u/dysfunctionaltrav · 1 pointr/cscareerquestions

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.

 

I'll see if I can't conjure up a few resources.

Scala website

The book I read

A good book on functional programming

 

I hope this all is formatted correctly I'm fairly new to commenting on reddit.

*Edited my formatting

u/SkyMarshal · 1 pointr/learnprogramming

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

u/CodeShaman · 1 pointr/java

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.