Skip to content

Insights

ChatGPT in software development

ChatGPT saves time on routine code, tests and debugging. Architecture and judgement stay with your developers.

Nahaufnahme einer gewölbten Fassade aus sechseckigen Metallwaben in Blau

A tool for routine work

Publicly available since November 2022, the language model can also write, explain and review code. This article covers where it helps, where it falls short and which prompts work, as of late 2023.

Where ChatGPT helps

Programming languages are formal languages, which a language model handles well. ChatGPT is most useful in five areas.

Writing and optimising code

ChatGPT drafts code, scripts and CI/CD pipeline configurations for recurring tasks. That saves time on standard work.

Testing

Ask ChatGPT and it writes unit tests for your code. Running and assessing them is still your job.

Debugging

For many errors, ChatGPT explains the cause and suggests a fix, even for unfamiliar error messages or third-party libraries.

Identifying vulnerabilities

ChatGPT often flags weaknesses and suggests safer alternatives. It does not replace a security review by specialists or automated checks.

Analysing code

When you inherit undocumented code, ChatGPT explains what a section does. It can also port it to another programming language.

Where the limits lie

ChatGPT struggles with complex interdependencies. It knows nothing about your architecture, business rules or operating environment.

It also produces answers that sound plausible but are wrong, such as functions that a library does not have. Every output needs expert review.

Rules for using it

1. Precise prompts

The more precise the prompt, the better the result. One or two extra sentences of context almost always pay off. For ideas, see an article by the agency AnalyticaA: 10 ChatGPT prompts for more effective online marketing (in German).

2. Examples

A few lines of existing code show the model the style and structure of your project.

3. Prompts in English

Most documentation and technical discussion is in English, so English prompts often give more precise results.

4. Data protection and confidentiality

Personal data, credentials and trade secrets do not belong in a public chat. For company use, we recommend business plans or the API with a data processing agreement.

Proven prompts

Replace the placeholders in square brackets with your own details.

Writing new code

Prompt: Act as a [Technology Name] developer. [Write a detailed description]

Example: Act as a JavaScript developer. Write a program that validates a form. Name and email are required, address and age are optional.

Fixing errors

Prompt: Tell me how to debug the code to solve the given error. Project: [Project name/description] Technology stack: [Technology stack] Error: [Explain the error]

Example: Tell me how to debug the code to solve the given error. Project: e-commerce Technology stack: JavaScript, Node.js, Express.js, Stripe, MongoDB Error: Some orders are placed twice after a payment timeout.

Writing database queries

Prompt: Write a [Language] query. Tables: [Tables/collection list] Requirement: [Mention your requirement]

Example: Write a MySQL query. Tables: users and orders Requirement: Return the details of the user who placed the highest order today.

Conclusion

Language models are already shifting the work towards review, architecture and coordination. Teams with clear rules for quality and data protection gain time without new risks. People remain responsible for the code.

Project enquiry

Back to top