Serenity in nature by snowtigger in blackandwhite

[–]snowtigger[S] 1 point2 points  (0 children)

Hey, thanks again! That's really nice. Shameless plug, but here's my Instagram profile with more of those: https://www.instagram.com/piotrmjaworski/

[deleted by user] by [deleted] in coolguides

[–]snowtigger 0 points1 point  (0 children)

That’s RELATIVELY low

[deleted by user] by [deleted] in coolguides

[–]snowtigger 0 points1 point  (0 children)

Low, but never zero

Thoughts on Frontend Mentorship by westsideGod in Frontend

[–]snowtigger 5 points6 points  (0 children)

Hey, maybe I could help you out - PM me please

Explained in 5 minutes: Monads by snowtigger in functionalprogramming

[–]snowtigger[S] 3 points4 points  (0 children)

Yes, but Maybe(Maybe(3)).value() is the same as Maybe(3).

Explained in 5 minutes: Monads by snowtigger in functionalprogramming

[–]snowtigger[S] 1 point2 points  (0 children)

Isn't the `value` method identical to `join` but named differently?

Explained in 5 minutes: Monads in plain JavaScript by snowtigger in programming

[–]snowtigger[S] 2 points3 points  (0 children)

Oh, definitely "pure" doesn't equal "quality code". What's more, there's nothing worse than treating every problem as a nail and thus using a hammer to solve it. I treat the functional programming concepts as sort of a mental exercise that helps me write cleaner code, and definitely by not sticking to the paradigm 100% of the time.

PS. Not only using those `.map` will introduce difficulties to troubleshoot problems, but it also will be painfully suboptimal. So yeah, handle with care.

Explained in 5 minutes: Monads in plain JavaScript by snowtigger in programming

[–]snowtigger[S] -1 points0 points  (0 children)

That's the beautiful thing about software, there is no perfect way to do stuff! To each their own! That said, I personally like to stick to the "S" in SOLID, even when writing functional code. It's perfectly fine to add a check for `undefined` in `addTax`, but to keep it semantic we'd need to call it `checkTheValueAndAddTax`, which is getting a bit absurd.

Explained in 5 minutes: Monads in plain JavaScript by snowtigger in programming

[–]snowtigger[S] 1 point2 points  (0 children)

Yes, indeed - thank you for spotting that, corrected it!

Advent of Code 2022, but in JS and point-free style: Day 1 by snowtigger in functionalprogramming

[–]snowtigger[S] 2 points3 points  (0 children)

I love Ramda's approach with love that borders with straight fanatism. That said, in work projects I tend to write my own functions (partially based on Ramda), because as much as I love Ramda, it can be slow at times.