I have been coding for 19+ years and for most of the time my workflow was pretty much similar. Things changed about 3 years back once ChatGPT came on the scene. The way I code has changed a lot after that. Still, at least for me it is far away from replacing developers.
What has changed?
Getting unstuck
In my company, AI tools are encouraged and Co-pilot and Windsurf are the official tools. Earlier (before 2022), If I was stuck on coding task, my go to option were "stack overflow" or asking a colleague. This was slow and most of the time, I had to post the idea without actual code and partially with limited context required for understanding the problem and then, wait till someone responds and further delays in case of follow ups if initial solution does not work.
This entire flow has changed to inline chat, AI has lot more context about my code and lot more knowledge about the libraries that my code is using. It often times give a solution and if not that, It gives me good pointers to solution. I sometimes switch between models to get code that suite my taste.
Of course, If there are up-sides then there has to be some downsides as well. AI also has downsides like, code generated with non-existing APIs, way to complicated code or code that does not work at all. For me, I always try to understand the code generated and change it as per my style.
The most important point here is that, ability to move forward rather quickly.
Bouncing Ideas
I remember once I wanted opinion of other to compare two ideas. I posted on stack overflow and question was banned as I was asking for opinion and not the definite answer. The whole point of question was to get opinionated answers but I also understand this could lead arguments between conflicting ideas.
With Copilot and Windsurf, I can bounce my ideas very easily and go deep to understand the solution. I can even ask for what references were used and follow them. I can ask it to generate quick code snippet to try out the idea and data required. All this without judgement and delays.
There is a good chance that you will get completely crap answers but its up to me to go deep and understand the suggestion and try it out before assuming that everything that is said is correct.
For e.g, I was working on Pandas based code and It was pulling data greater than 40 GB and then processing that much of data was clearly not best to be done with Pandas. I wanted to see if new "Polars" or existing "PySpark" was best for this task. And how much time will it take for computation in new approaches? I needed a POC to try out both ideas and see the result myself. Thanks for Claude I could complete the POC within few hours.
Auto complete & Testing
This has improved a lot, not only for code completion but for adding doc strings in code base. My code is now properly documented with example code.
Even before AI Tools I always added doc strings and examples but that whole process took longer and now, its auto-generated correctly in 95% cases.
One thing I am positively surprised about generated code is, sometimes as a developer I tend to use known API of any library instead of using new or better API which was added recently. I came across few PySpark & Pandas API that I learned because of AI tools.
I prefer to have partial code with test suite rather than all features and no test coverage. I try to build tests incrementally, and AI tools have helped me greatly to get started with test setup and adding basic tests. I iterate over basic tests and improve them, most of the time I keep the scaffolding created by tool and write my tests.
Learning
Learning is way easier with LLMs. Learn a new programming language or a library/tool (Terraform, Plumi, K8S) is very easy. You have inline help to get unstuck and learn quickly. You can ask all sort of questions without feeling being judged. All you need is curiosity.
I intentionally keep my auto-complete off when I am learning a language otherwise LLMs are so good that you will have a working code but zero-learning. Its a double edged sword!
I have realized that focusing on basics or concepts is far more important than learning a language or a specific tool.
Is it good enough to replace Devs?
I am impressed with the code generation ability of LLMs, but is it going to replace Devs? Short answer, I don't think so!
I have tried spec driven development when I wanted to build a job monitor, which would scan multiple database tables and compare the rows inserted everyday for last 7 days and flag if latest results are not in line with last 7 days.
I only used prompts to implement whole logic and for any changes relied on prompts. This whole process worked and I had monitor job created as per my wish in within 2 hours (accumulated all changes over a week).
One more example would be, I wanted to build a FastAPI based job scheduler, I (LLMs) built the UI for job scheduler using only prompts. I was 100% sure that I am not going to improve this code and just use forever once it works. Just like external package, as long as its working I am good!
If everything is working, then what is down side?
My Job monitor code generated 10+ files with 1000+ LOC and it explained me all the changed it did every time I asked it to change things. But that's just too much of code to review. It changed 500+ lines in HTML file, and I was asked for review those changes!
I prefer to understand the logic when I review instead of just looking for syntactical accuracy.
After so many years being a developer, One thing I know is, amount of code we maintain over time is far more compared to time we spend writing new code. I would say 80% is maintain and improve and rest is adding completely new code. I am just not sure how LLMs will handle this? Till now I have only seen LLMs producing new code but nothing about maintaining.
When I say maintain, I mean keeping the backward compatibility, thinking about the deployment, run time constraints etc. And adding new functionality in code base.
I feel confident when I know in-and-outs of code Bases I work on. And I don't mean line by line but the bigger picture, like which part deals with DB, file system or specific front-end component. In LLM generated code, I don't feel that confidence, maybe I need to invest more time to study the generated code to get that confidence.
Do you have a successful code base (with users) which is completely written and maintained by LLMs? Please let me know in comments. I would love to understand how its used.
Top comments (0)