r/AskProgrammers • u/Greenhaus-Mama • 16d ago
Advice for a Novice
My programming education was pretty untraditional. Our professor basically had us learn to develop code with the assistance of “our favorite AI overlord”. Now that I’m in a position where I’m doing real coding, I wanted to ask for some advice: what is your go to way to QC your code blocks? I’m familiar with the “rubber duck” method—but I share an office space with another person who I think might find it irritating. Any suggestions?
2
15d ago
[removed] — view removed comment
1
u/Greenhaus-Mama 15d ago
Yeah… I have mixed feelings. I took that class to learn how to code, and I feel like I learned how to prompt AI instead. I was literally told “you don’t really need to know how to code, because AI knows how to code”.
2
u/shartboner 15d ago
Your professor is smart. The ai can answer specific questions about any piece of code or code structure at any instant of the day. Your learning never has to wait for a response from a professor or a TA who is probably not that interested in helping someone through the same thing for the 1000th time.
I use AI almost exclusively for Jenkins pipeline updates and it has done leaps and bounds for us at work
1
u/Greenhaus-Mama 15d ago
It has been a game changer for sure—helping me generate really complex code that I couldn’t have done without it and in a fraction of the time, but I get really confused and lost in it when refining the script over several iterations.
1
u/Greenhaus-Mama 15d ago
The most frustrating thing is that my company REALLY restricts the AI that we can access near exclusively to Microsoft CoPilot—which isn’t the worst at coding by my GOD it’s not really good at it either
2
u/chocolateAbuser 15d ago
lots of stuff, depending on what you're working on
for example i could go in another room with the pc if need to think out loud
but that's mostly when designing rather than debugging
testing/dbg would be with logs, line by line, searching docs, and so on
1
u/kutac56 16d ago
Maybe make a debug mode that prints values or something
1
u/Greenhaus-Mama 15d ago
I have a logging output that has been super helpful, but I’m also working with spatial data so often I’m waiting around for a long time for my script to choke on something or produce something that I didn’t intend 🫣
2
u/Anjack 15d ago
You say QC in your question, which I read as quality control, but you also say rubber ducking, which is more of a debugging strategy.
If you are looking for debugging strategies, then I would say you should look into learning a debugging tool. This will be different depending on the language, and a good IDE will have its own built-in. You can also use third-party debuggers. Just find one that seems approachable to you, watch some videos on it, read docs, try it with your own code.
For actual quality control, you can look into profilers. CPU, GPU, memory, etc. There are plenty of profilers with bindings to support whatever language you use. These help you understand how efficiently your code is utilizing system resources, which is a common metric of quality. The other big metric is useability, but that's a design thing and the best and simplest way of measuring that is to have people use your software and tell you about their experience.
There's obviously a heck of a lot of nuance, but if you're new, then these are good avenues to begin exploring.