30 points
*
Deleted by creator
permalink
report
reply
7 points

It seems that you gotta learn prompt engineering

permalink
report
reply

reality: the code is written in 5 minutes, and it’s never debugged because the developer was fired by management. The buggy code is sent straight into software production

permalink
report
reply
27 points

The trick is to split the code into smaller parts.

This is how I code using ChatGPT:

  1. Have it analyze how to structure the program and then give me the code for the outline with not yet implemented methods and functions.
  2. Have it implement the methods and functions one by one with tests for each one.
  3. I copy the code and test for each method and function before moving on to the next one So that I always have working code.
  4. Despair because my code is working and I have no idea how it works and I have become a machine that just copies code without an original thought of my own.

This works pretty well for me as long as I don’t work with obscure frameworks or in large codebases.

permalink
report
reply
6 points

Actually, that’s the trick when writing code in general, and also how unit tests help coding an application.

permalink
report
parent
reply
8 points

This is exactly how you forget coding.

permalink
report
parent
reply
3 points

To be fair, you’re also describing working with other people.

permalink
report
parent
reply
4 points

I’ve been having a great time with copilot

permalink
report
reply
3 points

Yeah, that’s the way to go. Copilot or similar to automate the simple stuff, while you still do all the architecting and check whatever it suggests.

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 4

    Monthly active users

  • 755

    Posts

  • 2.2K

    Comments