Monday, September 10, 2012

All about functional programming, imperative programming, and JavaWorld


http://en.wikipedia.org/wiki/Functional_programming

In computer sciencefunctional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state.









http://eloquentjavascript.net/chapter6.html
Eloquent Javascript, like Dive into Python, only Javascript. (or should u just use jQuery.)



Eloquent JavaScript

A Modern Introduction to Programming

by Marijn Haverbeke


Eloquent JavaScript is a book providing an introduction to the JavaScript programming language and programming in general.
A concise and balanced mix of principles and pragmatics. I loved the tutorial-style game-like program development. This book rekindled my earliest joys of programming. Plus, JavaScript!
Brendan Eich, the man who gave us JavaScript
The book exists in two forms. It was originally written and published in digital form, which includes interactive examples and a mechanism for playing with all the example code. This version is released under an open license.
I have published a revised version of the book on paper. The structure of this version remained largely the same, but the whole text has been thoroughly edited and updated. You can order from Amazon here. There is still an interactive coding environment for this version, as aseparate page. Errata are here.
The digital version is available in the following formats:





http://www.joelonsoftware.com/items/2006/08/01.html

Can Your Programming Language Do This?

by Joel Spolsky


Or maybe, just hypothetically, you have hundreds of thousands of servers in several data centers around the world, and you have a really big array, containing, let's say, again, just hypothetically, the entire contents of the internet. Now you can run map on thousands of computers, each of which will attack a tiny part of the problem.
So now, for example, writing some really fast code to search the entire contents of the internet is as simple as calling the map function with a basic string searcher as an argument.
The really interesting thing I want you to notice, here, is that as soon as you think of map and reduce as functions that everybody can use, and they use them, you only have to get one supergenius to write the hard code to run map and reduce on a global massively parallel array of computers, and all the old code that used to work fine when you just ran a loop still works only it's a zillion times faster which means it can be used to tackle huge problems in an instant.
Lemme repeat that. By abstracting away the very concept of looping, you can implement looping any way you want, including implementing it in a way that scales nicely with extra hardware.
And now you understand something I wrote a while ago where Icomplained about CS students who are never taught anything but Java:
Without understanding functional programming, you can't inventMapReduce, the algorithm that makes Google so massively scalable.






http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

Execution in the Kingdom of Nouns

 They've a temper, some of them—particularly verbs: they're the proudest—adjectives you can do anything with, but not verbs—however, I can manage the whole lot of them! Impenetrability! That's what I say!
— Humpty Dumpty

Hello, world! Today we're going to hear the story of Evil King Java and his quest for worldwide verb stamp-outage.









No comments:

Post a Comment