Day 14 - What is a rare combination of two skills that when combined make someone unstoppable? https://golifelog.com/posts/what-is-a-rare-combination-of-two-skills-that-when-combined-make-someone-unstoppable-1610599782019
For indie hackers/makers, namely, developing, designing and marketing.
Researched and consulted widely on approach to solve the remaining streak bug
Taking a step back, to solve this new Date() doesn't apply offset issue, there seems to be 3 approaches I can take.
1. Patch date-streaks module directly by adding offset to new Date(), seems least effort, but hard to understand their code
2. Make my own streak.js plugin - making from scratch feels time-consuming but more control and less downstream gotchas
3. Use afterCreate lifecycle hooks within Strapi to save a new content-type streaks, so it's not calculated on the fly every time but saved as an integer as each post is created.
1. Patch date-streaks module directly by adding offset to new Date(), seems least effort, but hard to understand their code
2. Make my own streak.js plugin - making from scratch feels time-consuming but more control and less downstream gotchas
3. Use afterCreate lifecycle hooks within Strapi to save a new content-type streaks, so it's not calculated on the fly every time but saved as an integer as each post is created.
Day 13 - Rest != Sleep https://golifelog.com/posts/rest-sleep-1610543910415
Day 12 - Micro steps https://golifelog.com/posts/micro-steps-1610446250918
π Identified minor bug within streaks algorithm
OK...... looks like the streak bug is still not completely dead, just like how cockroaches die hard. At least I identified the problem within a day, which is something to celebrate over. The first step to solving any bug is to isolate and identify, so that's a pat on my own back at least. My date streaks module uses `new Date()` in UTC to set the current day/date, and it doesn't apply user's timezone offset. So the array of published dates are offset to user's tz but it's always referenced to the the current date in UTC, which is why sometimes the streak breaks but restores when the user posts (e.g. if the user happen to write past the UTC midnight but still within his tz's midnight).
π΅ Yet another lifetime deal (US$120) customer for Lifelog! Thank you so much @brianball for your support!
π Total one-off revenue: $480
π MRR: $20
π MRR: $20
Day 11 - Everyone can be a Gumroad entrepreneur now https://golifelog.com/posts/everyone-can-be-a-gumroad-entrepreneur-now-1610347236235
π€ Just received another lifetime deal payment $120! Thank you @peterdannock!
Added 1 new item to writing prompts
'What feels like play to you, but looks like work to others?'
Day 10 - Deep Year https://golifelog.com/posts/deep-year-1610266414444
Day 9 - Code only exists by the grace of others https://golifelog.com/posts/code-only-exists-by-the-grace-of-others-1610166733122
Day 8 - Fundamentals https://golifelog.com/posts/fundamentals-1610092536439
Fixed no SSL error on www subdomain via Cloudflare
πππ YAAASSSS ITS FIXED!!!! After 3 days of debugging trial by fire, I fixed the post page loading issue. Woohoooo I wanna dance hahahahah! πΊ
Turned out, the culprit was a sort function for the comments v-for loop.
v-for="comment in sortedComments"
:key="comment"
>
...
computed: {
sortedComments() {
const x = this.post.comments
return x.sort(function (a, b) {
return a.id - b.id
})
},
}
Changed that function to using lodash's sortBy function and it works now!
import _ from 'lodash'
computed: {
sortedComments() {
return _.orderBy(this.post.comments, ['created_at'], ['desc'])
},
},
All thanks to @yuyu 's suggestion to comment out everything in _slug! That got me down the right path to debug this eventually! Note to self: always fall back to fundamentals when debugging - just comment out code first to isolate the bug. But the deeper mystery remains:
* why this worked before but not now
* the behaviour should be consistent on local and production, but it worked on local
* the function didn't crash the page if I entered the site via a different child page by directly typing in the url
* why lodash worked but a vanilla JS script didn't
:key="comment"
>
...
computed: {
sortedComments() {
const x = this.post.comments
return x.sort(function (a, b) {
return a.id - b.id
})
},
}
Changed that function to using lodash's sortBy function and it works now!
import _ from 'lodash'
computed: {
sortedComments() {
return _.orderBy(this.post.comments, ['created_at'], ['desc'])
},
},
All thanks to @yuyu 's suggestion to comment out everything in _slug! That got me down the right path to debug this eventually! Note to self: always fall back to fundamentals when debugging - just comment out code first to isolate the bug. But the deeper mystery remains:
* why this worked before but not now
* the behaviour should be consistent on local and production, but it worked on local
* the function didn't crash the page if I entered the site via a different child page by directly typing in the url
* why lodash worked but a vanilla JS script didn't
Day 7 - Chronotype metamorphosis complete https://golifelog.com/posts/chronotype-metamorphosis-complete-1609987348325
Day 6 - $5k MRR-Breaking it down https://golifelog.com/posts/dollar5k-mrr-breaking-it-down-1609908146149
To earn $5,000 monthly, I need:
50 people to pay $100/month
100 people to pay $50/month
200 people to pay $25/month
500 people to pay $10/month π
1000 people to pay $5/month
5000 people to pay $1/month
Breaking it down in terms of actions:
$60k/year
β¦ $5k/month
β¦ $1250/week
β¦ $166.66/day
β¦ 10 people buy the $120 lifetime plan per week
β¦ or 17 people sign up on the $10/m plan per day
β¦ 1000-1700 views per day @ 1% conversion rate (assumed)
So my job now is to generate 1700 daily views ... π€
50 people to pay $100/month
100 people to pay $50/month
200 people to pay $25/month
500 people to pay $10/month π
1000 people to pay $5/month
5000 people to pay $1/month
Breaking it down in terms of actions:
$60k/year
β¦ $5k/month
β¦ $1250/week
β¦ $166.66/day
β¦ 10 people buy the $120 lifetime plan per week
β¦ or 17 people sign up on the $10/m plan per day
β¦ 1000-1700 views per day @ 1% conversion rate (assumed)
So my job now is to generate 1700 daily views ... π€
Researched about timezone management for apps
OK so this seems to be how the various packages should work on a high level:
* timezone detection - packages like jstz, moment.timezone.guess() to detect the tz of the user. These packages usually tap on the javascript Intl API
- Intl.DateTimeFormat.prototype.resolvedOptions()
* timezone library - a library of timezone offsets based on real world data (timezones are a mess, with daylight savings and all). This library would take the tz from the tx detection package, and pass on the offset needed calculate streaks
* streaks - calculate streaks data based on array of tz dates (I use date-streaks npm package)
* timezone detection - packages like jstz, moment.timezone.guess() to detect the tz of the user. These packages usually tap on the javascript Intl API
- Intl.DateTimeFormat.prototype.resolvedOptions()
* timezone library - a library of timezone offsets based on real world data (timezones are a mess, with daylight savings and all). This library would take the tz from the tx detection package, and pass on the offset needed calculate streaks
* streaks - calculate streaks data based on array of tz dates (I use date-streaks npm package)
Added feature/bug tags to roadmap
Learned something new today! I can actually v-bind a class attribute using the template literals `${ }`
:class="`is-${consideredFeature.typeColor}`"
:class="`is-${consideredFeature.typeColor}`"
Jason Leow
Author
Thanks @yuyu! Great learning point, didn't know that! I just did what worked but this really helps. Must add this to future optim efforts
Fixed Abe's streak manually
After some research and discussion with Abe, I think I know what went wrong with the streak mechanism. The npm `date streaks` package never calculated streaks based on timezones! Everything is in UTC +00 (as per recommended best practice of saving timestamps in databases). If users had very predictable routines of writing, it was still fine, but if someone wrote close to the end of their timezone windows, that might already be the next day in UTC time (thus broken streak). Need to look for a package that has a library of timezone offset rules to twin with my date streaks package, and perhaps another one too to detect user's timezone without user having to explicitly set it.
Day 5 - Biohacking sleep https://golifelog.com/posts/biohacking-sleep-1609833246396
Deployed roadmap page to
Felt like I made a mini-app within an app! Made this in 2 days - tabs for different upcoming features categories, with feature lists under each tab. Also added a few placeholders for upcoming features: upvote button, individual feature pages with comments threads for only logged in users.
Created component for roadmap page - tabs with a card/box-based list of features
Researched other feedback/roadmap tools, was either pricey (Canny.io) or didn't fit what I needed (Trello). So decided to make my own!
Created the roadmap page, since everyone is asking about it while giving feedback. 4 tabs - considering, planned, developing, launched. Each tab will have a list of features in card/box format, with future features like upvoting button, and comments thread upon click through to read/comment/discuss.
Created the roadmap page, since everyone is asking about it while giving feedback. 4 tabs - considering, planned, developing, launched. Each tab will have a list of features in card/box format, with future features like upvoting button, and comments thread upon click through to read/comment/discuss.
@jasonleow Anyway its cool to have a writing streak, actually I am now on challenge to use paper diary for one month :D Thanks for inspirative update ;)
Great! :-) Im curious what you will come up with soon. Leave me a note if you would like to localize it easily into more languages. We also have own tool for that :)
Day 4 - Why $5k MRR, not $1mil ARR? https://golifelog.com/posts/why-dollar5k-mrr-not-dollar1mil-arr-1609768815529
Fixed Keni's streak again. There's an issue alright, just that it's only affecting her, not the rest.How very odd.
Day 3 - 2021 in 8 forms of capital https://golifelog.com/posts/2021-in-8-forms-of-capital-1609644092355
In 2021, I want to see if I canβ¦
π΅ Financial: Hit $5k MRR from all my products by 31 Dec 2021, through consistency rather than intensity.
β Material: Give more, give away more.
π² Living: Sleep better, move more (& in nature).
π‘ Intellectual: Follow my dev nose.
πͺ Experiential: Look for 1% improvement every week. Just 1%, 1 thing, 1 task, 1 idea.
π₯ Social: Quality conversations and relationships, local and global.
π¨ Cultural: Changing lanes (and identity) to geek/dev subculture.
β© Spiritual: Fatherhood thatβs mindful and present.
π΅ Financial: Hit $5k MRR from all my products by 31 Dec 2021, through consistency rather than intensity.
β Material: Give more, give away more.
π² Living: Sleep better, move more (& in nature).
π‘ Intellectual: Follow my dev nose.
πͺ Experiential: Look for 1% improvement every week. Just 1%, 1 thing, 1 task, 1 idea.
π₯ Social: Quality conversations and relationships, local and global.
π¨ Cultural: Changing lanes (and identity) to geek/dev subculture.
β© Spiritual: Fatherhood thatβs mindful and present.