8 AI Tips for Web Developers (and Their Careers)
Published on November 12, 2024, filed under Development (RSS feed for allĀ categories).
This article first appeared at SitePoint. It was lightly edited.
For better or for worse, AI is coming everywhere. In web development, weāre not at but close to the epicenter of the AI earthquake. What does it mean for our work?
If youāre like me, you havenāt jumped at this the instant the first AI tools came out, years ago. Knowing about some of the issues with AI and appreciating the craft of our field, you may not have used it much even today.
If you arenāt using AI in web development yet, I think thatās a mistake. Let me share some ideas and tips from my observations going all in on AI over the last few months.
The following recommendations apply to web developers in their individual capacity. (I am working on sharing my perspective on AI in web development teams, too.) That assumes that you do have your own projects (including, hopefully, your own website).
Contents
- Do It
- Set Yourself Up With an AI Assistant
- Get Your Commit Messages Auto-Generated
- Get Your Code AI-Reviewed
- Use AI to Refactor Your Code
- Work Through Five Test Projects
- Regularly Explore AI Tools
- Decide Where You Will Not Use AI
- Summary
1. Do It
Use AI. If you havenāt yet, start today. If you donāt, your company may be going to throw you under the very same bus theyāre driving and had put you on.
Iām not joking (or, well, Iām not optimistic).
AI is bad for our environment, itās bad for our craft, but itās pointless to argue with reality. (There are some things we can and should do about both, but these are conversations to be had elsewhere.)
We have also been seeing a lot more layoffs over the years. No matter what āgreat place to workā they pride themselves to be and, therefore, how hypocritical companies may then appear, actions speak louder than words. In tech companies, we reached the time to assume the worst.
2. Set Yourself Up With an AI Assistant
When weāre talking AI here, weāre talking about development-related AI. All-purpose AI like ChatGPT can help, but for our work, we need specialized tooling. The most prominent choice here is probably GitHub Copilot, though I also like JetBrainsā AI Assistant. Get the license(s). Try what works for you. Most importantly, but weāll cover more of this, use it.
3. Get Your Commit Messages Auto-Generated
One big time saver is to AI-generate commit messages. (I go through about 1,000 every month.) JetBrainsā AI Assistant makes that easy in JetBrains IDEs. Hereās the prompt Iām using, based on the default, making use of Conventional Commits and marking every commit message as AI-generated:
Avoid overly verbose descriptions or unnecessary details.
Start with a short sentence in imperative form, no more than 50 characters long.
Use Conventional Commits style.
Then leave an empty line and continue with a more detailed explanation.
Write only one sentence for the first part, and two or three sentences at most for the detailed explanation.
For anything in the repository
[ā¦], make the commit message just the following: āchore: include automated changesāEnd every commit message with the following message on a separate line: ā(This commit message was AI-generated.)ā
It works well, it saves time, and the quality is as good (if not better) as when I write the message.
The following seems important though: Itās still a good skill to be able to write decent commit messages, in a standardized fashion. That is, if youāre a junior developer and havenāt yet developed a solid skill and routine around documenting your changes, Iād recommend to develop that first, then use AI for support. Itās crucial to be able to handle the basics, as itās at the core of your professional credibility.
4. Get Your Code AI-Reviewed
Unless youāre contributing to other peopleās work, you likely donāt get reviews for your code. Yet if youāre developing code for and within an organization, you may encounter all sorts of code review styles and processesāwith some reviewers who wave everything through, others who will discuss tabs vs. spaces in every single file; with cases in which you get feedback right away, and cases in which you need manager support to finally get that review from the other team.
In both cases, AI code reviews can help. They are super-useful if you need the second opinion you just canāt get right now, and they can speed up and harmonize code reviews within organizations. (If I had realized this a little earlier, Iād have campaigned to introduce AI reviews at my last station, Miro!)
What tool could you use? Iām still evaluating more options, but my favorite code review helper so far is CodeRabbit. It has correctly identified issues I may not have noticed otherwise, and I do like to fall back on it on more complex changes in my own projects.
Note that Iām not saying to solely rely on AI code reviews. While we may need to for our individual work, thatās different in organizations. Here we can include AI in the process, then make adjustments based on our expectations and experience.
5. Use AI to Refactor Your Code
If youāre like other developers (or like me), you use to-do comments to mark things that could be cleaned up š (Or do you š)
One great use case for your AI assistant or editor is to refactor these places. JetBrains, for example, has an excellent refactoring option (its best AI feature apart from commit messages, I think), allowing to request refactoring suggestions for such code. Try it out on your own code. While the solution may not be āperfect,ā it may still be better than what was there before. (If not, you can always slap another āto-doā comment on the codeāor roll back.)
Refactorings are where AI can shineāI suggest to use it for them.
6. Work Through Five Test Projects
ā¦and do that now: Write down your biggest pain points at the moment, the recurring tasks most annoying to you, the projects you always wanted to do.
If you have time and are set up already, ask your AI code assistant to give you the scaffolding or script for your needed solution or envisioned project. Allow to be dragged into it. Build it.
Make five, make more of these projects happen. If you can handle the extra work (cf. the āAI paradoxā), document, ship, and announce them.
The point is to develop a muscle for AI development work, and sharpening your sense for where it helps (and where it doesnāt).
7. Regularly Explore AI Tools
In a professional and personal capacity, keep trying AI solutions. Yes, everyone is shipping something AI, but the point here is to be on the lookout for AI solutions in your niche, and to make it a habit to test them (for me, recurring reminders help with this).
Here are some solutions Iāve been evaluating or planning to evaluate:
- AI Commits (JetBrains IDE plugin)
- Amazon Q Developer
- Bito
- Codacy
- Codepeer
- CodeScene
- CodiumAI
- Cursor
- Grit
- Figstack
- Mutable.ai
- PullRequest
- Reviewable
- Sourcegraph Cody
- Tabnine
Once thatās done, you and I could both move on to explore a number of āawesome listsā for AI. For example, Mahsima Dastanās Awesome AI Tools, or James Murdzaās Awesome AI-Powered Developer Tools.
8. Decide Where You Will Not Use AI
Iāve already suggested to wait with AI commit messages until youāve formed a good habit around them, something most of you will have.
Itās part of a bigger topicābeing or becoming aware of what work you can delegate to AI and what maybe you cannot hand over.
Here is where I think this gets delicate:
You can draw a line and say that you donāt use AI in your main area of expertise. I, for example, donāt use AI to produce HTML and CSS, something I have many reasons to do myself (if you donāt so far, consider following my work!).
But it still makes sense to test AI and check on where it can make you more efficientāor obsolete.
That looks like bad news, sureābut you want to learn it this way before someone else tells you. It will enable you to adopt and adjust, to a) incorporate AI in your own work, and b) develop your non-AI profile, identifying and shaping an area that can benefit from you and your talents and experience, and not yet from AI.
If you learn to use AI so that you also know where AI cannot be used, youāll be right at the spot where we as professionals will be needed in the future. If you donāt do this, the work youāre doing is likely to be AIāed and automated away.
Summary
- AI is an energy hog and we urgently need to figure out how to make it consume fewer resources, more and then all of them renewable.
- AI makes us dumb if we arenāt critical, keep learning, and develop a sense for when not to use AI.
- As developers, not just in web development, we need to incorporate AI in our work. There are enough companies who give an f about people, so if we donāt adapt, weāll be out. (This is a disaster and needs change, yes.)
- Incorporating AI in our work starts with an AI IDE or an IDE with an AI code assistant.
- AI-generating commit messages is a good AI use case.
- AI-supported code reviews are a mandatory AI use case. (Iām absolutely bullish on this one.)
- AI-supported refactorings are a great AI use case.
- We can build experience and a strong sense for AI by using it to resolve pain points and implement smaller projects.
- We benefit from keeping an eye on the AI landscape, by regularly exploring AI tools.
- We must know AI so well that we also know its shortcomings as they relate to our workāand we must use this knowledge to keep redefining ourselves as professionals.
I believe thatās where we are and what we can do right now, when it comes to AI in web development.
Many thanks to Kevin Khaw for reviewing this post.
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a frontend engineering leader and tech author/publisher. Iāve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, Iām a contributor to several web standards, and I write and review books for OāReilly and FrontendĀ Dogma.
I love trying things, not only in web development (and engineering management), but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (Please be critical, interpret charitably, and giveĀ feedback.)
Read More
Maybe of interest to you,Ā too:
- Next: 1 + 2 Engineering Team Priorities
- Previous: When You Are Rich
- More under Development
- More from 2024
- Most popular posts
Looking for a way to comment? Comments have been disabled,Ā unfortunately.
Get a good look at web development? Try WebGlossary.infoāand The Web Development Glossary 3K. With explanations and definitions for thousands of terms of web development, web design, and related fields, building on Wikipedia as well as MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, andĀ Leanpub.