Writing: My Motivation to Continue Coding

Writing: My Motivation to Continue Coding

When I was learning how to write, I struggled a lot because I had a hard time expressing my thoughts. I still struggle with writing now. It’s a process that improves the more you write. When I began learning how to code, many of the same struggles I faced with writing reappeared. Writing and coding are a lot more similar than you may initially think. Below are a few of the similarities I’ve noticed between writing and coding.

Getting Stuck

I feel like everyone has, at some point, faced the dreaded coder’s block. I definitely suffer from coder’s block from time to time. Coder’s block prevents me from making progress on my task and it makes me feel unproductive, whether it is starting a new project from scratch or building on top of one.

Earlier this year, Samantha wrote a blog post about writer’s block. Several of the tips she gives are things I followed during my undergraduate career while I was coding projects. There were days when I tried to code for hours but I kept going around in circles trying to figure out what was wrong or how to move forward with the code I had. At first, I had trouble dealing with coder’s block because I wasn’t giving myself enough time to think about the code. I would wait to work on parts that I was stuck on because I felt that I would get stuck again. It was my way of justifying procrastination.

The more courses I took, the more I learned that starting early was the best thing I could do to fix the unwanted moments of coder's block. Getting stuck early meant I had more time to walk away from the code and take a break. I could come back with a fresh mind and look at my code in a different way.

The same applies with writing. Although, it’s not always easy to start early on a paper, starting early helps you develop your ideas further since you have given yourself more time to think about it. Sometimes a good night’s rest will help you see how to resolve whatever problem caused you to get stuck.

Creating your own style

I think it’s safe to say that most people write in a unique way. In elementary school, almost everyone learns the same ways to write but, as you grow older, you develop your own style. Your style continues to develop as you learn new ways to improve your writing. The same thing goes for code. I remember my first year in college, when I was learning my first programming language, I used to use while loops almost all the time, when I could use for loops (these are both ways of iterating through something multiple times based on a condition). As I progressed through the course I noticed that for loops made some things easier to read so I started using a combination of both. Again, the more exposure I got to new code, the more I learned what things were better to use. I am still developing my style because frankly, I have not coded long enough and my style of code is still a work in progress.

Preparing & Revising

Writing an outline for a paper is similar to planning out a coding project. You want to make sure you have some direction before you begin. Because if you don’t, you waste time building something that might not do what you want it to do. Although sometimes it’s hard to plan something you haven’t built because you don’t know everything that you might need, it’s important to be able to take a step back and begin planning because it increases efficiency. Since plans do not always work out, it’s okay to start over. But I think it’s worthwhile to put in some effort in planning so that things go well.

In addition, it’s really important to continuously review and revise the code you are writing. A final coding project goes through several stages of revision, like writing a paper requires several drafts. You want to eliminate all the unnecessary steps you include so that the program functions as efficiently as possible. It will run faster and it will also make it easier to read for others looking at it. When working on larger projects, it’s nice to have other people look at your code because they can comment and evaluate how you can improve it before you spend more time doing something the wrong way.

Practicing and Collaborating

My most important takeaway from my experiences with both writing and coding is that the more you practice the better you get and the easier the processes of writing and coding get. Anyone can code, but coding well requires practice.

However, not all types of practices are the same. As Vince Lombardi once said, “Practice does not make perfect. Only perfect practice makes perfect." You will not grow as a programmer if you continue to rely on bad habits. It's important to be willing to make changes, to constantly look at your code and see if there is anything you can do to improve. It's also useful to read code from other projects so that you get ideas on how other developers are approaching problems that are similar to the ones you may face. The same applies with writing. You can write over and over again but if you keep doing things the same way without looking at ways to improve your writing, it’s no use.

So for those of you working on improving your writing, I hope WriteLab provides a place for you to practice perfectly so you can write perfectly.

Want to start practicing right now? Create a free account with WriteLab to get started!

 Image courtesy of Jimmy_Joe at Flickr.com

Why WriteLab Won't Replace Tutors

Why WriteLab Won't Replace Tutors

Believe, Be, Do, Have: Defining Company Culture and Identity

Believe, Be, Do, Have: Defining Company Culture and Identity