Cay Horstmann, author of Big Java (which was the textbook I used to learn Java) is teaching a class this semester in Scala. He is making all his lecture notes, labs, and homework available online. It's not a bad way to pick up notes on the language if you're interested. Here is a link to his blog posting, and here is the class schedule including lectures and labs assigned thus far. [ September 12, 2008: Message edited by: Garrett Rowe ]
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Thanks for the links. I'm still not groking this Functional Language stuff. All my real world experience is typically very simple procedural stuff. As a CS course, and one that is really about compilers, they use a lot more data structures and algorithms than I use in years of "real world" work.
Joined: Jan 17, 2006
I'm still not groking this Functional Language stuff.
Out of curiosity, do you find it difficult to understand the idioms, or the usefulness?
If you're doing basic CRUD apps, there's very little need for functional, I agree. There's no difficult processing and the server can easily manage each incoming request as a separate thread for you. I've struggled with trying to find the right niche for FP myself.
I'm a bit surprised that you don't work with collections very frequently. They're all over the place in everything I write and that's a big part of why I'm grokking Groovy so much - because it makes dealing with collections so simple. In fact, it's so simple that I often try to think of how to express things with data structures as frequently as possible (something I also recently read in The Art of Unix Programming as a great idea). Scala has a lot of the same coolness with collections as Groovy but things like Scala's map() don't get much publicity.
If nothing else, it's cool to see a JVM language replacing Scheme in universities. I'd hate to see students go to the dark side because they were taught F#.
Originally posted by Marc Peabody: If you're doing basic CRUD apps, there's very little need for functional, I agree. There's no difficult processing and the server can easily manage each incoming request as a separate thread for you. I've struggled with trying to find the right niche for FP myself.
I'm a bit surprised that you don't work with collections very frequently. They're all over the place in everything I write and that's a big part of why I'm grokking Groovy so much - because it makes dealing with collections so simple.
I use Collections a fair amount, but its really more like:
do select against DB
return results in a list
use results to fillin form
While I hate to think that I've spent 35+ years doing just CRUD, in practice, that's what 99% of business applications are about.
Most of the time, the closest you get to an "algorithm" is searching through a list for a match or the max. [ September 16, 2008: Message edited by: Pat Farrell ]
With normal CRUD apps, one must somehow bind between the model and the generated HTML. In Lift (the web framework that's built on Scala), one does:
text(record.field, record.field = _)
This creates an HTML input with the default value of the field. When the form is submitted, the function defined in the second parameter is called. Thus, a function is bound to an HTML form element and the function is called when the form is submitted. This creates a "continuation passing" style of web development by abstracting away the HTTP request/response cycle. Further, because the name of the HTML element is randomly chosen (unless you're running in test-mode), replay attaches become radically more difficult,
To other poster : Groovy is a decent language, i am not a fanatic on arguments, but I HATE purely dynamic languages with passion; I think a mixed breed works the best.
Scala is not just any FP language, Haskell is such a language; I don't look for languages that make my life easier, i look for languages that makes my code more re-usable and elegant, Scala is more elegant than Java (at least for the moment) and hey C# is great too, at least for the present; Java needs to grow up a little more.
Although as an addendum, i understand your ideas "generally"; frankly speaking if you are in commercial applications business and have not designed and developed framework or submitted a patch for language or worked on language specific features or architect'd stuff, then yes, you dont get exposed to those CS concepts that you read up ...
FP is just another way to broaden your way of thinking; This is what I don't like in work culture in general, ok so I have been doing this for years now, and whats the "use" of the stuff that I learn ... I just learn stuff to know more and more; knowledge is a driver for me, because in effect, it spreads the ideas around and finally if theres a feature in language thats lacking, then a JSR comes up (specifically relating to java) with requests from people like us which integrates features.