Artificial Intelligence – Langauge Models like ChatGPT are useless for Sotware Development with the most recent packages, libraries and frameworks. Let me share my personal experience.
Java Spring (Boot) Framework
I’ve been developing some Java Spring Boot Micro Services. I having a skeleton of a Spring Boot app and I am trying to apply it to all Applications. This way
- Minimally focus on architecture wars/choice and
- I focus on business logic more.
I’ve tried using ChatGPT for some of the software layers and I found it fails in several aspects:
Legacy code for data models and data access
Current Java is 21. You could use records instead of the lombok project. There are improvements in the java syntax – like:
- using strings in switch state,
- numbers with underscore,
- lambda functions.
Spring Security
Spring Security is essential part of any app. What I’ve noticed is – the example the AI gives are always with “extends WebSecurityConfigurerAdapter” and you – overriding the methods that you need. Instead the new approach is to have Beans for everything that was previously set-up in method overriding. The most important example is authenticated endpoints:
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.antMatcher("/dashboard/**")
.authorizeRequests(authorize -> authorize
.anyRequest().authenticated()
);
}
And the new way:
@Bean
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(registry ->
registry
.requestMatchers("/dashboard/**").hasAuthority("user").anyRequest().authenticated());
return http.build();
}
You may not immediately figure out what Bean you need to return and will most likely need to do some research.
Architecture Choice (for articles)
If you try to generate blog post ideas or strategies for Spring Boot – you will most likely receive standard set of modules. Some of libraries may not be developed actively. One such example is: https://github.com/Netflix/Hystrix. One of the great challendges in software development that you will face is – using the latest versions of technologies and approaches.
Service Registration and Discovery
While you could still use Spring Could Eureka, I feel that the industry has went more into Docker and Kubernetes as it has its own consept as Service. Docker is a standard way to get an app running identically on dev and production environments. And many cloud providers offer Kubernetes compatible services.
Flutter and Pub Packages
While doing research on Flutter Packages – I’ve received some items that were
- either missing (404),
- outdated and not updated – even to dart null safety,
- or simply not actively maintained.
Similarly sometimes the generated code does not work or does not fit into the State Management Solution or the in app – Component Library.
What is the AI Good for
ChatGPT is great for new scripts, logic and cases with very concrete requirements. It is great for Software Development tasks that use old, stable and backward compatible software.
In my experience this is for example the Java Standard Library. If you have a concrete requirement and archive describing it – ChatGPT will give you perfectly working code.
What variation of Generative AI may work better
In my opinion – a variation of GPT that may produce working code that will fit better is one – learned specifically on source code databases. These are the Git Service Providers with tons of code repositories. There will be a need for coder to mark code as aging/correct/up-to-date. What will work even more reliably – is if the data set that it tries to learn on – is entirely offline – internal to a company and code style. This way the AI will not fantasize and hallucinate.
Today – You will either
- IDE plugin,
- some low or no-code platform
- or entirely specialized software/custom solution/
that will talk to a GPT and will know what to do and where to put – a new code snippet – make an AI develop software on its own. This is especially true with today’s – too many – variation of programming languages, libraries, platforms, versions, etc. Semantic and purpose is left to us.
