Hacker News new | ask | show | jobs
by gremy0 3687 days ago
I don't really get the Ease vs Simple section, what point is he trying to make?

This is simple:

  i  = 0x5f3759df - ( i >> 1 );
Where this is just easy:

  famework.authService.login('user','password')

Good article though.
4 comments

If you haven't already done so, listen to this talk by Rich Hickey (the creator of Clojure). This should clear it up for you. https://www.infoq.com/presentations/Simple-Made-Easy
Thanks! Added link from the post to the lecture.
This is simple:

    if (str.length < 6) {
      str = ' '.repeat(6-str.length) + str;
    }
This is easy:

    leftPad = require('left-pad')
 
    leftPad(str, 6)
(note: my JavaScript is rusty; there may be some very valid reason that the simple code is wrong)
Thats one reason that its tempting to use something as simple as left pad. I only spend a small percentage of my time doing JavaScript, and the language has enough gotchas. Using something like that would give me the peace of mind that I haven't missed some quirk of the language. If someone knows how to publish a package on npm, then they probably know more JavaScript than me.
The point is that in the second case some people have no clue what's really happening, others have rough idea and very small group of people know what exactly happens. It might appear simple but it's not. It's easy.
Easy things can be vastly complicated. This means that such complicated easy things are hard to maintain.

Simple is always easy to maintain.

Remember, as software developers, complexity is the enemy. It is the beast we want to slay.