- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Getting Started
Sun, 2011-07-10, 13:16
Hello all!
I am a ruby dev, and I was wondering what sorts of things you all used to learn scala, and what worked well, and maybe not so well.
I am a ruby dev, and I was wondering what sorts of things you all used to learn scala, and what worked well, and maybe not so well.
Sun, 2011-07-10, 13:57
#2
Re: Getting Started
On 10/07/2011 14:16, Isaac Sanders wrote:
Well, everybody learns by its own way... So, what worked for me ?
- I started by reading the mailing list, being on IRC channel, reading (rare - we were in 2007) blog posts, and some papers from http://www.scala-lang.org/node/197 (a tour of Scala, Scala by examples and others).
- then, I played with the language with little toy examples (for me, that was 100 problems of project Euler (http://projecteuler.net/ )
- then, I tried to build what is for me "Hello World" project with the techno I was playing with at the moment - it was a "hello world blog" with Tapestry 5, which I was mastering at that moment ( http://fanf42.blogspot.com/2009/01/tapestry-5-with-scala.html and others )
- then, Programming in Scala was published, and I read it from front page to last one, playing with each concepts along the book. That was an amazing reading. Other good books where published around that time.
- and finally, what made me *really* progress a lot was just to use Scala on a daily basis at my work.
So, what worked for me was an expert mixed of Scala culture and community immersion throught IRC, mailing list and blog post, academic understanding of the language throught reference books and research papers, and practising - a lot of practising !
Note that I fist learned about Scala in 2007, and so some things will be done in an other order (reading Programming In Scala for example).
Hope it helps,
JZkNUsA [at] mail [dot] gmail [dot] com" type="cite">Hello all!
I am a ruby dev, and I was wondering what sorts of things you all used to learn scala, and what worked well, and maybe not so well.
Well, everybody learns by its own way... So, what worked for me ?
- I started by reading the mailing list, being on IRC channel, reading (rare - we were in 2007) blog posts, and some papers from http://www.scala-lang.org/node/197 (a tour of Scala, Scala by examples and others).
- then, I played with the language with little toy examples (for me, that was 100 problems of project Euler (http://projecteuler.net/ )
- then, I tried to build what is for me "Hello World" project with the techno I was playing with at the moment - it was a "hello world blog" with Tapestry 5, which I was mastering at that moment ( http://fanf42.blogspot.com/2009/01/tapestry-5-with-scala.html and others )
- then, Programming in Scala was published, and I read it from front page to last one, playing with each concepts along the book. That was an amazing reading. Other good books where published around that time.
- and finally, what made me *really* progress a lot was just to use Scala on a daily basis at my work.
So, what worked for me was an expert mixed of Scala culture and community immersion throught IRC, mailing list and blog post, academic understanding of the language throught reference books and research papers, and practising - a lot of practising !
Note that I fist learned about Scala in 2007, and so some things will be done in an other order (reading Programming In Scala for example).
Hope it helps,
-- Francois ARMAND http://fanf42.blogspot.com http://www.normation.com
Sun, 2011-07-10, 16:37
#3
Re: Getting Started
Coming from Java, I found I could pretty much continue to write Java code in Scala, just changing a little syntax here and there. But as I explored the libraries and read other people's code, I found a wealth of new idioms that gradually made my code much simpler and more readable.
Definitely read the books other people have recommended. If you have time, you might follow the Scala mailing lists. I also find that reading about Scheme and Haskell puts me in a functional-programming frame of mind -- many of the tricks you find in those languages will translate well to Scala.
A
On Sun, Jul 10, 2011 at 5:16 AM, Isaac Sanders <isaacbfsanders@gmail.com> wrote:
Definitely read the books other people have recommended. If you have time, you might follow the Scala mailing lists. I also find that reading about Scheme and Haskell puts me in a functional-programming frame of mind -- many of the tricks you find in those languages will translate well to Scala.
A
On Sun, Jul 10, 2011 at 5:16 AM, Isaac Sanders <isaacbfsanders@gmail.com> wrote:
Hello all!
I am a ruby dev, and I was wondering what sorts of things you all used to learn scala, and what worked well, and maybe not so well.
Sun, 2011-07-10, 18:07
#4
Re: Getting Started
Also, don't get frustrated at butting your head against something--Scala is an extremely sophisticated language (much more so than Python or Ruby IMHO), but remember you only need to learn the first 10 or 20% of that complexity to bring you up to about the same level you were at in Ruby. Then you can slowly push yourself to widen the scope of your knowledge to become more effective than in just about any other language.
Here are a few suggestions/topics that I think will help make your initial learning curve shallower.
--Make sure you understand Objects and Classes and how an Object and a Class of the same name are related.--realize that Case Classes create a companion Object "behind the scenes".--be aware of what the "apply" function does.--understand how method and operator notation can be interchanged.--try to program in a functional manner.
Hope that helps,Ken
Here are a few suggestions/topics that I think will help make your initial learning curve shallower.
--Make sure you understand Objects and Classes and how an Object and a Class of the same name are related.--realize that Case Classes create a companion Object "behind the scenes".--be aware of what the "apply" function does.--understand how method and operator notation can be interchanged.--try to program in a functional manner.
Hope that helps,Ken
Mon, 2011-07-11, 05:37
#5
Re: Getting Started
I'm busy reading Programming in Scala 2nd ed right now and it's a great place to start.
I think coming from Ruby that language will prove a bit trickier than coming from Java, since Scala is superficially more similar to the latter.
As Archontophoenix said, you can pretty much write modified Java in Scala and get results even if it's not the best way to dothings.
Still, I recommend you give it a strong go. It's easy to feel confused and overwhelmed at times especiallyif you look at some of the more advanced code early but the thing to keep in mind is that even the most fearsome Scala code usually boils down to clever usage of some of the clever underlying language features...
On 10 July 2011 19:04, Ken McDonald <ykkenmcd@gmail.com> wrote:
I think coming from Ruby that language will prove a bit trickier than coming from Java, since Scala is superficially more similar to the latter.
As Archontophoenix said, you can pretty much write modified Java in Scala and get results even if it's not the best way to dothings.
Still, I recommend you give it a strong go. It's easy to feel confused and overwhelmed at times especiallyif you look at some of the more advanced code early but the thing to keep in mind is that even the most fearsome Scala code usually boils down to clever usage of some of the clever underlying language features...
On 10 July 2011 19:04, Ken McDonald <ykkenmcd@gmail.com> wrote:
Also, don't get frustrated at butting your head against something--Scala is an extremely sophisticated language (much more so than Python or Ruby IMHO), but remember you only need to learn the first 10 or 20% of that complexity to bring you up to about the same level you were at in Ruby. Then you can slowly push yourself to widen the scope of your knowledge to become more effective than in just about any other language.
Here are a few suggestions/topics that I think will help make your initial learning curve shallower.
--Make sure you understand Objects and Classes and how an Object and a Class of the same name are related. --realize that Case Classes create a companion Object "behind the scenes".--be aware of what the "apply" function does.--understand how method and operator notation can be interchanged. --try to program in a functional manner.
Hope that helps,Ken
Mon, 2011-07-11, 07:57
#6
RE: Getting Started
I think, this is correct. Beginners should start with
Java like code, at least regarding the design and interplay of classes,
trait/interfaces etc. To improve I think the methods are a good starting point
to do it scala like.
see also: Bruce Eckel http://www.artima.com/weblogs/viewpost.jsp?thread=328540
From: scala-language@googlegroups.com [mailto:scala-language@googlegroups.com] On Behalf Of Adam Jorgensen
Sent: 11 July 2011 06:32
To: scala-language@googlegroups.com
Subject: Re: [scala-language] Getting Started
I'm busy reading Programming in Scala 2nd ed right now and it's a great place to start.
I think coming from Ruby that language will prove a bit trickier than coming from Java, since Scala is superficially more similar to the latter.
As Archontophoenix said, you can pretty much write modified Java in Scala and get results even if it's not the best way to do things.
Still, I recommend you give it a strong go. It's easy to feel confused and overwhelmed at times especially if you look at some of the more advanced code early but the thing to keep in mind is that even the most fearsome Scala code usually boils down to clever usage of some of the clever underlying language features...
On 10 July 2011 19:04, Ken McDonald <ykkenmcd@gmail.com> wrote:
From: scala-language@googlegroups.com [mailto:scala-language@googlegroups.com] On Behalf Of Adam Jorgensen
Sent: 11 July 2011 06:32
To: scala-language@googlegroups.com
Subject: Re: [scala-language] Getting Started
I'm busy reading Programming in Scala 2nd ed right now and it's a great place to start.
I think coming from Ruby that language will prove a bit trickier than coming from Java, since Scala is superficially more similar to the latter.
As Archontophoenix said, you can pretty much write modified Java in Scala and get results even if it's not the best way to do things.
Still, I recommend you give it a strong go. It's easy to feel confused and overwhelmed at times especially if you look at some of the more advanced code early but the thing to keep in mind is that even the most fearsome Scala code usually boils down to clever usage of some of the clever underlying language features...
On 10 July 2011 19:04, Ken McDonald <ykkenmcd@gmail.com> wrote:
Also, don't get frustrated at butting your head against something--Scala is an extremely sophisticated language (much more so than Python or Ruby IMHO), but remember you only need to learn the first 10 or 20% of that complexity to bring you up to about the same level you were at in Ruby. Then you can slowly push yourself to widen the scope of your knowledge to become more effective than in just about any other language.
Here are a few suggestions/topics that I think will help make your initial learning curve shallower.
--Make sure you understand Objects and Classes and how an Object and a Class of the same name are related. --realize that Case Classes create a companion Object "behind the scenes". --be aware of what the "apply" function does. --understand how method and operator notation can be interchanged. --try to program in a functional manner.
Hope that helps, Ken
Mon, 2011-07-11, 09:57
#7
RE: Getting Started
I disagree I do not think that using scala in a java like way is the right approach when you begin.
I think it only makes sense when you are a java developer to start with.
For someone who has no java background it makes more sense to learn scala with all the scala idioms from the start. Thinking imperative first and then functional will make it much harder to grasp the functional paradigm imho.
On the other hand first learning the functional side will give you a better understanding of the advanced concepts like typeclasses and monadic programming and your imperative background will not be in your way of understanding.
It is easy to go to an imperative way of coding once you are using the monadic patterns but it is much harder to go from an imperative code to a strictly functional one.
just my two cents.
-Stefan
> I think, this is correct. Beginners should start with Java like code, at least regarding the design and interplay of classes, trait/interfaces etc. To improve I think the methods are a good starting point to do it scala like.
>
> see also: Bruce Eckel http://www.artima.com/weblogs/viewpost.jsp?thread=328540
>
> ________________________________
> From: scala-language@googlegroups.com [mailto:scala-language@googlegroups.com] On Behalf Of Adam Jorgensen
> Sent: 11 July 2011 06:32
> To: scala-language@googlegroups.com
> Subject: Re: [scala-language] Getting Started
>
> I'm busy reading Programming in Scala 2nd ed right now and it's a great place to start.
>
> I think coming from Ruby that language will prove a bit trickier than coming from Java, since Scala is
> superficially more similar to the latter.
>
> As Archontophoenix said, you can pretty much write modified Java in Scala and get results even if it's not the best way to do
> things.
>
> Still, I recommend you give it a strong go. It's easy to feel confused and overwhelmed at times especially
> if you look at some of the more advanced code early but the thing to keep in mind is that even the most fearsome
> Scala code usually boils down to clever usage of some of the clever underlying language features...
>
> On 10 July 2011 19:04, Ken McDonald <ykkenmcd@gmail.com<mailto:ykkenmcd@gmail.com>> wrote:
> Also, don't get frustrated at butting your head against something--Scala is an extremely sophisticated language (much more so than Python or Ruby IMHO), but remember you only need to learn the first 10 or 20% of that complexity to bring you up to about the same level you were at in Ruby. Then you can slowly push yourself to widen the scope of your knowledge to become more effective than in just about any other language.
>
> Here are a few suggestions/topics that I think will help make your initial learning curve shallower.
>
> --Make sure you understand Objects and Classes and how an Object and a Class of the same name are related.
> --realize that Case Classes create a companion Object "behind the scenes".
> --be aware of what the "apply" function does.
> --understand how method and operator notation can be interchanged.
> --try to program in a functional manner.
>
> Hope that helps,
> Ken
>
Mon, 2011-07-11, 19:47
#8
Re: Getting Started
Hi Isaac,
first, welcome to scalaland. Hope you enjoy the language and the
community.
When I started with scala I liked the guides written to show how
problem solving in scala is done in comparison to java, which was (and
still is) the language I use the most. Probably there is something
similar for ruby. From a practical standpoint I liked playing with the
tasks at http://codingkata.org since it also gives you the possibility
to look at the java or (j)ruby solutions of other people. You will
probably notice that you start with translating your ruby ideas to
scala but as you will see more and more code of other people you will
look into books / blogs an soon come up with solutions which are more
idiomatic.
If you got stuck somewhere just ask here.
Tobias
On 10 Jul., 14:16, Isaac Sanders wrote:
> Hello all!
>
> I am a ruby dev, and I was wondering what sorts of things you all used to
> learn scala, and what worked well, and maybe not so well.
Hello Isaac,
there are many excellent books to learn Scala,
the best of which is Martin's book (the 2nd edition
contains a lot more material),
which, for me, is the best book on Programming in general.
I strongly recommend to start with Martin's book and use
also the book of Alex Payne, Dean Wampler as complementary.
For practicing Scala, you of course can use the official
Read-Eval-Print-Loop (REPL), which is console based.
However, I believe that more user-friendly is the interface to the Scala
Interpreter offered by the ScalaLab project
which I develop (http://code.google.com/p/scalalab/).
The main interface of ScalaLab29
is an improvement of the Swing based ScalaInterpreter Pane of
Sciss.
ScalaLab29 integrates also the recent Scala 2.9.0.1 binaries, thus
seperate Scala installation is not mandatory.
Regards
Stergios
On Sun, 2011-07-10 at 08:16 -0400, Isaac Sanders wrote:
> Hello all!
>
>
> I am a ruby dev, and I was wondering what sorts of things you all used
> to learn scala, and what worked well, and maybe not so well.