Posts

Showing posts from May, 2010

How to write a Hello World program for multi-billion users

Image
1 - Some current news, some inspirationshttp://www.forbes.com/2010/04/29/moores-law-computing-processing-opinions-contributors-bill-dally.html


2 - Some technical viewpointshttp://en.wikipedia.org/wiki/Functional_programming http://en.wikipedia.org/wiki/Comparison_of_programming_paradigms http://en.wikipedia.org/wiki/Imperative_programming

http://www.scala-lang.org/
" Functional programming - treats computation as the evaluation of mathematical functions and avoids state and mutable data. " So what am I thinking? The mutable data means, you have to or "must" control which function takes this data first if there are some functions concurrently refer to it. E.g: Normal case: Integer n = 1; n = n + 1; System.out.print(n); You get 2 Concurrent case:Integer n = 1; A thread do n = n + 1;
A another thread do n = n - 1; 2 threads use the shared object "Integer n".
2.1 - The waiting for your dinnerWhat happens when you share a fork with your friend. You have to wait him.Yes,…