Raspberry Pi - Node JS

Raspberry Pi - Node JS

So i finally got my pi! I went to micro direct at the weekend, turns out they have lots in stock!! so I cancelled my order with RS components as it was delayed until probably next year Now i have raspian up and running, i need a project!! I'm tempted to try out raspbmc, but i think my first project to try out will be using my pi as a server. First I need to setup SSH and FTP, this shouldn't be too difficult, then i can install Node JS. Its quite difficult looking for tutorials on this kinda stuff as its all relatively new, but I think i'll be following this link http://www.raspberrypi.org/phpBB3/viewtopic.php?f=34&t=18775 which seems fairly straight forward! ...but what to do next? I have been trying out some of the features of jQuery mobile, so maybe I'll try some kind of client server type app? This link should call straight into my pi, running node js

Long overdue update - Functional programming in scala

Long overdue update - Functional programming in scala

Its been a while since i managed to get the time post on my blog, I've been really busy with work and home life,
I've recently enrolled in an online course. Functional programming in Scala.
I haven't really touched upon much function programming (except for javascript and a bit of F#). I like it! And i can see its uses! It feels a bit weird entering back into the java world, firing up eclipse etc. I guess i have just become  reliant on the friendly features of Visual Studio.

Anyway, here are the answers to the assignment I just submitted for the Functional Programming in Scala!

Pascals Triangle
  1.   def pascal(c: Int, r: Int): Int =
  2.     if (c == 0 || r == c) 1
  3.     else (pascal(c - 1, r - 1) + pascal(c, r - 1));
Parentheses Balancing
  1. def balance(chars: List[Char]): Boolean = {
  2.     def countParenthese(index: Int, list: List[Char]): Boolean = {
  3.       if (index == 0 && list.isEmpty) true
  4.       else if (index < 0 || list.isEmpty) false
  5.       else if (list.head == '(') countParenthese(index + 1, list.tail)
  6.       else if (list.head == ')') countParenthese(index - 1, list.tail)
  7.       else countParenthese(index, list.tail)
  8.     }
  9.     countParenthese(0, chars)
  10.   }
Change Counting
  1.  def countChange(money: Int, coins: List[Int]): Int =
  2.     if (money == 0) 1
  3.     else if (money < 0 || coins.isEmpty) 0
  4.     else countChange(money, coins.tail) + countChange(money - coins.head, coins)
  5. }