There's a pattern I really like, and it goes like this:
var myObj = function()
{
return {
f1: function()
{
// Some code...
},
f2: function()
{
// Some other code...
}
}
}();
I am not going to write about this pattern right now, but to mention an issues with the return bracket. Turns out that if I take the opening bracket '{' right after the 'return' one row down, then the whole thing breaks apart and JavaScript cannot understand it.
The reason for it is that while writing JavaScript one does not have to put a ; at the end of every line, so the statement 'return' is actually similar to 'return;', and it doesn't matter that the row below contains the beginning of an object to return.
Tuesday, September 30, 2008
Tuesday, November 13, 2007
Programmatic Modeling of the Human Brain
While reading Daniel Goleman's Social Intelligence I realized how fascinated I am by the functioning of the human brain, and began fantasizing about programmatically modeling its replica.
Of course we don't know everything there is to know about this amazing processor, but surely by the time I am educated enough to design this sort application science will be closer to fully understand it.
There's a really cool article about Prof. Naftali Tishbi's thoughts regarding this matter (Hebrew) that I have recently encountered. Inspiring ambitions :)
Of course we don't know everything there is to know about this amazing processor, but surely by the time I am educated enough to design this sort application science will be closer to fully understand it.
There's a really cool article about Prof. Naftali Tishbi's thoughts regarding this matter (Hebrew) that I have recently encountered. Inspiring ambitions :)
Subscribe to:
Posts (Atom)