Developing with AI: Building a Foundation, Not Just Copying Code
Richard Karanu
Full Stack Software Engineer. Java | Python | TypeScript | Spring Boot | React | Django | fastAPI | Docker | AI Integration Engineer
As large language models (LLMs) like ChatGPT become more proficient at generating code, there’s a temptation to lean on them for every aspect of the development process. While these tools are incredible assets, especially in terms of saving time, there's a risk that they may unintentionally encourage some developers to become mere "frameworkers"—those who rely heavily on frameworks and libraries without fully understanding the underlying fundamentals.
Instead of becoming an "AI-frameworker"—someone who blindly copies and pastes code from AI tools—it's essential to use AI effectively while still mastering the basics of programming.
Let me illustrate this with an example.
A Bad Prompt: Skipping the Fundamentals
Consider the following prompt:
"Create for me a Spring Boot API endpoint that accepts a POST request with order ID and returns order information."
This is an example of a bad prompt. Why? It shows that the prompter lacks an understanding of core concepts like HTTP methods, data validation, and error handling. The prompt is vague and leaves many critical aspects up to the AI to figure out.
The prompt asks for functionality without considering these crucial details.
A Good Prompt: Focusing on Fundamentals
Now, let’s look at an improved prompt that reflects an understanding of key programming principles:
"Create a Spring Boot API endpoint that extracts order_id from URL parameters. Validate that the order_id is a valid integer by checking if it can be parsed and is non-negative. If invalid, return a 400 Bad Request with a JSON response detailing the error. If valid, fetch the corresponding order details and return the information serialized as a JSON response. Handle and return appropriate JSON responses for cases such as 404 Not Found (if the order doesn’t exist) and 500 Internal Server Error. Additionally, handle any other exceptions, including invalid HTTP methods, and respond with appropriate error messages and status codes."
This prompt is good because it demonstrates a solid grasp of key programming principles such as:
领英推荐
By focusing on these fundamentals, you set the stage for a reliable, maintainable, and scalable system. This is the difference between an AI-frameworker and a true engineer.
From Frameworkers to Engineers
A "frameworker"—someone who relies on frameworks without caring about the internals—wouldn't bother understanding how the JVM works or why reflection could pose performance and security risks in Java. Concepts like downcasting, which can lead to ClassCastException if done recklessly, would be ignored. Similarly, a frameworker in Python might overlook the significance of memory management or the Global Interpreter Lock (GIL), focusing only on what works "out of the box."
On the other hand, an engineer values knowledge of foundational concepts:
In Java, reflection is useful but also risky if misused. It allows runtime behavior modification, but developers must understand when it introduces security vulnerabilities or runtime overhead.
In Python, type hinting and decorators are often ignored by those who focus only on high-level functionality, but an engineer knows these tools ensure clean, maintainable, and robust code.
Let’s Build With AI, Not From AI
In the same way that frameworks should assist developers but not replace their understanding of core principles, AI should be an augmentation of your skills, not a crutch. The key is to use AI strategically—to supplement your engineering mindset, not replace it.
Remember, AI tools are great, but they're just tools. A true engineer thinks critically about why code works, not just what code works. By building with AI rather than from AI, you remain in control of the process and continue to grow as a problem solver.
Let’s build with AI, not from AI.
Junior Backend Developer ????| Developing robust-enterprise applications | Using ASP.NET MVC, ASP.NET Core & Django | ??InfoSec & Networking Technologies
2 周Bold take. Heavy on mastery. Very insightful