Self Reflection Byte - Treasure Hunt with AI
Table of Contents
- Introduction
- X
- Python
- Gen AI
- Bookmark Application
- To Vibe code or Not?
- The Long Winded Route
- My Application
Introduction
This week post is way off from Finance or Strategy. This is about treasure hunting - with AI. You might be wondering - "What is he talking about???" - treasure hunting & AI? What is the relation?
The first image that comes to mind for a treasure hunt is a treasure map
Or pirates who explore the ocean in search of treasure ( or loot).
So, what kind of treasure we talking about & what does this have to do with AI?
X
We all know about social networking platform X (formerly Twitter). X, like other social media platforms, contain a huge pile of garbage.
Nothing worth other than scrolling & wasting our time in real life.
But, underneath all that garbage are treasure nuggets of knowledge & wisdom. Amazing people sharing their Chain of Thoughts, mindsets, learnings, experiences, building systems to solve problems in public etc. It is an amazing cesspool of knowledge provided we follow the right people & interact with the right posts so the algorithm (which normally shows us garbage) fills our timeline with these treasure nuggets.
So, I find a post which I find interesting & will deep dive into it later. What do we normally do for such posts?
We bookmark the post for viewing later. Then we end up scrolling again & find another treasure which we bookmark again & so on. We end up with a pile of bookmarks which we might never end up visiting because of our daily schedule, work etc.
So, we have a problem here. We save our bookmarks for reading later but do not revisit it plus the UI for scrolling through our bookmarks is a nightmare. If we want to revisit a particular bookmark saved three months ago, we have to scroll down again to go to that bookmark.
Revisiting my bookmarks has always been on my mind but how to do it with less friction?
So, what is the solution?
Python
I love to code. I took almost three years to complete CS-50 which is a beginner's Introduction to Computer Programming. I loved the challenge, the problem sets, the lectures. Through coding, you can watch your creation come to life. Some days, I could do only one line of code. It used to take days to debug an issue. But I loved it!! And ultimately it was all worth it.
I love Python as it is simple to type & also closer to my domain (finance). Python is used extensively in finance applications with tons of libraries supporting data analysis, visualization. Python is also supported in our beloved Excel. 😄
After completing the course, I tinkered with some side projects in Python but time was always an issue as coding a project & debugging issues took a lot of time & I was sometimes frustrated at the slow pace at which my projects were moving. Then a phenomenon entered all our lives.. Gen AI.
Gen AI (Generative AI)
Software engineering is the first profession which is being impacted by Gen AI. Coding is like a low hanging fruit as the syntax, functions & libraries are all defined. The only thing we have to be clear when coding an app is
- To be clear on what we are designing in terms of application type & structure
- Explain the context clearly to the AI (what will the app do?)
- Make the constraints clear (what the app will NOT do)
For those interested in a layman version of how AI works, the below video from Andrej Karpathy is worth a watch :
So, after getting some basic ideas on how to do coding with AI, I embarked on finding out the AI tools which I started using in small ways for coding. Then, after getting comfortable with the tools, got into problem solving mode to find a way to revisit my bookmarks.
So, I gave it an idea for a desktop application (for my personal use) in Python to kill two problems in one stone :
Problem 1 - Learning Python
The best way to learn to code is to build something & I chose to build in Python. I found that the problem sets in CS50 was where the fundamentals were actually drilled in because in solving an issue, we can actually gauge whether we understood a concept or not. When listening to the lecture, we feel that we understood something but when we actually implement it, the questions start rising in our mind. So, on to building in Python.
Problem 2 - Access my X Bookmarks
I can build an application in Python to access my bookmarks faster & in simpler fashion.
So, I had this idea of a Netflix style layout to see my bookmarks, click on a bookmark & a screen should pop out showing the summary with a link to access the full bookmark on X.
Bookmark Application
So, I gave the idea to Claude to design the project. There were lots of back & forth between me & Claude on the expectation. But the most important aspect of the communication was - asking questions & making it arrive at recommendations with me only giving it the idea.
I found that the best way to make it "understand" (it really doesn't understand in the way we understand. But helps it get better context & retrieves the most probable & best resolution to the issue or answer to the query from it's vast knowledge base.) is to ask questions & make it provide recommendations.
I could vibe code the application in minutes. But I didn't do that. What is vibe coding?
To Vibe code or not?
"Vibe coding" is a term coined by Andrej Karpathy -
Vibe coding (or vibe coding) is an approach to producing software using artificial intelligence (AI), where a person describes a problem in a few sentences as a prompt to a Large Language Model (LLM) tuned for coding.
The LLM generates software based on the description, shifting the programmer's role from manual coding to guiding, testing & refining the AI generated source code. (Source : Wikipedia)
If I followed the vibe coding route, I can have a full working application in minutes or hours depending on how simple or complicated the functionalities are. There are tools like Replit or Bolt.new where you can build fully functional apps with front end UI & back end databases through prompts or by vibe coding. Courses on prompt engineering are becoming more popular.
But I didn't want to go that route as I am learning. I want to learn how the code works, what functions are being used & how they call each other, what arguments are being used, how is the code structured etc.
The Long winded route
So, I took the long winded route to prompt the AI not to give me the solution but guide me on the programming logic & resources for me to read after which i will type in the code for a function & ask AI to do the rest. Another long winded route but with an objective and a coding partner. You can say I am semi-vibe coding or using AI as a co-partner.
So I went step by step understanding the PyQt framework (a Python library for creating GUI applications) to design the front end interface, understandng how to export bookmarks in JSON format. (JSON or JavaScript Object Notation is an open data interchange format that is both human and machine-readable.) After weeks of back & forth with testing, the application was ready.
I took my time to understand the code asking Claude the logic behind each & every line and retyping it into the IDE (Integrated Development Environment) myself. Maybe it's my finance background or my passion to go deep into rabbit holes that I took this long winded route.
But I find that if I didn't do this, I will not know how my application is structured (one module for the user interface, another one for maintaining the database, another for testing etc) and debugging the code, even though irritating & time consuming is where we learn the concepts.
I also saw that the AI was giving right solutions most of the time but it also changed an unrelated part of the code which caused other issues. So, use it with care. It can get over-enthusiastic & break other parts of the code. Another aspect is security. Since this is my personal desktop application, I didn't have to worry about that. But it is something fundamentally to be checked & fixed before releasing any commercial application.
Also, maybe the AI will think the root cause of a problem could be due to one issue but the actual root cause could be something else. So, code with care. Review, review & review - can't emphasize that enough.
Maybe once I get comfortable with the concepts, I will let AI do most of the heavy lifting of the coding the application keeping control on the required functionalities & design. Not sure when, but for now, I will continue to semi-vibe code.
We can see how programming was in it's early days with assembly language & punch cards, then came languages like FORTRAN, COBOL & C where the programmer had to know pointers & optimize for memory along with compiling the code to make it machine readable. Then Python changed programming to make it more english like syntax abstracting away a lot of memory management & compiling which happens in the background.
Moving forward, this is another evolution where AI does the code & humans have to check(???) or maybe AI will generate all the code with the required checks done within AI itself. It's the best time to let our creativity fly & build something of value.
My Application
Below is a screenshot of the app which I built. It's a working solution which I have to run from the terminal & hence not a fully functional application with a beautiful front end.
- Opening the App

- Clicking a bookmark tab

- Clicking on "View on X"
