Use understandable variable names Dammit!

Is there anything more annoying than looking through code that has stupid variable names? Im currently tweaking a script that someone else once wrote, a couple of months back maybe and the variable names are like this:
ow, oh, wh, wi, nw, nh, sure i can understand ow = original width and nw being new width. But common?

Seriosuly, people that does this kind of programming should never, ever be working as programmers.

So what do i suggest instead of these riddicilus names? Well back in the time when we had a limit to how many characters we could use, there was a couple of conventions used, but i dont like any of these "short naming"-conventions. Use explaining variable names, such as: image_width, image_height, image_new_width, image_new_height or somewhat like this imageWidth, imageHeight, newImageHeight, newImageWidth. This will make code more understandable and readable.

Kommentarer

Kommentera inlägget här:

Namn:
Kom ihåg mig?

E-postadress:

URL:

Kommentar:

Trackback