Building What You Don't Understand: How to Supercharge System Design with LLMs

Building What You Don't Understand: How to Supercharge System Design with LLMs

Hey, folks! It's been a few weeks since I posted on LinkedIn because I've been coding—a lot.  Basically, I've been exploring niche technical domains I don’t understand and designing and programming applications in languages I've never used before. It's been an intoxicating experience. I feel like there isn’t anything I can’t build now. I want to share how I've been pairing with an LLM to improve my coding skills. So, my apologies in advance, greater LinkedIn; here comes another LLM article.

If you haven't tried it yet, I highly recommend pairing with an LLM. Code completion from comments is fantastic, but having an LLM-powered chatbot that understands your entire project and can debate architecture and write perfect code for you is a game-changer. I'm eagerly awaiting Co-pilot X, which promises to be even better.

If you're a programmer at any level, I urge you to challenge yourself by building something simple in a language you've never used before. It's a great way to learn and expand your skills.

Here's how I've been pairing with ChatGPT to write code:

  1. Name your project, write a brief description, and paste it into the chat. Tell ChatGPT that you want to discuss the architecture of the project and ask it not to write any code until you ask.
  2. Have a dialogue with ChatGPT about the system. Ask its opinion on the code and the project, make sure it understands what you want to do, and listen to and debate any suggestions it might make about functionality.
  3. If ChatGPT gets something wrong, correct it and explain why.
  4. Once you generally agree on the architecture, ask ChatGPT to print out a detailed description and save it off to the side.
  5. Ask ChatGPT to generate a theoretical software repo structure for the program based on your architecture. Discuss the structure, make sure it makes sense, and save it off to the side.
  6. Ask ChatGPT what's the best sequence to generate the code files in.
  7. Have ChatGPT generate all the code files. Note that there is a limit on the number of lines and characters it can work with.
  8. Once all the files are done, run a script that concatenates them and prints them into a single text file with file name delimiters.
  9. Write "Please evaluate the below:" and below that line, paste in the architecture description, the software repo hierarchy, and the concatenated code file.
  10. Once ChatGPT sees all the code together, it will evaluate it comprehensively and suggest refactoring. Make any necessary changes.

The code that ChatGPT produces is impressive, with minimal errors or omissions. It may miss a few small items, but I rarely have VSCode flag any problems with the code. Depending on how complex the project is, you may run into issues with the generated code, but in the rare case of minor issues, such as missing imports or dependencies, they are usually easily resolved with minor adjustments. Once you run the program, you may find some errors, but feeding those errors back into the chat thread helps ChatGPT gain a better understanding of what you’re building, and if you continue to pair with it, then ChatGPT can continue to help.

I am excited about Copilot X but ecstatic if ChatGPT turns into a platform play. A competitive ecosystem of ChatGPT-powered developer tools will supercharge the cognitive abilities of programmers. If you code, I urge you to pick something interesting you don’t understand and get out and build!

Ron Margalit

CIO at Evergreen Nephrology

1y

Intellectual property discussions are going to get interesting.

Like
Reply

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics