October 25, 2024
Contents
Daily Updates
October 21, 2024 (My Birthday)
Okay. I coded for 7.5 hours straight today, and it wasn't even that productive.
I sat down at the cafe at 8am, and then started coding. I tried working with the react-native-calendars
datepicker library, but the lack of documentation made it difficult. I got frustrated enough to start rolling my own WeekViewDatePicker. With a lot of help from ChatGPT and CoPilot, I succeeded in using the FlatList element for my needs.
Then, as I was about to insert the symptoms (at this point it was ~2.30pm), I realized I was missing the algorithm for determining whether a given date is in the menstrual, follicular, ovulatory, or luteal phase.
I did not take any toilet breaks. I did not eat or drink anything. I was fully absorbed in solving the problems I was facing. Time just flew... and suddenly it was 3.30pm.
My eyes were kind of tired afterwards.
I still need to do pre-class work for my 5am class tomorrow (sobs).
I treated myself to a Chipotle burrito for my linner (lunch + dinner) but this—irregular meal times and lack of hydration—is not healthy. I'll definitely stick to my stipulated time limits on Wednesday.
October 22, 2024
I attended a Shut Up & Write session, this time at a different location from last week. I ended up being the only participant apart from the host, but the host was nice and the session was still light-hearted and motivating to work in.
For this session, I worked on explaining the features in my app. I left a lot of "XXXTODO" annotations because I didn't have my literature review at hand to properly insert citations.
I did not manage to work on my Capstone for the rest of the week before Friday. I had another assignment due on Thursday and I also had to finish a peer review as part of my work-study responsibilities.
I tried to make up for this shortfall on Saturday, 26 October 2024, the progress of which will be covered in Week 8's check-in.
What worked?
Trying to roll my own datepicker has showed me how good CoPilot and ChatGPT have gotten over the years. It's important to be suspicious of any generated code, though: while the generated code might be error free, it might not have the intended behavior.
For example, ChatGPT gave me code that had "Previous" and "Next" buttons to scroll through the weeks, which was not what I wanted. I tweaked my prompt to better describe my intended behavior, and while ChatGPT was able to revise its code to accomplish this requirement, it started using lower-level gesture handlers and animations, which made the implementation more complex and a little slow. I eventually found a simpler solution using Flatlist and it worked a lot better*.
Through it all, I found my 7 years of programming experience useful in figuring out what was wrong or inelegant. I'll keep this experience in mind the next time I pick up something new:
Never try to skip or shortcut the zero to average phase, because this phase is where you'll gain the knowledge, skills, and intuition that you'll need to critique and adjust AI outputs effectively.
*: There's still a few "issues", such as the lack of proper memoization and the opacity animation taking a considerable amount of time, but they're mostly aesthetic and minor.
What didn't work, and what can I do better?
Never work for 7 hours straight—without eating, drinking, or getting up to stretch—again. (I eventually paid for this on October 27: My period started with painful, sleep-disrupting cramps and aching in the lower back that made it difficult to sit and work.)
I might have to rethink my Monday-Wednesday-Friday Capstone work schedule. While it's true that I don't have classes on theses days and can thus carve out longer work sessions (i.e. up to 3 hours), it's also true that I have classes the next day. This meant that if I overran my Capstone work sessions and left inadequate time to do pre-class work, I would spend my evenings trying to catch up, making it more difficult to wind down and sleep on time.
Perhaps shifting to Tuesday-Thursday-Saturday-Sunday would be a good idea. This is something I'll try in the upcoming week, Week 8 (and also the due date for my mid-term deliverable :'))) help)
Technical Learnings
Not a lot of technical a-ha moments this week, but the dayjs library has been a life-saver.
I was using my own DateUtil with functions to add/subtract from dates, but I forgot about timezones and daylight savings (among other thorny issues that come with dealing with dates). So yes, I'm very grateful for such a lightweight library that manages the caveats of date handling well.