3 ms·
>And if someone can explain well what a piece of code is doing, then of course that person can also write code. How can you read without knowing how to write? [
by jasode 5y ago
>And if someone can explain well what a piece of code is doing, then of course that person can also write code. How can you read without knowing how to write? [...] Reading and writing are two sides of the same coin.
I'm not so sure about that. I can read assembly code but I can't write it at a competent level that an employer would require. Reading code is often easier than writing it.
Maybe an analogy is reading vs writing a movie script. A lot of us can read the actors lines and set directions and can then explain what the movie is about -- but most of us are not skillful enough to write a movie script.
The deciphering-vs-generation divide happens in human languages too. Many times, a person learning a foreign language can understand what someone is saying but if asked to generate a sentence to express a thought, they often will be flustered and halting in their speech as the brain struggles to find the next correct word to say.
The reading vs writing skills don't seem to progress equally.
- benrbray 5y agoSimilarly, it took a few months of learning to read Haskell before I felt comfortable writing more than just a couple lines. I like the idea of code reviews in an interview though! Seeing how someone approaches a new code base would be a really pragmatic way to evaluate them. Having them make a targeted change to a smallish unfamiliar program would be informative as well.
- notriskfree 5y agoMakes sense, It is also easier to read and understand a book than it was for the author to write it. You can also think you understand something while you read it and later realize that you misunderstood it.