# Do I Buy My Wife Flowers Tonight or Not

DevFeed: [Do I Buy My Wife Flowers Tonight or Not](<https://devfeed.tech/articles/do-i-buy-my-wife-flowers-tonight-or-not-28297.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/relationships/2019/11/19/do-i-buy-flowers-tonight-or-not.html>)

Author: Fuzzygroup

Published: 2019-11-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Tool](<https://devfeed.tech/topics/tool.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>)

Tags: [birthday](<https://devfeed.tech/tags/birthday.md>), [calendar](<https://devfeed.tech/tags/calendar.md>), [code](<https://devfeed.tech/tags/code.md>), [developers](<https://devfeed.tech/tags/developers.md>), [flowers](<https://devfeed.tech/tags/flowers.md>), [old-school](<https://devfeed.tech/tags/old-school.md>), [prolog](<https://devfeed.tech/tags/prolog.md>), [random](<https://devfeed.tech/tags/random.md>), [relationships](<https://devfeed.tech/tags/relationships.md>), [routine](<https://devfeed.tech/tags/routine.md>), [script](<https://devfeed.tech/tags/script.md>), [shell](<https://devfeed.tech/tags/shell.md>), [software-developers](<https://devfeed.tech/tags/software-developers.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [unix](<https://devfeed.tech/tags/unix.md>)

## AI overview

The author describes using a quasi-random Ruby script in a shell startup file as a reminder to occasionally buy a partner a small gift. Each run samples from flowers, wine, chocolates, a card, and several nil entries; the author says the probability can be adjusted and the script runs from `~/.zshrc` or `~/.bashrc`. The excerpt also shows an intended birthday check, though its displayed condition and message appear inconsistent with the birthday reminder described. The author emphasizes that the prompt did not dictate behavior, but increased awareness; over time, the habit became internalized.

## Source excerpt

Like a lot of software developers, I can be pretty forgetful at times. If you're in the industry, you know how it goes: You start working on a project and it is February You look up and ... it is May and You don't remember all that much of your life between A good friend of mine refers to this as falling down a code hole (Thank you Mister Mott) and it really is a thing. Some people's code holes are a few days long. Other people's code holes can, in the case of a death march, last for months. A bunch of years ago, I came out of a code hole and realized that I couldn't remember when I had last bought my wife flowers (if your wife doesn't like flowers then substitute chocolates, wine, etc). Any husband worth his salt knows what I mean - that little treat that says to the person you love that you remember their existence and they matter. I regard that for my personal relationships, buying a woman flowers unexpectedly as akin to lubrication on a mechanical device; something that makes the underlying machine work better. Call if "relationship lubrication" if you will. After realizing this, I thought about how I could solve it - in a natural fashion. I didn't want to put it on a calendar; I didn't want it to be regular so I realized that I could tie it to: Something I did regularly Make it quasi random Since I've an old school Unix guy (originally SunOS back in '89 on a Sun 3 running Qunitus Prolog), what I did was tie this to my shell startup routine: For non computer folks, a "shell" is a program you use to interface directly with the machine A startup routine is a script which runs when the shell starts up As a heavy terminal user, I open a shell 10 or 20 times a day so, over time, I adjusted the probabilities to reflect that. What I did was write a "throw of the dice routine" that randomly tells me whether or not to buy flowers. This can be as complex as you want it to be. I made the example below a little complex and tied in a "on her birthday" routine just in case. Her