Original: https://aprenent.substack.com/p/mhe-flipat-amb-replit-7-de-7
This is the continuation of the post: https://thelearningrub.substack.com/p/im-crazy-about-replit-6-out-of-7
Things are getting serious.
Database
Okay, I already have authentication and persistence in the browser, but… with login… I'm one step away from being able to set up user accounts for the application and then persist them across any browser and device. It's time to set up a Database.
The Replit guys are great at this part, as they have trained the Agent for this very common task.
We will try and…
Enhance the existing Pokémon card collection application with database persistence and user-specific features:
* Implement database storage for users' card collections, using the Google login email as the user identifier.
* Update the import functionality to set the entire collection for the corresponding user (not incremental updates).
* Add the ability to mark cards as favorites in the data model.
* Implement a feature to track how many cards are missing from each collection (Pikachu, Charizard, or Mewtwo).
* Design a flexible data model to accommodate future collections easily.
UI/Style:
* Pokéball-inspired design elements with subtle animations on interactions.
* Collection progress bars styled as evolutionary stages.
* Card grid layout with hover effects revealing favorite status and collection details.
Total disaster! I mean, he created the Database and all the fishing for the connection and some entities, but the thing didn't work...
It was very frustrating, I spent 4 messages trying to get it fixed, which is a whole $1, and there was no way. Now, I have to tell you something, I don't know how much of a negative impact it may have had. It's something I've realized now doing this forensic analysis of the experience.
The Agent warned me that it was running out of context windows and recommended that I open a new chat. The truth is that I didn't see the warning, and I took a couple of actions before getting into the Database issue.
In fact, now reading the original prompt, I think there's a lot of junk, a lot of UI stuff that I didn't want at the time, so, as I warned, review the prompts even if they're magically generated.
The thing is that I didn't program the writes to the Database correctly, in one of the iterations it understood that I wanted to eliminate the persistence of the local storage, in short, I had to throw o1 again, because I no longer knew if it was a Database issue, that I hadn't even programmed endpoints to call it, in short, the Agent had truly lost its way, and luckily I've now realized the issue of the "limit" of the context window, because whatever I continue to do, I'll do it in another chat, just in case...
And that's where I got to. I want to replace the Postgres DB that the Agent gave me with a SQLite, because it's a toy web app and I don't want them to charge me for SaaS to have Postgres open 24x7.
Conclusions
If you've made it this far through the whole adventure, I thank you endlessly and I hope you enjoyed reading it.
From this experience I take away the following lessons:
Replit is a great tool and worth every penny it costs.
By the end of 2024, Code Generative AI has made a few leaps forward in these 2 years, Agents are a serious thing.
Non-technical profiles can access tools that allow them to implement small tools or personal websites, but not having the minimum knowledge will greatly limit what you will be able to do with the tool, because from time to time it needs to be unblocked.
So, I don't feel comfortable with the advertising that claims that everyone will have a software engineer in their pocket.
I reaffirm the statement that the more you know about programming, the more you will get out of Code Generative AI.
A computer engineer does much more than just crack code, if you're in the industry, you know that (if you don't know, be careful), my anxiety about AI eliminating the job of a computer engineer was very low, with Replit, it has almost disappeared. How is that?
Clearly, they are becoming more and more capable and I am more certain that they will not replace me? Yes, because for every step they take, they make me a double. They are fabulous tools, because they are redefining what is valuable work in my job and this search is what I am passionate about, that of being able to do valuable things and that of being able to do more things. And if an AGI comes tomorrow and has blown everything, then “let me take the bailao” (no one notice the automatic translation, right? ^_^U)