Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Haskell as a useful practical 'tool' for intelligent
non-programmers (Kyle Murphy)
2. Re: Haskell as a useful practical 'tool' for intelligent
non-programmers (umptious)
3. Re: Haskell as a useful practical 'tool' for intelligent
non-programmers (Ertugrul S?ylemez)
----------------------------------------------------------------------
Message: 1
Date: Sun, 29 Apr 2012 13:27:50 -0400
From: Kyle Murphy <[email protected]>
Subject: Re: [Haskell-beginners] Haskell as a useful practical 'tool'
for intelligent non-programmers
To: [email protected]
Message-ID:
<ca+y6jcxfv2giowvoqgghpls9r2up98nzlh6gu22yuvrp0ab...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
As you can see this is a highly contentious subject. What you naively asked
(what's the best language for me) is a really good way to start a flame war
with a bunch of programmers. To understand why, imagine you went to the
American Kennel Club, and asked a bunch of the breeders there "What's the
best dog for me?". You'd probably get a bunch of people asking for more
details like "what size is your house/apartment", "how often are you home",
"do you plan on using the dog for anything in particular or just as a pet",
etc. as well as a handful of people arguing about "<my_favorite_breed> is
better than <other_breed> because of <x>". What you've done is essentially
the same thing.
Programming is a very complex field, with a lot of theory and concepts
behind it. Fortunately you don't NEED to know all the theory and concepts
in order to write a program, but the more you know, the better you will be
able to write programs. Haskell because it has a very strong academic
background tends to attract a lot of people with VERY strong backgrounds in
CS theory, as well as handfuls of programmers that only know some of the
theory but see a lot of potential in the language and are trying to brush
up on it (like me). Unfortunately because it has such a strong academic
backing a lot of the documentation available for Haskell is written for at
a minimum experienced programmers, and a lot of it assumes a pretty strong
CS background (E.G. any page talking about arrows), so it can be pretty
rough for someone with absolutely no background in programming to get into.
Programming languages can usually be divided up into smaller groups on
rather arbitrary axis, some of which are stylistic (E.G. white space vs.
brace delimited blocks), and some of which are fundamental to the way
programs are reasoned about and constructed (E.G. functional vs. object
oriented). Each language is a unique blend of these various axis. Certain
problems tend to be easier to solve along certain points on these axis, and
so languages that are closer to those points will tend to be "easier" to
use for that particular set of problems. That said, any programming
language can, for the most part, be used to solve any problem given enough
time and effort, and a programmers relative experience with a particular
language goes a long way in determining how long a given task will take.
Some languages, for a variety of reasons, tend to be easier for novices to
pick up. Python as others have indicated would probably be one of the best
choices mentioned so far, but other options include javascript (it's
ubiquitous, but learning the scope rules can be a bit tough, and there is a
LOT of REALLY bad javascript code out there so pick your examples
carefully), Assembly (this one is often frowned on, but understanding at
its most basic exactly what a computer is doing can be a huge boost in
understanding more advanced concepts), or even something like Go.
Importantly, learning a language that exists at a particular point in the
theory axis (functional, object oriented, procedural, logic) will make
learning other languages on that same point easier, which is why a lot of
people on here (Haskell is functional) are recommending other functional
languages.
As for your original statement about "I am not a programmer, and have no
intention of becoming one", that would be a bit like a programmer coming to
you and saying "I'm not a stock and options trader and have no intention of
becoming one, but can you tell me a simple way to make money on the stock
market without having to learn anything about economics or finance?". By
learning to use a programming language, you are in effect becoming a
programmer, just not a very good one (that takes years and years of
study/work to accomplish, and even then there's always someone better or
more you can learn).
My recommendation is to pick a language, any language, and start
experimenting. Don't worry about all the details right away, just find some
tutorials and work through them until you understand how to do basic input
and output, and then start working towards goals. Start simple (write a
program that takes a series of numbers as input terminated with a newline,
and then outputs the mean, median, and mode averages), and move on to more
complex (program that reads a JSON formatted input file and outputs some
sort of analysis of the data). Eventually you'll reach the point with
whatever language you've chosen where you can do almost anything you want
with it, and somewhere along the way you'll probably be ready to start
learning/experimenting with other languages, maybe ones from completely
different design paradigms.
-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.
On Sun, Apr 29, 2012 at 11:08, Lyndon Maydwell <[email protected]> wrote:
> If you're interested in OS integration, it may be worth learning C# if
> you're on windows. It's certainly quite amenable to 'glue', and it's
> gaining more functional features all the time. Also, you have the
> option of branching out to F# if you enjoy the .Net environment, but
> crave a purer language.
>
> I'd probably consider some combination of .Net and Mathematica if I
> were doing trading on Windows and didn't mind paying for the software,
> but it might not be a popular opinion :-)
>
> Disclaimer - I don't really know how trading works in practice.
>
> On Sun, Apr 29, 2012 at 10:56 PM, Michael Orlitzky <[email protected]>
> wrote:
> > On 04/29/2012 10:28 AM, Lorenzo Bolla wrote:
> >>>
> >>> What's the difference? You're not passing around the actual function,
> in
> >>> any language.
> >>
> >> $ python
> >> Python 2.7.3 (default, Apr 14 2012, 23:17:33)
> >> [GCC 4.7.0 20120407 (prerelease)] on linux2
> >> Type "help", "copyright", "credits" or "license" for more information.
> >>>>> def f():
> >> ... print 'foo'
> >> ...
> >>>>> def g(f):
> >> ... print 'bar'
> >> ... f()
> >> ...
> >>>>> g(f)
> >> bar
> >> foo
> >>
> >> Also:
> http://en.wikipedia.org/wiki/First-class_function#Language_support
> >>
> >
> > You're not passing around the function, you're passing around the name
> > of the function or a pointer. Python happens to know that when you write
> > f(), you want to evaluate the function named f, much like when you say
> > f.call() in Ruby.
> >
> > Ruby doesn't even have functions, only methods, so you have to entertain
> > the idea that the same thing can have two different names to even have
> > this discussion. Passing functions to other functions is so fundamental
> > to Ruby that it's baked into the language:
> >
> > irb(main):001:0> [1, 2, 3].map { |x| 2*x }
> > => [2, 4, 6]
> >
> > They're not called functions, but the distinction is imaginary. For an
> > imperative language, the culture pretty strongly encourages you to use
> > map, filter, fold etc. which are all passed functions (Procs) using the
> > block syntax.
> >
> > _______________________________________________
> > Beginners mailing list
> > [email protected]
> > http://www.haskell.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120429/edbc3803/attachment-0001.htm>
------------------------------
Message: 2
Date: Sun, 29 Apr 2012 18:30:50 +0100
From: umptious <[email protected]>
Subject: Re: [Haskell-beginners] Haskell as a useful practical 'tool'
for intelligent non-programmers
Cc: [email protected]
Message-ID:
<cae20bnvnlxz1lknorvwzzrxgcmblq5mv4wdu6xzipmns4ty...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
>>>>>
Mike Meyer <[email protected]> wrote: ruby...
Michael Orlitzky <[email protected]> wrote: python..
<<<<<
Surprisingly, Ruby vs Python was recently voted only the galaxy's
***second*** most pointless ethnic conflict:
http://my10online.com/wp-content/uploads/2011/09/Let_That_Be_Your_Last_Battlefield.jpg
In other "I Am So Surprised!" news, PHP and Visual Basic programmers were
astonished to discover that tests prove neither language was significantly
more likely than the other to help in picking up girls or to lead to
becoming the lead guitarist of a successful rock band...
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120429/7b87384a/attachment-0001.htm>
------------------------------
Message: 3
Date: Sun, 29 Apr 2012 20:43:54 +0200
From: Ertugrul S?ylemez <[email protected]>
Subject: Re: [Haskell-beginners] Haskell as a useful practical 'tool'
for intelligent non-programmers
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
Hello there,
actually I did not want to participate in this discussion, but as I have
experience teaching many programming languages to many different sorts
of people, I feel obligated to share my observations.
To someone marginally skilled at logical thinking Haskell appears to be
the first choice as the first programming language. I'm offering two
experiences as a reference:
* I had to teach C++ to a math student. The language was very hard to
grasp, because as someone with math skills you practically have to
go back to stone age. Instead of writing equations and
relationships you have to imagine yourself sitting before a large
array of little slips of paper and manipulate them arithmetically to
reach the goal you want. Remember that the array is your memory.
You don't have a brain in C++. This was about the most difficult
part and the whole thing turned out to be a very frustrating
endeavor, because you basically have to temporarily forget what you
learned in university.
* A friend of mine with no technical and no math background wanted to
learn programming. I decided to go with Haskell, because it would
be an interesting experiment.
The experiment turned out to be very successful. As someone with no
technical skills you can pick up Haskell simply by logical thinking.
For example I never explained laziness. She developed an intuition
for it all by herself. She dealed with infinite lists like it was a
totally natural thing to have in a computer. I never explained a
lot about types, only that types must match when applying a
function. Except for "no instance for X"-style type class-related
problems the type errors made total sense to her.
At the same time I gave workshops for a group of technically skilled
people, who had a much harder time grasping Haskell. Their
knowledge of how computers work stymied them.
While many people claim that following a recipe is the natural way of
human thinking, it is surprising what a difficult time people have
passing instructions to the machine properly. My conclusion from this
and my teaching experience is that humans are good at /following/
recipes but very bad at /making/ them.
Humans think in relationships, but can't memorize a lot of them, but
exactly this is necessary for imperative programming. Functional
programming allows you to view everything in isolation and focus on
individual parts of your code without paying attention to the rest.
Furthermore imperative language compilers don't know anything about the
relationships in your code, so they can't help you a lot. Compilers for
a purely functional language on the other hand keep all relationships
and derive the recipe from them. GHC compiles to a G-machine, which
basically follows an implicit recipe extracted from the functional
relationships. Hence you express relationships and the compiler writes
the corresponding recipe. This is much easier for the human mind to
follow, because you can view everything in isolation. While
object-oriented programming languages try to emulate this (poorly) by
splitting your imperative program into isolated pieces, a purely
functional language takes this idea to its conclusion and enforces it as
a first class language feature.
This might be a reason why people programming in an imperative language
use most of their time for debugging instead of productively writing
code. A type system helps, but is very limited in its abilities,
because the programmer never gets the opportunity to express
relationships. I'm willing to subscribe to this reasoning any time.
With this experience in mind my opinion is that a purely functional
language is the natural choice for every beginning programmer, before
you screw up your mind with an imperative language like Perl, Python or
Ruby. Haskell is not a mathematical language. It is a natural
language. And /not/ knowing how the machine works actually comes as an
advantage for understanding it.
Greets,
Ertugrul
--
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120429/b9fa50c4/attachment.pgp>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 46, Issue 51
*****************************************