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

Helplessly hoping
Her harlequin hovers nearby
Awaiting a word

Gasping at glimpses of gentle true spirit
He runs, wishing he could fly
Only to trip at the sound of goodbye

Table of Contents1 - GET, POST, DELETE, and PUT examples2 - More POST examples3 - Headers returned by the server4 - Discussion5 - Summary

There may be better ways to do this, but as I’m writing a mobile app with the client written in Sencha Touch, and the server written with the Play Framework, I’ve written some curl scripts to simulate GET, POST, DELETE, and PUT request (method) calls to my Play Framework “RESTful” services.

“A lot of people with high IQs are terrible investors because they’ve got terrible temperaments. You need to keep raw irrational emotion under control.”

~ Charlie Munger

“He has departed from this strange world a little ahead of me. That means nothing. People like us, who believe in physics, know that the distinction between past, present and future is only a stubbornly persistent illusion."

~ Stephen Hawking (1/8/1942 to 3/14/2018), in regards to Albert Einstein (3/14/1879 to 4/18/1955)


The “three principles of functional programming,” from this tweet:

1. Orthogonal composability
2. Maximum polymorphism
3. Maximum deferment

The “three pillars of functional programming,” from Functional and Reactive Domain Modeling:

1. Referential transparency
2. Substitution model
3. Equational reasoning

When I learned OOP I saw that it was based on several principles that everyone agrees upon. When I started learning FP (and later took two years to write Functional Programming, Simplified) I was surprised there wasn’t a single accepted definition of functional programming. I ran across the principles/pillars in the last two days and was reminded of that again.

This is part of a little log cabin church that used to be on my walking path in Palmer, Alaska.

Little log cabin church in Palmer, Alaska

I’m very proud of students who are taking the action that American politicians won’t. Image from this Twitter page.

Columbine students protesting gun violence

Note (March 14, 2018): I’ve disabled comments on this website until I get through this current illness.

The mast cell disease has been kicking my butt the last few weeks, and I’ve come close to losing consciousness several times. Had this been eighteen months ago when I didn’t know what was going on I surely would have lost consciousness, but these days I at least know that I can try to rapidly load up on the meds and do some other things to stay conscious.

One thought I’ve had during these times is, “What joy is there in this moment?” I don’t mean that in a negative thing; in fact, I mean it as the exact opposite. For example, when the syncope started last Thursday at 2:15am and I ran outside to sit with my head between my legs in the icy cold weather on the porch, I asked myself this question. My first answer was that the cold felt good. After a little while I noticed the faint sounds of an owl making “Who ... who” calls somewhere in the distance, and combined with the cold dark silence, that was very pretty.

Frankly, my main thought was that if I was going to go unconscious again – something you never know if you’re going to come back from – I wanted my last thoughts to be of something joyful, and that’s when I started thinking to ask myself, “What joy is there in this moment?” If you’re having a bad day or a bad moment, I encourage you to ask yourself that question. For me it’s been a way of finding some gratitude in my most difficult moments.

“Nobody can bring you peace but yourself.”

~ Ralph Waldo Emerson

It’s important to remember that even when successful people say things, they’re often just opinions, not facts. Starbucks’ CEO Howard Schultz once told Jeff Bezos of Amazon, “You have no physical presence. That is going to hold you back.” The reality was that not having a physical presence at that time is what propelled Amazon forward.

Fact of the day: Billionaires Larry Ellison of Oracle, Steve Jobs of Apple, and Jeff Bezos of Amazon were all adopted.

Jobs met his biological mother and sister in his thirties. He would later meet his biological father once in passing at a restaurant, and they even shook hands, but they didn’t know they were father and son.

Bezos grew up with his biological mother. He says he doesn’t remember his father, who he last saw when he was three years old.

Ellison would meet his biological mother at age 48. (That’s all I know about him.)

A few quotes from Gary Kubiak about new Broncos QB Case Keenum, from this Houston Chronicle article:

The reason he’s where he is, first and foremost, is his work ethic. He wants to be great. His presence among his teammates is as good as I’ve ever seen. He never judges people or acts like he’s above them. He treats everybody the same, and guys want to make plays for him.

Case played well (in his rookie year), but we couldn’t win a close game. One thing I learned about Case is that he’s such a mentally strong person. He can handle any type of locker room and any kind of teammate. He’s very consistent on and off the field. His teammates respect that.

A lot of guys would just go in the tank with a start like that (0-8), but Case kept battling because that’s the kind of guy he is. He’s very comfortable in his own skin.

I don’t care who he plays for, you’re not going to put Case in an uncomfortable situation. He’s got a lot of confidence in who he is and how he carries himself. Guys respond to that.

If you’re interested in investing and would like to somehow invest in “artificial intelligence” and robotics but don’t know how to get started, take a look at the ROBO and BOTZ ETFs (exchange-traded funds). You can either invest in those ETFs, or do your research on them to see what underlying securities they invest in.

There are times when I work on images a lot with Gimp, and then there are times when I don’t work with Gimp for a month or two. When I don’t work with Gimp a lot, I tend to forget about all of the different things I can do with. Therefore, I have created this page as a “Gimp special effects cheat sheet” page to help remind me of all the cool things I can do with Gimp effects.

I came across this Android phone dialer tip yesterday. If you want to make a phone call from an Android application, all you have to do is create a new Intent, either an Intent.ACTION_DIAL (to start the call) or Intent.ACTION_CALL (to place the call).

Here are the three lines of source code you need to get started:

Intent dialIntent = new Intent();

I was recently working on some images of a mobile phone, where the mobile phone was surrounded by a solid color that I wanted to make transparent. Unfortunately the phone was black, and that color was dark gray, so when I made the dark gray a transparent color in Gimp using my usual approach — clicking Colors > Color to Alpha, then choosing dark gray — it had the effect of bleeding a lot of color out of the black phone. This was wrong.

Per this story on ycombinator, it appears that political issues can affect clocks:

The short version of the story is that grid electricity in Europe is produced by rotating the turbines 50 times a second and that's where the 50Hz AC electricity comes from. Apparently to match the demand at given instance electricity plants rotate their turbines a bit faster or a bit slower instead of switching a complete plant on and off, which results in slight deviations from the 50Hz standard but it is fine as long as it stays between the limits.

At the end of the day, as the demand increases and decreases, the average frequency would be 50Hz and engineers took advantage of that fact to create clocks that may not be accurate to the second but accurate on average. How do they do that? They count the change in the electricity and assume that 50 changes are exactly 1 second.

Unfortunately, due to political issues in the Balkans, the grid was under-supplied or over-supplied for a prolonged period and this created a deviation from the average of 50Hz and the clocks that depend on this average to be 50Hz also lost accuracy that currently amounts to 6 minutes.

In the third line of her song, Thank You, Alanis Morissette sings, “How about them transparent dangling carrots?” In this article I’ll take a little look at what that line means.

Here’s a good story about how Intel missed out on the mobile CPU market, and what they’re trying to do about it now. It’s always interesting to me to read about how leaders of large corporations misread the possibilities of the future, thereby endangering the future existence of their business.

A bit on how Intel missed out on the mobile CPU market