[racket] article about Racket
On Nov 12, 2011, at 10:00 PM, Raoul Duke wrote:
> * it seems to be serving too many different audiences out of the
> box. having to choose a language is pretty confusing. is dr. racket
> aimed first at top-level PLT folks who grok multi-lingual stuff? i
> think that should be more ‘advanced’ and thus hidden. i’d start it out
> in some basic middle-of-the-road language.
DrRacket does indeed try to serve several different audiences. From
my perspective, the primary audience is beginning programming
students, which is why it intentionally has a minimalistic look, not
a lot of menus and submenus and buttons and panes. I want to be able
to walk into a lab full of English, History, and Theater majors who
have never written a program before, and get them evaluating nested
expressions within five minutes. I do this, successfully, almost
every semester, and DrRacket's simple design is a large part of the
reason. If I gave them Eclipse or something like it, most of them
would drop the class in the first week.
That said, I use DrRacket for a lot of my own programming. In part
this is because I use it almost every day, either in the classroom or
testing my students' programs, so I'm quite comfortable in it.
> * killer bad: when i evaluate code from the top pane, my cursor
> gets moved to the bottom pane and i have to manually get it back up
> top to edit my program.
I'll second Eli here: this is a collision of work-flows. When you
evaluate code from the top pane, the results are in the bottom pane,
so your visual attention will be in the bottom pane, so it makes
sense for your cursor to be in the same place -- especially since the
next thing you're likely to do is TRY (interactively) some of the
things you just defined.
> * killer bad: clicking on Check Syntax
> * changes the ui drastically and i have no idea how to get
> back to how it was before i clicked it.
Huh?
> * also there were no visible results of clicking it, no
> report card, no “ok” even. i had (+ 3 2) as the program.
It should syntax-color your code, but otherwise not bother you unless
there's an error. If there is, it'll give you a level-appropriate
error message and highlight the error in the source code.
> * hovering over the hilighted z does nothing.
I gather this has been fixed since last night. Which is a not
uncommon response time for bug reports around here :-)
> * like, i guess i have to quit the entire app and start it
> again to get the 2 pane format back? [oh i guess i can "run" it
> again to get
> it back at least.]
The "View" menu allows you to hide and show each of the panes, which
seems reasonably discoverable to me. It also allows you to drag the
border between them to other than a 50/50 split. If you can suggest
a more-discoverable way to optimize real-estate use between the
panes, I'm sure it'll be considered.
Tom McNulty wrote:
> 1) Inline / popup function signatures. Racket certainly comes
> batteries-included, which is most appreciated. It does however,
> mean spending a lot of time consulting documentation for less
> frequently used functions. Often I'll remember the complete (or
> sometimes partial) function name, but need to reach for the docs to
> recall the function arity, argument order, and possible keywords.
> I would be much more productive if the function signature could be
> displayed on demand.
Have you tried F1? It does a documentation search on the word
closest to the cursor, in either the Definitions or Interactions
pane. (I must confess, I only vaguely knew about this until a few
months ago, and now I can't imagine living without it.)
Perhaps there should be a variant of F1 that doesn't bring up a whole
Web page but merely pops up the signature close to the cursor.... or
a variant that turns the word into a function call with parameter
names to remind you what each parameter is supposed to be....
There's been a fair amount of discussion of auto-complete both on
this list and on the BlueJ users' list. Auto-complete is useful for
professional programmers who have a good idea what they want to
accomplish but can't remember the full spelling of the function, or
don't want to take the extra half-second to type it. But if you give
it to BEGINNING programmers, they just hit the auto-complete key and
accept the first option rather than actually thinking about what they
need to accomplish -- programming by random walk through syntax
space. And then they get upset that they did exactly what the IDE
told them to, and their program still doesn't work.
Another problem with auto-complete in DrRacket in particular is that
what search results you get depends on what language you're in and
what libraries you have loaded. Which means that in two different
windows you could type the same prefix and get very different
autocompletes -- which again could really confuse beginning programmers.