Coding from dictation
Posted by CalculusSlander@reddit | learnprogramming | View on Reddit | 10 comments
I've been into Computer Science for a while now. I've got a pretty solid background, but it's just a little bit of this and a little bit of that.
While following a backend course I realized I was spending too much time on syntax and just typing things rather than understanding the structure. I struggled to code on my own and that's probably the biggest frustration that comes down to a beginner dev. I could fully comprehend the code which the other person is typing. But even after seeing a snippet right in front of me, I’d have a hard time recreating it without looking at the snipper over and over.
But lately I've seen some real improvement. One of the best techniques I've come up with is coding by dictation. Instead of watching the video, I only listen to the audio while keeping my code editor open. So by following the instructor's explanation alone, I’m forced to recall the syntax while not struggling that much. I'm not copying the code, just following the instructions. Even when the turor's rereading the code, I still find it more efficient than just copying.
It works really well for me, and I just wanted to share my experience. If you feel like you’re getting familiar with the syntax but still struggle to build things from scratch, I really recommend this method
grantrules@reddit
What's it like.. like how do you dictate
if (a() <= b[0]) { for (a = false; !a;) { ... } }If open parenthesis a open parenthesis close parenthesis less than or equal to b open square bracket 0 close square bracket close parenthesis open curly bracket..
I couldn't listen to that lol
DigThatData@reddit
have you ever heard a course that was even taught like that? I don't think this is a real problem OP is likely to encounter.
Since you mentioned this though, here's a presentation by someone who writes code by dictation (because they struggle with wrist pain) describing how their setup works. https://www.youtube.com/watch?v=Mz3JeYfBTcY
grantrules@reddit
I've never taken any programming course so no I've never heard anyone dictate code that people were expected to run
I'm not in a space where I can listen to audio, but how does it handle something like ((a && b) || c)
I'll check that link out later
CalculusSlander@reddit (OP)
Just without parenthesis.
If a or the result of a is less than or equal to the first element of b...we're gonna have a loop were 'a' is set to false with the condition of not a. Inside the loop...
I just came up with another idea, so you can actually ask an LLM to provide a code snippet for something you want to learn, and then have it read in a narrative style
Wonderful-Habit-139@reddit
Maybe if you're a beginner. But you have to put in effort in getting out of this tutorial hell.
Try to write things like conditionals and loops and functions, the simplest ones, without looking at a source. If you have to look at a source, finish writing the code, then try again. Until you don't need to look at the source in the middle of writing the code.
Once that's done, you should start working on very simple projects, and only look up the exact thing that you're trying to implement, instead of looking at a guide.
Curious201@reddit
this is interesting because it sounds like the slowdown is the actual feature, not a side effect. i noticed something similar with background audio - when i code in silence i rush and miss details, when theres rhythmic noise i slow down and the code comes out cleaner. your hands being forced to pause might be doing the same thing for your brain
CalculusSlander@reddit (OP)
I like to listen to Limittless soundtrack and pretend I'm some sort of programming prodigy when coding, xd. I'm forcing my brain to accept the fact that it's not a task that's extremely difficult, it's just the lack of practice
patternrelay@reddit
That actually makes sense, you’re forcing recall instead of recognition. It’s similar to how systems fail when people rely on copying instead of understanding flow. Curious if you’ve tried mixing this with small projects right after, to lock it in further?
IAmADev_NoReallyIAm@reddit
You're an audio learner. Some people are like that. Whereas I'm a visual learner, I learn by seeing - I learn best by reading. Some people learn by a mix. Those are the ones that videos work best for. I can learn form those, but it's difficult sometime.
I'm glad you found a technique that works for you. That's usually the hardest part for people learning programming, finding that sweet spot that works for them.
CalculusSlander@reddit (OP)
Yeah, probably. But I've noticed it only when I became fluent enough with tools and framework's syntax