Wednesday, April 11, 2012

weaknesses Programmers young


                      one of the errors that were encountered on new young programmers is the lack of insight into the theory and what is already done by others. Often, when given a task, the programmer is proudly quickly direct do the coding (coding). He did not want to look for information about the range of possible solutions have been found the to solve the problem or task assigned to him. I take an example, a search (searching) a data in a particular data set. Most of the programmers This young company makes a loop "for" or "while" the browse the data set. He does not care about data structure of the data set (which may be array, tree, graph). Strategy was chosen at random. He did not want to think about whether it is better using the Depth First Search (DFS) or Breadth First Search (BFS). Yet out there already much literature on about the search and its applications. In addition to problems search, a similar problem is sorting (sorting). As a result of this ignorance is often the programmers takes a long time to find a solution. If you've managed to make the solution too, it turns out that the solution created by the programmer is not efficient. Program can way for small amounts of data. Once the amount of data raised, the program becomes not the way, or takes a long time to complete the task. Imagine, there applications that require long hours just to do the sorting.

 This is often due to errors in selection algorithm and its data structures used to process the data. The solution, often read books, journals, and theories of programming to find a better solution. If the above error is caused because of lack of understanding theory, then another error that is often done by Young programmers are less frequent practice of reading or see the source code to others. When he was asked to create a program in C language, the program as in Below The above example makes my eyes hurt when reading it. What is wrong? There are many. Laying keyword "Play" that goes into without cause, the placement of opening and closing curly brackets that go around (not straight line of its own or follow the previous line) is annoying thing for me. Do you not passionately see the source code like that? Programming examples in Other languages ​​are also quite similar fault. What can we learn from this example? style of writing the program turned out to be also controlled by a programmers. The program should not just roads, but must also easy and beautiful when read. (Remember the last article about the art and programming?) There are several streams in the writing style programs. For example, some use "tab" for the indenta-tion, but there are any spaces (spacebar). Both of them you can do, but you have to be consistent. if you use tabs or spaces, how many blanks as you use? Programming capabilities are the same as our ability
playing a musical instrument, the guitar for example. A guitar player Reliable theories need to know (chords, scales, picking), often exercise regularly, and also need to see examples of how to style
veteran guitarist plays. Often there are things more quickly understood after seeing theory put into practice. Often see or read the source code of seasoned programmers will enrich your knowledge in
field of programming. Open source approach, where we can see the source code of a program that we admire, makes it easier to improve the ability of our programming. Well, let's giatkan to read journals (theoretical) and viewing the source code (practice)

No comments:

Post a Comment

SOP Door Lock Activity Reading

Door Lock Activity Reading 1        1.    Prepare DTU Unit. 2.    Switch “On” DTU Unit. 3.    Put in Staff Code DTU, press Enter. ...