So you want help with Haskell homework? Good news! The Haskell community loves teaching beginners about the language. However, there's a right way and a wrong way to get help. If you have been directed here by someone, maybe you asked the wrong way.
The purpose of this page is to help you understand why the wrong way is wrong, and guide you to the right way so that you can get the help you need.
Your university/school probably has tutors or instructors who can help you out if you are stuck. These people are paid to (amongst other things) help you. If you have no idea where to even start on your problem, this should always be your first port of call. You have probably also been given course notes, lecture notes or a textbook. Admittedly, some course notes and textbooks are better than others, but even so, these have been assigned to you for a reason. There are also many fine resources on the net which can assist you in getting started.
If you have tried and failed, and for some reason can't or don't want to use your school's resources, then the Haskell community may be able to help you out. Read on to learn how.
The Haskell Community
The first thing you should know is that the Haskell communities are a fairly closely-knit bunch of people. They may not all know each other well, but they tend to hang out in the same virtual places. Chances are, the lecturers/professors/instructors for your course hang out in these places too. Any request for homework help on the haskell-cafe mailing list, the comp.lang.functional newsgroup or even the HaskellIrcChannel might be noticed by your instructors.
In addition, those who know Haskell well had to learn it once, and if they're smart, they did it the proper way. The kind of people who you want to help you don't want to repeat something you can find in a book, and they don't want to do your homework for you.
This doesn't mean that you can't ask for homework help. Far from it! However, it does mean:
- Nobody is going to do your homework for you. The best you're going to get is help.
- Even if someone does it for you, their solution may not help you or may even be subtly wrong. Some people are deliberately cruel to people who ask for homework questions the wrong way; some just like the mental challenge of producing a correct but unhelpful answer.
- Even if someone does give you a useful solution, whoever marks your homework is probably going to know about it one way or another. Cheating (and getting someone else to do the work for you is cheating) is a pretty serious offence at most institutions. Besides, you're not really learning anything this way.
The flip side of this is that people in HaskellCommunities often enjoy teaching others. If you truly want to learn, there are many people who will be happy to help you.
Your lecturer/instructor may have told you that there is no such thing as a stupid question. Inside your classroom, that is correct. Outside your classroom, there are smart questions and stupid questions. If you ask a smart question of the Haskell community, you will probably get a helpful answer. If you ask a stupid question, you will probably get an unhelpful answer or, more likely, no answer at all.
The difference between a smart question and a stupid question is not what you think. Being a HaskellNewbie does not make you or your question stupid. After all, everyone was a newbie once. The difference is almost all about what you tried before you asked your question.
You have been set the homework question because those running your course believe that you are equipped to attempt it. If you don't even try, don't expect anyone else to help you.
So before asking, try to go through these steps first:
- Read the problem carefully and make sure you understand what is being asked of you.
- If you can't solve the whole problem, try breaking the problem down into parts and solving those parts.
- If you can't write it in Haskell, try writing it in English (or your native language) first.
- If you can't write code, try at least writing a type signature.
- Look through the libraries provided by Haskell, particularly those parts which have been pointed out to you in class or in your course notes. There may be something there which helps you.
If you are still stuck after this, it might be time to ask a question. If so, the following guidelines will help:
- Make sure you pick the right forum. For example, don't use the haskell mailing list to ask for homework help. (If you want to ask on a mailing list, use haskell-cafe instead.) It might help to lurk for a while to get the general tone of the forum first. You can also ask smart questions on the HaskellIrcChannel.
- Say that it's homework. They're going to recognise it as such regardless, but this way, you're being upfront about it.
- Always ask publicly. Just because someone seems helpful in a forum doesn't mean they'll want to help you personally in email. By asking publicly, you not only avoid the risk of being completely ignored, but also you may get more or better help than a single person can give you.
- Try to make your question as specific as possible. Say what problem (or subproblem) you are stuck on as succinctly as you can. If the original homework question is long, don't copy it verbatim (though if it's available on the web, a link might not go astray). People who may want to help you probably don't have a lot of time to familiarise themselves with your problem.
- Say what you've done so far, and include code. People are much more likely to help you fix your incorrect code than write correct code for you. Moreover, if the problem is that you don't understand something, your incorrect code will probably reflect this, and fixing your misunderstanding is much more valuable than fixing your code.
A fine guide to asking smart questions is How To Ask Questions The Smart Way. Please note that the authors of this guide are not a help desk for your project. Do not email them with your homework questions. That wouldn't be smart.
Also check out Problem solving in Haskell, a how-to guide on approaching Haskell problems.
On this site, see the Category:Tutorials page.