|

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

  • 100 Words 029

    Today I’m working from a “mobile command center.” This a a term I heard coined from coworker and all-around great fellow Brian Richards. He uses it when he’s working from the road, usually literally moving. I love this idea; working remotely let’s us work anywhere and modern technology enables us to do it. I’m not…

  • |

    What is a Hackathon?

    According to Wikipedia, a hackathon is defined as: …an event in which computer programmers and others involved in software development, including graphic designers, interface designers and project managers, collaborate intensively on software projects. Basically, it’s a place were people who work with computers can come together to hopefully make something awesome. There are all types…

  • |

    Why Not Wanting to Pay for Software is Holding Your Business Back

    Earlier this month, Elementor announced that they are increasing their prices. Most notably, 1000 sites (called the Agency Plan) is moving from $199/year to $999/year. This is only for new customers but, as is common when software pricing changes, people are outraged. Not only is this sort of outrage getting old, but I would argue that if you’re not willing to pay what software is worth, you will never grow as a business. And not for the reason you think.

  • USPB NYC Trip

    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!Its on Dec. 5th and its $10 to go to the city and $20 to see the show as well- the…