alphalist Blog

How will AI change web development? Tips to effectively use AI for coding

Share

written by

Alexander Feiglstorfer

CTO @ Storyblok

The use of AI in the software development lifecycle (SDLC) is constantly increasing. Automating code creation, augmenting developer productivity, and enhancing code quality are all drivers for better business outcomes like faster time-to-market, less effort and lower costs. AI is already having a significant impact on web development, and while it’s important to have a vision for what’s next, it is essential to focus on what we have now, before making plans for the future.

The Current State of AI in web development

The likes of ChatGPT, GitHub Copilot, AlphaCode, and Tabnine are already accelerating software development. These systems expedite time-consuming processes like writing, refactoring and debugging code, creating test scripts, or writing documentation. In the best cases, AI can decrease the time it takes to build prototypes by 90%.

But while AI can handle routine technical tasks, it hasn’t replaced human expertise for the more complex ones. A recent study conducted by Cornell University showed that the most advanced LLM - Claude 2 - could only solve 1.96% of the real-world GitHub issues it was assigned.

The greatest merit of AI is that it releases bandwidth for developers to address complex tasks and brainstorm solutions to make the product scalable and future-proof. 

Its biggest flaw is that AI outcomes are only as good as the inputs it receives. Just as we humans learn from our mistakes, the use of “reinforcement learning” can reward or penalize AI for its work, which in turn allows it to adjust its behavior and learn from feedback and past errors. This may signal that, over time, the code produced by AI will significantly improve and AI systems will be able to perform more and more complex software development tasks. 

While this sounds promising, it’s also worth noting that AI-generated code may not be robust enough when confronted with security breaches. A team of researchers affiliated with Stanford concluded that code-generating AI systems are more likely to cause security vulnerabilities in the application the code resides in. Legal risks linked to the misuse of copyrighted material are also a possibility. 

 

What does AI-generated coding looks like? Tools like CodeT5 have different capabilities and can be used as an AI-powered coding assistant to maximize the productivity of software developers. More specifically, CodeT5 can: 

  1. Auto-complete an entire function of code, if given the target function name

  2. Summarize a code function in natural language description

  3. Generate text-to-code based on natural language descriptions. Just define a function that takes text input and the pre-trained CodeT5 model generates the code.

Crystal Ball Gazing: Will AI democratize software development?

The automation of software development could lead to greater scalability and productivity for businesses. The more AI applications are fed with qualitative information to consume, the more they will turn into highly receptive systems, capable of addressing increasingly complex problems within a wider set of use cases. 

However, the human ability to understand, innovate and reason to solve complex problems is not going anywhere. Developers’ guidance to solve problems creatively and ethically will continue to be crucial, especially in training AI models on the organization’s specific code and standards, to yield code of similar quality.

We can draw a parallel between AI-generated code and open-source software (OSS), as both involve code that is written by another entity instead of your developers. The advent of OSS did not make developers redundant, it just gave them a chance to code collaboratively, and to benefit from the power of a community of like-minded pros to solve problems of common interest. Just like AI, OSS needs expert guidance by in-house developers to address code specificities and quality issues, including security concerns and vulnerabilities. OSS and AI generated-code also have other common points, like cost reduction and faster go-to-market.

In terms of processes, Technical Due Diligence (TDD) practices are already used within OSS projects to keep all business stakeholders informed of the quality, security and scalability of the system. We can expect that best practices will emerge for AI-generated code as well, to cover aspects such as application reliability, efficiency and maintainability, technical debt, legal and security vulnerabilities, architectural flaws, benchmarks against best-in-class applications etc. 

The Storyblok Way with AI 

At Storyblok, catching up with current technological advancements – be it VR, AR, AI or any other new tech on the horizon - is part of our day-to-day. We've observed firsthand the leap in innovation with technologies like ChatGPT and the metaverse, and we know that these are not just trends but pivotal elements reshaping the sector. We’ll never stress it enough: it is vital for organizations to keep investing in their digital infrastructure, experiment new things, and assess the results. But before investing heavily in AI development, it’s important to test and track the financial impact, such as the ROI or cost savings, attributed to the AI implementation. 

In this context, Storyblok’s CEO Dominik Angerer is persuaded that generative AI is going to play a huge role in the development of technology over the next few decades, however, it’s important that businesses do not get swept away with the hype at the expense of seeing the opportunities that are here now. 

As a CTO, you need to know what items should be put at the top of your list when everything sounds like a priority, so I can only agree with this idea. If you don’t focus on the present before making plans for the future, the risk is that you’ll be wasting resources and preparing for emerging trends that will never come to fruition. 

Getting the best out of current and modern technology may also prove useful for adapting to future technology. At Storyblok we use AI in different ways; we’re adding AI components to our product (more news soon!) and we also use it for web development. We like to work on creating a successful future by taking care of the present.

Storyblok's AI-led SDLC

Some best practices we apply within AI-led SDLC include:

  • Monitoring: we want to monitor developers’ satisfaction and ensure that AI solutions complement and augment developers' skills and encourage them to do better work, rather than adding complexity that hinders their efficiency. What is the impact of AI on your organization’s goals, its processes and people? If you don’t have an answer, you’re probably doing something wrong. For this purpose, you can use:

    • Company standards: is the work of AI matching the level of quality that customers and employees would expect from the company? Comparing AI generated results with company core values and brand standards provides a good rule of thumb in this sense

    • Surveys: how happy are your teams with the work delivered by AI? Are they using AI generated technical documentation? Any new technology or initiative in an organization is only as good as its rate of adoption. Conducting anonymous surveys to collect feedback, and share the general sentiment and usage metrics is important to decide what to do next. 

  • A/B testing: keeping track of the results obtained on projects developed with and without AI is crucial to compare the efficacy of both methods. 

    • Dashboards are useful when building prototypes, test cases, products, etc. 

    • Metrics: You can compare Pure results - where the work of AI was not modified - vs Blended - where developers made edits to the AI-generated code. 

  • Mentoring: AI development may not be the best option for inexperienced developers because AI-generated work may contain bad code. In general, what we see at Storyblok is that senior developers will get better thanks to AI, while junior developers will get worse. Senior developers should lead the production of AI created code and guide their junior colleagues towards the right usage of AI, for example, by providing training sessions on how to write very good prompts for AI. 

  • Code reviews: AI generated code needs to be validated as it can be fraught with security issues and errors. Expert team members should regularly make time to explore the gaps and vulnerabilities that the system may have created, and address them proactively.

Remember, leveraging AI coding effectively doesn’t mean you should just deploy the technology and then forget about it. At Storyblok we like to see what our teams are up to when it comes to AI, while following the best practices mentioned above. One of the recent trends we have observed is that developers are increasingly adopting AI to work on ReactJS projects, to deliver smart and fast applications more efficiently.

Conclusion:

Web development changes constantly, and its natural course is that the technical skills you learn at the beginning of your career will likely become obsolete when you retire. In a world where AI is used for software development, things will be no different. We can expect the emergence of new roles, where the most demanded skill sets will be a mixture of familiarity with innovation and knowledge of core principles. In other words, cutting-edge technology will be used to augment - not replace - the human element in coding.

Alexander Feiglstorfer

Alexander Feiglstorfer

CTO @ Storyblok

Alex is Storyblok’s CTO and co-founder, where he is based in Brazil and leads Storyblok’s product development. Alex’s entrepreneurial journey started in 2009 when he was the sole founder of a fitness platform and co-founded an eCommerce platform. In 2017, together with Dominik, the two launched Storyblok.