Discover more from Eating Complexity
Soft Open #002
Learning Software Engineering in the Open
It’s Owls All the Way Down
Failure is the duty of the beginner
The continuing journey to get Graphs on a Page
One of the best things about coding nowadays is that no longer have to rely upon Stack Overflow for answers. Stack Overflow is both actively gamified and passively ossified. I found it to be a pretty toxic place to ask coding questions.
Often I would write a question for it to be instantly killedor marked as a duplicate to some other question that has nothing to do with it. This is to do with people gaming the system for points, aka Imaginary Internet Power. Not only that, but many of the answers are not up to date.
A better thing to do is to use chatGPT (aka the bot) as a co-pilot. chatGPT never gets sick of answering my dumb questions, and can be pretty helpful as long as you understand how to ask it the right kind of thing.
Unlike Stack Overflow it will also add encouraging appendices to its replies such as:
Remember that interactive learning works best when you're actively engaged. Be sure to code along, experiment, and apply what you've learned to personal projects or coding challenges. Learning to code is a hands-on experience, and the more you practice, the better you'll become. Good luck on your learning journey!
Thank you, robot overlord!
It helps to be specific about what you want it to do:
This way of using it is like making a jigsaw puzzle piece by piece. You need to have a decent idea of what it is that you’re trying to do.
Debugging code blocks
If you have a code block that is not doing what it is supposed to do then you can send it to the bot and it can debug it for you. Sometimes errors aren’t easy to find because a block is kind of giving the right output: eg a block that is supposed to return an array does return an array, but it is empty.
If you wrap the code with
``` code ``` ie triple backticks then it helps the bot know where the code begins and ends. Probably this isn’t strictly necessary but I always do it.
Debugging from console messages
You can also cut and paste any error messages that you get back into chatGPT and it will have (usually) a pretty good idea of what is wrong.
There are other more advanced ways that you can use the bot as well. You can use it to generate prompts for itself:
I want you to become my Prompt Creator. Your goal is to help me craft the best possible prompt for my needs. The prompt will be used by you, ChatGPT. You will follow the following process:
(1) Your first response will be to ask me what the prompt should be about. I will provide my answer, but we will need to improve it through continual iterations by going through the next steps.
(2) Based on my input, you will generate 3 sections. a) Revised prompt (provide your rewritten prompt. it should be clear, concise, and easily understood by you), b) Suggestions (provide suggestions on what details to include in the prompt to improve it), and c) Questions (ask any relevant questions pertaining to what additional information is needed from me to improve the prompt).
(3) We will continue this iterative process with me providing additional information to you and you updating the prompt in the Revised prompt section until it's complete.
Drawing the rest of the owl
Working with the above I eventually got to the prompt:
I won’t post the total result here but here are some resources suggested:
OK that’s it for now! Next: Actual Learning.
If a question gets downvoted soon after being created it will never really appear in many people’s feeds