So you wanna write programs using this wonderful language? Well here's how you'll go about it. Firstly you'll need to develop a good sense of awareness, of how things can be best implemented in your program and how your problem can be most efficiently handled by your code. Yes, I am saying that you'll have to develop a good programming style. If you have programmed before however you'll already know this and you'll have your own unique style that you find best so you should probably go and check out the next couple of tutorials when the real coding actually starts. This is just a page for those that have never programmed before and want to know how to go about writing the code that will best suit their needs and also look good.
When you start to write a program in any language you'll always have one thing that you can't do without, the objective. In order to write a program you must understand exactly what you are trying to do. So despite what you first think a program starts a long way away from the computer. I recommend that you tackle the problem on paper first before you take to the coding. If any mathematical problems are to be addressed then write them out how they first sound and then try to manipulate them into a more simple structure that will do the same job but with less complexity. Why do I have to do this you may say? Well despite the fact that computers are so powerful and another three lines of code is not really going to make a big difference, this is actually the foundation to writing good code. If you can break down a mathematical program into smaller and more efficient steps then you can break down almost any problem in the same way because you'll know what is needed of it. You see, a mathematical problem is probably the most basic yet important problem in programming. Understanding how to break down an equation into a sequence of simple events allows you to examine the basics of the operation. Being able to do this will ultimately enhance your skills in problem solving and if you can solve the problems using a broken down version of the problem then the chances are that you will be able to reconstruct the problem in a more efficient manner so that it can be implemented without so much code.
The ability to break down the problems into simpler form may not matter too much when it comes to writing a basic program but when you get into big projects that involve multiple problems that interact with each other then it is essential that you get the most efficient way of solving it. The original three lines of extra code could suddenly increase by a large factor if not improved and this would make a difference to a programs performance. So basically all that I am trying to say in this tutorial is to practise solving problems in the most efficient manner possible, even simple mathematical problems. Just writing them a different way can help you to further understand how to decompose the problems you may encounter. You don't even need to write any proper code for the program, you can just write simple pseudo code that will reflect what you are trying to do. Even the best programmers in the world still use their idea of pseudo code to help them break down their problems. Try it out and then proceed to the next few tutorials where I'll actually start writing some programs that you can try out.
Tutorials | Index | Next |
© Redsetter 2000