Scala Resources & Community links for the newcomer
During the last couple of months I have been asked a few times among colleagues and friends hot to get started with
Scala. People come to Scala from diverse backgrounds such as…
- Java folks looking for a better Java or just tired of waiting for Java features other modern languages such as C#
- Ruby, PHP, and programmers that come from a scripting background looking for type safety.
- People trying to bridge the best of both OOP and Functional paradigms.
Scala is a vast language full of features with a very technical community. Don’t let your first step discourage you
you don’t need to know everything about Scala to become productive quickly. People in the mailing list will often
about some crazy shit you don’t need to know just yet. Monads, Monoids, Combinators, Macros and things you may not
even know how to
pronounce,… Seriously guys as you start to learn about it it’s gonna blow your mind. It’s gonna take some time to
digest all the info but it sure it’s worth it.
Here is a few resources / steps may help you get started focused on its community and not so much on the technical
details of downloading and running your first scala “hello world”
Take the Coursera Progfun Course
The first thing I’d recommend based on my experience is that you take the Coursera Progfun Course.
This course sure is a great learning experience folks not used to functional programming that come from an
imperative lang such as Java. Martin Odersky guides you through very interesting concepts regarding
programming, immutability, collections, tail recursion, the Scala programming language principles. It is a
source of knowledge even for the most experienced Java programmers.
Subscribe to the scala-user mailing list
A very active mailing list with
topics ranging from newbie stuff all the way to hardcore discussions about new lang features. People are
friendly and eager to help.
Join the G+ Scala Community
Complementary to the scala-user mailing list there is also other social resources like the G+ community. You can find people
sharing here articles, questions and all things Scala.
Browse available books see which one fits your style better.
Buenas!! Gracias a los compañeros de Cyberneticos que grabaron la presentación de todos los proyectos os puedo enseñar cual ha sido el ganador local.
¡El videojuego CatsThulhu!
Música, ilustración y videojuego realizado enteramente en los tres días que se ha desarrollado el Megathon. Todo un meritazo si tenemos en cuenta que en verdad es 1 día y medio (entre presentación y demás)
One of the nicest scala features is for comprehension loops. They allow you to express the expected outcome of the loop and manipulate Seq, List and other collections in a way that saves time and removes clutter from its Java counterpart.
The Java code is just straightforward iterate over the collection, turn its values to ints and then check if the int is even before we add it to a new collection.
Both of the scala code result in the same result a List[Int] of even numbers. Depends on your style or the logic involved you can take several approaches.
Go for the yield style where as you iterate over a collection with a for comprehension and a guard the yield sends new elements to the resulting List.
Use the map and filter FP style approach where you map the collection to a new collection of Ints that is then filtered and yields a new collection of even ints.
Check out some other ways to do the same task more efficiently in scala as well contributed by some members on the G+ Scala community
How many apps have you built where you have to send out emails for any variety of reasons?
As I make my way learning about Akka Actors I decided to use them in one scala app I’m working on.
I decided to used them for this task not just because of the scalability and easy concurrent model but also for 3 main reasons.
The builtin configurable supervisor strategy allows you to monitor child workers and decide what policy applies should there be an exception.
I could easily reschedule email delivery attempts on common email exception often times thrown by SMTP servers.
Actor routers allow you to dispatch messages to a pool of actors in an intelligent way. In this case we use the SmallestMailboxRouter which sends messages to actors in the pool with a smaller workload.
The code is dependent on apache commons-email and some built in play! framework 2 stuff but getting rid of it would be trivial for anyone wanting to reuse it on a different context.