January 14, 2025
At the beginning, I'd like to show a quick screenshot from a code file demonstrating how I made a RAG (Retrieval-Augmented Generation) chatbot in Python, in 40 lines of code and within 20 minutes:
This program creates a simple AI-powered assistant that can help you quickly find and answer questions about the contents of a PDF document. Here’s what it does in simple terms:
You might wonder, “If a working chatbot can be written in just 40 lines, why do companies or software developers often charge $5k+ and take an entire month (or more) to deliver it?” Another similar question I often hear is, “It’s only CRUD (create, read, update, delete program) — why will it take a month?”
The truth is, creating an MVP (like a simple CRUD app or a prototype chatbot) is relatively straightforward. No one disputes that. That’s the easy part! But it’s just the tip of the iceberg. It's a classic example of the Pareto 80/20 principle: you can accomplish 80% of the core functionality in just 20% of the total time. However, no one wants to deliver an 80% complete product. What’s missing in that final 20%? And why is that 20% so critical (and time-consuming)?
Consider authentication: without proper user auth, data leaks or breaches become a real possibility. Someone might abuse your chatbot / CRUD, drain your server resources, or exploit it for malicious purposes. Then there’s testing. Without thorough tests, the app might work well today but could break tomorrow, or fail under unexpected user behavior. While doing tests, you might find that the chatbot doesn’t handle XYZ cases well, and you need to debug the code for hours. Add to that hosting and CI/CD pipelines — because if you can’t reliably deploy and maintain your application on the internet, it’s basically inaccessible and pointless.
On top of that, there’s ongoing communication with stakeholders or clients, clarifying requirements, and making sure the final product meets everyone’s needs. All these “surrounding tasks” can easily account for the bulk of development time. They ensure the product is secure, stable, maintainable, and user-friendly over the long haul. That’s exactly why a seemingly simple CRUD or small AI prototype can balloon into a much bigger project timeline and cost.
HOWEVER, it’s important to note that not all projects require this level of rigor. Many small projects can be delivered quickly and cheaply, maybe not in 20 minutes, but certainly in a few days or weeks. And its a matter of having the right tools (templates, libraries, frameworks) and experience to know when to cut corners and when to go the extra mile. I've been noticing many developers are choosing to go the "cool modern way" and use the latest tech stack for every project, which is not always the best choice. SSR, GraphQL, microservices, etc. are great, but they come with a cost — complexity, learning curve, and maintenance overhead. Another big problem is the lack of clear requirements. If you don’t know what you want, how can you expect someone to deliver it? Everyone knows the "final1_1_final_final_v2" file naming convention, right? 😄 Understanding whether the project is a simple MVP, a long-term product, or something in between is crucial. It sets the right expectations for everyone involved and ensures the project is a success. And that’s why it’s so important to have a good project manager or product owner who can guide the team and stakeholders through the process. But that’s a topic for another day.
In short, writing the core code is just a fraction of the journey. Doing the job right — ensuring stability, security, maintainability, and a great user experience — is what truly takes time.