# 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: opinion

Language: en

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

Topics: [Shell](<https://devfeed.tech/topics/shell.md>), [Script](<https://devfeed.tech/topics/script.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [developers](<https://devfeed.tech/tags/developers.md>), [personal](<https://devfeed.tech/tags/personal.md>), [relationships](<https://devfeed.tech/tags/relationships.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [script](<https://devfeed.tech/tags/script.md>), [shell](<https://devfeed.tech/tags/shell.md>), [unix](<https://devfeed.tech/tags/unix.md>)

## AI overview

A software developer describes using a quasi-random Ruby routine in shell startup files such as ~/.zshrc and ~/.bashrc to remind him to buy flowers or another small gift for his wife. The routine was intended to increase awareness rather than directly control his behavior.

## 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