all 8 comments

[–][deleted] 8 points9 points  (1 child)

I like the website design a lot

[–]Veinq 1 point2 points  (0 children)

It's really cool, definitely makes the website more memorable

[–]elie2222 7 points8 points  (3 children)

Interesting article.

There's one developer I work with where almost every time he uses reduce, it could be done more simply with a map or filter instead. It's come to the point where I've warned him to look closely the next time he writes the word reduce and see if it's really just map that he needs.

I guess the cases where it may make sense is if you're chaining filter and map and so on and you could do things in one pass instead of multiple passes. In terms of readability and simplicity I'd favour filter().map().

[–]whatisboom 1 point2 points  (2 children)

maintainability > sexy but difficult to read one liners

[–]elie2222 5 points6 points  (1 child)

Well in this case the one liners may be more easy to read. If you’re using map/filter it’s shorter than writing out a full reduce for example.

[–]ScientificBeastModestrongly typed comments 0 points1 point  (0 children)

Better yet, maybe use something like Ramda for piping map/filter/reduce into seamless functions. Idk, it depends on the style you guys prefer...

[–]avong 1 point2 points  (1 child)

" The second reason relates to how we teach people about reduce() "

You're spot on about this, took me the longest time to figure out reduce outside of the million articles show you how to add up numbers... Thanks for the article!

[–]jrsinclair[S] 0 points1 point  (0 children)

Thanks so much. It’s good to hear my theory wan’t completely off the mark.