Phua KY profile picture

Phua KY

Daily Journal - 2024-01-03

Day 3/30.

Morning Reflection:

I did not complete my morning training today. My wife’s alarm woke me up at 9:25am, later than intended.

Today’s Focus: My main goals for today are to read through the BizSale codebase, define the end goal, and begin coding.

Midday Check-In:

So far I have accomplished finding the Cody AI assistant and re-writing the logic flow of the app to improve my understanding.

Adjustments Needed: Are there any changes you need to make to your plan for the rest of the day?

Evening Review:

Accomplishments: What did you achieve today? This includes progress in work, exercise, personal projects, etc. Added cody ai to ide.

Reread and understood our logic flow of getting data.

  1. It checks if the current data is synchronized with the source it’s fetching from. If not, it stops the process to avoid errors.
  2. It decides whether to re-fetch all listings or just the new ones based on a configuration setting.
  3. It fetches the old listings from the database to compare with the new data.
  4. It looks for new, sold, or deleted listings by comparing the old data with the newly fetched data.
  5. It processes the listings, which could involve cleaning up the data or transforming it into a more useful format.
  6. It saves the processed listings to Firestore.
  7. It updates the metadata, which is data about the data, like how many listings there are in total.
  8. It indexes the listings in Typesense, which makes them searchable.

Identified that the code is very long and complicated.

Challenges: What challenges did you face today, and how did you work to overcome them?

I struggled to get the code running properly, which was frustrating. The complex logic flow made it difficult to understand where to begin debugging. There were also constraints around running frequent scrapes and queries due to usage limits. I was not yet able to fully execute the code even once. However, I am determined to break this challenge down into smaller steps and continue experimenting systematically until I can get it working.

Lessons Learned: Any insights or lessons learned from the day’s experiences?

I made progress on developing code to retrieve business data. I iterated through several versions, with each one improving on the previous. In version 4, I tried to modularize the code by separating a daily run from an hourly run. Another challenge was maintaining the database when new data contained updates to existing records. I was not yet able to solve that problem. As of version 3, the code can continuously scrape for new data, compare it to the existing data, and only upload and index the new additions in Firebase and Typesense.

Self-Assessment:

Adherence to Plan: How closely did you follow your planned schedule and goals? Mindset and Momentum: Are you still determined and focused? No regrets at the end of the year, stay committed. Don't lose momentum.

No exercise completed today. Tomorrow, start at 6am sharp. Tonight, prepare for bed by 8pm.

You cant take the easy path. You cannot do the easy small tasks. You cannot be distracted like a normal person. You cannot rest like a normal person. Stay FOCUS!

Stay Focus Turned On?

Tomorrow’s Preparation:

Next Day's Focus: What are the main goals for tomorrow?

Refocus efforts on front-end development using existing data. Prioritize creating a smooth user interface.

Plan Adjustment: Based on today's experiences, are there any changes you need to make to tomorrow's plan?

Reduce time spent on screens and number of API queries to improve performance. Avoid non-essential sites like Bilibili. Otherwise, stay disciplined by avoiding YouTube and Reddit.

Get your ass to bed by 10pm. See you at 5.30am brother.


Phua KY profile picture
Multiple business owner wannabe. Big on finding out my fullest potential through mental toughness.
contact