[Haskell-cafe] First steps in Haskell

Cale Gibbard cgibbard at gmail.com
Sun Dec 18 14:26:30 EST 2005


On 18/12/05, Daniel Carrera <daniel.carrera at zmsl.com> wrote:
> Chris Kuklewicz wrote:
> > Almost everything is explained under
> >
> > http://www.haskell.org/ghc/docs/6.4.1/html/users_guide/ghci.html
>
> Ok. How would a visitor to the Haskell site find this document? If this
> is the correct document for a beginner to start with Haskell, perhaps
> the site should be updated to point to it instead of the documents it
> currently points to.
>
> I find some usability problems in the documentation section. Think of
> usability in terms of barriers. If you have low barriers, a lot of
> people will have enough motivation to cross them and get started with
> Haskell. If the barriers are very high, only the most intent and
> motivated users will get started. Barriers are bad.
>
> Consider some barriers for a user who wants to learn Haskell:
>
> * There's no way for a new user to figure out how to successfully run
> the simplest Haskell program.
> * The first tutorial listed requires the user to give up some personal
> information before getting the tutorial.

Google for "Yet Another Haskell Tutorial pdf", and you'll find that
this form can be subverted if you actually care. It also accepts
completely random values.

>
> These are very significant barriers.
>
> Sure, it's not all bad. For example, Haskell has a friendly community
> (low barrier). But the barriers that exist are a problem because they
> hit the person who is trying to take the very very first step. If you
> can make that *fist* step easier, more people will take it.
>
> > The main things is: The ghci prompt accepts either command, starting
> > with a color such as :load "filename" or haskell IO code, since it
> > is in a do-block. Thus let is required.
>
> I understand that the design of Haskell might force this behaviour (I
> don't know, but I guess it must). The best solution I can think of (from
> a usability POV) is to provide a very brief tutorial, just 1/2 page,
> just enough to get someone through "hello world", and put it right at
> the top of the Learning Haskell section. I would remove the Intro
> section (it would fit better on the front page) and replace it with a
> 1/2 page tutorial. Something like this:
>
> -------------// Sugestion -------------
> 40-SECOND INTRO TO HASKELL
>
> (You must have <link>Hugs or GHC installed</link>)
>
> 1. Open a text editor and type:
> fac :: Integer -> Integer
> fac 0 = 1
> fac n | n > 0 = n * fac (n-1)
>
> 2. Save as "fac.hs"
> 3. On a terminal:
>
> $ ghci
> Prelude> :load fac.hs
> Compiling Main             ( fac.hs, interpreted )
> Ok, modules loaded: Main.
> *Main> fac 12
> 479001600
>
> 4. Press Ctrl+D to exit.
>
> For more information, look at the following tutorials:
> -------------// Sugestion -------------
>
> There. That's brief, and it's enough to get the user past the first
> step. It sends the message that Haskell is not so scary.
>
>
> > More typically you would write your code in a file, as shown in:
> > http://www.haskell.org/ghc/docs/6.4.1/html/users_guide/ch03s02.html
>
> Thanks.
>
> Best,
> Daniel.
> --
>       /\/`) http://oooauthors.org
>      /\/_/  http://opendocumentfellowship.org
>     /\/_/
>     \/_/    I am not over-weight, I am under-tall.
>     /
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list