
‘Functional Programming Principles in Scala’ starts today - Zolomon
https://class.coursera.org/progfun-002
======
avparker
I took the course last year, and really enjoyed it a lot. It's a very good
introduction to functional programming.

For anyone unsure about taking the course, I wrote about my experience on my
blog [1], maybe that will be of use. I posted more technical details of the
course contents on google+ (links in the blog post).

[1] [http://www.avparker.com/2012/11/25/functional-programming-
pr...](http://www.avparker.com/2012/11/25/functional-programming-principles-
in-scala/) .

~~~
sampo
From your blog:

 _"a lot of material was explained by Professor Ordesky during the videos, so
you’d have a hard time trying to do the course without watching the videos"_

The Stanford Databases class (<http://class2go.stanford.edu/db/>) did that
part very well (well it did everything very well): Everything that the
professor typed in during video demonstrations, was also provided as text
files in the course downloadables.

------
coopdog
Can't recommend this course enough. Martin Odersky is a great lecturer and
very passionate about functional programming. Learning Scala was a useful
bonus too.

~~~
teacr
Odersky is a truly brilliant language designer.

However, he tends to talk slooooowly and methodically (him being German/Swiss
is probably related), which makes watching his videos kind of unfun, and there
are no slides.

There's an hour of lectures, and I'm pretty sure I could say the same stuff in
a 10 minute video at most.

I mean, this kind of way of teaching is really ancient and outdated; why would
you subject yourself to 7 weeks of watching boring videos, when you could just
read his whole book RIGHT NOW in 1-2 days, and then read other books,
tutorials on websites, etc.?

~~~
microtherion
Yes, I found the class somewhat slow going, and the programming environment
fairly unpleasant (I’m not used to working in Eclipse). I ended up dropping
the class somewhere in the middle.

Generally, I learn better from books than from lectures, but I found that some
of the lecturers in online courses are truly outstanding (Prof Agarwal in
Circuits and Electronics at MITx, Profs Ng (Stanford, Machine Learning),
Egerstedt (Georgia Tech, Control of Mobile Robots), Pattison (Berklee,
Songwriting)), so listening to their lectures was worth it. I did not quite
find Odersky as strong as a lecturer.

~~~
sampo
You can edit the source files with any text editor, and compile, test and
submit using `sbt` from the command line. No need to use Eclipse.

~~~
recursive
The lectures really only showed how to accomplish it with eclipse.

------
pvillega
To anyone doing the course or interested in Scala, 2 recommendations:

* the blog of Daniel Westheide (<http://danielwestheide.com/>) has a series of posts (starting at [http://danielwestheide.com/blog/2012/11/21/the-neophytes-gui...](http://danielwestheide.com/blog/2012/11/21/the-neophytes-guide-to-scala-part-1-extractors.html) and currently at lesson 15) which may be worth reading to complement/expand on the course lectures. Probably not useful for the course itself until you’ve finished week 2 or 3, but relevant anyway.

* the book “Scala for the impatient”, probably the best book out there about Scala from beginner to advanced level

~~~
spacemanaki
I'll politely offer some dissenting opinion regarding Scala for the Impatient.
I found that it really doesn't live up to its name if you have done any FP
before, ever, even in Scheme or Lisp, because Horstmann treats functional
programming like a somewhat advanced topic, and doesn't really address it in
the first dozen chapters, instead covering file IO, regular expressions, and
packages before higher order functions and pattern matching. When he gets to
it, FP is covered at an introductory level at first. Instead I think it would
have been better titled "Scala for the Impatient Java developer", because it
doesn't really get to the meat of what makes Scala different from ML and
Haskell very quickly.

Even as a beginner text, I think it's a bit lacking due to hurried
presentation. This Coursera class is a far, far better presentation of intro
FP, and a much better intro to Scala IMHO.

------
boothead
Anyone who's done some Haskell care to comment on whether scala is worth
learning?

I read the scala book a few years ago, then I decided to go to the source
first and learn Haskell. However, I don't see many Haskell employment
opportunities available in my area or industry (London, Hedge
funds/algorithmic trading). I have however seen an up tick in FP jobs in
general, mainly scala or F#.

So, those in the know: What should I learn if I want to land a decent FP job?
Scala, F#, something else? Or should I continue to wait for Haskell's
inevitable word domination?

~~~
taligent
Scala will easily dominate the JVM largely due to web use cases.

When you have companies like Twitter, LinkedIn, FourSquare behind it there is
that air of credibility and longevity which companies look for when committing
to a new technology. Plus the popularity of frameworks like Play doesn't hurt.

~~~
laureny
> When you have companies like Twitter, LinkedIn, FourSquare behind it

How come none of these companies list a single Scala job on their web site?

~~~
ratherbefuddled
> How come none of these companies list a single Scala job on their web site?

Twitter and Foursquare seem to list many scala jobs. Have you looked?

<https://twitter.com/jobs/positions?jvi=oUebXfw0,Job>

<https://twitter.com/jobs/positions?jvi=o2nHWfwM,Job>

[https://www.jobscore.com/jobs/foursquare/software-
engineer/a...](https://www.jobscore.com/jobs/foursquare/software-
engineer/a_c2QE8Emr35TgeJe4bk1X)

------
ilcavero
For those of us waiting for the continuation course, Odersky seems to be
planning one for the fall.
<https://twitter.com/odersky/status/315048673069379585>

------
dkhenry
I took this course the first time through and really really enjoyed it. This
time I got a bunch of my Coworkers to sign up by promising them I could TA the
course for them. It should be a good time had by all. Especially since we can
then deep dive into parts of it to show how it applies to real world problems.

------
mark_l_watson
I would like to add one thing to this discussion: Martin Odersky's class (I
took it last year) is also very useful if you use other functional languages
rather than Scala. I have been using Clojure for about 2/3 of my development
in the last year and I found this course to be useful. The lectures are also
fun to watch.

~~~
mogrim
You're highlighting one of the most positive things about the course: it's
functional programming with Scala, in that order. The Scala part is less
important than the ideas behind FP.

(And I, too, found the course very useful. It's certainly changed how I think
about and develop Java code).

------
mtgx
Wish it had a Google sign-in button. Don't get me wrong, I _hate_ it when
sites _force_ you into signing with one of these sign-on services (or worse -
Facebook-only sign-in, like Spotify was for a while), but I also appreciate
being able to use that quickly when I don't care that much about the site, and
I wouldn't waste my time creating a "full account" to see what's about.

~~~
Zolomon
Yeah, I should've submitted <https://www.coursera.org/course/progfun> link
instead. Too bad I can't edit it now.

------
kybernetyk
This is great and I signed up. I wish there was such a course with Clojure
though. (Just a personal preference.)

------
Refefer
For those who have taken it already, what's the time commitment like? I would
hate to sign up to find myself swamped with more hours than I can feasibly
handle on top of an already full schedule.

~~~
jfim
It really depends on how quickly you can wrap around your head around FP; I
had done a little bit of Scala before the course and usually could code the
assignments in an evening. The assignments are _really_ fun, by the way.

------
vbtemp
I cannot recommend this course enough. The lectures and assignments are _very_
well organized. It was worth every minute, and I look forward to a "level 2"
FP course from this instructor.

------
prezjordan
Started this course late a few months ago. Very enjoyable, unfortunately I
missed the "passing" grade by two tenths of a point :)

Check it out, they have a very nice setup for grading homework and the videos
are very informative.

------
seandhi
I have been trying to play with Scala for the past year, and I have made some
strides, but I keep falling back to language with which I am comfortable to
just get things done. This is largely in part to my lack of familiarity with
Scala, but I have really wanted to tackle a large project with it. I have read
the book that Martin Odersky wrote, but this will be an awesome addition that
will, hopefully, push me over that final hurdle to becoming productive. Thank
you for posting this! I signed up today.

------
joeygibson
I took this class the first time it was offered, and it was really good.
Martin explains things very well.

------
grigy
The course also does teach Scala. It made me love Scala and it's definitely
worth learning.

------
orrsella
Excellent course – highly recommend it. (for newcomers to Scala, but not
only.)

------
michaelochurch
Functional programming is _the_ most important CS topic if you want to become
a great (1.5+) engineer. No, you aren't going to be doing pure functional
programming very often. In the real world, eliminating mutable state is
neither possible nor desirable. It's extremely worthwhile to learn how to
_manage_ state, though. Hell, even the Unix philosophy (do one thing, do it
well) was directly inspired by functional programming, though it _couldn't_ be
purely functional (infeasible at the time, plus semantic mutability).

TL;DR: If you don't know what "flatMap that shit" means, then it's worthwhile
to learn it.

~~~
papsosouid
>No, you aren't going to be doing pure functional programming very often

I do every single day.

>In the real world, eliminating mutable state is neither possible nor
desirable.

Eliminating state is not what functional programming is about.

>If you don't know what "flatMap that shit" means, then it's worthwhile to
learn it.

Scala is a pretty terrible language to be learning it though. Subtyping makes
things far more complex and difficult to learn, just for the benefit of java
compatibility (which doesn't matter if you are just learning for the sake of
learning).

~~~
michaelwww
I have a question if you care to answer. I was watching "Overview and
Introduction to Lisp" (link below.) I was struck by the idea of a function
taking a function as input and transforming it to another function as output.
My only experience with something similar is JavaScript, but the idea of a
function doing function transforms is new to me. Is this the fundamental thing
to understand about Functional Programming?

[http://ocw.mit.edu/courses/electrical-engineering-and-
comput...](http://ocw.mit.edu/courses/electrical-engineering-and-computer-
science/6-001-structure-and-interpretation-of-computer-programs-
spring-2005/video-lectures/1a-overview-and-introduction-to-lisp/)

~~~
martinced
_"I was struck by the idea of a function taking a function as input and
transforming it to another function as output."_

That's a higher-order function (HoF). I'd say it's not the fundamental thing
to understand about FP: you can even program in a functional way without using
them.

And also you can have languages which aren't putting the emphasis on FP at all
and yet who have higher-order functions: elisp, for example (anyone calling
elisp functional is automatically setq'ed to crazy ; )

IMHO Lisp dialects aren't inherently functionals. Some are, some aren't. Even
Clojure, which definitely puts the emphasis on FP, isn't purely functional,
far from it. But you can use it in a functional way (and Java too, in a way --
I used to do "OO over immutable objects" and use "functional Java").

However you'll probably find that when using Lisps in a functional way, you
can use higher-order function often. For example if you have, say, a
referentially transparent function and want to add memoization for free then
it's very convenient to simply (memoize myfunc).

Or if you want to "carry the state" of your program through monads (or to use
other kind of monads): then you'll need higher-order functions.

To me if there is one thing about FP it is simply idempotent / referentially
transparent functions which make it easier to reason about the program.

I'm simply beginning to "grok" FP, HoFs and Clojure so take this with a grain
of salt : )

~~~
papsosouid
>you can even program in a functional way without using them.

For a very tiny limited subset of programs. Anything beyond the most trivial
of toy apps will use them.

>And also you can have languages which aren't putting the emphasis on FP at
all and yet who have higher-order functions

Where their usefulness is seriously hampered by the language not being
functional. This is the primary reason people think HoFs are no big deal.
They've never gotten to actually use them in an environment designed to make
good use of them.

------
maxk42
Who?

~~~
recursive
Martin Odersky. FWIW, you can also just go back and read it again.

