I know it's one of these questions that come back endlessly, but I really need your advices :)
I'd like to hear from you about the design and programming methodology you follow...
Until recently, when I started a new application project I first drew a sketch of the application, then I started coding by the "main", adding subs as needed.
Unfortunately this tend to give spaghetti code; I had too often various unrelated code blocks stuffed into the "main" routine, and I had quite a hard time splitting the program into files/ librairies/ components.
Then I tried to start the other way around; first, I draw the general application schema, but I start first by programming the first components I need. Then I write a "main" program which actually does pretty much nothing by itself, but uses the librairies or objects already done, so I can test them.
Here I am now. The second approach seems much cleaner and better to me; but it comes at a price of longer time spent and harder work, because I have to build very clean objects from the start, instead of throwing together some dirty code that just "does the trick".
I can imagine another way, of course: I may try my first method, but keep refactoring as needed the "ugly bits" while working, instead of having the code working first...
What do you think?
In reply to How do you program (again)? by wazoox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |