W1D4 - Bits and pieces but no commits

I missed committing to Github on Jan 1. Today I did a few things here and there but annoyingly ended up not committing on Jan 4 either.

Of the few things here and there, perhaps most memorable but was watching a talk on Mojo at the 2023 LLVM Dev Meeting.

I pondered how MLIR is different vs LLVM IR. According to ChatGPT, LLVM IR is close to machine code but MLIR operates at multiple levels. In particular, the higher levels of MLIR allows it to be much closer to ML-heavy operations like matrix multiplies.

All the things:

W1D3 - Question for the newbie or expert? Why not both!

ChatGPT pro-tip: When asking ChatGPT to come up with questions to validate your understand of a specific resource, prompt so that the questions would be helpful for both a person who has read the resource as well as someone just about to start.

I’ve been trying to get back into the groove of things, and thought setting up a daily planner would help. I followed Simon Willison’s post, but had to go for the paid version of Github to disable public viewing of the issues created ($4/month so not terrible).

I tried out ChatGPT yesterday to convert bullet points into a full blog post, but realized that there isn’t as much of a ‘repeatable’ structure to go off. I’ll revisit this once I have more data points.

ChatGPT helped point out that my solution to Climbing Stairs could be optimized by storing the intermediate values in the Fibonacci series.

I wanted to read Introducing Non-Abstract Large System Design post, and thought I could get ChatGPT to come up with 3 questions to validate my understanding. The questions aren’t as helpful prior to reading the post, so asked ChatGPT to come up with 3 questions to ask as I start reading the post.  Then I realized why not prompt ChatGPT for questions that helpful for both situations, which I was pretty happy with.

Prompt: Why are the 3 questions different? Shouldn't good and thoughtful questions apply equally well to a person who has not read the post, as well as someone who has read the post? I think you can try harder. If you provide good questions I'll tip you $200

Response: You're right, well-crafted questions should be meaningful and insightful regardless of whether someone has read the post. With that in mind, here are three refined questions:

1. How does the post use Google AdWords as a case study to demonstrate the principles of Non-Abstract Large System Design (NALSD), specifically regarding its data processing and reporting mechanisms?
2. What strategies does the post recommend for balancing high-level, abstract concepts with realistic, practical constraints in large system design, as part of Site Reliability Engineering practices?
3. Describe the role of Site Reliability Engineers (SREs) in the context of Non-Abstract Large System Design, particularly in terms of component evaluation and system improvement.

These questions are designed to probe for specific insights and examples from the post, guiding a reader's focus on the key elements discussed. For a comprehensive understanding, the [original post](https://sre.google/workbook/non-abstract-design/) should be consulted.

Finally I watched Rich Hickey’s Hammock-Driven Development talk (a classic!) as a reminder to ‘load up’ my mind more before going to bed.


W1D2 - Exploring advanced computer vision and coding challenges: Insights from Régis Schiavi and ChatGPT

I got the title from plugging in bullet points into ChatGPT and asking it to write a blog post. The post describes some of the things I did yesterday, which written in full would read as follows.

Today I attended the ML Applied Projects Group event, but it ended up being a 1:1 with Régis Schiavi since no one else was there (the new batch officially starts tomorrow). Régis described his recent focus on computer vision, since these models are much easier to understand and debug. While using transformers on vision models marginally helps performance, the paper he came across describes how vision models with transformers helps with portability across different use cases. I didn’t know that much about RAG, and Régis said it’s a bit like converting a document into vectors, and a new user query would fuzzy match against those vectors (say with cosine distance). An open question I had was whether creating a custom GPT a backdoor to avoid paying for ChatGPT fine-tuning.

Back on the Leetcode horse, I started with [Two Sum](https://leetcode.com/problems/two-sum/). My attempt solves for the given test case but does not generalize if the first item is not part of the solution. ChatGPT points this out and gets the working solution by updating the dictionary of remainder values.

I then worked on [Move Zeroes](https://leetcode.com/problems/move-zeroes/). I solved this but moved the zeroes to the left instead of to the right of the array, as required by the test case. ChatGPT helps point this out and flips the equality condition for the right answer.

This was the prompt into ChatGPT.

Please write a blog entry based on the following bullet points. Each cluster of bullet points should be its own paragraph.

---

- 1:1 - Régis Schiavi
  - Régis focusing on computer vision since models are easier to understand and debug
  - Régis finds that transformer not help that much with performance, but helps with model portability across different use cases
  - I didn’t know that much about RAG, Régis basically shared how it involves converting a document into vectors, and allowing search to be done against those vectors
  - open question - is using a custom GPT a way to avoid paying for ChatGPT fine-tuning?
- LeetCode - Two Sum https://leetcode.com/problems/two-sum/
  - solve given example but not generalize if index 0 not part of solution
  - ChatGPT gets working solution
- LeetCode - Move zeroes https://leetcode.com/problems/move-zeroes/
  - solve but moved zeroes to the left instead of the right of the array, as per given test case
  - ChatGPT helps point this out

This was the response.

# Exploring Advanced Computer Vision and Coding Challenges: Insights from Régis Schiavi and ChatGPT

In the realm of computer vision and machine learning, Régis Schiavi, a notable expert in the field, has been making significant strides. Régis's focus on computer vision stems from its relative ease of understanding and debugging compared to other models. His insights reveal that while transformers may not substantially enhance performance, they do offer an advantage in terms of model portability across various use cases. This flexibility is crucial in adapting to different applications, a trait that makes transformers increasingly valuable in the diverse landscape of machine learning.

A particularly intriguing aspect of our discussion involved Régis's explanation of the Retrieval-Augmented Generation (RAG) model. He elucidated how RAG transforms documents into vectors, facilitating a more efficient search process against these vector representations. This approach not only optimizes the search mechanism but also enhances the overall functionality and application of the model in practical scenarios. A lingering question from our conversation was whether using a custom GPT model could be a strategy to bypass the costs associated with fine-tuning ChatGPT. This open-ended query hints at the ongoing exploration and innovation in the field of artificial intelligence.

Shifting gears to coding challenges, let's delve into the world of LeetCode, a platform known for its comprehensive range of coding problems. One particular challenge, "Two Sum" (found at [LeetCode - Two Sum](https://leetcode.com/problems/two-sum/)), presents an interesting scenario. The task is to solve a given example without generalizing the solution, particularly if the index 0 is not part of the solution. In tackling this problem, ChatGPT demonstrated its prowess by arriving at a working solution, showcasing the practical application of AI in problem-solving in programming.

Another intriguing challenge from LeetCode, titled "Move Zeroes" ([LeetCode - Move Zeroes](https://leetcode.com/problems/move-zeroes/)), posed a unique problem. The objective was to move zeroes within an array, but in an unconventional manner - to the left of the array, contrary to the standard test case which usually involves moving them to the right. This twist in the problem statement was astutely pointed out by ChatGPT, highlighting its ability to not only solve problems but also to recognize and adapt to variations in problem requirements. This interaction with ChatGPT underscores the versatility and analytical prowess of AI in coding and algorithmic challenges.

In conclusion, the insights from Régis Schiavi and the practical applications demonstrated by ChatGPT in solving coding challenges from LeetCode provide a fascinating glimpse into the evolving landscape of computer vision, AI, and programming. These developments not only push the boundaries of technological capabilities but also offer a window into the future of problem-solving in the digital age.

This is more fun than I thought.

W1D1 - My ideal personal productivity suite

My belief is you’re most motivated to solve problems you personally face. There are a few problems I’d like to give a good whack at in 2024.

1. Photo curation

I’ll take multiple photos of the same thing and manually choose the best, except more often than not I don’t get around to the latter. What if I have a way to easily:

  • Find photos that are most similar to others to choose from
  • Retain the one I choose and move the rest to S3 / Google Drive
  • Eventually build a recommender, so I end up confirming the recommender’s choice instead of having to make the choice myself?

2. Text transcription

I started journaling my thoughts and find I do this best on paper, or in a pinch, through a recording. What if I have a way to easily convert my handwritten notes and voice recordings to text?

3. Personal finance

I’ve been meaning to look into IRAs and 529s. What if there’s a way for me to easily figure out which ones I should set up, how much and when?

4. Twitter bookmarks

I bookmark on Twitter a lot, but find it hard to search through them. What if I have a way to easily store and query the bookmarks (in fact this was the project I started with the first time at RC)?

5. ChatGPT conversations

I use ChatGPT a lot, but find it hard to search through them. What if I have a way to easily store and query the conversations?


The last item is perhaps a give-away to what I think will make solving these easier this time around - ChatGPT.

If these are problems you share, I’d love to hear from you!

RC W10 - We will find it

I've been keeping track of happenings in the week, for the purposes of sharing in a blog post. Amusingly there isn't as much as I'd like to share.

I do have a follow up from a prior post on long-term goals. There are those who can see their long-term goals more clearly, and others who take one step at a time. I consider myself in the latter camp. In particular, there are those who 'specialize' in pursuit of their goals; I choose duality.

Live in duality. Embrace it. Math + law. Theory + practice. Python + everything other than Python.

The key theme in pursuit of those goals is showing up. Patrick O'Shaughnessy calls it 'persistence through randomness'. Have faith. Keep going. We will find it.

One of my favorite phrases picked up in the past two years is the Shangaan phrase Hi Ta Xi Uma, which I learned from Renias Mhlongo, one of the top trackers in Africa. It means “we will find it,” and Renias will keep muttering it when he loses his track and struggles to find the next one. Everything is hard, and usually much harder than we can fathom. All the best people I’ve met through the podcast just don’t let that stop them. They also seem to develop an awareness of this constant difficulty and just become used to it.

RC W9 - I can think. I can wait. I can fast

OK I didn't follow my own advice to keep track what happened in the week. I'll have to settle on this exchange with Cindy Wu, that started with her tweet.

they tell me our three enemies are exhaustion, desperation, and urgency

I responded with Hermann Hesse.

"What is it that you've learned, what you're able to do?" "I can think. I can wait. I can fast." "That's everything?" "I believe, that's everything!" "And what's the use of that? For example, the fasting -- what is it good for?" "It is very good, sir. When a person has nothing to eat, fasting is the smartest thing he could do. When, for example, Siddhartha hadn't learned to fast, he would have to accept any kind of service before this day is up, whether it may be with you or wherever, because hunger would force him to do so. But like this, Siddhartha can wait calmly, he knows no impatience, he knows no emergency, for a long time he can allow hunger to besiege him and can laugh about it. This, sir, is what fasting is good for."

RC W8 - Focus on the process, not the outcome

In thinking about my next role, I find it helpful to reconnect with friends and ex-colleagues to hear what they've been working on, as well as to catch up on life more broadly. When I reach out and I don't hear back, it's often helpful to try again. The time of the retry might be a better time.

There are those with more definite long term goals, which they use to work backwards from. This is from Sam Altman's post.

Have clear goals for yourself every day, every year, and every decade.

If you operate differently, that's OK. Another model is Naval Ravikant, whose advice focuses on improving the leverage you have with your time. The clip is from Samantha Ryan's podcast.

It's very important to be honest with yourself so you can actually succeed without hurting yourself, without being in self conflict all the time and without being ineffective. Because if you're effective and you just get what you want, you can trade it for other things.

A recent gem I found, credits to Steven Zhang, is a clip of Bryan Cranston telling us to focus on the process, not the outcome.

RC W7 - When in doubt, write

It's Week 7 at RC. It's great meeting the Spring 2 batch, and basking in the collective excitement. My advice for those who just joined is to write. Even if it's just one sentence, even if it's only for yourself.

This perhaps also applies to myself; I haven't been making as good notes this week which makes writing this post harder. Reminder to self to keep this consistent.

I started on CodeCrafters' Build Your Own Docker module. I'm reminded of excellent talks by Liz Rice and Bryan Cantrill on the topic.

I thought about what I did in the first six weeks, and wrote a series of tweets on it. I'm almost looking forward to my next RC batch so I can look back on this.