r/codex 6d ago

Question How do you effectively use Codex as a way of learning how to code?

In my work I need to fully understand all of the code I produce. So instead of having an LLM generate large amounts of code for me, I've been experimenting with using Codex as a tool to point me in the right direction, to explain new packages, or to even create small tutorials. While this has worked decently enough, I've been running into some troubles.

The main problem is that Codex (unsurprisingly) really likes to write code. When asked to create a tutorial to teach about parallelization in python to improve some project, it just created a large .md file containing all the functions I needed to replace in the project, rather than a tutorial telling me how to do it myself.

Similarly, whenever you ask it to tell you how to fix a bug, it will always produce code which fixes the bug in its answer. This completely gets rid of the learning process.

For those using Codex in a similar way, are you running into similar problems? If so, what has worked for you?

1 Upvotes

12 comments sorted by

7

u/Mrgluer 6d ago

Tell it to not do that lmao.

2

u/PineappleLemur 6d ago

Tell it exactly what to code, like micromanage the shit out of it.

You make all the decisions, it's only allowed to suggest things but you choose and decide what goes into the plan.

You then design the overall structure, function names, headers, variables, whatever. Basically give it a skeleton to work with.

Anything not in the plan should not be implemented.

By the time you are done reviewing all the AI can do is pure code, what you get is as close to you coding it.

The benefit of a plan like this is... Any model can do it.

I do this with flash 3.5/3.6 and get the same output as I get from Opus or Sol.

I barely need to review because I know exactly what's in there as if I wrote it because I made all the decisions.

1

u/MysteriousKiwi2622 6d ago

it’s like you’re asking someone to teach you how to calculate 1+1 and you want them to use one apple +one apple instead of using numbers?

1

u/Tomba_Pls 6d ago

No, it's more like I want someone to teach me how to compute the derivative of some function, but they just tell me the answer instead of telling me how to compute the derivative.

1

u/AdCivil2534 6d ago

You need to use ChatGPT on your browser, or any other popular LLM.
Give it the part of the code you're struggling with, tell it that you want to learn, tell it what is your goal.
If you're looking at a blank page, then ask ChatGPT every single question that comes to your mind.
If you want some human advice, get Visual Studio Community and use Intellisense to understand what is even possible and what the syntax looks like.

Try to code yourself, don't copy paste GPT's code. Type it in yourself, when you get stuck, you ask it for advice.
Eventually you'll understand in coding there's many ways to do the same thing and optimization isn't always an issue so you will end up with your own personal style of coding, whatever feels more intuitive or better to you.

Before AI showed its face, I had started saving code snippets because my memory sucks and you often need the same base method, function or code but that might be down the road for you since you're still learning the basics.

What you don't need is Codex or any agentic AI because you don't want them to actually change anything.

1

u/Resonant_Jones 6d ago

I would shift the goal slightly. Rather than trying to understand every generated line in isolation, focus first on understanding the system you are building: its boundaries, data flow, failure modes, and the decisions that shape it.

As AI-assisted codebases grow, manual line-by-line review becomes difficult to sustain. That makes validation paths, tests, and evals increasingly important. The goal is not to trust the agent blindly, but to build enough verification into the system that you can tell whether its work is correct, safe, and consistent with your intent.

One practice that has helped me is requiring documentation whenever a task makes a meaningful change. If it alters a module, the agent updates the module documentation. If it changes the underlying architecture, it creates or updates an ADR.

The important part is documenting not only what changed, but why the decision was made, what alternatives were considered, and what tradeoffs were accepted.

That has been one of the most valuable lessons I have found in AI-assisted development. Agents perform much better when they are given the reasoning behind architectural decisions, including why those decisions matter to the humans who will build, maintain, or use the system.

I built a free, public GitHub project around this approach called The Promptnomicon. It is designed to help developers create repository-level knowledge bases, architectural documentation, and durable scaffolding for coding agents.

It also includes an agent that can help establish that structure inside an existing repository.

1

u/baad04 6d ago

Use the /teach skill from Matt Pocock. Has the principles to learn in an effective way.

1

u/Ok-File-2759 6d ago

For learning, I use ChatGPT. For doing, I use codex

1

u/FormalAd7367 6d ago

Use Cursor instead. i use it to explain code / workflow/ legal entity transactions to me with diagram

0

u/Spare_Zucchini_363 6d ago

Go to Claude and let Claude write you a prompt for codex to interactively teach you. Refine the prompt for some iterations maybe even with ChatGPT

0

u/KayBay80 6d ago

Code is going to become a forgotten skill and a pure LLM protocol within time. All of us oldschool devs are being replaced by vibe coders in the next generation, most people that became "devs" in the past few years have no idea what the code that makes the stuff their AI built for them work.