Re: Functional Programming in Scala at Coursera

I think Jon is talking about the time it takes for the REPL to evaluate the first expression you enter, not the speed of Scala per se.

Regarding video vs. being in the room: I have to say I prefer watching a lecture as a video. It allows me to adjust the pace. So when the prof said something that I need to digest (or when he says something that prompts a line of thought that I want to think through to the end), I can just pause the video and think about it carefully. I'd miss half the lecture if I did that in a live lecture.

Similarly if the Prof is still explaining something I already understood, I can simply fast forward. And if I missed something the prof said because I was distracted, I can rewind.

Re: Functional Programming in Scala at Coursera

Posted 27 September 2012 - 12:55 PM

Quote

I think Jon is talking about the time it takes for the REPL to evaluate the first expression you enter, not the speed of Scala per se.

I find the overall REPL response is killingly slow, not just the first expression, and I'm not running on a slow machine. It's roughly comparable to a call to the compiler, but it's blocking after every line. This is annoying, but yes, this is just with respect to the interpreter, not the language itself. I haven't done any benchmark tests of compiled code. I'm sure that's been done, though.

The sbt is also not zippy, but that's another matter.
However, the language seems good to work in, so I'm willing to work with it and see where I can get to.

Quote

Regarding video vs. being in the room: I have to say I prefer watching a lecture as a video. It allows me to adjust the pace. So when the prof said something that I need to digest (or when he says something that prompts a line of thought that I want to think through to the end), I can just pause the video and think about it carefully. I'd miss half the lecture if I did that in a live lecture.

I get that, but for me there's something useful about being forced to hear it all on the go. Any work expands to fill the time you allow for it - if you give yourself all the time in the world to understand a lecture, you'll take all the time in the world doing it.
If you force me to get it all in one go, I'll have to defer my woolgathering - make a note of it and think about it on the way home - and focus on what the speaker is saying.

This post has been edited by jon.kiparsky: 27 September 2012 - 01:07 PM

Re: Functional Programming in Scala at Coursera

Posted 27 September 2012 - 01:01 PM

blackcompe, on 26 September 2012 - 04:45 PM, said:

People just love them some Vim and Emacs. I must be new school....

Vi is an efficient way to manipulate text. I understand why everyone was excited when Douglas Englebart demonstrated the mouse forty years ago, but you'd think we'd have gotten over it by now. It's just not a useful input device, and it slows down everything you attach it to.
It's fine for funtime play stuff, but if you're trying to do any sort of work, it's just a nuisance.

Re: Functional Programming in Scala at Coursera

It's fine for funtime play stuff, but if you're trying to do any sort of work, it's just a nuisance.

I'm sorry to barge in, but try telling that to graphic designers. Then again, I guess those serious about their profession use a pen to interface with the computer.

Also, thanks for the Vim recommendation, I will try learning how to use it one of these days. Well, I tried opening it but I couldn't get past the initial screen. That's what I get for not reading any documentation.

Re: Functional Programming in Scala at Coursera

Posted 02 October 2012 - 12:06 AM

There are some good resources out there. I tried putting together a training document at one point, but it got swallowed by time. I did like the premise, though: it was a completely scrambled set of instructions, and following each instruction would unscramble the next. (and give you practice on one particular editing maneuver)
Maybe I'll drag that out one of these days and make it work, it was a good idea.

The most important thing to know about vi* is that it's modal: you're either entering text, or you're entering commands. Once you grok that, and you know that esc brings you to the command mode, you start to learn stuff.
Basic command set is simple:
i/a insert or append text
I/A start editing at the start or the end of the line

esc gets you out of text entry mode

move commands are many and varied, but most basic are
h/j/k/l work like they do in rogue (left-down-up-right)
w/b forward or back by a word

the most basic edit commands:
d(move) delete between here and the destination of some move command (and keep it for pasting)
y "yank" text (same as "copy" in pointy-clicky editors)
p/P "pull" (ie, paste) deleted or "yanked" text after or before the cursor point

:w "write" (ie, save) the file
:q quit the editor
:wq write and quit

You'll know you've got vi under your skin when you come across instances of ":wq" where you tried to quit a file you were editing in OpenOffice.

Re: Functional Programming in Scala at Coursera

Posted 03 October 2012 - 08:15 AM

Some additional (nice) commands for Vim:

v - visual mode. Allows you to select text in order to manipulate it.
V - Visual line mode. Like visual mode, but takes full lines. Great with the yank (y) command.
Ctrl+v - Visual block mode. Selects a rectangular block of text.

When you've got some lines selected in visual mode, you can use > and < to change indentation of those lines.

Re: Functional Programming in Scala at Coursera

Posted 10 October 2012 - 02:57 PM

jon.kiparsky: Are you still in the class? I just finished the last assignment. I really felt like the assignments were plug and play, especially the last one. I guess I should write a DIC tutorial with the time I've saved.

Re: Functional Programming in Scala at Coursera

Posted 10 October 2012 - 06:14 PM

I'm still plugging away. I agree that the assignments aren't the most demanding I've ever been asked to do, but they're still well worth doing - and considering the way my day job is sliding into the territory mapped out by Ed Yourdon, it's probably just as well that it isn't too much more demanding.

The thing I mostly find lacking is any assigned reading. I usually find a lecture is much more effective if I've gone over the material ahead of time, and it would allow him to make a lot more use of the lecture time. I've been walking through the Scala book on the side - that doesn't really track with the lectures very well, but it's a chance to get a little more in depth on the language.