English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Many people have told me the key to keeping up with user's needs is to make programs flexible, so changes can be made easily. Programmers, how do you make your programs flexible (easier to make changes)? Thanks a bunch!

2006-09-05 16:52:49 · 1 answers · asked by GirlsRGamers2 7 in Computers & Internet Programming & Design

Just because one person has given me a great answer, don't let that stop you from telling me what you think! I need several different points of view! Thanks!

2006-09-06 02:43:15 · update #1

1 answers

When you say that code is "flexible" it means it "can be easily modified and reused"

How do you accomplish this? By creating code that is logically arranged, is generic in nature, and well documented.

Logically arranging your code means breaking it down into modules or functions that handle a particular aspect of the program. For example, you might put all of your user interface into one module, and put all the back-end computation in another module.

Making code generic in nature will make it much easier to modify in the future. Suppose you have two functions. The first draws a static image for the splash screen when the program starts up. The other one loads some image data from a file and displays it. The second function is much more "flexible" than the first, wouldn't you agree? Especially when the customer decides that she doesn't like the original image!

Finally, well documented code can help in understanding the code's purpose. It might be somebody else trying to figure out what the heck you were doing here, or it might even be you in 3 months trying to figure out what the heck you were doing! Documentation should explain function purposes, what it expects, and what it returns. It should explain code that may be obscure or unusual. Anything to help the understanding of your program and make it easier to utilize later.

Flexible programming is important because all too often you find yourself going back and changing the way a program behaves. If you use these methods, you'll find that task much easier and less painful.

2006-09-05 17:23:47 · answer #1 · answered by sovbob 3 · 1 0

fedest.com, questions and answers