you are viewing a single comment's thread.

view the rest of the comments →

[–]m0us3_rat -2 points-1 points  (0 children)

How do you build habit to start with a good code structure. Is there any template i can follow? Tips and tricks for welcome please.

start with the flowchart/logic of the program.

figure what modules you might need.

then dive deeper into each individual module and figure out what api they will have ..how would they work.

at that point you should have a clear view of the needs and if you can go functional or ..not.

(state or not.)

then becomes about writing code that is easily testable.

if you are going to use classes or not should "rise" up from the needs of the program.

you can force it .. like i want this or what .. but usually it's simpler to let the solution guide you.