The mess we're in

Imperative insanity

  • Causing software projects to fail

Stop programming

for the love of god..

  • Spend less time writing code
  • Spend more time thinking
  • Spend more time learning

Complexity

  • Most complexity is accidental - not required.
  • Taken for granted (wrongfully)
  • Understanding the domain and problem is vital

Simple

  • is always better than complex
  • required discipline

Code is a biproduct

  • solving problems is the value
  • write code for humans - not computers
var numbers = [[1, 2], [3, 4], [5, 6]];
var doubled = [];

for(var i = 0; i < numbers.length; i++) {
  var entry = [];
  for (var j = 0; j < numbers[i].length; j++) {
    entry.push(numbers[i][j] * 2);
  }
  doubled.push(entry);
}

console.log(doubled); //=> [[2, 4], [6, 8], [10, 12]]
var numbers = [[1, 2], [3, 4], [5, 6]];
var doubled = numbers.map(n => n.map(m => m * 2));

Functional JavaScript

Stop using

  • for / while
  • nested if/else
  • mutative intermediate state
  • imperative programming style

Start using

  • functional approaches
  • abstractions
  • composition
  • streams

Tools

  • streams
  • lodash
  • highland
  • ramda

Declarative

Your code should read as a recipe of what to do - not how to do it

Takeaway

  • Take a step back (regularly)
  • It doesn't have to be complex
  • Think more - code less (but better)
  • Learn the tools
  • Always keep learning

The mess we're in (rant)

By Eirik Langholm Vullum

The mess we're in (rant)

Internal rant at Scandinavia Online

  • 610
Loading comments...

More from Eirik Langholm Vullum