Codex helps me write code with AI

Codex helps me write code with AI

It’s been over a decade since I last wrote code for a company. After moving from software engineering into product management, I stopped coding professionally. I still understand the principles, but I’m out of practice and unfamiliar with the development tools used in 2025.

With the advent of AI coding assistants, I wanted to see if these tools could help someone like me write code again. I decided to try OpenAI’s Codex.

Installation and Setup

Codex installed without issues. After launching, it guided me through a setup process that included connecting to my GitHub account. This was handled through a built-in wizard.

Once configured, the interface presented a text input field where I could describe what I wanted the code to do. Here is what the interface looks like:

First Task: A Simple Windows GUI Program in C

For the first test, I asked Codex to write a program in C that would display a pop-up message box on Windows.

The generated output was:

Codex Handles a Non-Trivial C Example

Writing a Windows GUI program in C is not trivial, especially for someone who hasn’t written code professionally in ten years. Compared to more modern and higher-level languages like Go or Python, C requires precise syntax and familiarity with low-level constructs. Working with the Windows API in particular used to involve me reading hundreds of pages—and experimenting to get the function signatures and parameters right.

Given that context, Codex generating a correct and working example in about 30 seconds was notable. It correctly used WinMain, included the necessary headers, and provided a call to MessageBox with appropriate arguments. In the past, writing and debugging even this small example could take significantly longer, even with the right reference materials at hand, which I don't easily have now.

In addition to writing the code, Codex also offered integration with my GitHub. It helped generate a pull request and handled the merge process. As someone who is no longer familiar with modern tooling or typical developer workflows in 2025, having assistance through that flow was a huge relief.

Getting Help with Compilation

After generating the code, I needed help compiling it into a Windows .exe. At this point, I pivoted away from Codex and turned to ChatGPT for assistance. I asked how to install a Windows-native compiler that could handle C and produce a standalone executable.

Initially, it recommended an open-source toolchain (MinGW), which I recognized but preferred not to use. I clarified that I wanted the official Microsoft compiler. ChatGPT adjusted its guidance accordingly and provided step-by-step instructions to install the Microsoft Build Tools, including how to configure the environment using the Visual Studio Developer command prompt.

Following those instructions, I had the Microsoft C compiler (cl.exe) installed and ready to use within about 5 to 8 minutes.

Command-Line Workflow and Using the Microsoft Compiler

To stay close to how I used to work, I chose a command-line setup instead of a full IDE. After generating the code with Codex, ChatGPT guided me to use the official Microsoft C compiler by launching the “x64 Native Tools Command Prompt for Visual Studio 2022.” From there, I compiled the program using the cl command and linked it properly to produce a working Windows GUI application. This gave me a familiar workflow while using up-to-date tools.

Git Workflow Assistance

When I needed to clone my GitHub repository and work from the Windows command line, I turned to ChatGPT for help. It guided me through using git clone in a writable directory and helped me avoid common permission issues. With that, I was able to pull down my repository and begin working locally without problems.

Running the Program

After compiling the code and resolving the environment setup with ChatGPT’s help, I was able to run the program directly from the command line using the Microsoft compiler. The output was exactly what I expected—a simple pop-up message saying “Hello world!” using the Windows API.

Here is a screenshot of the working program:

Conclusion

This experience showed me that with the help of AI tools like Codex and ChatGPT, it’s possible to return to coding—even after a long gap—without needing to relearn everything from scratch. I was able to describe what I wanted, generate working C code, set up a compiler, troubleshoot environment issues, and run a GUI program, all within about 20 minutes. The combination of natural language coding and conversational troubleshooting dramatically lowered the barrier to re-engaging with development.

Now I am starting to ponder what I will code next!

You can view and clone the code I wrote here: https://github.com/ivannovick/windowsapp1

oh man, still program in C ... a thorough and complete foundamental software engineer, using the most efficient yet most difficult language to write.

To view or add a comment, sign in

Others also viewed

Explore topics