
Ask HN: How to choose functional programming side projects? - CRUDmeariver
I&#x27;ve been using functional programming languages in the workplace for about a year and a half now, first Scala and now Clojure.  I am comfortable with basic FP operations (reduce, fold, map, etc) and the principles behind it, but I have yet to come across a reason to learn the more academic side of things (monads, applicative functors, currying, etc).<p>I&#x27;m trying to figure out a fun side project that will give me an opportunity to get deeper into the weeds of FP.  I&#x27;m not sure whether to take a simple idea you could do in OO (i.e. a CRUD app) and do it in an FP language, or look for a problem that is more suited to the domain of FP.<p>What are the characteristics of a problem that is especially suited to FP?  Or is it a pointless distinction?  And how much of the theory is actually worth learning if I don&#x27;t plan on using Haskell?
======
bbcbasic
I would recommend having a look at
[http://haskellbook.com/](http://haskellbook.com/) which is written by someone
who is seriously passionate about making Haskell understandable to regular
programmers. Before writing the book he kept track of the best resources for
learning Haskell but was always thinking the community needs something better
for beginners. So I think it would be worth buying.

For parallel and concurrency programming this book is excellent
[http://chimera.labs.oreilly.com/books/1230000000929](http://chimera.labs.oreilly.com/books/1230000000929)
and is free online to read. I am working through the concurrency chapters and
it is blowing my mind how excellent concurrency support is in Haskell AND how
someone who is smart enough to work on the GHC for 15 years can explain
concurrency in a way that is accessible to someone fairly new to Haskell and
concurrency. You'd probably need the grounding of haskellbook first though
before reading this.

For a Haskell project I have decided to make a stock exchange using the
concurrency I am learning from the above book. Eventually it may be good
enough for someone wanting to run a bitcoin exchange or similar. Happy to have
you help me if you like.

> What are the characteristics of a problem that is especially suited to FP?

Really, any programming problem is suitable for FP. I think web applications
and server applications are especially suited. Writing desktop applications is
trickier mainly because of a lack of a really nice paradigm. The nicest thing
I've seen so far in that respect is the Elm language - which is for the
browser but the ideas could be applied to the native desktop too.

The classic applications for FP is compilers but Haskell is a general purpose
language and ideal for producing the kind of business apps that Java/C# is
often used for.

~~~
a-saleh
I second the elm recommendation :-) Really nice language to learn the FP from.

------
AnimalMuppet
To produce the benefits you want, you're probably going to need a side project
that you stick with for a while, one that pushes you to figure out how to do
things that aren't necessarily easy to do in (simple) FP. To me, the kind of
side project that is likely to do that is one where _you care about the
project_. Forget whether the problem is "suited to FP" or not. Do something
you _want_ to do.

------
eatonphil
If you want to be boring, try writing purely functional data structures (check
out Containers in the Ponyo source via ponyo.org). Otherwise, do something
interesting like writing a web server from scratch or a wrapper to FastCGI.
These are the kinds of things I do in every new language I want to learn
(OCaml, SML, Scheme, etc.).

------
runT1ME
Have you read Functional Programming in Scala?

[https://www.amazon.com/Functional-Programming-Scala-Paul-
Chi...](https://www.amazon.com/Functional-Programming-Scala-Paul-
Chiusano/dp/1617290653/ref=sr_1_1?ie=UTF8&qid=1465849313&sr=8-1&keywords=functional+programming+in+scala)

------
meric
You could try implement monads in an OO language.

