Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Future of Programming

Nate Abele
February 19, 2015

The Future of Programming

"The most dangerous thought you can have as a creative person is to think you know what you’re doing."
— Richard Hamming, The Art of Doing Science and Engineering

Nate Abele

February 19, 2015
Tweet

More Decks by Nate Abele

Other Decks in Technology

Transcript

  1. “The most dangerous thought you can have as a creative

    person is to think you know what you’re doing.” — Richard Hamming The Art of Doing Science and Engineering
  2. Rich Hickey: Simple Made Easy Gary Bernhardt: Boundaries Alan Kay:

    The Future Doesn’t Have to be Incremental Anthony Ferrara: Beyond Series
  3. “enormous, […] but not stronger” “inherent defects at the most

    basic level” “primitive word-at-a-time style” “close coupling of semantics to state transitions” “division […] into […] expressions & […] statements” “inability to use powerful combining forms” “lack of useful mathematical properties for reasoning”
  4. “We've got things back-asswards today: we let Intel make processors

    that may or may not be good for anything, then the programmer's job is to make Intel look good, by making code that will actually somehow run on it.” — Alan Kay https://www.youtube.com/watch?v=ubaX1Smg6pY
  5. “[W]e were able to do the operating system, the programming

    language, the applications and the user interface in about 10,000 lines of code. Now it's true that we were able to build our own computers, that makes a huge difference.” — Alan Kay https://www.youtube.com/watch?v=ubaX1Smg6pY
  6. “That language is an instrument of human reason, and not

    merely a medium for the expression of thought, is a truth generally admitted.” — George Boole
  7. • Events • Callbacks • Promises • Database cursors •

    Arrays • etc. Streams (aka observables, aka sequences)
  8. • …show list of incomplete tasks for a given user

    • …display the title and priority • …sorted by date Given a list of tasks… http://scott.sauyet.com/Javascript/Talk/2014/01/FuncProgTalk
  9. http://scott.sauyet.com/Javascript/Talk/2014/01/FuncProgTalk var getIncompleteTaskSummariesForMember = function(memberName) { return fetchData() .then(function(data) {

    return data.tasks; }) .then(function(tasks) { var results = []; for (var i = 0, len = tasks.length; i < len; i++) { if (tasks[i].member == memberName) { results.push(tasks[i]); } } return results; }) .then(function(tasks) { var results = []; for (var i = 0, len = tasks.length; i < len; i++) { if (!tasks[i].complete) { results.push(tasks[i]); } } return results; }) .then(function(tasks) { var results = [], task; for (var i = 0, len = tasks.length; i < len; i++) { task = tasks[i]; results.push({ id: task.id, dueDate: task.dueDate, title: task.title, priority: task.priority }) } return results; }) .then(function(tasks) { tasks.sort(function(first, second) { return first.dueDate - second.dueDate; }); return tasks; });
  10. http://scott.sauyet.com/Javascript/Talk/2014/01/FuncProgTalk var getIncompleteTaskSummariesForMember = function(memberName) { return fetchData() .then(get('tasks')) .then(filter(propEq('member',

    memberName))) .then(reject(propEq('complete', true))) .then(map(pick(['id', 'dueDate', 'title', 'priority']))) .then(sortBy(get('dueDate'))); };
  11. var taskPipeline = (member) => { return pipe( 'tasks', filter({

    member }), reject({ complete: true }), pick(['id', 'dueDate', 'title', 'priority']), sortBy('dueDate') ); }; var pipeline = taskPipeline(memberName); return fetchData().then(pipeline);
  12. 'id' pipline = (member) => { 'tasks', filter: { member

    }, reject: { complete: true }, pick: 'dueDate', sortBy: 'dueDate' } 'title' 'priority'
  13. Task List [{…}, {…}, {…}] → SELECT * from tasks

    owner = “Nate” → array_filter(…) “title (countdown)” → <li> <?=$title … ?> </li> duedate → usort(…)
  14. Task List [{…}, {…}, {…}] → SELECT title, duedate, (…)

    as countdown FROM tasks WHERE owner = “Nate” ORDERBY duedate “title (countdown)” → <li> <?=$title … ?> </li>