Saturday, October 4, 2014

Jargon

Like every other community there are difference is the way people speak, but there is also a difference in the way people code. Writing code for a computer like everything else in the world is an art. Just like with any language the is not one way to say something, there are many ways to say just about everything. There are actually cleaner ways to write your code, that can both take up less space, and are less likely to cause problems later with the way that computers and processes interpret it. One of the main circumstances in which this happens is variables. There are two main kinds of variables, local and global. When writing code you have to be very carful in the way that you define variable, and making a variable continue to hold data. When you make a global variable, it exists everywhere in your code and for ever in your code. You only want to define a global variable when you want this to happen because these variables take processing power, ram, and you can not use the character you used to define the variable for anything else. The alternative is local variable, these exist just for as long as you need them to exist. The problem with a local variable though is if you need it many times, you constantly have to redefine it and make it exist again. Because of this you need to really chose what kind of variable you are using and be specific about it. This is only one of the many of the things that can make your code “messy”. When you post you code on forums, people have no problem pointing this out to you. So just like writing a paper, when writing the code you need to go through it  and edit it, and rewrite pieces so that you are easier understood.

No comments:

Post a Comment