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

Interesting discussion of the day: A young woman who helped me at Best Buy today told me that one reason she works there is so she has something she can talk about with her father (tech stuff).

Ram Dass on being a parent, and a soul (and attachment).

Ram Dass on being a parent, and a soul

On this day (May 16th) in 1990, Muppets creator Jim Henson died. He left this note for his children. (There’s a little more information at lettersofnote.com.)

Jim Henson's letter to his children

Via Kelley Robinson, one of Martin Odersky’s slides at ScalaDays (May, 2018) is titled, “Realizing Scala’s Potential,” with these bullet points:

  • become more opinionated
  • simplify
  • eliminate inconsistencies and puzzlers
  • build on strong foundations
  • consolidate language constructs to improve: consistency, safety, ergonomics, performance

As Ms. Robinson writes, “Scala was a language toolbox, and that leads to fragmentation. Scala 3 wants to become more opinionated.”

Here’s another ScalikeJdbc SQL SELECT query example. In this example I use the concept of a “service,” which I probably originally got from the ScalikeJdbc website:

“Knowing that when light is gone, love remains for shining.”

~ from “To Flush, My Dog,” by Elizabeth Barrett Browning

This short interview titled The Tao of The RZA reminds me of the movie Ghost Dog:

“According to what one of the Elders say,
taking an enemy on the battlefield
is like a hawk taking a bird;

Even though it enters into
the midst of a thousand of them,
it pays no attention to any bird
other than the one that it has first marked.”

The Onion “reports” that the Dalai Lama says that his next life will be his last one before he retires.

The Dalai Lama to retire after his next life (The Onion)

I haven’t tried it yet, but as a note to self, Scala 2.12.5 introduced a new -Ybackend-parallelism N compiler flag with which “the backend can now run in parallel on N threads.”

“When Yahoo bought Viaweb, they asked me what I wanted to do. I had never liked the business side very much, and said that I just wanted to hack. When I got to Yahoo, I found that what hacking meant to them was implementing software, not designing it. Programmers were seen as technicians who translated the visions (if that is the word) of product managers into code.

This seems to be the default plan in big companies. They do it because it decreases the standard deviation of the outcome. Only a small percentage of hackers can actually design software, and it’s hard for the people running a company to pick these out. So instead of entrusting the future of the software to one brilliant hacker, most companies set things up so that it is designed by committee, and the hackers merely implement the design.

If you want to make money at some point, remember this, because this is one of the reasons startups win. Big companies want to decrease the standard deviation of design outcomes because they want to avoid disasters. But when you damp oscillations, you lose the high points as well as the low. This is not a problem for big companies, because they don’t win by making great products. Big companies win by sucking less than other big companies.

So if you can figure out a way to get in a design war with a company big enough that its software is designed by product managers, they’ll never be able to keep up with you ... The place to fight design wars is in new markets, where no one has yet managed to establish any fortifications. That's where you can win big by taking the bold approach to design, and having the same people both design and implement the product. ”

~ I hope to write more about this at some point, but for now this is a long quote from a Paul Graham blog post titled, Hackers and Painters

I was surprised to read in this TechCrunch article that Apple now has the second-most autonomous vehicles registered in California. A bigger surprise was seeing that GM has nearly double the amount that Apple has.

Apple has the second-most autonomous vehicles registered in California

Facebook tells me that I found this quote by Janis Ian back in 2014. Still seems like a good idea. :)

Janis Ian - Buy a book instead of a drink

Here’s a quick look at how to convert a Java Map (such as HashMap) to a Scala Map using the JavaConverters object:

// import what you need
import java.util._
import scala.collection.JavaConverters._

// create and populate a java map
val jMap = new HashMap[String, String]()
jMap.put("first_name", "Alvin")
jMap.put("last_name",  "Alexander")

// convert the java map to a scala map
val sMap = jMap.asScala

If you ever need definitions of scalac compiler options (up to Scala 2.12.2), here you go.

Per this Wired security news this week story, a company named Securus claims to be able to track nearly any cell phone in the United States, within seconds.

A company claims to be able to track any cell phone in the U.S.

I just read about Subaru of Indiana’s “Zero-Landfill” status. It makes me wonder how the rest of the world can be more like this.

Subaru of Indiana's Zero-Landfill status

If you want to be free,
Get to know your real self.

It has no form, no appearance,
No root, no basis, no abode,
But is lively and buoyant.

It responds with versatile facility,
But its function cannot be located.

Therefore when you look for it,
You become further from it;
When you seek it,
You turn away from it all the more.

~ Linji

I started to kill a gnat tonight, and as I went to hit it, it rocked back on its back legs, looked up at me and screamed, “Stop! It’s me, Zeus!”

I looked at it and said, “Zeus was too good, he taught me kindness and compassion; I can’t believe he would have been reborn as a gnat. But l’ll let you live. Go on, enjoy your life.”

Some long time ago I was working on a large software development project, and I wasn’t happy with either the quality or the velocity of our programming effort. So one night I sat down and tried to work out an activity diagram to show what our software development process needed to be, to improve both speed and quality. It turns out that a lot of this is just common sense, but for some reason or another team members would try to circumvent the process, which always led to more pain for everyone involved.