8 AI Tips for Web Developers (and Their Careers)

Published on November 12, 2024, filed under (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

  1. Do It
  2. Set Yourself Up With an AI Assistant
  3. Get Your Commit Messages Auto-Generated
  4. Get Your Code AI-Reviewed
  5. Use AI to Refactor Your Code
  6. Work Through Five Test Projects
  7. Regularly Explore AI Tools
  8. Decide Where You Will Not Use AI
  9. 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:

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

  1. 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.
  2. AI makes us dumb if we arenā€™t critical, keep learning, and develop a sense for when not to use AI.
  3. 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.)
  4. Incorporating AI in our work starts with an AI IDE or an IDE with an AI code assistant.
  5. AI-generating commit messages is a good AI use case.
  6. AI-supported code reviews are a mandatory AI use case. (Iā€™m absolutely bullish on this one.)
  7. AI-supported refactorings are a great AI use case.
  8. We can build experience and a strong sense for AI by using it to resolve pain points and implement smaller projects.
  9. We benefit from keeping an eye on the AI landscape, by regularly exploring AI tools.
  10. 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.

Was this useful or interesting? Share (toot) this post, become a one-time nano-sponsor, or support my work by learning with myĀ ebooks.

About Me

Jens Oliver Meiert, on November 9, 2024.

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.)