effect

Scala: What do “effect” and “effectful” mean in functional programming?

When you get started with functional programming (FP) a common question you’ll have is, “What is an effect in functional programming?” You’ll hear advanced FPers use the words effects and effectful, but it can be hard to find a definition of what these terms mean.

A wee bit of cause and effect

A wee bit of cause and effect:

I may never have lived in Alaska
if I didn’t first go there on vacation.

I may have never gone to Alaska on vacation
if Colorado wasn’t on fire in 2002.

I may not have thought to go to Alaska in 2002
if I hadn’t discovered Northern Exposure ~1996.

I may never have discovered Northern Exposure
if I didn’t quit a job I didn’t like in 1995.

I may never have discovered Northern Exposure if a tv channel
that doesn’t exist today hadn’t aired it back then.

This keeps going back in time until I was born (or before then),
but that’s the basic idea.

American doctors, and medicating the effect rather than treating the cause

I recently went through a period where my blood pressure (BP) went up to 150/100 and stayed there. My normal BP is ~115/70, so I monitored it for a few days, and when it stayed there I made an appointment with my primary care physician (PCP). I explained everything to her, how I eat almost exclusively organic foods that I prepare at home, and I exercise harder than I have since 2011. I told her that I started feeling a little sick about two weeks ago, and that I was now feeling worse. I suggested that I probably had an infection, because that had been a recurring problem before we knew about the mast cell disease, and I had also just had a surgery in December. To me there was no logical reason that my BP should be that high unless I’m having an infection or some sort of heart issue.

Nonetheless, without doing any tests, her recommendation was that I should increase my Lisinopril dosage from 20mg to 40mg — which is the max you can take, and also has potentially severe side effects. My response was along the lines of, “Okay, whatev,” and after I left her office I made an appointment to see a specialist. I felt like she was just medicating the effect, and had little interest in understanding the cause.

Jack Kornfield on karma related to speech, and intention

I’m not a huge believer in certain types of karma in this world, but Jack Kornfield offers this discussion about karma related to speech, and intention:

“Speech is one area in which karma can be seen in an easy and direct way. For this exercise, resolve to take two or three days to carefully notice the intentions that motivate your speech. Direct your attention to the state of mind that precedes talking, the motivation for your comments, responses, and observations. Try to be particularly aware of whether your speech is even subtly motivated by boredom, concern, irritation, loneliness, compassion, fear, love, competitiveness, greed, or whatever state you observe ... Simply notice the various motivations in the mind and the speech that flows from them.”

“Then, after discovering which motivation is present as you speak, notice the effect of the speech. If there is competitiveness or grasping or pride or irritation behind the speech, what response does it elicit from the world around you? If there is compassion or love, what is the response? If your speech is mindless, as if you were on automatic pilot, what is the response? If there is clarity and concern, how is this received and responded to?”

It brings up an excellent point: What motivates your speech?

A gallery of 130+ Gimp filters/effects examples

There are times when I work on images a lot with Gimp, and then there are times when I don’t work with Gimp for a month or two. When I don’t work with Gimp a lot, I tend to forget about all of the different things I can do with. Therefore, I have created this page as a “Gimp special effects cheat sheet” page to help remind me of all the cool things I can do with Gimp effects.

More examples of working with Gimp effects (filters)

In a previous article I shared a catalog of examples of Gimp filter effects. In this brief pictorial I’ll share examples of some of my favorite Gimp effects on a favorite image of a favorite dog. I don’t have a particular goal in this work, I just want to try out some different filters and effects and see where they lead.

Here’s a raw image of a Siberian Husky named Zeus that I knew very well:


Karma goes on for generations

I don’t know how my father was raised, but at times he could be domineering, mean, and negative. That has created a “cause and effect” karmic ripple that continues to influence people generations later, and long after his death.

(To be clear, he wasn’t all bad.)

How to slowly minimize a Mac OS X window to the Dock using the Genie effect

If you ever want to impress your friends with a fun Mac OS X trick, just minimize a window in super slow motion. Steve Jobs used to do this during his presentations, but I don't know if he's done it in a few years now. Here's an image of what this slow-motion Genie effect looks like:

Mac OS X slow motion Genie minimizing window effect