Turkish Coffee

I love coffee and last year I added a few new things to my bag of tricks. Last Christmas my in-laws bought me a coffee roaster and every three days I fire it up and make some fresh beans for my espresso machine. It has been fun learning how to roast, but it has also saved me from going to the local coffee shop every couple weeks to buy a bag of beans.

I also learned about Vietnamese style coffee by finally getting around to learning how to use my Vietnamese coffee brewer. It was really fun to research the various brewing techniques and make an educated guess based on all the different videos and blogs out there on the subject.

This year for Christmas my in-laws continued with the new tradition and are helping me expand my coffee horizons even further with Turkish coffee. The first present I opened was the coffee pot called a cezve as well as a wooden spoon. The next up were the cups or fincan and saucers which are about the size of the small espresso cups. The last present included finely ground turkish coffee and some special spices.

The next day I spent thirty minutes researching on the internet to see how I was supposed to properly brew cofee in the cezve. There were lots of different videos and most of them had similar instructions, but each one had its own special technique for one part of the process. I weighed the various options and came up with my plan. The following steps were for creating two cups of coffee.

  1. Add a teaspoon of the special spice to the cezve
  2. Add a teaspoon of sugar to the cezve
  3. Stir the spices and sugar to combine them
  4. Add about 3 fincan cups of cold water to the cezve
  5. Stir it up a little bit to mix the dried ingrediens with the water
  6. Turn on one of the burners on the stove to low
  7. Put the cezve over the heat and keep a close eye on it
  8. Bubbles will start to form where the surface of the coffee meets the side of the cezve, a little after that happens but before the foam starts filling in you should remove it from the heat
  9. Using the wooden spoon scoop the top layer of foam evenly into each fincan
  10. Put the cezve back on the heat very briefly until it starts bubbling a little bit
  11. Remove it from the heat and carefully fill up the fincan, taking care to pour so you don’t interfere with the foam
  12. Serve with fresh water and a sweet treat

Some videos recommended completely mixing the contents of the cezve before adding the heat instead of just loosely mixing it. Another part that will require fine tuning and practice is the time of the scooping of the foam and the subsequent pouring of the coffee. There is a very fine balance around when you scoop the foam and how long you heat the coffee. Overall the entire process should take about 7-10 minutes. Thankfully there aren’t too many different knobs and levers to mess with so I should be able to find a sweet spot after about a half dozen or so attempts.

JAVA Home and macOS

I decided to take the leap a couple weeks ago and installed macOS Big Sur. I have had a couple small issues like the display not waking up from sleep and my JAVA IDE not rendering some text properly, but it seems pretty solid. There was one issue with my development tools related to the JAVA_HOME settings and I wanted to document for future me.

In macOS you can run the following command in Terminal to list out all the different versions of JAVA installed.

$/usr/libexec/java_home -V
    Matching Java Virtual Machines (3):
    12.0.1 (x86_64) “Oracle Corporation” - “OpenJDK 12.0.1” /Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home
    1.8.211.12 (x86_64) “Oracle Corporation” - “Java” /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_211 (x86_64) “Oracle Corporation” - “Java SE 8” /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home

You can then specify the active JAVA in Terminal by adding the following to your .bash_profile and specifying the version to use.

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0_211)

I ran into an issue after the upgrade because the 1.8.21.12 plugin was new in the list and I had only specified version 1.8, so my JAVA_HOME was getting set to the plugin instead of the JDK. After changing it from 1.8 to the more specific 1.8.0_211 I was back in business.

Source: Notes for Geeks: java_home and JAVA_HOME on macOS

SpringBoot Arguments

I recently ran into an issue with our deployment of a SpringBoot application because of some confusion around how to pass arguments when launching it.

The command to run an app looks like this java -jar ${APP_NAME}.jar

You can pass arguments to Spring boot either

  • Using the -D Java property notation by adding it as a VM argument between java and -jar

  • Using -- style notation after the jar name

For example, java -DenvTarget=dev test-api.jar --server.port=8008 would set the envTarget property to dev and the server.port to 8008

Apache2 Subdomain Redirect Fun

Last year I set my son up with his own domain name and learned how to use virtual hosts in Apache 2 to host his site alongside mine. It seems like a long time ago, but for the most part it was a pretty straightforward process and within a couple hours he was up and running. Fast forward to yesterday when I was trying to configure a redirect for a subdomain on my site. I started messing around with my site’s virtual host configuration file and realized an existing redirect softball.keegsands.org now sent the browser to my son’s domain. I blindly hacked away at the configuration file for an hour or so, but since it was almost 70 degrees in November I decided to go outside instead.

This morning I picked up where I left off and started at the beginning and verifying that the DNS stuff was configured correctly. There were a couple differences between our DNS settings. My son’s domain had www set up as an A record, while mine had it set up as a CNAME. It shouldn’t really matter, but for consistency sake I switched mine to have www as an A record. Next I tried to add a new virtual host for my subdomain and that didn’t seem to work and just added an extra level of complexity.

Finally I started reading about virtual hosts and was certain I was in the right place, I just needed to get the configuration correct. During the initial set up I do remember an issue where my son’s site would end up being the default virtual host for all traffic to the Apache server, so I focused on why calls to the softball subdomain weren’t being handled by my site’s virtual host. The problem was with the ServerAlias property for my site was set for only www.keegsands.org, I switched it to *.keegsands.org and it started doing the proper rewrite of the URL.

Hosting my own site has been a little annoying at times, but just having that extra experience messing around at this level definitely makes me happy.

At the beginning of the school year we upgraded my son from my old 2011 MacBook Pro to a new MacBook Air. Today I finally fixed the wobbly display hinge and removed all of the stickers. Now it is as good as new and ready for the museum.

Shortcuts Folder Support in iOS14

One update I was looking forward to in iOS 14 was folder support in Shortcuts. Over the years I have expiremented with Shortcuts and most of them were just simple utilities, but at some point I decided to do a deep dive and write one to make publishing my podcast easier. It took a lot of trial and error, but eventually I had a main shortcut for the process and it would call out to a few different specialized utility shortcuts for different things. The developer in me couldn’t resist trying to breaking it out for easier testing and flexibility, thankfully Shortcuts was built for developers and a Shortcut can be built as a little function that receive arguments and returns a result.

It wasn’t the easiest process because the code block dragging and dropping is a bit tedious and I would have loved being able to just type in text, because it would have saved me a ton of time. The organization of the shortcuts was always daunting too, because everything was just a giant grid of unrelated shortcuts and I was always moving things around so they stayed grouped together.

Well, now in iOS14 there is support for folders and it gave me the chance to go back and revisit my Shortcuts. As an added bonus I hooked up a keyboard and mouse to make things even easier. The first part of any good reorganization is getting rid of the old unused stuff and I had plenty of that. A bunch of shortcuts seemed to just have been added randomly and others were utilities that were no longer necessary thanks to advancements to iOS, like saving a file to iCloud Drive.

After cleaning up a bit I started testing each shortcut to see if they still worked and was frustrated to find a lot of them were broken as Shortcuts has grown over the years. In some cases the parameters I originally entered were just blank and it took me quite a while to wire them back up and occasionally I wasn’t even able to get them working again. I understand how difficult backward compatibility can be, but there wasn’t even a hint of even the simplest things upgrading successfully. Luckily I knew this was a problem, because I had fixed up my podcast release shortcut a few months ago and it was really frustrating.

Next, I put all the shortcuts into new folders one for utilities and another for all the podcast related helper shortcuts. I had already moved things around a little for using the Shortcuts widget and the return of Shortcuts support on Apple Watch. I now have a nice clean interface for Shortcuts on my iPad and iPhone. The last thing I did was clean up a bunch of Share Sheet shortcuts, which are now nicely grouped in its on “smart” folder.

Overall Shortcuts continues to be an integral part of my experience on my Apple devices. I hope it eventually shows up in a future release of macOS.

Why is Massachusetts not exempt from Maine's COVID-19 travel restrictions?

Maine has travel restrictions placed on visitors from different states because of COVID-19. NH, VT, NY, CT and NJ are all exempt, but MA is not. I crunched some numbers today to figure out why and think I know why. If you look at daily cases per 1M people NY, NJ and MA are all about the same, so I figured there must be another factor they are considering in their metrics.

After digging around on this Maine Tourism report I was able to gather information about the location of residence for visitors to Maine. New York and Massachusetts are neck and neck when it comes to overnight visitors at 22% each. However, when you look at daily visitors for obvious reasons the New York visitors is near zero and Massachusetts makes up 35% of all visitors tied with Maine. If you combine overnight and daily visits Massachusetts accounts for 34% of all visits to Maine, about double the results from New York.

Using the new case numbers for today and converting to values per 1M people and then multiplying against the total visit breakdown per state shows that Massachusetts would bring in 16 new cases per every 1 million visitors to Maine. Next up would be New York with 7, followed by Rhode Island with 4. I’m not quite sure why Rhode Island isn’t exempt, but it does make sense for Massachusetts.

Ski season is right around the corner and I have a sinking feeling that it just isn’t going to be in the cards for us this year. Maybe this fall we will be able to get home COVID-19 tests that we can use every couple weeks before we head up north.

“The US has 4% of the world’s population but 25% of its coronavirus cases”. Based on our trajectory the rest of the world is going to start calling it the “American virus”.