When you're in the zone, nothing can stop you. Let your coworkers know what tunes you were listening to in the moment.
There are two modes in life:
- (R)ecord - when you want to make a mixtape for somebody
- (P)layback - when you want to feel the mood
In The Zone is an information schema that identifies what music somebody was listening to when they were coding and can help other people get in to the same groove.
There are different granularities for project definition:
- Project scope
- Package scope
- Folder scope
- File scope
- FuNCtION ScoPE
Similarly, there are different granularies for music selection:
- Artist
- Album
- Playlist
- Track
- PlAYEd THiS on LOOP 1000000000 tiMMEs
My default album when coding is TRON: Legacy Reconfigured
, so in the root of any project, I'll have a .zone
file with the following metadata.
inthezone:spotify-uri=https://open.spotify.com/album/382ObEPsp2rxGrnsizN5TX?si=nZ0rlGnDRdu4GhpNKJm6cw
inthezone:media:type=album
inthezone:config:loop=true
inthezone:config:shuffle=false
When I open that project, it'll automatically kick off the Derezzed remix by The Glitch Mob and my brain will imeddiately hop down the rabbit hole by the 8th bar.
Sometimes I'll really need to focus on a problem in a single file or class. With In The Zone, we have metadata that can be inserted at the top of a file or function such that when it opens you're automatically, well, in the zone.
/**
* inthezone:scope=file
* inthezone:spotify-uri=https://open.spotify.com/track/5xKVYMxOHB2XRLCUafFrz6?si=3a5b8b4c70ea4869
* inthezone:media:type=track
* inthezone:config:loop=true
* inthezone:config:loop:count=10
*/
The way that In The Zone works is that as you dive deeper in to more specific areas of the code, more specific In The Zone definitions will override more general ones. Kind of like CSS. 🤮
Also, certain configurations like inthezone:config:loop:count
can help you know when you've gone too deep.
Sometimes you might also just be a little too proud of a piece of code you wrote and want to let a colleague know about it. Don't let us stop you.
# inthezone:scope=scroll
# inthezone:scope:lines=+20
# inthezone:scope:spotify-uri=https://open.spotify.com/track/2WElktskrNJEwgpp5Vouxk?si=4b246627810c4858
That little gem right there? Only kicks off when somebody scrolls within 20 lines of the comment. 🐈