Monday, December 06, 2021

Tampa and Fort Myers Adventure, Day 1

[Composed 11/21/2021]

We're spending our traditional Thanksgiving Travel adventure in Tampa and Fort Myers, Florida this year. Our nieces and nephew are in Tampa, which is where our fun began.

We landed at the Tampa airport and spent an eternity (OK, more like an hour) collecting our bags, making our way to the rental car facility and getting through the rental car process. I'm an advocate of checking bags, but even I will think twice about doing so when flying to Tampa next time. Hopefully this was a one off annoyance.

We enjoyed a quick lunch at Thinh An Kitchen & Tofu. I know the place was good because I called the waiter over not once, but twice, to confirm that my soup was in fact vegetarian. The tofu skin tasted too good not to be meat. Yum!

We then scooped up the kids and their parents and headed to the Manatee Viewing Center near Apollo Beach. We thought seeing manatees in the wild would be a thrill for us all. But as we were driving towards the Viewing Center I admit I got nervous. What if we arrived and there was nothing to see? Perhaps we should have selected a more fool-proof activity, like say the plain old aquarium?

My fears were allayed as soon as we pulled into the parking lot: the place was packed. There must be something to see here!

Once we arrived, it was just a few minutes until we were on a boardwalk overlooking the power plant's 'discharge canal' and we could see massive shapes swimming in the water. Manatees! The experience was sort of like going whale watching; you see a tail here, or a snout there. I'm not sure the kids were blown away by it as much as I was, but they certainly enjoyed it.

We then made our way to a touchtank where the kids could observe and carefully pet the cownose rays swimming there. This was a thrill for the kids and definitely made the 40 minute drive worthwhile.

There are a couple of walks you can take in the area, one out to a pier and one out to an observation tower. We visited the pier but were too late to visit the observation tower. Maybe next time.

The pier was fascinating in its own right. For one thing, you walk through a mangrove forest which, I suppose, is relatively easy to dismiss. And yet these trees are thriving at the junction of salt and fresh water, something that would kill the vast majority of plants on the planet. Along the pier Shmuel noticed some massive fish casually swimming along. Our guess is that these were Tarpon.

Farther away from the pier, we'd see bursts of activity as shark fins broke through the surface of the water. Everyone loves the warm water from the power plant, and I suppose sharks are no different.

After the pier, we took another quick look at the rays and then headed home for dinner. We called it a night relatively early, as we had a big plans for the next day.

A keen observer will notice that I'm in more pics belon than usual. When we got to the Manatee Viewing Center I asked the kids if they wanted to try out my DSLR with telephoto lens. T and G were in! Many of the pics of me, the family and the animals were taken by T and G. It was a real treat to see them take an interest in photography and share some of the basics.

Wednesday, December 01, 2021

Tasker To Power A New Habit

I'm working on creating a habit that requires one minute of my attention a few times a day. I've tried using my watch's countdown timer to mark off the time, but I've found this both (slightly) inconvenient and (slightly) ineffective.

What would be ideal is an icon I could press on my phone's home screen that would play a soothing sound for a minute. I'm sure there are apps out there that do this, but building this in Tasker is too easy, so let's do it!

Step #1: Get Some Sounds

A quick Google Search turned up as a source of sounds that fit my needs. I downloaded a sample, being careful not to click on any of the button-looking ads, unziped it and played it using mpg123. Success!

In a few minutes I downloaded 23 different sounds.

Step #2: Unzip and Rename the MP3 files

Using a bit of linux-fu, I unzipped each of the sound files and renamed them to <count>.mp3. The goal was to end up with a directory full of files named: 0.mp3, 1.mp3, etc. up to 22.mp3.

# unzip 'em all
$ for f in *.zip ; do unzip -o $f ; done

# see if I can use 'nl' to come up with with a 'count' value
# for each mp3 file. I can!
$ ls -1 *.mp3  | nl -v 0
     0  432-hz-music-for-relaxation.mp3
     1  ambient-synth-music.mp3
     2  bird-chirping-in-the-garden-sound-effect.mp3
     3  birds-song-in-forest.mp3
     4  calming-sea-sounds.mp3
     5  city-storm-sound-effect.mp3
     6  deep-relaxation-ambient-music.mp3
     7  dreamy-ambient-background-music-free.mp3
     8  farm-ambience-sfx.mp3
     9  night-ambient-sounds-cricket.mp3
    10  outer-space-atmosphere-sound-effect.mp3
    11  peaceful-village-ambience-sound-effect.mp3
    12  relaxing-nature-music.mp3
    13  sad-emotional-background-melody.mp3
    14  sea-waves-sound.mp3
    15  small-sea-waves-crashing-sound-effect.mp3
    16  soothing-nighttime-ambience.mp3
    17  spring-forest-birds-sounds.mp3
    18  stormy-wave-sounds.mp3
    19  stream-and-bird-sounds-for-relaxation.mp3
    20  summer-night-ambience.mp3
    21  village-sounds-ambience.mp3
    22  wind-sound-effect-free.mp3

# Here's a one liner that sets $n to the count, $f to the file name
# and does a 'mv $f $n.mp3'
$ ls *.mp3 | nl -v 0 | while read line ; do n=$(echo $line | cut -d' ' -f1) ; f=$(echo $line | cut -d' ' -f2); mv -v $f $n.mp3; done
renamed '432-hz-music-for-relaxation.mp3' -> '0.mp3'
renamed 'ambient-synth-music.mp3' -> '1.mp3'
renamed 'bird-chirping-in-the-garden-sound-effect.mp3' -> '2.mp3'
renamed 'birds-song-in-forest.mp3' -> '3.mp3'
renamed 'calming-sea-sounds.mp3' -> '4.mp3'
renamed 'city-storm-sound-effect.mp3' -> '5.mp3'
renamed 'deep-relaxation-ambient-music.mp3' -> '6.mp3'
renamed 'dreamy-ambient-background-music-free.mp3' -> '7.mp3'
renamed 'farm-ambience-sfx.mp3' -> '8.mp3'
renamed 'night-ambient-sounds-cricket.mp3' -> '9.mp3'
renamed 'outer-space-atmosphere-sound-effect.mp3' -> '10.mp3'
renamed 'peaceful-village-ambience-sound-effect.mp3' -> '11.mp3'
renamed 'relaxing-nature-music.mp3' -> '12.mp3'
renamed 'sad-emotional-background-melody.mp3' -> '13.mp3'
renamed 'sea-waves-sound.mp3' -> '14.mp3'
renamed 'small-sea-waves-crashing-sound-effect.mp3' -> '15.mp3'
renamed 'soothing-nighttime-ambience.mp3' -> '16.mp3'
renamed 'spring-forest-birds-sounds.mp3' -> '17.mp3'
renamed 'stormy-wave-sounds.mp3' -> '18.mp3'
renamed 'stream-and-bird-sounds-for-relaxation.mp3' -> '19.mp3'
renamed 'summer-night-ambience.mp3' -> '20.mp3'
renamed 'village-sounds-ambience.mp3' -> '21.mp3'
renamed 'wind-sound-effect-free.mp3' -> '22.mp3'

# Bonus: test out my random sound strategy from the command line
# Pick a random number, force it to be between 0 and 22 and then
# use mpg123 to play the audio
$ mpg123 $(($RANDOM % 23)).mp3
Playing MPEG stream 1 of 1: 8.mp3 ...

# Success!

Step #3: Put the Files Where Tasker Can See Them

I plugged my phone into my computer via USB C cable and used Windows Explorer to copy the mp3 files to: <Internal Storage>\Tasker\sounds. Tasker should have easy access to these files.

Step #4: Write The Tasker Code

I created a new Task called 1 Minute of Action with four steps:

  1. Set the variable %index to a random number between 0 and 22.
  2. Asks the phone to play a sound that uses %index in its name. This is the magic that causes Tasker to play a random sound, because %index is randomized in the previous step. I've set the sound to loop so that if any of the sounds I picked are less than one minute in length they'll repeat.
  3. Do nothing for precisely one minute.
  4. Stop playing the sound.

Step #5: Add An Icon To The Home Screen

The final touch was to add a Tasker Widget to my home screen that kicks off the '1 Minute of Action' Task. Now I'm a single button press away from a random, ambient sound playing for one minute.

Step #6: Celebrate!

And just like that, you're an app developer! Congrats. You can import this Task by visiting this TaskerNet URL.

There are many ways you could enhance this little app. You could have the Task prompt you, with a slider, for how long to play the music. You could add a task for canceling the currently playing audio. You could log to a Google Spreadsheet, e-mail a friend or send out a Tweet every time you complete the Task, thereby noting the completion of your practice. And of course, you can add sounds, including recording your own. Such is the joy of being a programmer, you're the boss and the computer is just waiting to be put to work.

Tuesday, November 30, 2021

There's Something Fishy About This Menorah

Last week we were in Florida, and spent time on Sanibel Island (pics coming soon!). Sanibel Island has a reputation for being a shell collector's paradise. Naturally, I collected a Ziploc baggie full of shells, but it wasn't until last night that I realized I had a use for them: to craft a Shell Menorah!

Looking at my humble findings, a couple of shells seemed perfect for holding a pool of oil to serve as a lamp. If I had collected eight of these, I could have fashioned a meaningful and effective Hanukkiah. Alas, I only had two. Last night we marked the second night of Chanukah, and so along with lighting our standard menorah, I experimented with using my beach discoveries as lamps:

I used a bit of mounting putty to align and stabilize the shells, and then filled them with olive oil and added a floating wick. I lit the wicks, and to my surprise and delight, the setup worked perfectly!

This partial menorah was not only eco-friendly and personalized, but it also served as sort of a living history demonstration of how early costal communities would have thought about their ecosystem. Seashells weren't pretty trinkets, they were essential for tool construction. Including lamps!

While I didn't collect enough shells to create a proper menorah, the process did inspire me to dig into the topic. I learned a couple of useful tidbits. First, using a menorah is optional. Lighting two lamps, plus a 3rd candle as a shamash, was a Kosher way to mark the second night of Chanukah. The requirement is to have the proper number of lights, and while this is ideally done with a menorah, you can accomplish this by using "several glasses or cups placed in a straight line.".

Second, I could repurpose the shells I collected for use as Shabbat 'candles.' While I've always lit wax candles for Shabbat, the original requirement called for lighting oil lamps, and in many communities this is still practiced. This makes sense, as wax candles weren't a thing nearly two thousand years ago.

Finally I had to ponder what relationship Jews have with seashells. The first thought that came to mind was this memory of visiting a shul in Venice:

While the shuls have been in continuous use (even to this day, they get a few uses every year), many of the reasons behind the symbols on display have been lost. Consider the case of large sea shell above the doorway in one of the shuls. What is this non-kosher item doing there? Does it represent the wash basin used by the Levi'm, or was it simply an in-vogue symbol of the time, so the architect put it in place? Nobody knows. But being Jews, we have no problem coming up with a handful of explanations, and using the one we prefer the best.

The tour had a strict no-photography rule, so I don't have a picture of this memorable decoration. But YouTube does:

There's another connection between Jews and seashells. Specifically with Murex trunculus, a particular sea snail. This little guy is believed to be the source of the blue dye used for creating tekhelet, the special blue thread that used to be included in the creation of tzitzit.

If tekhelet can come from a humble sea creature, then it seems more than appropriate to have a menorah from a similar source.

Here's to a happy and resourceful Chanukah!