6 min read

Depersonalized Diary

For this week’s meditation, I decided to do a digital form of automatic writing to channel the dead — in this case, specifically a former…
Depersonalized Diary
This is one of the less embarrassing entries.

For this week’s meditation, I decided to do a digital form of automatic writing to channel the dead — in this case, specifically a former version of myself.

As I’ve mentioned in previous weeks, journaling is an important practice to me, but one I don’t do often enough. Past versions of myself, however, have been extremely good about it, particularly those past versions who were going through a hard time emotionally or mentally. I’d been interested in experimenting with text generation using a Markov chain for some time, and how better to see how I like the results than to put a past self through one?

Since about 2015 I’ve been intermittently journaling using Microsoft OneNote. 2015 was, not coincidentally, one of the hardest years of my life. That January I left my first job after graduating college in 2014, spent quite a while unemployed and depressed, eventually did a code bootcamp and then moved to New York, where I spent another few months unemployed and depressed until that December I got my first coding job. During this period, I journaled every 2 or 3 days, documenting my feelings, my day-to-day life, and my constantly changing thoughts on the overwhelming existential crisis I was going through as someone who was, for the first time, completely directionless in life and completely on my own. I was also a little too enamored of polysyllabic words at the time.

I’d initially thought of using my entire journal from 2015 up until the present day as a source text, but as I started to go back through it I realized that I’ve been quite a few different selves over the past four years. Using the full corpus could be an interesting experience, but I decided for my first attempt to channel a version of myself I’ve intentionally left in the past. I wanted first of all to make sure the character of the text was relatively coherent, and also to see how I feel about that person now and how much I’ve changed since then. What does the cripplingly depressed, unemployed, incredibly pretentious post-college me have to teach me?

Process

I spent quite a while getting set up. I’ve been trying to get more comfortable with Python and stop defaulting to JavaScript all the time, so I decided to follow Allison’s Markovify guide. Because I’m insufferable, I’m a dedicated vim user, so I spent a while getting my Python bindings juuuuuust right.

Once this was done, I had a very annoying time getting the text out of OneNote. The only available exporting function on Mac is to export each individual page to a PDF. I had about a hundred pages worth of writing to export, and I needed it to go to a .txt file, so this was useless to me. After exploring a number of paths and failing, I decided to do it by hand and copy and past the data myself (into a file which will remain private because I don’t want anyone reading my damn diary).

Once this was done, however, getting Markovify running with the text file was shockingly easy, especially compared to work I’ve done with RNN and other text generation softwares. It was pretty much plug and play, so I just about immediately started having fun with generating text.

Default Settings

initial code. four lines.
My first generated result. Seems auspicious.

My first few results using the default settings were fantastic. I had some sentences I might actually have written, as well as some outputs that were almost poetry.

My first generative poetry. This is honestly much better writing than the source text.
This was not a good time for my romantic life.

I then decided to try with different states and character limits, and ran into my first problems. I wanted to generate something the length of a full journal entry, but including the uniqueness requirement often led to it failing to reach my desired character length or just not generating anything.

Some failed tries at getting to 700 characters.

I then upped my number of tries to 100, and started getting some longer results, although still shorter than I was hoping.

Again, not the best version of myself.

I upped number of tries to 200 and started getting results I liked better.

Ouch.

Messing With State

From here, I started playing around with other variables and copying the results back into a OneNote file for better readability/storage.

Predictably, higher state sizes led to more coherence, but less interesting output. I ultimately decided I was happiest with the default state size of 2.

Doing Something With It

I had a journal entry generator that I was happy with, but what to do with it next?

I liked the idea of creating an automatic journal entry every day using a cronjob — I messed around a bit with Markovify’s generate_sentence_from_seed function, but couldn’t get it to do what I wanted (generate a post from the current date).

I decided instead to take an idea of Mark Lam’s and combine it with an old concept I had for journaling every time I opened a browser -> I’d have this python script run on startup every time I opened a terminal window, then write that same text to a journal entry for the day. Sort of an enforced daily journal entry for an older version of myself, one that needed to journal near-daily, as well as a way for me to consistently commune with that version of me.

You can check out the final code here, and see some sample output below.

Next Steps

This was a fun little exercise, but I was frankly blown away by how impactful and, in some cases, beautiful the output of this script is. I’d like to spend more time curating these entries and figure out a way to show or embody them that I feel does them justice — I think a physical embodiment of this digital record of myself could be really powerful, but I’m not sure how best to move forward. I’d initially thought of using an automatic writing machine to write them out in a diary, but there’s something a little too cutesy about that.

Reflections

This was an opportunity to communicate with a past version of myself in a direct way that I rarely do. Every now and then I’ll read through my old journal entries, and it’s always an interesting experience, but enforcing this communion through terminal generation is forcing me to face the divides and similarities between past and present selves on a much more regular basis.

Mostly, it’s been positive. It’s sometimes embarrassing to see the way this version of me thought, and felt, but in general I’ve been happy to see how far I’ve come, and sympathetic to a version of myself that thought all hope was lost. I hope, if somehow this version of me is still watching, he’s happy that my life got so much better, that I found a direction, that I changed a lot about myself that made me unhappy in those days. I wish I could give him a hug and tell him it’s going to get better, and also to stop being such a pretentious dumbass.

Something else I found interesting while working on this was how vulnerable it made me feel. Even though the posts being generated are novel, the source text is so deeply personal that there were plenty of outputs I chose not to share because I felt they were too private. I think there’s the seed of something really interesting to unpack there .

How much data, how much of our private selves do we not consider because it’s been anonymized and put into algorithms?

How uncomfortable would we be to see how it’s being used?

As an art piece, is it more effective if I just let it generate without curation?

Should I curate for coherence and impact, but be more willing to let the sentences that reveal too much about me slide?

These are questions that have been driving a lot of my work lately, and I hope to find a satisfactory way to address them as they relate to this piece in the future.