-2

I come from a background of 1 year programing in html/css/javascript/jQuery and 6 months in Java's JSP Servelets.I am in the 2nd year of college and in the last semester of the second year I didn't passed Functional Programing course in which we were learning Haskell(maybe mostly because i mised 90% of the clases). Seems in my second year I will also have a course in witch Haskell is involved so learning just the basics wont be enough.

What I am interested in is:

-the differences between OOP programming and function programming

-what book is recommended for a beginner in functioning programing using Haskell(I cant seem to make head or tail of what the professor wrote)

-where to go to practice the language after I'm done with the book

-what can I do with Haskell and cant do in Java

-do I need a lot of Math for understanding Haskell(My college professor used a lot of math related stuff in hes course)

zx81
  • 41,100
  • 9
  • 89
  • 105
Aly
  • 117
  • 1
  • 2
  • 6
  • 4
    http://stackoverflow.com/questions/16918/beginners-guide-to-haskell – Luigi Plinge Sep 13 '11 at 16:43
  • 1
    All of this is trivially searchable on the web. IMO [Learn You a Haskell for Great Good](http://learnyouahaskell.com/) is priceless. – Dave Newton Sep 13 '11 at 16:47
  • 3
    You're asking a lot of broad questions here. Why don't you have a look around at [haskell.org](http://haskell.org/), and come back with more specific questions if you have any? – hammar Sep 13 '11 at 16:48
  • Despite popular belief, most professors love talking about the stuff they teach. So grab your professor sometime (or email him) and ask these questions. I'm sure he would be able to give very satisfying answers. If you are ill-prepared for the class (e.g. you need more math experience) then the professor is the best one to identify that issue. – Dan Burton Sep 13 '11 at 22:09

4 Answers4

5

the diferences beetween OOP programming and function programming

From your background, you probably don't know enough about OOP for comparisons to be useful. Just forget about it and learn functional programming as itself.

what book is recomended for a beginer in functioning programing using Haskell(I cant seem to make heade or tales of what the profesor wrote)

Everyone else keeps mentioning Learn You A Haskell for a reason. :]

where to go to practice the language after I'm done with the book

On your computer? Get the compiler, get a code editor, start programming. Learning by doing is the best way.

what can I do with Haskell and cant do in Java

Trivially, nothing. Both languages are capable of doing anything you might want to do, the end.

And again, you haven't spent enough time with Java for comparing the languages to be helpful anyway, so just learn Haskell as itself.

do I need alot of Math for understanding Haskell(My coledge profesor used a lot of math related stuff in hes course)

Not really. A little bit of discrete math and formal logic helps, though, but that's the sort of stuff you should get in any CS program anyway.

C. A. McCann
  • 76,893
  • 19
  • 209
  • 302
4

If you missed most of the lectures, then I haven't got a lot of sympathy. But I'll try to help.

1: Differences in OOP and Functional: big question. For now, I would try to approach Haskell with an open mind rather than trying to understand it in terms of its difference from OOP.

2: "Learn you a Haskell" and "Real World Haskell" are both available on the Net.

3: Work through the exercises in the books. Then look at the exercises in Project Euler.

4: Both are general purpose languages, so any application can be written in both. Haskell enables greater type safety and shorter code.

5: No, but the maths helps you understand it at a deeper level. I picked up the relevant math as I went along. Look up maths terminology on Wikipedia, and don't sweat it too much.

Paul Johnson
  • 17,438
  • 3
  • 42
  • 59
  • Well when you work you dont have alot of time for all your courses but thanx for the info – Aly Sep 13 '11 at 16:52
  • 2
    @Aly: If you don't even have enough time to go to most of the lectures, you certainly won't have enough time to do the studying required. There's more to learning than sitting in a room a few times a week and then hoping for a passing grade. – C. A. McCann Sep 13 '11 at 17:00
  • Coledge in Romania you cant take the number of courses you want.There are 7 courses and there predifiend bye the profesors.I already work as a developer for a small company and I belive I learn more from there than I would in 5 years of coledge – Aly Sep 13 '11 at 17:00
  • 1
    Hmm. I don't see how that's a workable system if you're working at the same time, and can't make the time necessary to study. – Dave Newton Sep 13 '11 at 17:02
  • 2
    @Aly: Then why not take a break from college and focus on your work? You'll certainly be much more able to appreciate the value of Haskell and functional programming a couple of years from now, once you've spent some time getting comfortable with programming in general. – Daniel Pryden Sep 13 '11 at 17:04
  • 2
    @Aly: I think you will find that work and college teach different things, and both are valuable. – Paul Johnson Sep 13 '11 at 17:22
  • I am working so I can go to coledge so taking a brake from coledge makes no sens – Aly Sep 13 '11 at 17:22
  • If you want to do programming with less math, Project Euler probably isn't for you. – amindfv Sep 13 '11 at 18:42
3

Start with Learn You a Haskell for Great Good. Also, look at the design of the jQuery library, as many of its features are designed around functional programming techniques.

Also, I highly recommend that you spend some time brushing up on your English skills as well. In my opinion, programming is a least as much about language as it is about math. From your comments so far, I suspect that your approach to both has been somewhat sloppy. That's going to be the hardest thing to overcome. As a general rule, programming systems are quite rigorous, and one way or another you'll need to learn to be more precise in the way you organize your thoughts.

Daniel Pryden
  • 59,486
  • 16
  • 97
  • 135
1

i go with the opinions above - missing lectures is a bad thing and good English is a nice skill to have.

  • Of course - the already mentioned Learn you a Haskell for great good - is the location to start with.
  • Here are recordings of an exercise class in Germany, but the spoken language is English (with german accent).
  • And one thing you also should be aware of is: Hoogle, one if not the greatest things when it comes to learning haskell (imho) - a type searchable documentation:
    • if you search for a function that pulls out the end of a list - but you don't know the name:
      hoogle: [a]-> a lists all functions that have the given type signature - last, which is the function you looked for, is one of them.
  • Another thing - helping me develop my haskell skills is - syntastic in vim, a syntax checker, which sped the "compile - check - run"-cycle up by a massive amount, and hlint - a linting tool, that makes code much more readable - and shows you unnecessary stuff you added to your code, I really learned stuff from tiding up my code that way.
  • For starting with IO - there's this great article. It is also a great introduction how experienced functional programmers think.
  • And for advanced stuff and getting to know monads there is the Monad Reader recent stuff, older stuff a worthy thing to attack, I've heard, especially #13.

if you already know and like Java have a look at Clojure

epsilonhalbe
  • 15,637
  • 5
  • 46
  • 74