Thursday, October 1, 2015

Good software features – Computerworld Portugal

Developers reveal points that make better code than others

.

 ok - Ben Ostrowsky CC BY 2_0

There are many, many lines of code to ensure the operation of systems worldwide. Google, just for example, has more than two billion lines of code in your repositóriao. But not all are created in a similar way.

To find out what makes some better code than others, we heard the opinion of several developers, and questioned others to know what features you expect or want to have a system in which they will work. The result was six points that software “well written” have in common.

It is easily readable
programadoresparecem agree that one of the most important qualities of a code is the Your readability . Code written in a way that can be read quickly by other programmers are considered a high-level work.

“I feel that if I can not understand the intent of the system of the author in five minutes or less, the programmer made a bad job, “says Luke Burnham, software engineer, Lionbridge. “A code is written once and read many others throughout his life,” he recalls, citing the need to use resources to facilitate this process of reading and understanding.

For a Web application developer , who asked not to be identified, a good code is one that “follows a consistent coding style (proper spacing, indentation, the general flow)”. He also stressed the importance of choosing “variable names” that make sense in general

In short:. More readable means more understandable and makes life easier for everyone. Thus, the faster one can understand the structure, the better.

Are you helpful comments
Besides the good formatting and “appointment”, comments can also make the code ultimately, more readily understood. But not just any comments, like Burnham says. “I do not need comments to tell me what a loop is. Comments need to tell me why the code is doing what you are doing, “he says. “For me, a good code has comments that explain what happened in the author’s head during its development”

It’s simple
better code -. And this seems consensual – is often something simple. Good programmers know how to do the job without excesses, that too complicate things. “There is a proven statistical correlation between the complexity of code and the ‘bugs’” wrote Neville Kuyt.

It is flexible
functionality of a part of the existing code It must often be modified, expanded or re-used in future. That’s why Burnham advises: “Good software is written with the requirements of both today as to the prospects for future”

Of course, predict what lies ahead is impossible.. “But almost all the good programmer is able to create a flexible system enough to require minimal changes to accommodate new requirements,” added the engineer.

The code is good if developers are able to “add or change certain parts of the code without having to break other parts of the code, “said another programmer, who also asked not to be identified. “It is really when somebody is good code when you have to touch it.”

Is it sustainable
No matter how good a piece of code is written he will inevitably have “bugs”. “Obviously someone may have to fix them,” says Kevin Moylan, software engineer at Genuine Interactive. “And the person who will do this could be you.”

Maintenance is thus a key attribute of a good code. All the code must be maintained and there is no need to make this even more difficult than necessary. So avoid doing things like “values ​​that may change (URLs, hotkeys, password databases, etc.),” ​​wrote an anonymous programmer.

Works
Finally, there is a seemingly obvious feature of good software code that should probably be strengthened:. he actually needs to run

In short, the system has to do the job for which it was designed. “No matter how great it seems, if it does not work, no good,” summed Burnham.

(ITWorld with IDGNow!)

LikeTweet

No comments:

Post a Comment