Researching the use of an IO Monad in Scala alvin February 26, 2017 - 7:44pm

As I was researching who might be using an “IO Monad” in Scala, I found this quote from Martin Odersky in the Google Group titled “scala-debate”:

“The IO monad was a neat trick for combining side effects with lazy evaluation ... there is only one lazily evaluated language in wide usage today and even its creators have said that laziness was probably a mistake. Strict languages don’t need the IO monad, and generally don’t have it, even though they could. Bob Harper’s posts in his ‘existential type’ series are a good explanation on why not.”

Here’s a link to Bob Harper’s The Point of Laziness article.

Struggling to say things pleasant or unpleasant (or not)

Many people seem to struggle to say things that are either pleasant or unpleasant. I can’t speak for anyone else, but having gone through the process of not knowing if I was going to live through many days last year I find it easier to say pretty much anything now. It’s like you know your time is limited, and beyond that, you truly have nothing to lose. If I had died one of those times instead of just getting sick and passing out I wouldn’t be here now, so it’s like I got some free tickets to have fun at the circus for a little while longer.

(I suppose that sometimes when you’re dealing with the opposite sex you have to be a little careful. Today I told a woman that I liked her hair (it was tinted red-ish), but then when I got “that look” I clarified it by adding that I didn’t say that because I wanted her to come over tonight to bake some cookies, I just liked what she had done with her hair.)

I’ve cow-towed to a culture of sensitivity

A quote from the founder of Buddhist Geeks: “I’ve cow-towed to a culture of sensitivity, whose aim has been to avoid offending others over having difficult conversations.”

This made me think of two things. First, many years ago my company worked as a consultant with a large church, and any time there was conflict about something on the project, all productivity came to a screeching halt. People there all felt the need to be nice to each other above all else, and as a result the tough decisions couldn’t be made, and they were our slowest-moving client of ever.

Second, as I learned from Zen, being your true self doesn’t mean “being nice above all else” all the time. That’s just faking it. There will always be disagreements, and the philosophy I try to follow is, “The best idea wins.”

I learned part of that philosophy — and how to handle conflict — from this article by Bill Parcells, The tough work of turning around a team.

How to search multiple jar files for a string or pattern (shell script)

Here’s a Unix shell script that I use that search Java “jar” files for any type of pattern. You can use it to search for the name of a class, the name of a package, or any other string/pattern that will show up if you manually ran jar tvf on each jar file. The advantage of this script — if you’re a Unix, Linux, or Cygwin user — is that it will search through all jar files in the current directory:

The “reduce, reduce, reduce” mantra applied to writing

One philosophy I have about writing technical material is that I want to condense the material as much as possible, to the point where I want people who use yellow highlighters to mark most of what I write. I am one of those people who use yellow highlighters, and I look for that property in books that I read.

This isn’t necessarily true for blog posts that I write, because for these I usually write them pretty fast. But for books, I take the time to review them and look for this quality. This follows the design mantra, “reduce, reduce, reduce.”

“Rare disease makes woman allergic to everything, including her husband”

From a today.com story about a woman who has a more severe form of the illness/disease I have:

“Johanna Watkins, 30, is allergic to almost everything and everyone, including her husband Scott, 29. She’s been diagnosed with mast cell activation syndrome, a rare and progressive immunological condition.”

“She has a list of 15 foods she can eat and that’s it. Even those foods make her feel ill, it’s just that they don’t kill her. She’s eaten the same two meals for two years.”

(The image is from the today.com story.)