|
Wednesday 2024-12-25 12:42 PM |
CHAT | |
Statistics |
Total online: 5 Guests: 5 Users: 0 |
VISITORS | A HEARTY WELCOME TO MA VISITORS 4R ENTERIN MA BLOG
THNX 4R VISITIN MA BLOG |
|
|
Welcome Guest | RSS
Main | Registration | Login |
STUDENTS QUEST |
Main » 2011 » August » 8 » What NOT To Do When Java Coding
0:31 AM What NOT To Do When Java Coding |
The one thing I can emphatically say iMOVING AWAY FROM PARALLEL ARRAYS . Use classes and objects instead! They will help you organize your code so much better, as well as develop modular and reusable components.
I would also encourage developers to use appropriate data structures. When choosing a data structure, using it should make your life easier, especially as the size of the problem grows. The structure should also provide an efficient and appropriate means of accessing data (ie., with Trees, it might take longerr to traverse the Tree, but it shouldn't take O(n^3) time to access a bottom-level element in the Tree). Some examples of appropriate data structures are Maps for finding the frequencies of occurrences for elements, Graphs for GPS systems, etc.
Regarding GUIs, always separate your GUI from your data and program state. Regardless of the UI (console, GUI, etc.), the way the data is accessed, modified, and organized shouldn't change. Generally, one should design DataManager and/or StateManager classes to handle this.
Also with GUIs, design your Components with OOP in mind. They should be modular, easily reusable, and extensible. If you are getting to the point where you are setting up a method to initialize and/or return a single GUI Component, then it is probably time to extend that Component and make it its own class.
These are just a few of the things I came up with off the top of my head.
|
Category: LATEST TECHNICAL IMPORTANT NEWS |
Views: 792 |
Added by: kc
| Rating: 0.0/0 |
|
|