I don't know much about a Haskell lens, but I've seen it referred to several times recently, so I thought I'd dig into it some more. Here's a photo from this article about lenses in scalaz.
Scala, Java, Unix, MacOS tutorials (page 291)
| Stand your ground and reclaim your time! | |
|
The Art of Saying No |
Diagram is from an article on how to assign Linux processes to specific CPUs and cores.
A look at the military spending of the United States in 2012 compared to other countries. Chart from this Business Insider link.
There’s a nice Scala Set tip in the book, Functional Programming Patterns in Scala and Clojure. The tip is this:
You can use a Scala
Setas a predicate to a function.
Note that a predicate is just a function that returns a Boolean value.
I love the flexibility and expressiveness of the Scala language. The code shown comes from this Github page, and is part of a Scalachess project.
From a good article titled, Secure Salted Password Hashing - Doing It Right.
A little sage investing advice from Warren Buffett, from this article.
Summary: Most Java/OOP developers I know are interested in FP. They want to make their code more reliable, testing easier, and want to gain performance advantages of multiple cores. The problem they have is that all the FP literature is about “programming in the small”, and what they need right now is a good example of a complete FP system (programming in the large), one that includes a UI, database, web services, etc. In this article I explore that problem from the perspective of Java/OOP developers, and offer the 80/20 rule I follow today for building systems with FP in mind.
Composition
I ran across some great thoughts from Erkki Lindpere on zeroturnaround.com yesterday. First this:
“I think the real composability and reusability in object-oriented code doesn’t come from object-oriented design at all: it comes from abstraction and encapsulation.”
That’s good, but the highlight below shows my favorite thought:
Socrates (Soc), whispering in Dan's mind: Where are you?
Dan: Here.
Soc: What time is it?
Dan: Now.
Soc: What are you?
Dan: This moment.
(From the movie, Peaceful Warrior.)
A life lesson from watching old Kung Fu episodes: If Caine had communicated better, such as using sentences of more than 1 to 3 words, he would have avoided many misunderstandings and fights.
If you like animals, and Siberian Huskies in particular, the Free Spirit Siberian Rescue page on Facebook is one of the most interesting/entertaining things about Facebook these days.
| Stand your ground and reclaim your time! | |
|
The Art of Saying No |