View Single Post
  #6  
Old 05-04-2006, 04:00 PM
sjaguar13 sjaguar13 is offline
Member
GB Advanced User
 
Join Date: May 2006
Posts: 50
Default

There are two things that make a good programmer. The first is knowing how to do something and the second is knowing how to do something efficiently.

There are several ways to program anything. For the most part, efficiency is usually the same, but there are occassions where one thing doesn't work as well as something else. Knowing which one to use something a good programmer can do.

The best way to learn how to do program is read books and tutorials, follow the sample code, and do some projects. Learning how to do something efficiently is a bit more work. For small projects, the time it takes for an efficient and inefficient is probably going to be a few nanoseconds apart. You'll never be able to tell which is really the best method. Plus, you have to factor in code reusablity, file size, and code readibility. If you code is slightly less efficient, but you can use that code in 10 other programs, where as the efficient version has to be re-written for the 10 other programs, you should probably just go with the inefficient program.

Likewise, if you code is 10 lines, but it can be done in 2, it's not always better. Really the only way to get better at this is to start doing some project, however, they have to be fairly large so you can see the difference. You can read up on more of the science end of Computer Science, and various common algorithms (searching and storage are two big areas).

I started by just using other people's code like they wrote it. Then I got good enough to modify it a little, and then I started writing my own code. If you use someone's code who is a good programmer, you pick up on their habbits.
Reply With Quote