← back

Weeknote 21: Dance Improv, Lucid Dreams, and Software Architecture

Productivity stats · Dance improv · Lucid dream research · Sleep data · Software architecture · Cal Newport

Table of contents

Stats I’m tracking

This week I did:

Here I am modeling with my electrodes on. Dash posing while wearing sleep electrodes.

Dance Improv Party

I threw another dance improv party on Wednesday.

Our list of activities.

  1. Warm up from the floor Full group
    “Al Salam” by Superposition & Rotana

    We started lying down and gradually danced our way up to standing, each focusing on our own movement.

  2. Find an ending together Groups of three, then the full group
    No music

    We improvised a dance and listened to one another to figure out when to end. Without music to cue you, you have to pay more attention to each other.

  3. Dance with one leader Full group
    “Dancing Queen” by ABBA (led by Joseph)
    “Ti Amo” by Danny L Harle & DJ Danny (feat. MC Spirits) (led by Anand)

    The leader chose the song and lighting. We could follow their moves, complement them, or use them as inspiration.

  4. Dance with two leaders Full group
    “Hide and Seek” by Imogen Heap (led by Dash and Daniel)
    “Egyptian Fantasy” (led by Avery and Anand)

    We repeated the previous exercise with two people leading at the same time.

  5. Make a soundscape Full group

    We were tired, so we lay on the floor, switched off the lights, and made sounds for a series of scenes: a factory, an ocean, rude people on the subway, then an altercation.

Afterwards people stayed late to chat.

I keep forgetting to take pictures even though the dancing is very visual! We had all sorts of party lights.

Lucid dream research: Totally dead haptic device

My haptic device has been breaking. Even worse, sometimes the device breaks without reporting an error, so we record a stimulation that never happened. So now we have lying data!

This week, the issue was being annoyingly intermittent. During live recording, the device broke. As soon as I tried to debug the device, it worked again! Satan was pleased.

Image associated with a computer vision object detection project.

Luckily, shaking the device briefly made it disconnect and reconnect. So I could tell it must be from a loose wire.

I ordered supplies from Digikey to

  1. fix the loose wires
  2. test out a signal verifier

I’m going to test an accelerometer to see if it can verify that the buzzer is actually buzzing. This way, we verify that our data isn’t a lie!

Many lucid dreams and interesting data on Monday

My experiment was suppressing REM early in the night by waking me up mid-REM. So later, when the buzzer broke and stopped suppressing my REM, I think I accidentally gave myself a REM rebound. I had like five lucid dreams that morning.

I recorded a lot of lucid dream signals. Here’s one below.

Sleep recording with a lucid dream signal marked in pink.

Unrelated to lucidity, below is an interesting moment where I’m not sure whether I was awake. I signal, in response to a buzz, that I felt like I was already awake and the buzz didn’t wake me. And I do this twice in a row.

Sleep recording with annotated eye signals and blue buzzer markers.

I am supposed to press a button at the same time as I give the eye signal. This helps distinguish between an eye signal made while awake and one made during a false awakening.

However, in my first signal, I forget to use the button. So I signal a second time with the button (blue markers in the graph above).

This leads to the question, was I really awake when I gave the first signal?

During the first signal, I have no alpha, which is associated with being asleep. My eye signals are weak. On the other hand, my EMG looks a little increased, which suggests I was awake.

In the second signal set, when I did press the button, alpha is clearly increased, which is associated with being awake. My eye signals are very strong. In my personal experience, I feel like sleep eye signals are weaker than wake signals.

Computer vision project

Played with a side project that deals with detecting an object in images.

Example image used in a computer vision object detection project.

Software architecture rabbit hole

Values that shouldn’t change after they are set: enforce in the database?

I was confused about whether to enforce a business rule in the database that prevents a specific value from changing once it’s set.

We expect some values to change over time: a user’s occupation, the lifecycle status on a message, etc.

But we would never expect some things to change after they happen, like a credit card charge.

After a charge happens, it always has happened, even if you later refund it.

But what happens if the charge amount was recorded incorrectly? Then you do need to change it, even though the charge itself didn’t change.

I like the idea of enforcing rules in the database because I feel like it limits mistakes and hackers’ damages. Maybe I’m not supposed to think of it that way…

But if you do enforce that a value should never change once set because that’s its business logic, what happens when the data passed to the db was a mistake?

Now you can’t simply correct your mistake by editing the field. So, do you enforce value staticness in the database or not? And if you do, how do you handle corrections?

I found several ways to approach this question. However, it was unclear when you use each method or why.

I posted a question on Stack Exchange (which, of course, was downvoted and deleted within an hour).

One commenter said “having to correct a mistake” is a rule itself. But it’s weird because it’s like a meta rule about the data and not about the business logic.

I guess next week we’ll see if I can synthesize all of this into a decision….

Event sourcing and software architecture rabbit hole

I also asked developers I knew about my question above.

One developer mentioned that he doesn’t even give the database that much thought. He uses event-driven architecture. Which led me down a rabbit hole!

I ended up watching a bunch of tutorials on software architecture and event sourcing, and questioning my whole project plan!

Overwhelmed with choices, one video had a useful suggestion: when you’re planning, don’t over-engineer but do code in a way that gives you optionality. I am not sure how to do this in practice, but I like the idea.

Watch on YouTube.

Cal Newport: Hugging Face

I enjoyed this video from Cal Newport, the author who coined the term deep work, on the Hugging Face hack and the media coverage of it.

Watch on YouTube.