|

Coding Process

Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don't hold it against me. One of the perils of having a 20+ year old website!

Here is a paper I recently found. It’s on my coding process (after being a coder for about 2.5 months), and was written my freshman year of college…

What I do BEFORE I write any code?

Before actually coding any program, I have to make sure I understand it. Usually, I will understand what I have to do, but not what that means when it comes to writing the program. However, for the last 2 assignments we’ve had, I sat down, and wrote exactly what I had to do, and then what kind of methods I could use for writing that program. This took some time on my part. Just recently I’ve realized I should do this, and it makes writing the program so much easier. Since this course is my first experience with programming, It takes me a little longer to actually realize what I have to do and how to go about doing it. This is, I should also mention, the longest part of the process for me. For the current program, we actually had to write and hand in what we thought we had to do. We had to set up an array that took the inputted number and added 1 to t hat spot in the array. Ex. If 50 was the input, the a[50]= 1. Then the program had to print out the array with the number in that array. So this example would print 50: 1. After figuring out what I had to do, I thought of the best solution. Since I am new to programming, the best solution might not be the best, but I want to be sure that the program works. My solution was that I should set up an array, then use a for loop to make each value in that array 0. Then read in the Int. with a while loop, and made the loop terminate with a value less than 0. After each number was read in, I set up another for loop that, if the value in the array spot was greater than 0, it would print the array spot and its value.

What I do BEFORE I get my first clean compile?

Before my first clean compile, I go back to make sure that I didn’t miss anything. If I did, I would fix it. This is before any compile. I align everything to make sure it is all written correctly. Then if I compile, and it is not clean, I fix the errors the best I can. Sometimes, this would include asking a friend for some pointers on where I messed up. With this particular program, my error at compile time was that the file input class Prof. Plishka provided was not updated. So I went out to the website and got the updated one. I make sure everything makes sense, and then I proceed to my first clean compile.

What I do AFTER my first clean compile?

After my first clean compile, I first pray to God that the program works. Sometimes, it does. Usually, it doesn’t. So I go back to my code to check where the problem might be. After checking through the entire program- pretty much line by line, I assess where the problem might be and solve it accordingly.

Quite a bit has changed since then, and now coding is ‘like a second language’ to me. I don’t really need to put a lot of thought into how I will do something, just into how I can make it better, more efficient. I use a lot more print statements for error checking now than I did then, and they really do help pin point any problems. I don’t need to check line by line any more, since I am more familiar with whatever languages I use, so I usually can tell what is giving me trouble. As for asking friends for help, that is always good to do. Writing code is like writing a paper in the sense that you might over look errors because you wrote it. Later.

Similar Posts

  • How Do You Listen to Podcasts? (Win a $50 Amazon Gift Card)

    I’ve spent more than one post on this blog talking about podcast sponsorships. Today, I wanted to talk about podcast listeners. There are a lot of stats out there for website users – where they came from, what they do on the site, how long they stay, and a lot more. While there have been strides…

  • Coding at a new level

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website!This semester I am taking a class called Machine Organization and Assembly Language. What this amounts to is learning how to…

  • Coding

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website!This semester I am taking CompSci II, an advanced Java programming course at my school. So I figured I might as…

  • New Job

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website!Tomorrow I start my new job as a XHTML/PHP Developer for a local company. While I don’t want to give any…

  • Building a Better Business Part 2: Being Prepared Will Land You More Clients

    [audio src="https://episodes.castos.com/5f436edb798df2-94459192/1/2228ba51-3d94-406b-8378-c4dbc61a8d16/042-bbb-pt2.mp3" /]

    In part one of this series, I talked about the importance of understanding your customer through a somewhat drawn-out example using baby clothes. But the point remains!  Today I want to tell you two other stories about my experience with prepared vs. unprepared people in different industries. You see, being prepared is the next step in understanding your customers. Knowing, and anticipating, their needs will help you get more clients.

    Brought to you by GoDaddy Pro.

  • The Diet: Week 1

    While speaking with Colin yesterday about my on-and-off commitment to weight loss and how I’m not making the progress I’d like, he mentioned something he did called, “The Diet.” He’d blog every week or two about his progress. I’d like to start that up today. Below is my current weight and goal. My incentive? I’m…