Coding vs Writing

I know “coding” might be intimidating to many people, and you may easily relate it to programmer and hundreds of thousands line of codes. With such stereotype deeply root in mind, I guess you don’t even want to read it further. BUT, believe it or not, coding is as simple as writing!

Little Programmer (Source: Claire Thompson via Flickr)

What do kids learn about coding?

I found a very interesting fact that kids are able to code well without even knowing they are coding. I once were a tertiary student assistant helping the robot programming class in a secondary school and I sat next to a year-7 boy when he was coding his robot to walk to the destination. All he did were dragging some instructions to the operation box (like dragging “turn-left” to the box to let the robot turn left). After the combination of several instructions, the robot successfully walked to the destination.

Certainly the boy did not know whether it’s C# or Java used behind each instruction, but he accomplished the task of letting the robot walk to the destination. That is the essence of coding: it is a means to an end – solve a problem. By observing his coding process, I found he altered the order of instructions several times to make sure the robot went to the correct direction as he wanted. And sometimes the kid tried to use more efficient combinations to fill in the box with limited number of instructions.

I was amazed by how easily he learned the basic elements of coding: the problem to solve, the structure to use, and agile debugging, which takes me several years to learn. And I can’t stop thinking the way I learned coding. As many computer science students, I was taught the syntax of programming language and a lot of logic operations before I start to code. They are all necessary knowledge  to write a program but they are not necessary for you to start coding.

You can write = You can code

Now try to recall the process of writing a piece of work, what do you need to write an article? Personally, I need three steps to finish such a writing task. First, I need to think clearly the purpose of my writing: what content I would like to include? or what idea I would like to express? Then I will think of all related materials about the topic of my writing and organize them in structure. Finally, I may do some editing to make the writing better. These are exactly the same three steps you need in coding.

Coding, similar to writing, is a means to an end – solve a problem. Thus before any coding process, you need to clarify your problem: what exact problem do you want to solve? Thinking clearly of your problem will make your coding life much easier. After determine the problem you want to solve, it’s time to use some strategy: divide and conquer to structure your coding. Since most of time the problem we want to solve is big and complex, so we would like to divide a big task into smaller pieces and solve it one by one. The last step is debugging. Like editing makes your writing better, debugging is your best helper to make sure your code is good to go.

If you can write an article, then you have already had all the basics to start coding! As insufficient vocabularies won’t be an obstacle for your writing, those complex programming syntax won’t in your way of coding neither.

Happy coding!

To learn more about coding:

One Response to “Coding vs Writing”

  1. JUN says:

    This is one of the simplest explanations I’ve seen for coding. It’s a helpful analogy for non professionals to understand what is the coding. I’d like to try coding once I have the chance.