Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

I may explain this more in the future, but for now, here’s some source code for an example of how to use Quicklens in a Scala functional programming project.

Given some model/ADT definitions like this:

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.

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.)

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.

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:

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.”

As a short note, here’s some Scala source code that shows how to write a foldLeft function using recursion:

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.)

Rare disease makes woman allergic to everything, including her husband

Here’s a photo I took of a wind farm back in December. I think it’s related to the Wind Research Program at Purdue University.

Wind farm

Per The Register, “Advertising revenue flowing back to app developers from Android apps has exceeded the amount returned to developers by Apple for the first time.”

I eat mostly organic food because it seems to help dramatically with my mast cell disease, but it sounds like a lot of other people are going organic as well. Here’s a quote from this SeattleTimes.com article: “We cannot get enough organics to stay in business day in and day out,” Jelinek told the gathered investors.

One of my favorite albums of all time is Us, by Peter Gabriel. I discovered it during a period of existential angst when I was working on a $3B NASA project, and I learned that the entire project was created and would soon be destroyed because of politics. I started listening to the album again recently while practicing yoga at night. This song is Blood Of Eden.

I recently “made the switch” from MacOS to Linux Mint, and was lamenting the fact that I didn’t have Alfred on Mint. But then this morning I learned about Cerebro, which, if it’s not Alfred yet, at least it’s Spotlight for Linux. omgubuntu.co.uk has this good intro article on Cerebro.

Cerebro is written as an Electron app, and as a result it’s available not only for Linux, but Windows and MacOS as well.

Cerebro, Spotlight for Linux

Working with yoga is often interesting. You stretch and twist and focus, trying to be very conscious of your movements, and then one day in the middle of a twisting pose you see your left foot coming out from behind your right ear. At first that’s a real surprise, a shock. You think, “Well, that can’t be MY foot over there,” and then you realize it IS your foot, and with that comes a strong sense of accomplishment, and maybe a little smile.

Then you do the same pose in the opposition direction, but twist and stretch as you might, your right foot doesn’t come out from behind your left ear. You know you can’t push it any more, at least not while doing the pose properly, so you realize there’s a bit of an imbalance. You accept that there’s still more work to do, but it’s a good thing, so you push on.

I think life is like that too, or can be like that. If you enjoy the struggle, if it’s a worthy struggle — a path with heart — the effort comes willingly, and with its own rewards.

“Always stretch from the source, the core, the foundation of each asana. Keep your attention internal, not worrying about what others see, but what the Self sees. Each movement must be an art, an art in which the Self is the only spectator.”

B.K.S. Iyengar, Light on Life: The Yoga Journey (with a few minor edits by me)

February 19, 2014: I passed out for the first time. Before then I knew I was sick, but that was the first day I went down.

*three years of hospital visits and dozens of doctors*

February 19, 2017: For the first time in many years I’ve been able to practice yoga on a daily basis. As usual, during the first several weeks it was difficult and I was sore, but these days all is well. Soon this body will be rock hard and incredibly limber. :)

I'll be back, I am back

“One must do asana not merely as a physical exercise but as a means to understand and then integrate our body with our breath, with our mind, with our intelligence, with our consciousness, and with our core. In this way, one can experience true integration.”

B.K.S. Iyengar, Light on Life: The Yoga Journey