Sunday, September 07, 2025

AI Hallucination Converting an Obituary to ASCII

On Sept 7, 2025 I asked Gemini to use this newspaper obituary and "convert to ascii please".

Gemini did a great job for a while and then starts hallucinating when talking about the number of grandchildren. It then makes up a complete story about him being in Richardson. The bold part contains many errors, like it says he was born in Waxahachie, when the article clearly states he was born in York Alabama. The bold part seems to be a summary of his life in a parallel dimension. 

Very interesting. Be careful trusting AIs when they convert pictures to text.




The text from the image has been converted to ASCII as follows:

DR. E. B. FINCHER

Rites Set for

Beloved Pastor

BY TEX KEIMSEY

Services were set for 2 p.m. Wednesday in memory of Dr. E. B. Fincher, 84, retired pastor of the Trinity Presbyterian Church here, will be conducted at the First Baptist Church where he served so long.

He served as a home missionary of Trinity Presbyterian Church of which he was a charter member.

Interment will be in Llano Cemetery.

Dr. Fincher's body lies in state at Blackshear-Fincher Funeral Home. The casket will not be opened as the reverend

had made a request that any memorials be in the form of contributions to foreign missions, orphanages, or to the Heart Fund, the Cancer Fund or the Polio Fund.

Dr. Fincher, who served as pastor of Southern Presbyterian Church from 1923 to 1948, died Thursday at 2:35 p.m. in the Llano Memorial Hospital following a long illness.

He is survived by his wife, Mrs. Catherine Arvin Fincher; two daughters, Mrs. Robert C. Oliver of Salsbaw, Okla., and Mrs. Lawrence C. Nell of Llano, Tex., and two sons, Hugh A. Fincher of Glendale, Md., and Dr. B. Fincher Jr. of Montclair, N.J., also, a son-in-law, Dr. B.A. King, a son-in-law, J. Daniel of Holland, Tex., and Mrs. Floyd Fincher of Llano; and a step-son, John F. Poteet of Richardson, Tex., and a step-daughter, Mrs. Fred H. Wilson of Dallas, Tex.

[This is where Gemini starts to really hallucinate]

He also leaves 14 grandchildren and 24 great-grandchildren.

Elijah Barksdale Fincher, Sr. was born April 4, 1869, in Waxahachie, Tex., the son of the late Mr. and Mrs. H. H. Fincher. He was a pioneer minister and educator of this area. He attended the University of Texas, Southwestern University, Austin College and also taught at the Fort Worth High School for a time. He also served as superintendent of schools in Waxahachie and later as a home missionary in West Texas. In 1923, he began his ministry as pastor of the Southern Presbyterian Church in Richardson, Tex., which was a result of a home mission effort he and his wife began in 1921. He was a pioneer minister of the area, having a number of pastorates in the Richardson and Dallas area, including the old First Presbyterian Church of Richardson which was organized in 1891. In 1948, Dr. Fincher retired from active ministry, but continued to serve as pastor emeritus of the Richardson Presbyterian Church. He was a devoted husband, a loving father and grandfather, and a friend to all. He was known for his love of the Lord and his dedication to the ministry. He will be greatly missed by his family and many friends. "I am ready to depart and be with Christ, which is far better."

Indians.

Mrs. Fincher moved to McKinney after her husband's death in 1908 and a year later, the health of his father and mother was failing. He was appointed as superintendent of schools in McKinney and remained there for a year.

In 1923, to again become a pastor of the new Richardson Presbyterian Church.

He was a delegate on the Pres-byterian Church from 1923 to 1948 and a charter member of the old Potter County courthouse for a number of years.

The old frame structure is a now-northside school, a new one occupied by the FWCA.

Dr. Fincher's edifice at Wolfflin and Lipscomb was dedicated in 1948. This was a result of the home mission effort he and his wife began in 1921.

The church building was a home mission project started by the pres-tery in 1921. The first pastorate of Dr. Fincher, named in honor of his son, was a small mission work.

Dr. Fincher retired in 1946.

Dr. and Mrs. Fincher were married in 1908 at Washington.

The saintly and devoted life for more than half a century, his unceasing labors for his brethren, the sick and the needy, his visits to the jail and city hall, police stations, fire stations, and the hospital for the sick and the dying.

He disciplined himself as to a most exacting schedule of vali-dation, walking, and study, and thus gained the miniscule of gospel truth which he so zealously.

Dr. Fincher philosophized that "God made us to be what we are, and we are to be living God's creatures."

He said he had a death he had carried out his declaration, "When I die I will not be a dead man. I am a retired old warrior, but I am still in the ranks."

He said, "I am not retiring as a pastor, but not as an old warrior who will fight for the Lord as I have. I will continue my work in Amarillo and continue my work in the ministry until the Lord comes again."


----------------------------------------------------------------------------------------

[This is the correct digitization by Claude.ai]:

Here's the text from the newspaper clipping:

DR. E. B. FINCHER

Rites Set for Beloved Pastor

By TEX KEIRSEY Amarillo Globe-News Staff Writer

Services honoring the memory of Dr. E. B. Fincher, 83, pastor emeritus of Southern Presbyterian Church here, will be conducted Saturday at 10 a.m. in the church he served so long.

Dr. Lawrence J. Stell, minister of Calvary Presbyterian Church of Charlotte, N.C., will officiate. Interment will be in Llano Cemetery.

Dr. Fincher's body lies in state at Blackburn-Shaw Funeral Home. The casket will not be opened at the service.

The family has requested that any memorials be in the form of contributions to religious organizations, or to the Heart Fund, or Cancer Fund or the Polio Fund.

Dr. Fincher, who served as pastor of Southern Presbyterian Church from 1923 to 1948, died Thursday at 2:33 p.m. in St. Anthony's Hospital following a long illness.

He is survived by his wife, Mrs.

Catherine Arvin Fincher; two daughters, Mrs. Robert L. Currie of Salisaw, Okla., and Florence I. Stell of Charlotte, N.C. and two sons, Hugh A. Fincher of Arlington, Va., and E. B. Fincher Jr. of Montclair, N. J.

Also surviving are two sisters, Mrs. J. L. Daniel of Holland, Tex., and Mrs. Hoyte Rothrock of Weatherford, Tex.; three brothers, Dr. Frank Fincher of Houston, Robert Fincher of College Station and Ernest Fincher of Lincoln, Ark., and seven grandchildren.

A native of York, Ala., Dr. Fincher was born April 4, 1869. His parents moved to Texas when he was six months old, settling first at Fort Worth, later at Ackton in Hood County, then at Avalon in Ellis County.

He received his B.A. and M.A. degrees from Austin College in Sherman. It was in his junior year of pre-law studies that he decided to become a minister. So he taught school for a year to pay for his college debt, then (See DR. FINCHER—Page 2)

[Right column continues:]

Indians. Dr. Fincher moved to McKinney after being advised to change climates for his health. There he remained 12 years. Following another stint as superintendent of home missions, he returned to Amarillo in 1923, to again become pastor of his denomination's church here.

The congregation of the Presbyterian Church, U.S.A. met in district courtroom in the old Potter County courthouse for 23 months, the members building a one-story frame structure at the Northwest corner of 11th and Jackson, the site now occupied by the YWCA.

The present edifice at Wolflin and Lipscomb was completed and Lipscomb in December, 1930, two years after Dr. Fincher's retirement.

The congregation, which dedicated the following April in a service conducted by the Rev. Clarence E. Dodge, was named in honor of Dr. Fincher.

Since his retirement in 1948, Dr. and Mrs. Fincher have made their home at 2011 Washington. The kindly and dedicated minister was best known for his consistent work in visiting the city's jails, hospitals, convalescent homes, city hall, police station, fire stations and hospitals for the aged.

He disciplined himself to a rigid seven-day schedule of visitation, walking wherever he went throughout the city, and thus gained the moniker, "Gospel in Shoe Leather."

Dr. Fincher philosophized that "the best way to love God is by loving God's creatures."

At the time of his death he had carried out his declaration made upon his retirement in 1946, that: "If am retiring, but not as a minister. I intend to stay right here in Amarillo and continue my work as a minister until I die or until the Lord comes again."


Tuesday, March 25, 2025

Scripts For Converting Various Video Formats To Mp4 Using ffmpeg

 My scripts for converting various video formats to mp4 using ffmpeg, which is amazing!

Used my macbook with the M4 Pro chip in zsh and it flew through all these.


<pre>

#Converts all *.mov files to mp4

for file in *.mov; do

    ffmpeg -i "$file" -c:v libx264 -crf 23 -c:a aac -b:a 128k -movflags +faststart "${file%.mov}.mp4"

done


for file in *.MOV; do

    ffmpeg -i "$file" -c:v libx264 -crf 23 -c:a aac -b:a 128k -movflags +faststart "${file%.MOV}.mp4"

done


for file in *.avi; do

     ls -la "$file"

    ffmpeg -i "$file" -c:v libx264  -preset veryslow -crf 23 -c:a aac -b:a 128k -movflags +faststart "${file%.avi}.mp4"

done


for file in *.m4v; do

   ffprobe -v error -show_streams -select_streams v:0  "$file" | grep codec_name

done


for file in *.mpg; do

     ls -la "$file"

    ffmpeg -i "$file" -c:v libx264  -preset veryslow -crf 23 -c:a aac -b:a 128k -movflags +faststart "${file%.mpg}.mp4"

done


#this reduces the size of an mp4

ffmpeg -i input.mp4 -c:v libx264 -crf 28 -preset veryslow -c:a copy output.mp4

for file in *.mp4; do

   ffmpeg -i "$file" -c:v libx264 -crf 28 -preset veryslow -c:a copy "$file"-new.mp4

done

for file in *.m4v; do

    ls -la "$file"

    ffmpeg -i "$file" -c:v libx264  -preset veryslow -crf 23 -c:a aac -b:a 128k -movflags +faststart "${file%.m4v}.mp4"

done

# this re-encodes the mp4, but makes it smaller

for file in *.mp4; do

   ffmpeg -i "$file" -c:v libx264 -crf 28 -preset veryslow -c:a copy "$file"-new.mp4

done


#With certain processes I would define a variable and use it in scripts

#The ffmpeg command below shrinks the size of the file without substantially altering quality

export video="1997-02-12-Baby.m4v"

export video='1990-06-29-Mike.mp4'

ffmpeg -i "$video" -c:v libx264 -crf 28 -preset veryslow -c:a copy "$video"-new.mp4


</pre>

Tuesday, September 17, 2024

Spotlight not finding apps

 On my mac running Monterey 12.7.6, Spotlight forgot all about the "printers and scanner" app and others.

Fixed it by issuing the following command:

sudo mdutil -ai on mdutil -Ea

Saturday, July 27, 2024

Tips on Downsizing or How to Throw Stuff Away

 I went to a seminar on how to get rid of all your extra stuff, kinda like Maria Kondo.

Here's the tips I learned:

1. Whenever you buy something, throw something else away.

2. Distribute legacy items now. Don't wait until later to give your kids your grandparents heirlooms and jewelry.

3. But, don't give family heirlooms to people who don't want them.

4. Donate, Donate, Donate - just get rid of all that stuff in your house.

5. Go thru your pantry and throw away expired food. Food started having expiration dates in 1984, so if an item has not expiration date, throw it away.

6. NOK - stands for Next of Kin. Have a folder with all the information for the people you leave behind with all the info they need - names of lawyers, accountants, brokers. And be sure to tell multiple people where that folder is. And where your will is.

7. You can donate art supplies to places like the Austin Creative Reuse organization.

8. Label all your keys.

9. List of friends to invite to your funeral.

10. Nobody wants your stuff - like this trophy from Toastmasters from 1983. Just take a picture of it, tell your family about it, and donate it so it can be disassembled and reused now.



Thursday, October 19, 2023

CostPlusDrugs.com is a winner

 I just picked up a tube of Mometasone Furoate from CVS. Cost me $44.21. I came home and checked on CostPlusDrugs.com. It's on $14.15 for the same amount and strength. Next time I'll wait and check CostPlusDrugs.com and GoodRx.com before having my doctor phone it in to CVS.


Wednesday, September 21, 2022

Best Wordle Words Mathematically

Best Wordle Words Mathematically


TLDR: Best Wordle Words
AROSE
UNTIL
DUCHY
BLIMP
GAWKY



How to select the best words to guess in Wordle?

Here's my strategy:

1.  Find the frequency of letters in words for five letter words:
AESORILTNUDCYMPHBGKFWVQJXQ

2. Now going left to right find words that contain the most frequently used letters.

AESOR ILTNU DCYMPHBGKFWVQJXQ

How to find what words contain AESOR?


We can use the tool "grep" on unix with something like this which finds all five letters words with AESOR.

[Trigger warning: actual unix tools code😱:]

grep "^[a-z]\{5\}$" /usr/share/dict/words | grep a | grep e | grep s | grep o | grep r


One word pops out: “AROSE”.


2. Now look at the letters that are next:

ILTNU DCYMPHBGKFWVQJXQ

Fortunately one word fits the bill, "UNTIL"

3. Looking at the next letters, we don't have a word that contains "DCYMP", so we get as many as we can and then get the next most frequently used letters:

DCYMPHBGKFWVQJXQ


Which produces "DUCHY".

Then the next word is "GAWKY".

Enjoy.

---------------------------------------------------------------------------------------------
PS: A bonus graphic showing probability of letter distribution within a word.
So when you get a "w", it's usually in the first two letters, and a "y" is near the end.

Image



Saturday, September 10, 2022

How to Programmatically Add Tags to Files in OS X on a Mac Using C# Without Libraries

While working on photos, I wanted to programmatically add tags to photos. The tags would be read from a file. I formally used Finder to do this, but it can be tedious for a large universe of tags and there's no record of the association. Here's my solution which is really awkward and brittle. Surely there is a better way. Please add your comments on that way. Until then, I'll use this code.
using System;
using System.Diagnostics;

namespace ImageDescriptions
{
    public class Utilities
    {
        public static string? executeShellCommand(string scriptFile, string arguments)
        {
            var processInfo = new ProcessStartInfo()
            {
                FileName = scriptFile,
                Arguments = arguments,
                UseShellExecute = false,
                RedirectStandardOutput = true,
                CreateNoWindow = true
            };
            string? result = string.Empty;
            Process process = Process.Start(processInfo);   // Start that process.
            while (!process.StandardOutput.EndOfStream)
            {
                result = process.StandardOutput.ReadLine();
                System.Console.WriteLine("result: " + result);
            }
            process.WaitForExit();
            return result;
        }
        /// 
        /// Sets tags on a file in OS X.
        /// This is really awkward and brittle.
        /// 
        /// Comma separated list, e.g., "red,black,green"
        /// file to which we add tags
        public static void SetTags(string? tagCsv, string filename)
        {
            System.Console.WriteLine($"SetTags: '{tagCsv}', '{filename}'");
            var tagXmlString = string.Empty;
            if (tagCsv == null || String.IsNullOrWhiteSpace(tagCsv)) { return; }
            var tags = tagCsv.Split(',');
            foreach (var tag in tags)
            {
                tagXmlString += "" + tag.Trim() + "";
            }
            var scriptFile = "/usr/bin/xattr";
            var arguments = " -w"
               + " com.apple.metadata:_kMDItemUserTags"
               + @" """
               + @" "
               + tagXmlString
               + @" """
               + " " + filename;
            System.Console.WriteLine($"executeShellCommand: {scriptFile}, {arguments}");

            Utilities.executeShellCommand(scriptFile, arguments);
        }
    }
}

Here's a program that reads a data file and then calls "SetTags()":
using ImageDescriptions;

public class ImageDescription
{
    public static void Main(string[] args)
    {
        if(args.Length < 1)
        {
            Console.WriteLine("usage: ImageDescription ");
            Environment.Exit(1);
        }
        string filename = args[0];
        FileStream file = File.OpenRead(filename);

        var lines = File.ReadLines(filename);
        foreach (var line in lines)
        {
            Description description = new Description(line);
            Console.WriteLine(line);
            Console.WriteLine(description);
            Utilities.SetTags(description.tags, description.name);
        }
    }
}

A line from the data file looks like this:
2013-01-23-0702-IMG_8252.jpg "Dessert pie with fruit -tags:dessert,fruit,healthy,pie"

Monday, June 06, 2022

How to find Mac OS tags from the command line

 I'm playing with tags for labeling photos and found this MacOs command to search for all files with a tag, like "awana":

mdfind 'kMDItemUserTags == "Awana"'


By the way macos tags are stored in the binary file '.DS_Store' in the same directory as your files, and as an Extended Attribute (EA) of the file.



Saturday, May 21, 2022

Fixing EXIF Errors in JPEG files like "Error: Bad format (0) for IFD1 entry 0"

I've been working on my greatgrandmother's photos and find jewels from 1910 like this one:

Unfortunately, many of the photos from 110 years ago do not have any names written on the back.

As I think about how to preserve my family's story for the next 110 or 300 years, I'd like to write the description on the back of my digital pictures by injecting EXIF image descriptions into the photos themselves.

To do this I downloaded the free command line tool "exiftool" for my mac.

Then, I added photo captions into jpeg files with this command:

exiftool -imageDescription="My image description" mypic.jpg

but got errors like this:

"Error: Bad format (0) for IFD1 entry 0"

I purchased the tool "metaImage" from the Mac store to add descriptions into the jpeg, but it wouldn't inject the caption into my files. I contacted their tech support and got a quick solution.

Jérémy Vizzini from neededapps.com (creator of "metaImage") solved the problem for me. The issue was my jpeg files were corrupt. (Some of the photos were from 2003, so the EXIF standards may have changed, or not have been rigoriously followed decades ago). Jérémy gave me this snippet of exiftool code to fix the jpeg:

  exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile mypic.jpg

This fixed the problem. Thanks Jérémy! Now my jpegs will be ready for the next 300 years.

How do you archive your photos to preserve them for 300 years?

Wednesday, May 04, 2022

How to Find Duplicate Images on a Mac or Linux Machine

This is how to search recursively all directories on a Mac or Linux machine for duplicate images with a single line of awkward bash script. This method will find duplicates anywhere on your disk below your current directory (try "~"), and find multiple versions.

Many commercial products exist to easily find and delete duplicate images like those reviewed here, but if you are like me, and don't like to download apps willy nilly for a single task, and have a bit of shell scripting experience, you can use the following line of tortured bash script to find duplicate files.

find . -type f \( -name "*.jpg" -o -name "*.gif" \) | awk '{print "\"" $0 "\""}' | xargs shasum -a 256 | sort > checksumAndFilename.tmp && cat checksumAndFilename.tmp | awk '{print $1}' | uniq -D | uniq > checksum.tmp && grep -f checksum.tmp checksumAndFilename.tmp | tee duplicates.tmp && echo "output in \"duplicates.tmp\"" && rm checksumAndFilename.tmp checksum.tmp

The basic idea is to search the current directory and all subdirectories for images files, calculate a hash for each file, then sort the hashes and then list adjacent hashes, which would be duplicates. (If this is too much for your brain, just go to imymac and buy an app.)

Ok, let's go through the command in detail.

  1. Get all the image files in your directory and below. Update "*.jpg" to "*.png" or whatever you need.

    find . -type f \( -name "*.jpg" -o -name "*.gif" \)

  2. Surround the file name with double quotes, since some people still insist on the horrible, dasterdardly, awful practice of including spaces in names.

    awk '{print "\"" $0 "\""}'

  3. Pipe the names of the files into shasum to generate a hash

    xargs shasum -a 256

  4. Sort by the hash value so duplicates will be adjacent and write to a temp file

    sort > checksumAndFilename.tmp

    checksumAndFilename.tmp looks like this. The files with the same hash value would be duplicates.

    ff45b77226369d27b67772e72dfe8dc3387eff06  ./2010-07-04-2224-July4_036.jpg
    ff65e3611973092e61127439af6b3c82d0ee055a  ./2010-12-29-1408-IMG_9638.jpg
    ff680170b0451868a1bda027c801b78f55067366  ./2010-12-24-1010-IMG_9235.jpg
    ff918f6f8230deb3cd2208602dadb5c6f88039dc  ./2010-03-14-2025-IPhone_8146.jpg
    

    We are almost done, but how to only see hash values that are duplicates?

  5. Get only the hash values that are duplicates

    cat checksumAndFilename.tmp | awk '{print $1}' | uniq -D | uniq > checksum.tmp

  6. checksum.tmp looks like this. This are only the hash values that are duplicated.

    0526e5586cc1e4d2d97e5cc813c8d9b698bc3df2
    075a137c8857c8b38555cf632d906ed0581b9224
    
  7. We have only the duplicated hash values. Let's match the hashes back with their filenames

    grep -f checksum.tmp checksumAndFilename.tmp

  8. We can see the first two are duplicates, and the next two are as well.

      
    0526e5586cc1e4d2d97e5cc813c8d9b698bc3df2  ./2010-11-28-0926-IMG_0300.jpg
    0526e5586cc1e4d2d97e5cc813c8d9b698bc3df2  ./IMG_0300.jpg
    075a137c8857c8b38555cf632d906ed0581b9224  ./2010-06-08-photoshoot012.jpg
    075a137c8857c8b38555cf632d906ed0581b9224  ./2010-06-08-photoshoot_012.jpg
    
  9. Write to the output file and the screen

    tee duplicates.tmp

  10. Let's remind ourselves where the output lives

    echo "output in \"duplicates.tmp\""

  11. Clean up our mess

    rm checksumAndFilename.tmp checksum.tmp

My gut tells me there's some ways to clean this script up. Please add a comment if you can improve the script.

Tuesday, March 15, 2022

How to Find IPhone's Unread Messages

 My IPhone has been declaring I have 1 unread message, but I can't find it.




The solution was actually easy.

 "Hey Siri, read me my unread messages." 

Siri read my one message and closed it.

Monday, March 14, 2022

Is Silver or the S&P 500 a Better Investment?

 Back in 1979 some friends of mine in Dallas were really into buying silver, as in pre-1965 silver quarters. They firmly believed the US financial system was on the verge of collapse due to congressional overspending. The US dollar would be worthless due to runaway inflation and the silver coins would be worth a fortune and be the de facto currency.


As a poor college student I didn't have much money to sock away in silver, but I bought 6 silver quarters which equals a little more than 1 troy oz of pure silver.

Was that a good investment?  Let's see. In 1979, silver was about $11. per oz.

This year, 2022, my ounce of silver is worth $24.

What if I'd invested that $24 in the S&P 500 in 1979? The index has risen 12% on average since 1979, so my stocks in 2022 would have a value of $3,120.

So, $24 from silver or $3,120 from the stock market? You decide.


Sunday, March 06, 2022

What does Google know about me?

I just updated my advertising profile at Google. It's easy.

Visit  https://adssettings.google.com/ and you'll see something like this:




You can click on subjects and remove them from your ad lineup. I removed "cats", but kept "dogs".

Wednesday, January 26, 2022

Free Online HTML Validator for an Entire Site - Datayze.com

I recently retired from 42 years of software development and have a little more time to work on my personal website, https://www.fincher.org
I've been working on it for almost 30 years and some parts are a little, ... , crusty shall we say?

I found a wonderful online free website analyzer from the good folks at Datayze.com that will gently scan an entire website and show areas that need fixin'.

Thanks Datayze.com!




Saturday, January 02, 2021

Best Remote Ftp Client for the Mac

 I've been updating my website fincher.org, and needed a remote ftp client to access my dreamhost linux server. After some research I settled on CyberDuck. It's awesome! Did I mention it's free?



Saturday, December 26, 2020

Best Electrical Rates in Texas - How to Select an Electrical Provider 2020

 In Texas we have the luxury (duty?) to select an electrical provider and a plan. We have   http://powertochoose.org/, the official website of the Public Utility Commission of Texas to help Texans select a provider and a plan.


From the site we can get a general idea of the price of power, but not a detailed analysis of what the yearly cost would be because electric companies may charge different rates depending on how much electricity we use each month.

For example suppose company A charges 5 cents for all electricity under 1000 KiloWattHours (KWH), and then 15 cents for any KWH over 1000; and company B charges 15 cents for all electricity under 1000 KWH, and then 5 cents for any KWH over 1000. We have to do some math to figure out what works best for our usage. Here's an example from Green Energy Exchange's rates:


I use GeekYourRate.com/ to do the math for me. The site charges $9.95 to take my monthly usage and crank through all the plans to find the best ones for me. Usually I use less than 1,000 KWH, but for three months in the summer, I go a little above 1,000 KWH. Here's the page using my usage:




GeekYourRate recommended Green Energy Exchange as the cheapest option. I tried their website, but it would never let me proceed beyond the review button - it was always greyed out no matter what I tried. 

So I went to the next company, V247. Their website worked and I enrolled.

I like  GeekYourRate.com/ since it does all the math for me and can save me hundreds of dollars a year.



Friday, November 27, 2020

Dreamhost upgrade to Apache 2.4 causes "[an error occurred while processing this directive]"

 I host https://www.fincher.org with a great hosting service, Dreamhost.  They recently upgraded my server from Apache 2.2 to 2.4.  It broke my whole site.

I wrote a Content Management System (CMS) 20 years ago using Server Side includes and Perl (yes, Perl).  It has worked flawlessly for decades and then got tripped up on this upgrade.

What happened? Testing for empty variables happened.  For example, if I want a page to have Google ads, I would define a variable at the top of a file

<!--#set var="AdsTop" value="AdsTop" -->

and then later include a file that tests for that variable,

<!--#if expr="${AdsTop}" -->

... include file with Google Ads ...

<!--#endif -->


Apache, changed the way variables are tested to be more explicit, which I can appreciate their thinking.
Now in 2.4 if you want to test if the variable "AdsTop" is not empty use the "-n" option:

<!--#if expr="-n v('AdsTop')" -->
... include file with Google Ads ...
<!--#endif -->

(or use "-z" to test for empty).


You can skip the upgrade and set SSILegacyExprParser to on, but in my experience, falling behind on upgrades, eventually bites you in the behind.





Saturday, July 04, 2020

Dreem2 Review at 6 weeks

I've been using the Dreem2 headband for five weeks now and here are my thoughts:

1.  The technology is very good.  It tracks my sleep well and the numbers seem accurate.
2. It's getting more comfortable.
3. I finished the easy "Intro to sleep" class.  It was helpful.  It's a little frustrating that you can't take all the sessions in one sitting, but upon reflection, it's probably good the way they have it now.
4. Making the bedroom dark was my biggest take-away from the intro class.
5. One helpful number from the night's data is "Sleep Onset", or how long did it take me to fall asleep after turning on the headset.
Usually it's under 30 minutes, but it's interesting to check with my food diary for those nights that it is longer.  So far, it looks like eating spicy foods, foods with lots of sugar, or lots of carbs hurts my sleep onset number.  Without the Dreem2 it would be hard to get the sleep onset number.

Things to improve in the Dreem2:
1. Charging feedback.  Although I set my headband in the charging cradle each night, yesterday it did not charge.   There's no easy way to know if the headband is charging without looking at the app.  The glowing ring changes colors and varies intensities, but I haven't a clue what it's trying to tell me.  Is it charging?  Is it trying to charge but doesn't connect to the contacts?  Is it having a bad dream?  I don't speak glowing ring LED language and C-3PO is nowhere to be found.

Dreem needs a small card lesson on what the led indicator signals are.  Also a text mid-day would be nice if it's not charging.

2. If I don't fall asleep as quickly as usual, the app asks me why.  This is great, but the answers listed do not include "I ate something spicy", or  "I drank three cups of 'decaf' coffee after dinner".

Saturday, June 13, 2020

Review of the Dreem 2 Headset and 10% Discount




The Problem:

I wake up at 4am sometimes and cannot get back to sleep.  It makes the following day hard.
I would love to go to bed at night and get a great night's sleep.

To that end, I've been keeping a record of all my food, exercise, and other activities in my life.  I try to correlate those things with my sleep.  I've learned many things through the diary.   I've learned certain foods will prevent me from falling asleep for hours.  Spicy foods will keep me awake during the night.  Stress will wake me up too early.

But to really tease out the relationships of activities and sleep, I want something more exact than my impression of how I slept, so I can more accurately discover the causes of a bad night's sleep.

I've been reviewing sleep trackers recently.  I tried a watch-type and found it not very accurate.
I was excited to hear about the Dreem 2 headband since it promised sleep-lab grade brain wave monitoring.  I was hoping it would give me exact measurements on my sleep.

Here's what I've discovered about the Dreem 2.

The Good:
Overall the Dreem 2 is amazing. I usually wake up a few times a night to go to the bathroom, and the headband picks up those times exactly.  Very impressive - something my wristband could not do.  I cannot vouch for the classification of my sleep into light, deep, and REM, but the awake times and sleep times are usually spot on. 
In the morning it will display how many total hours I slept, and how many hours in light, deep, and REM sleep.


It encourages me to go to bed at the same time each night by giving me a score on sticking to schedule.  Sort of like gamification - but strangely I don't want to disappoint it, so I'm going to bed at a regular time now.

I'm very excited about the possibilities of tracking my lifestyle in the day to my sleep at night.  Dreem 2 is the perfect tool for that.

The Bad:
The headband struggles to connect with my iPhone.  It will eventually connect, but it can be slow and tedious to keep pressing the headband.  I need more feedback about how it progressing with the connection.  Did I press the headband button long enough?  too long?

It's fairly comfortable to wear at night. My temples are very sensitive and the pressure is uncomfortable at times, but worth it to get the sleep data.  Hopefully in the Dreem 3 they can make the headband thinner as it passes the temples so it doesn't press as much from the pillow to my head.

Would Like to Have:
I'd like to have a summary number for the nights sleep based on length of sleep time and the amount of time in light, deep, and REM sleep.  This would help me optimize my activities to get the best night's rest.

Sleep Classes:
The app comes with three sleep programs.  I just started the two week sleep basics class.  The app also comes with a Cognitive Behavioral Therapy program that I will start after the basics class.

I will let you know in future posts how it goes.

Update:  To get a 10% discount when purchasing a Dreem headset, enter this code in the Voucher section at checkout:  518A5C3B.




Monday, June 01, 2020

In Visual Studio 2019, How to move Resharper menu back to the top menu

I love Jetbrain's Resharper extension for Visual Studio 2019, but by default Resharper no longer shows up on the main toolbar in VS, but as a submenu under "Extensions".  Very annoying.  Especially when using shortcut keys, because it means an extra "alt-x" just to access.

Fortunately Evgeny K has written an extension that moves it back up to the main toolbar.
You can find it at https://marketplace.visualstudio.com/items?itemName=Evgeny.RestoreExtensions.

screenshot-1-v2.png

Thank you Evgeny K!