## Drive

My car’s in the shop, so I had to take a Lyft to my dentist appointment.

• Hail another Lyft ride to get home (~\$9 USD), or
• Walk ~2 miles in 30-something °F to get my Heart Points/Steps for today

Sometimes the benefits of doing things the hard way outweighs the convenience of doing them the easy way. But you’ve got to pick and choose those opportunities wisely.

## How I Make Algorithms

I’ve been reading Clive Thompson’s Coders book, and it’s caused me to reflect upon the process I use for coming up with algorithms. I’ve come to realize this is one of those things which I do, but is incredibly difficult to explain to others– so this post is my effort to encapsulate “my process.”

1. Become intrigued/obsessed with something (e.g. anagrams)
2. Discover an online anagram finder
3. Ask myself, “How would I go about building my own anagram finder?”
4. Realize I have no idea, and beat myself up for not knowing
5. Forget about building my anagram finder project
6. Weeks later, coincidentally stumble across:
1. Fermat’s notes on anagram comparison using prime numbers trick
2. A code challenge to create anagram tester function
7. Turn Fermat’s concept into a quick & dirty JavaScript function, areAnagrams().
8. Feel good about my areAnagrams() milestone/accomplishment
9. Realize Fermat approach hits integer bit-limit with medium length words.
10. Convert areAnagrams() from prime numbers to “wordDNA” approach (i.e. case-insensitive letter sorting)
11. Feel good about resolving limit in areAnagrams() function.
12. Days later, realize wordDNA approach can be used to create a “rainbow table” of dictionary list– and now you’ve got the basic building parts of an online anagram finder.

## Happiness and Money

I finished reading Gretchen Rubin’s “The Happiness Project” a few weeks ago, and have started gradually implementing her action items. I can’t say I’ve been 100% consistent, or tried them in the exact order and combination the author has done, but after trying a fourth action item today, I wanted to capture my thoughts while the impressions and feelings are still fresh in my mind.

The first two items I implemented were going to sleep earlier and doing the nagging task. I had my doubts about the going to sleep earlier suggestion, but I’ve got to admit when I’ve actually done it, I’ve felt better the following morning. I have this habit of staying up until I’m literally struggling to stay awake, and then going to bed and falling asleep almost immediately afterwards. I typically get 6-7 hours of sleep this way, and I’m sure I adapted to that amount as my “normal” (whatever that means) baseline.

When I go to sleep earlier, though, I’m finding I wake up earlier and get approximately the same amount of total sleep time– but I “feel better” (more rested, more recharged, more patient, whatever subjective terminology you want to use) for some reason.  I’m certainly not a sleep researcher, but this suggests to me the quantity of sleep time isn’t as important as the timing of when I sleep.  Maybe I’m getting a higher percentage of time in REM sleep by going to bed earlier, somehow?

The nagging task action item has been successful when I’ve actually followed through on it, in the sense that I have one fewer “open loop” to worry about once the task is completed– but I haven’t been applying it on a consistent, daily basis.  Definitely an area of improvement for me to focus on in the upcoming weeks.

Which brings me to the most recent action items I put into effect this weekend: buying needful things and indulging in a modest splurge.