Scala, Java, Unix, MacOS tutorials (page 115)

If you’d like to donate some money to a worthy cause, my niece is studying to be a nurse, and she’s helping to raise money for sick and injured children. Here’s a blurb from that page:

“I'm on a mission to help sick and injured kids in my local community and I need your help. My local Children’s Miracle Network Hospital treats thousands of children each year, regardless of their illness, injury, or even their family’s ability to pay. These kids are facing scary stuff like cancer, cystic fibrosis, and injuries they may get from just being a kid.”

Any help is appreciated!

“By a lie a man throws away and, as it were, annihilates his dignity as a man. A man who himself does not believe what he tells another … has even less worth than if he were a mere thing … makes himself a mere deceptive appearance of man, not man himself.”

~ Immanuel Kant (via Dan Rather)

Once upon a time I was recommended for a college baseball scholarship.

Once upon a time I was recommended for a college baseball scholarship

I don’t know if it was just coincidence, but I went to Lowe’s yesterday for the first time in seven months, then I had a Lowe’s ad on Twitter first thing this morning. So “Allow some” is now “Off.” (See the Location and Personalization settings in the images.)

On Twitter privacy settings and personalized ads

“If you try to drive through Canada in the winter with those summer tires you’re going to end up as a statistic.”

~ A nice RCMP person, after looking at my car, March, 2010. She was very close to being right, as I got stranded for five days in Dease Lake, British Columbia.

If you happen to be using Dotty (Scala 3) and find that the f string interpolator isn’t working, it’s a known bug. (It was implemented with a macro, and the old, experimental macro system has been dropped.) I’m writing this in January, 2019; I don’t know when it will work again. You can use the Java/Scala String.format method until it’s fixed:

val pi = scala.math.Pi
println( "%1.5f".format(pi) )

I was reading this post by Martin Odersky (Make the Scala runtime independent of the standard library) and came across this comment by Li Haoyi: “This would also make it more feasible to use Scala for tiny bootstrap scripts; current Mill’s launcher is written in Java because the added classloading needed to use scala.Predef (even just println) easily adds a 200-400ms of initialization overhead.” I haven’t written anything where the startup time of a Scala application was a huge problem, but that was interesting to read.

(Though I should say that I wish all Scala/Java command-line apps started faster. It’s one reason I occasionally think about using Haskell for small scripts, so I can compile them to an executable.)

Back in the 90s I was a Unix admin on a NASA project. Rumor was there was going to be a 14% layoff. The next day my boss tells me to go to HR. I’m thinking, “Me???”

I get there, and they tell me they can’t print their Postscript layoff reports in landscape mode, ask if I can help. In the end I got a great Pico de Gallo recipe out of it. :)

If you ever need to convert Docbook to AsciiDoc, this Pandoc command seems to work well:

pandoc --wrap=none -f docbook -t asciidoc \
       DocbookFile.xml > AsciiDocFile.adoc

As I have found out in the long run, if you want to edit the resulting LaTeX file, the wrap option is very helpful.

Nature.com has a great article, How ‘magic angle’ graphene is stirring up physics (Misaligned stacks of the wonder material exhibit superconductivity and other curious properties).

“Keep grinding man. If you’ve ever been down, misplaced, overlooked, just keep grinding baby. You’re dreams don’t die until you give up on them. Just continue to keep working.”

~ CJ Anderson, let go by the Broncos, Panthers, Raiders, and now a star in the playoffs with the Rams

I’m glad to say that I’ll be going back to regular consulting work again very soon. If you’re interested in the gory medical details that led me to quit consulting work (and write five computer programming books and a couple thousand blog posts), here you go:

  • Back in 1999 I founded and co-owned a small software consulting company
  • Over time I knew I was sicker than the average person, and it was getting worse
  • Despite symptoms like constantly getting colds, the flu every winter, pink eye, difficulty breathing (intermittent asthma), rashes, compartment syndrome in both legs due to jogging, blood blisters in multiple places, migraines, and heart issues (irregular heartbeat and SVT), doctors suggested it was in my head
  • Figuring I might die before doctors figured anything out, I sold my business and moved to Alaska to at least have some fun before it was over
  • I got a bad digestive illness two months after moving there; that led to having my gallbladder removed
  • Symptoms kept getting worse:
    • I road a bicycle every day, and suddenly couldn’t ride as far one day as I could the previous day; this kept getting worse
    • Diagnosed with Hashimoto’s disease
  • For family reasons I moved to Colorado
  • New symptoms and medical procedures included:
    • Enlarged liver and spleen
    • Increasing muscle weakness
    • Thyroid cancer
    • Brain fog
    • Flushing
    • Hives
    • More rashes and reactions
    • Peripheral neuropathy
    • Went unconscious seven times (syncope)
    • Nearly went unconscious over 20 times more (pre-syncope)
    • A TEE test when a previous test showed that blood was flowing backwards inside my heart
    • Three “fake heart attacks” (what in retrospect was allergic angina)
    • 17 ER visits, one of which showed my kidneys were rapidly failing (this would eventually be a good thing, because it led to further lab tests that eventually led to a proper diagnosis and solution)
    • Several bouts of diverticulitis
    • A PICC line in my arm, followed by a blood clot
    • At one point doctors thought I had an adrenal tumor that could kill me any day and the good news was that there was a 90% chance of surviving that surgery
    • Over 100 blood tests
    • Nearly 20 CT scans and MRIs
    • Anaphylactic reaction to MRI contrast
    • An angiogram after a nuclear stress test showed a dead spot in my heart after my third fake heart attack
    • Had to have part of my colon removed
    • The 24th and 25th doctors finally found anomalies in lab results (only because the “fake kidney failure” led them to do those tests)
    • Pericarditis (inflammation around the heart)
    • More pre-syncope and syncope

Finally an answer

In late 2016 those last two doctors thought I might have a rare blood disease called Mastocytosis. (So rare, it wasn’t featured on House until Season 8.) I tested negative for that, but this led to the final diagnosis of another rare blood disease, Mast Cell Activation Syndrome (MCAS). Statistically, it’s so rare that there are only 26 of us in Colorado.

If you’ve ever heard of the “Bubble Boy” or “Boy In the Plastic Bubble,” this disease is related to that. You can read these stories about two women who have a more severe version of this illness at these links:

Following that diagnosis I almost immediately switched to a diet of eating only a select group of organic vegetables and fruits, and all of the symptoms rapidly dissipated. I still had to have three more surgeries in 2017 and 2018 to clean up problems that were caused by the untreated MCAS, but these days — January, 2019 — I feel better than I’ve felt in twenty years, exercising hard every other day and working a full schedule. And after writing books like Scala Cookbook, Functional Programming, Simplified, and Hello, Scala while mostly hoping not to die, I’ll be going back to regular programming/consulting work in about a month.

(And yes, there will also be more books. Three more books are currently in the works.)

When you worry about where your words land or how others digest or perceive them, you are clinging (and not allowing space for more to come through the channel). Continually create, let go, surrender to more. Create, let go, surrender to more. It is a divine dance. Respect your own story. Remain inside the rhythm.

~ Victoria Erickson

For folks in states like Colorado where marijuana is legal, per uchealth.org, edible marijuana seems to be causing a lot more health problems than inhaled marijuana. A few notes:

  • It can take up to four hours for the high from an edible to take effect
  • Edibles are 268 times more likely than inhaled marijuana to cause users in Colorado to seek help at an ER (despite the fact that many more people use the inhaled form)
  • Edibles have a more severe toxicity than inhaled forms and the effects are psychiatric in nature

I had it in my mind that the worst of the mast cell disease (MCAS) side effects didn’t kick in until later in 2015, but I just saw this memory on Facebook from January 3, 2015:

“The day started off with a bad dream, after which I woke up, threw up, and had the shakes for long time. Fortunately it got much better as the day went on, and I eventually enjoyed a belated Christmas celebration with friends and family.”

I remember the vomiting and shakes started long before this – I learned to keep a trash can by the bedside – so those symptoms would have been well back into 2014.

In this InfoQ Java in 2019 Predictions article, this line stood out the most: Java 9 and 10 saw virtually no deployment to production. Working alone I occasionally wonder what large companies are doing, and with these Java major version number releases coming every six months I was wondering how that was playing out.

Yesterday one of my doctors was struggling to give me a little bit of bad news, fumbling a little over his words and giving me a very lengthy explanation. After a little while I told him, “Listen, I’ve been unconscious seven times, I’ve had three fake heart attacks (allergic angina), and I was once told that I had a 10% chance of dying during an operation. What you’re telling me right now, it’s okay, it’s not that big of a deal.” He calmed down a little after that. :)

This photo of walking through a neighborhood in Wasilla, Alaska in the winter reminds me of a few walks I took here in Colorado in the last few days after our New Years snow.

Walking in Wasilla

This image shows symptoms of Mast Cell Activation Syndrome, from this article. I can personally attest to abdominal pain, cramping, bloating, nausea, vomiting, difficulty digesting certain foods, muscle and bone pain, muscle weakness, nerve pain, headache, neuropathy, difficulty concentrating, reduced attention span, brain fog, itching, rashes, hives, inflammation, swelling, flushing, inflammation of the eye or conjunctivitis, trouble focusing eyes, itchy and watery eyes, a burning sensation, ulcers on the tongue or in the mouth, coughing, wheezing, difficulty breathing, runny or stuffy nose, sneezing, sinus pain or pressure, enlarged spleen, elevated liver enzymes, high cholesterol, rapid heart rate, abnormal blood pressures (either too high or too low), fainting, anaphylaxis, chemical and environmental sensitivities (and more).

Symptoms of Mast Cell Activation Syndrome (MCAS)