You are currently viewing Can AI Help Software Managers? It’s a Game Changer In More Ways Than You think.

Can AI Help Software Managers? It’s a Game Changer In More Ways Than You think.

Article Synopsis

As software managers, we are responsible for the quality of the code our teams produce, the team’s productivity, and efficiency.  We’re asked to encourage good software engineering practices while juggling other demands such as bug fixes, issue triage, and endpoint support. Given this tall order, we are often forced to make difficult decisions, especially as pressure builds toward the end of a release cycle. All of this has to be balanced against revenue-generating activities.

AI tools can help relieve this pressure.  Now that ChatGPT is available, we can address these often ignored software engineering activities while giving our developers more time to write code.

AI Assistant

New AI tools, including ChatGPT, do well at things that will lead to more productive teams and improve code quality. Here are 19 ways AI can help software managers.

19 Ways AI Can Help Software Managers

  1. Code Commenting
  2. Generating Code Templates
  3. Refactoring Existing Code
  4. Malicious Code Review
  5. Low-Code Generation
  6. Converting Code
  7. Performing Code Reviews
  8. Investigating Compile Errors and Warnings
  9. Finding Bugs
  10. Generating Alternate Code
  11. Writing Unit Test Cases and Test Documentation
  12. Writing Project Documentation
  13. Performing String Localization
  14. Performing Code Optimization
  15. Creating Automation Scripts
  16. Encoding and Decoding (ISO-8859-1, UTF-8 etc…)
  17. Generating Structured Data and Schemas
  18. Following Coding Standards
  19. Diagramming Code

For reluctant teams and their sympathetic managers, there are no more excuses for not following good software engineering practices.  AI tools like ChatGPT can make our code more maintainable, portable, and reliable.

1. Code Commenting

A high degree of code maintainability is necessary because it allows easier updating, fixing, and troubleshooting of existing code. It helps ensure it is easier to understand, modify, and extend, making managing code easier and less time-consuming. As code becomes more complex, it becomes easier to maintain if properly structured and organized. Commenting code is a major element in achieving this objective.

You Missed Something Here

For those who code, commenting can be an immense pain.  It’s like asking an author of a book to add rationale for every paragraph they write.  But, unlike book authors, software will probably need someone who didn’t write it to update it at some point.  AI tools can help add comments to code and relieve the developer’s burden while promoting good code hygiene.

In addition, AI tools like ChatGPT can help with code commenting by providing additional help such as guidelines, best practices, and examples for writing effective comments. For instance, you can ask ChatGPT for examples of good or bad code comments or explanations of common commenting conventions or standards.

In addition, ChatGPT can provide feedback on your existing code comments and suggest improvements or alternatives.

2. Generating Code Templates

A code template, or code skeleton, is a pre-written piece of code that your Developers can reuse as a starting point. Code templates typically contain the basic structure and syntax required for a specific programming task or functionality. They can be customized or modified as needed to fit the specific requirements of a project.

This is Tedious

Code templates can save time and improve productivity by reducing the repetitive code developers need to write from scratch. They can also help to ensure consistency in coding style and practices across a project or team. Code templates can be created for various programming languages and platforms and shared and reused within and across projects. Some integrated development environments (IDEs) also provide built-in code templates or support for creating and managing custom code templates.

ChatGPT can to generate scaffolding, templates, and boilerplate code for applications, as well as for correcting mistakes and ironing out existing code

3. Refactoring Existing Code

To save time and improve code quality, developers can use AI tools like ChatGPT as a code partner to develop ideas, resolve unintended errors, and learn new programming languages or technologies.

Refactoring is improving the design and structure of existing code without changing its external behavior. It involves modifying the internal structure of code to make it more readable, maintainable, and efficient. Refactoring is often done to improve code quality and reduce technical debt, which refers to the cost of maintaining and updating poorly designed code.

Refactoring can involve various techniques, such as simplifying complex code, removing duplication, improving naming conventions, and modularizing code into reusable components. It can also involve changing the code design to make it more extensible and flexible, such as by introducing abstraction layers or using design patterns.

Refactoring is an important part of the software development process because it helps developers continuously improve code quality over time. By making small, incremental changes to code, developers can avoid introducing bugs or breaking existing functionality while making code easier to work with and maintain.

AI tools are now capable of assisting developers in refactoring their code.  Whether is simply cleaning up variable naming or compacting long sequences of statements into more compact nested structures, AI tools can help us do this.  

4. Malicious Code Review

Malicious code is designed (intentionally or unintentionally) to harm a computer system, such as corrupting data, stealing information, or disabling operations. It spreads through email, malicious websites, or other means. Examples of malicious code include viruses, worms, and Trojan horses.

Hum, This Looks Wrong

This is a complex topic, but in addition to well-known static analysis tools, AI tools are now available to help detect vulnerability errors even at run-time.  ChatGPT can review small code segments and see if it is brittle or vulnerable to known attacks.  More complex higher-order behavior is still beyond the reach of AI tools today, but it will be possible soon.

BTW – People are still trying to get ChatGPT to write malware.  Boo.

5. Low-Code Generation

I remember using code generators back in the mid-90’s.  In many cases, it required the creation of visual representations or special scripts to generate the working code.  It also took a lot of work to control the efficiency of the code generated and in some cases took a lot of tweaking of the code itself.

Interactive AI-based code generators, on the other hand, can generate code, modify it, take additional commands, and work with the developer to build code.  It’s just a matter of time before someone reveals ChatGPT has generated a large, sophisticated program.

For the moment, small snippets of code are the easiest type of code to generate. ChatGPT can create code snippets and even explanations for existing code. However, it makes mistakes, so it is not a replacement for a software engineer, and developers must always test ChatGPT code before implementing.

6. Converting Code

This is unsurprising, but AI tools can easily convert code from one programming language to another.  Nuff said?

7. Performing Code Reviews

This may not be surprising either, but ChatGPT can review code. Of course, its effectiveness depends on the size and complexity of the file’s content. There is already a Chome plugin to do a ChatGPT PR.  

8. Investigating Compile Errors and Warnings

How many of you have struggled with a compiler error or attempted to wring out every last compiler warning? AI offers more understanding of the code in the compiler error context than standard compiler tools or static code checkers.

Compile errors are coding errors that occur when a compiler cannot compile a program due to syntax or semantic errors. Warnings are coding errors that are less severe than compile errors but still need to be addressed, as they can lead to unexpected behavior.

9. Finding Bugs

AI tools can find bugs not related to compilation errors.  Researchers at Johannes Gutenberg University and the University College of London evaluated ChatGPT’s capabilities in this regard and were impressed with the results.

Sweeping Up Bugs

10. Generating Alternate Code

Sometimes, code is written with certain limitations that constrain its implementation and require special supporting libraries.  AI tools can now rewrite existing code to support other constraints while maintaining the same input and output behavior.

For example, given the description and operation of a program, constraints such as database type, schema construction or UI library can be changed, and the AI code generator can help do this effortlessly. Indeed, it should be supervised and refined, but this can be done now.

11. Writing Unit Test Cases and Test Documentation

If you rely solely on your developers to write code and test it, you know tests don’t get a lot of focus.  AI can help.  AI tools like ChatGPT can write and document unit tests by prompting the AI with the task needed. For example, I asked ChatGPT to create a Selenium Python script to test the UI of a login page.  It did this with no problem.  I even gave the ChatGPT the web page’s construction details and asked it to generate a test plan. No problem.  ChatGPT is an excellent tool for testing web and mobile applications with various configurations and capabilities.

In addition, to test creation and documentation, AIs can be used by developers and QA professionals to improve their routine reporting and data analysis activities. It can be used to summarize test execution results, providing an overview of the test results, including the number of tests passed, failed, and skipped. It can also provide explanations for system or coding errors, identify possible causes of coding errors and help sharpen programming language skills.

12. Writing Project Documentation

Yes, AI tools can help create product requirements and specifications. It is more useful to generate implied requirements.  In other words, it is great for developing requirements for software whose exact specification isn’t known but needs to be.  

Need a New Project Plan? No Problem.

For example, documenting an existing application where its behavior and operating constraints are known, back-generating (or reverse engineering) a specification is quickly done for an AI tool.  

13. Performing String Localization

String localization is the process of adapting a product that contains text to different languages or locales. It involves the translation of strings of text that appear in an application into multiple languages. This process typically includes the internationalization of strings, the translation of the strings into different languages, and the integration of the translated strings into the application. Localization is often used to make an application or product more accessible and appealing to a global audience.  This is a straightforward application of AI and NLP.

14. Perform Code Optimization

There are countless examples on the internet of ChatGPT reducing the code size of an existing block of code without jeopardizing its functionality.  Yes, it can quickly optimize code.

15. Creating Automation Scripts

I used ChatGPT to write a PowerShell script to create a GitHub workflow to commit other Python code quickly. The AI created and added comments along with markdowns.  You can build scripts to automate tasks in YAML for Home Assistant and even Ansible scripts to build cloud playbooks.

16. Encoding and Decoding Data (ISO-8859-1, UTF-8 etc…)

Encoding is the process of converting data from one format into another format for transmission or storage. The process is used to convert data from one form to another. Examples of encoding include converting text into binary code, encoding images and sound, and compressing files for storage.

Occasionally, a need to encode or decode data or information is necessary.  This is a perfect task for AI tools. For example, say you need to character-encode a string into UTF-8 format.  Simply enter this into ChatGPT, and it will do it.

17. Generating Structured Data and Schemas

Have you ever needed a quick and easy way to review data metastructure with Devs but were only given a link to Postman or Swagger? ChatGPT is the perfect tool for generating the schema.  Using it, you can see the holes or inefficiencies in the data structure.  

If you need to create a data file from scratch, ChatGPT can take care of it. Simply provide the file format (CSV, JSON, XML, SQL, XSL) and give details on the data structure, attributes, types, and values. ChatGPT will do the rest.

18. Following Coding Standards

Coding standards are necessary because they help to ensure that code is consistent, well-structured, and maintainable. They provide a framework for different developers to work together and ensure that each person builds code with the same conventions. This helps create a consistent style that is easier to read, debug, and extend. Additionally, coding standards can improve the overall code quality and reduce the number of errors that occur.

ChatGPT can help enforce coding standards by automatically suggesting best practices for code. It can review code, flag errors, and suggest improvements. Additionally, ChatGPT can suggest coding standard enforcement tools, such as static analysis, code linters, and style guides. With ChatGPT, developers can more quickly and easily enforce coding standards and help ensure their codebase remains up-to-date and high quality.

19. Diagramming Code

Software diagrams are essential because they help visualize and explain the structure and components of a software system. They also help capture complex relationships between different parts of the system. By providing a visual representation of the system, software diagrams make it easier to understand how the software works and to identify areas that could be improved or modified.

UML Diagram Of A Blog Post

Current AI tools and future updates to traditional software diagramming tools will help to automate this for developers.  ChatGPT is not able to generate software diagrams. You can, however, leverage other tools like draw.io, yEd, Lucidchart, or Gliffy for that purpose. These tools allow you to create diagrams, flowcharts, and other visual data representations from code. You can also engage user-friendly diagramming SaaS products like Visual Paradigm to generate software diagrams.

Conclusion

AI tools have the potential to revolutionize software engineering by helping software managers make better decisions, increase team productivity, and improve software quality. AI tools like ChatGPT can help with mundane tasks such as code commenting, code conversion, code reviews, code optimization, automation script generation, code encoding and decoding, creation of structured data, enforcing coding standards, and diagramming code. AI tools can also help with more complex tasks such as writing unit test cases and documentation, bug detection, and generating alternate code. AI tools can help make the software development process easier and more efficient and help software managers maximize their team’s potential.

Interestingly, these suggestions come from me, a good old-fashioned human, not an AI.  

David Hendrickson, PhD

Throughout my career, spanning several decades in the technology sector, I have been fortunate enough to work with both large and small companies, contributing to various successful projects. My experience covers hardware and software, process improvement (Six-Sigma), and engineering management. I love technology especially AI and have several patents on the subject.