I don’t know the original source of this “Please don’t move/observe the coffee machine” image, but I just saw it here on Twitter.
Scala, Java, Unix, MacOS tutorials (page 134)
Li Haoyi has created a JSON library he named uJSON.
Two good quotes from the last few days:
“Humble pie is good for everyone.” ~ Broncos DE Derek Wolfe
“Be excellent to each other.” ~ someone at a Meetup, talking about social interactions
Seeking Alpha has a good article on how the last eight corporate scandals/problems have affected their stock prices over time. Useful stats: “Excluding Facebook, the median length of the declines is 63 days. The median percentage decline is 35%.”

From a Ron Jeffries article, Dark Scrum: The case against the Sprint:
“Let’s consider the Scrum Sprint. What’s the strongest case we can make against it? We’ve already talked about the fact that Sprints are not necessary to teams who are working well: pulling one story, and swarming on it, then another and another, works better, my friends and I believe, than Sprints. (There are good reasons to continue a regular cadence of planning, and certainly of review and retrospection.) But that’s not much of a case. What else ya got?”
Here’s an article with two interesting exercises near the end of it: How thinking about infinity changes kids’ brains on math. When you’re ready to go deeper, that article links to a NY Times article, Teaching the mathematics of infinity. And then that article links to another titled, The life of Pi and other infinities.
(When I was a young lad, I’d often lay in bed at night and wonder, “Okay, so I go to the edge of the universe ... what’s after that? There’s gotta be something after that, right?”)
As a brief Scala tip, a fun thing you can do with the map
method on Scala sequences (Array
, List
, Seq
, Vector
, etc.) is to convert a sequence of objects into a sequence of something else, typically extracting a field from the original object to create the new sequence.
For instance, imagine that you have a case class named Person
that has two constructor parameters, firstName
and lastName
:
“Never believe that a few caring people can’t change the world. For, indeed, that’s all who ever have.”
~ Margaret Mead
Unix/Linux FAQ: How can I print columns of data from text files on Unix/Linux systems?
Background
One of my favorite ways to use the Unix awk
command is to print columns of data from text files, including printing columns in a different order than they are in in the text file. Here are some examples of how awk
works in this use case.
I can’t say I understand it all, but Alan Kay wrote an article on Quora titled, Why is FP seen as the opposite as OOP rather than an addition to it?
Very much enjoyed reading Tim O’Reilly’s book, WTF? What’s the Future and Why It’s Up to Us the last few nights. Just surprised it didn’t have animals on the front cover. ;)

After watching Meet John Doe last night, today my neighbor’s dog was barking all afternoon. Thinking my neighbor might be like the neighbor in the movie, when he came outside I went outside also and yelled over to him, “Are you hard of hearing?”
He yells back, “What?,” so now I’m thinking I’m on the right track, which leads me to yell even louder, “Are you deaf?
Well, things didn’t quite go like they did in the movie.
~ Diary note from March 25, 2011, Palmer, Alaska
@WorldAndScience has this great video of weight distribution dynamics that people with trailers might want to watch.
From a fastcodesign.com article: “Researchers at the Lawrence Berkeley National Laboratory are developing smart photovoltaic windows that can shade you and generate electricity at the same time ... This coated glass is about 82% transparent when it’s at room temperature ... At 7% efficiency, they’re still under the minimum of 10% that the team led by Professor Peidong Yang believes would be adequate for commercial purposes. Dou told me that they hope to reach that mark in the next three to five years ... They also face a manufacturing roadblock: the color. Right now, Yang’s team can get the glass to turn orange, red, and brown ... But the main problem, right now, is the glass’s temperature threshold, which they’re working to reduce to 122 degrees Fahrenheit, the typical temperature of glass exposed to a typical sunny midday.”
Mashable asked astronauts if they think aliens exist. Here’s part of the article I found interesting:
“The math isn’t easy. How many stars are in the universe? Well, that depends on the size of the universe. We’re able to observe the cosmic microwave background (CMB), radiation formed around 400,000 years after the Big Bang. It tells us the observable universe goes back around 14 billion years. But there could be something beyond the CMB, or even other universes contained in a massive ‘multiverse.’”
“Within the constraints of the observable universe, there could be 1,000,000,000,000,000,000,000,000 (or septillion) stars, according to astronomer David Kornreich. (He conceded to Space.com that the number could be a gross underestimate.)”
After reading this Farnam Street blog post about using a decision journal, I tried to use his PDF but I didn’t like the way it was formatted. So I re-typed his decision journal template and re-created it as a Word document. I thought I’d also share it as HTML here in case anyone wants an easier way to re-created it themselves.
Without the underlines and checkboxes, here is a decision journal template that you’re welcome to copy and paste to make your own decision journal. I added a few items to the original decision journal, and I encourage you to add (and remove) whatever works for you.
The Decision Journal template
Here’s the decision journal template, which is currently 99% based on the Farnam Street PDF:
Decision #:
Decision:
Date:
Time:
Mental/Physical State:
- Happy
- Energized
- Confident
- Accomodating
- Frustrated
- Focused
- Tired
- Sad
- Anxious
- Angry
- Relaxed
- Accepting
- Resigned
The situation/context
The problem statement or frame
The variables that govern the situation include ...
The complications/complexities as I see them
Alternatives that were considered but not chosen
The possible range of outcomes
What I expect to happen and the actual probabilities
The decision (discussion)
Review date (six months after the decision):
What actually happened:
What I learned
Discussion
As you’ll see in the example that follows, depending on your decision at hand it can make sense to rearrange the “discussion points.” I also added a section for “The Decision” because there wasn’t a section for what you actually decided in the Farnam PDF (or I didn’t interpret it that way). (I think The Decision itself deserves some discussion.)
A decision journal example
Now that you’ve seen what a decision journal looks like, let’s take a look at an example of how to use a decision journal. For the purpose of this example my question/decision is, “As of today (March 22, 2018), should I buy Facebook stock?”
Decision #: 1
Decision: Should I buy Facebook (FB) stock today?
Date: March 22, 2018
Time: 4pm
Mental/Physical State:
- Happy
- Energized
- Confident
- Focused
- Relaxed
The situation/context
- The stock market was at an all-time high earlier this year, and it’s come down now
- Facebook has made a series of blunders over the last several years
- The latest blunder involves the Cambridge Analytics company
- The current President of the United States is cray-cray
- His recent tariff threats are making the market go down
- The Fed has raised interest rates and plans to continue raising interest rates
- Some people have started a #deletefacebook movement
- There is talk about the U.S. government and other governments regulating FB
- The 52-week low/high is 139/195
- Morningstar shows them “fairly rated,” with a Fair Value of 198, a 5-star price of 119 and a 1-star price of 307
This is a summary of where Facebook’s stock is right now, using Fastgraphs:
As that chart shows:
- The stock is significantly undervalued related to earnings
- Facebook’s earnings are (were) projected to continue increasing
From Yahoo Finance, this image shows Facebook’s stock and the S&P 500 over the last three months, with FB in blue:
The problem statement or frame
- This is redundant, but the basic question is whether I should buy Facebook stock right now
The variables that govern the situation include ...
I covered these under the Situation/Context question, so I won’t repeat those here. Okay, a few additional points:
- There is now a discussion of regulating FB
- People say that in some other countries, “Facebook is the internet”
- Another variable is, if I decide to buy, how much should I buy? That is, how much do I believe that this is the best investment to make right now?
The complications/complexities as I see them
The big thing is that FB needs to find a way to show they are trustworthy. This requires a series of actions followed by PR. In Warren Buffett’s way of thinking, this is a solvable problem, but will Zuckerburg & Co. do the right thing?
In addition to FB-specific problems, the general state of the stock market, the President, and the Fed are all factors.
The possible range of outcomes
- Worst Case: Everybody in the world stops using Facebook and the stock market tanks
- Best Case: A small percentage of people will delete Facebook or stop using it and the stock market picks back up
- Note: Will people also stop using Instagram and WhatsApp?
(Note that this is a great place to use something like a “spectrum diagram,” where you have Worst Case on one end and Best Case on the other end.)
Other thoughts
I won’t show the details here, but an important part of this decision is digging into FB’s financials, i.e., attempting to make a forecast of future revenues and cash flows, etc. As just one example, using a Buffettology style formula, with the current stock price at $164 and EPS at $5.4, the initial rate of return is only 3.3%, nothing to get excited about.
The decision (discussion)
My decision is to postpone this decision for now and revisit it, perhaps weekly. I think this is a solvable problem for Facebook and it could make them a better and more trustworthy company in the long run, but I’m postponing the decision for now because:
- Trump’s tariff threats and general irrational behavior are negatively affecting the overall market right now (a rising tide lifts all ships, and a lowering tide gets them all stuck in the sand)
- The Fed plans to keep raising interest rates (when interest rates go up the market goes down)
- I have a history of investing in troubled companies a little too early, and there is no good news for FB at the moment
- It’s not unreasonable to think that FB could fall to its 52-week low of 139 or Morningstar’s 1-star price of 119
Alternatives that were considered but not chosen
None. I always look at other stocks, but this decision is just about whether I should buy FB stock right now.
What I expect to happen and the actual probabilities
In the long term I expect FB to make changes and have at least a small PR campaign to reflect those changes. Everything that’s happened over the last 2-3 years is a major threat to the company. A few years ago it was hard to imagine a large percentage of people deleting the Facebook app or quitting Facebook, but to some extent Facebook has become boring and many people seem to use it less already, and then there is all of this negative stuff over the past few years.
The best part of FB for me right now are some of the groups I belong to, such as the groups for people who have mast cell disease. It‘s hard to imagine everyone in the world switching to some other service, re-creating all the groups, getting all the members to follow them, etc.
Even without the groups, I’d say that Facebook has a wide moat. They have everyone’s data for the last 5-10 years. It would be hard to say, “Hey, let’s all move to SomeUnknownCompetitor, I’ll re-friend you over there.” The reality is that whatever that business is, they’ll rely on advertisements as well.
I think the mostly likely thing to happen is:
- A small percentage of people will quit using FB
- FB will do some things to try to show they are trustworthy
- The government will get involved with some sort of TBD regulation
At some point I expect that everything related to Trump will be resolved, Pence will take over, and after some considerable uncertainty, the market will go back up because it won’t be subject to Trump’s inconsistent behavior.
Probabilities:
- I think there’s something like an 80% chance that FB’s stock will continue to go down for the foreseeable future. They’ve barely addressed the current problem, and everything related to Trump is affecting the market right now.
Review date (six months after the decision): This doesn’t really make sense for a “Postponed” decision
What actually happened: TBD
What I learned: TBD
Discussion of the example
As you saw in that example, it can make sense to re-arrange the discussion points depending on the problem/decision at hand. Also note that the questions are just intended to stimulate your thinking. If there’s something in your mind that doesn’t fit into the given questions, create your own “Miscellaneous” or “Other” section and put your thoughts down there.
It’s also worth stating that I’ve been discussing this with other people for the last couple of days, and through those discussions I knew I wasn’t going to buy Facebook stock right now, but working my way through this process made me do a little more research, including the charts and Morningstar data shown.
Another important point for me is that by doing this electronically, it’s easy to come back and update this decision every week or two until I finally decide to buy in, or not.
Finally, you’re free to agree or disagree with my decision-making process regarding Facebook’s stock. The point isn’t whether you agree with me, it’s about working through the process to try to make intelligent decisions, especially when they’re important. For me, I almost always invest at least $10K at a time, so decisions like these fall into the “big decision” category.
Summary
In summary, I hope this decision journal template and example are helpful. As I mentioned earlier, feel free to copy the template and modify it as needed for your decision making purposes.
Scala FAQ: How do I get the current month as an integer or as a string in Scala?
Solution
Rent in Denver, Colorado rose almost as fast as rent in the San Francisco Bay Area, according to this story by the Denver Post. But the good news is that despite rising 47% from 2010 to 2017, rent in Denver is still much lower than San Francisco.
A Facebook post from March 22, 2010, when I was stranded in a small town in Canada named Dease Lake, British Columbia:
How neat, the “Court Circuit” comes to town tonight. Just like the Northern Exposure episode, the court people travel around and temporarily set up court in various towns. They are expected to be here from tonight until Thursday. My chance to meet many police officers! (RCMPs, I wonder?)