My next step: Mathematics and functional programming?

9 points by EgeBamyasi ↗ HN
Hi!

First, a proper introduction. Im a 22 year old student from Sweden who have been programming on and off since I was 12, and at the moment Im studying "application development", at something called KY(basically a little less fancy university where you have 6 months of mandatory internship at some company).What we do at school is object oriented programming day in and day out for two and a half year, and during my summer break Im working with a iPhone-app. I would say that my understanding of the object oriented paradigm is steadily getting better and better.

Although I really enjoy this and never get bored doing it I have begun to think about what would be my next step, after i graduate October 2011.

Over the last couple of years I have stared to enjoy mathematics more and more and have been looking at functional programming(mainly Haskell) for a while and I feel that this is something I would be willing to spend a good portion of my life doing(among artist, record label owner, custom bicycle builder and rock star :-) ). Im interested to work with functional programming and to know math, not so much work with it.

So, I have a couple of questions.

A. What would be best choice to get the most out of a degree and get the deepest understanding about FP? A CS-bachelor with mainly math and functional programming courses(in Sweden Chalmers offers quite a lot in this subject) or a Mathematics bachelor with lots functional programming courses?

B. Should I work for a few years before I start studying again? On one hand I think It would be nice to get some real experience but on the other Im afraid that if I get to deep down in the OO-rabbit hole I would get stuck in it, have a harder time grasping all the, for me, abstract techniques and theorems behind FP or just get comfortable with the salary and refuse to start living as a poor student again ;-).

C. I know there is always exiting work for a good programmer, but how is it for a functional programmer?(I'm not limited by living in Sweden, I really want to work all over the world). Do you have to be among the best to get somewhere? Is there many jobs where you program a good portion in the FPparadigm etc etc.

D. Is the idea of studying a lot of math stupid since Its mostly for my personal interest? Would it be better to do a CS, have fun on the math-courses, and choose other courses, maybe software engineering stuff like that to broaden my OO-understanding?

And since Im a music nerd and have held your attention for this long I would like to offer a song as compensation for the long text :-) I present; Tetragon - Fugue, on of the most awesome and epic song of all time. Part 1/2: http://www.youtube.com/watch?v=MNlOuzNkF40 Part 2/2: http://www.youtube.com/watch?v=m9bXMtMIR-s

13 comments

[ 2.8 ms ] story [ 36.6 ms ] thread
Hi, New to FP as well, and I like your list of interests =)

  Have you ever considered Clojure with Incanter? 
  http://data-sorcery.org/
Not until now, thanks for the tip! :-)
Somebody observed (around here or reddit?) recently that there are no unemployed mathematicians. By that, s/he probably meant statistics/probability, linear algebra and diff EQ's as good things to be good at:

http://measuringmeasures.com/blog/2010/3/12/learning-about-m...

=====================

FP, there's pretty strong interest in erlang, ocaml, haskell, F#, scala , clojure. Also scheme/CL .

http://stackoverflow.com/questions/805429/learning-scala-or-...

http://www.slideshare.net/brweber2/functional-concepts-for-o...

http://enfranchisedmind.com/blog/posts/what-killed-lisp-coul...

http://ivory.idyll.org/blog/jun-10/functional-programming-la...

Thank you for the links, although I already know the basics of FP(or Haskell at least, good enough to solve most of the Project Euler problems I've been able to do with OO) and at this moment Haskell seems to be the best tool for learning FP for me so Im going to stick with it :-). And if I know one FP-language really well would't it be just like with procedural programming languages, trivial to pick up a new language?

What Im after is a full understanding of what happens "under the hood", I've read some articles about lambda calculus, higher order functions, monads etc. but I get lost in all the math and abstract thinking.

As a general comment, you're not likely to regret studying a lot of math whatever you end up doing. It's very useful general purpose stuff, both it and how it trains you to think.
Have you looked at FOOP - Functional Object Oriented Programming? It very neatly marries FP and OOP. ECMAscript and Python both implement the paradigm.

Suggest learning a solid foundation of Lisp, then languages like Clojure, etc will be easier to pickup.

Uni level math is very different from high school. If you need a bridging course take a look at http://ocw.mit.edu/courses/electrical-engineering-and-comput....

For anyone who might be interested in readin more about FP, whats its good for and when to use it here are som reading.

Why functional programming matters, by John Hughes(This one is recommended all over the place :-) ). Its really fun to read and he writes in a natual and easy to understand way. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.63....

A comparison of an Quick Sort implementation, C# vs Haskell. For problems involving large amount of data and the need to operate over it functional programming seems like the perfect choice. http://shunsuk.blogspot.com/2008/02/quick-sort-haskell-vs-c....

I'm finishing up a mathematics degree so I'll tackle question A from my perspective.

If you know how to program a CS degree can be very tedious. This is mainly why I made the switch to mathematics. On the other side mathematics will teach you many things that are fairly archaic as the discipline has not really caught up with the advances in computing over the last few decades.

Both are good for what you want. If I could do it again though I would select a few CS courses (fp etc), some mathematics (graph theory, algebra, cryptography), and actually major in a liberal arts area like linguistics.

Do you feel that your programming skills have increased due to your mathematics studies(I make a difference between programming and problem solving, this is maybe the wrong way to see it?)?

Why is it that you would have majored in another area if you where to do it all again?

My plan is to use logical reasoning, problem solving and mathematical knowledge in lots of different fields outside computer science hence the main interest in mathematical studies.

Computers have been my Nr. 1 interest for as long as I can remember but I don´t think that I want to WORK with them for more than about 15-20 years, there Is so much more to do, music, building stuff, working with people on a non technical level etc.

Anyways, thanks for the reply!

My advice is to follow your interests, especially since they mean getting into solving deeper and more interesting problems.

There are lots of people out there with standard programming backgrounds, not a lot coming from the deeper and more esoteric ones.

I figure if you want interesting work, you gotta have an interesting education.

Also don't too hung up on the OO vs FP shiz. They're both just tools for solving a problem. Learn them both and take what you need.

Also I like your fugue...but http://www.youtube.com/watch?v=OoA0cTC228M ...turn it up

Yeah, I get that FP, OO, Logical etc etc. paradigms just is different ways to model problems around and that you should choose the one best suited for the task.

What I meant was that If I were to work with OO 8hr/day for a longer period of time Im afraid that I would get so "wired up" in the OO way of thinking that I would have a hard time learning and understanding to think in a correct FP-manner.

Oh, This Is Happening is an excellent record! Since were in on electronic stuff I must recommend Bot'Ox - Blue Steel :-) http://www.youtube.com/watch?v=XMEUpF7mNb0