On the same day the president of the United States decided to ignore that whole science thing and opt out of the Paris Agreement, a gigantic iceberg the size of Delaware is about to break off from one of the largest ice shelves in Antartica.
Scala, Java, Unix, MacOS tutorials (page 164)
From bbc.com, scientists are reporting yet another burst of gravitational waves.
Here’s a link to a page by James Earl Douglas that I don’t quite understand yet, but also don’t want to forget. Here’s his intro to the problem, and then the image shows his solution.
Problem: You have a mutable variable (a var in Scala) that is both read from and written to outside of a tightly-scoped block.
Solution: Remodel the block as functions that take an initial value of the variable, and return both the final value of the variable and the original return value of the expression.
This article titled, Little things I like to do with git, has a fun series of git commands.
Here’s a cool tip I learned recently: If you want to search for a text string in ALL fields of ALL tables in a MySQL database, you can use phpMyAdmin to do this very easily. Here are the steps to search every MySQL/MariaDB database table for your text string.
1) Select the desired database
The first step is to select the database you want to search. Don’t select a table — just select the database you want to search. (If you select a table you’ll get a different search form in Step 2.)
If you like “works in progress,” I’m currently in the process of moving the HTML version of my new book to this website (alvinalexander.com). You can find the first page here at Learning Functional Programming in Scala.
(The motivation for moving it here is that I want to a) make my life easier, and b) make it so I can find my own content by just searching this website.)
“True self appears when we actively practice in the present moment, not waiting for enlightenment to appear in some special way.”
~ Les Kaye, Zen at Work
If you’re interested in “meta” programming in Scala, check out the Scalameta project. It’s described on its website like this:
“Scalameta is a clean-room implementation of a metaprogramming toolkit for Scala, designed to be simple, robust and portable. We are striving for scalameta to become a successor of scala.reflect, the current de facto standard in the Scala ecosystem.”
“Scalameta provides functionality that's unprecedented in the Scala ecosystem. Our killer feature is abstract syntax trees that capture the code exactly as it is written — with all the original formatting and attention to minor syntactic details.”
I don’t send cards at Christmas, but if I did, I might send this “Fox looking at Santa and the Moon” Christmas card that I saw in Santa Fe, New Mexico this week.
Somewhere around the year 2006, my writing style was influenced by the CIO of a company I was working with. When trying to get a new project started, a project manager gave me a very vague description of what he wanted, and as a result, the cost estimate and Statement of Work I wrote (so I would get paid) was vague as well.
The CIO called me to her office, and then told me that I didn’t have to write anything fancy, I just had to “say what I mean.” Since then, that simple approach has been a key to my writing style.
This is a good post from 2014 titled, 44 engineering management lessons.
I love these quotes:
- My happiness depends on me.
- Do not give anyone else responsibility for how you feel.
Unfortunately, many people blame other people for their problems. I hear people say, “If only so-and-so would do xyz, I’d be happy.” Guess what? No you won’t! Nobody else is ever going to give you lasting happiness. If your friend/sibling/whatever is a slacker, they’re a slacker! (And guess what else? You’re judging them, and that makes you judgmental!) Get over it, move on! Tend to your own garden. You make yourself miserable, and you can also make yourself happy. It’s your choice. Stop blaming others.
For people who have life partners (spouses, etc.), I think it’s important to ask, “Is there joy in my partner’s life?”
Sometimes we get so caught up in our own lives, we forget to check in with our partners and ask how they’re doing, if they’re happy. (And if they’re not, what we can help do about that.)
Being a “life partner” is a commitment to the other person, and to their well-being.
If you’re interested in a simple introduction to mindfulness meditation, search the Internet for a free, 25-page PDF booklet named, “Buddha in Blue Jeans,” by Tai Sheridan. Despite that name, the booklet has good, non-denominational tips about meditating and mindfulness (and only mentions the name “Buddha” twice in the main text).
Here’s a favorite quote: “Be like a cat purring. Follow your breath like ocean waves coming in and out.”
“I thought once everybody could speak freely and exchange information and ideas, the world is automatically going to be a better place,” Mr. Williams says. “I was wrong about that.”
~ Evan Williams, in a N.Y. Times article, The Internet is broken.
Lately I’ve been in the process of “making the switch” from macOS to Linux Mint, and to that end, I just installed the Java 8 JDK/SDK, Scala 2.12, and SBT 0.13 on a new Linux Mint system, and I want to note here how I did that while it’s still fresh in my mind. Here are my notes in a compact form.
Update: Possible alternative
I haven’t looked into this yet, but it may be possible (and easier) to install OpenJDK rather than Oracle’s version of Java (which I describe below). I describe that process on my notes on how to configure a new Ubuntu server, but the basic command to install the OpenJDK JRE is:
apt-get install default-jre
and the command to install the OpenJDK JDK/SDK is:
apt-get install default-jdk
Guess. Apologize. Compensate. This is a nice slide from a talk by Jonas Bonér, CTO of Lightbend.
Tried to use someone’s software library.
Documentation was bad, couldn’t get it to work.
Used someone else’s.
#haiku-ish
I’d like to meet the person who first drank milk from a cow. I’m curious about what led up to that decision.