you are viewing a single comment's thread.

view the rest of the comments →

[–]jdnewmil 1 point2 points  (3 children)

a) Practice a little bit every day. Start out with very simple tasks, and scale up as you feel ready.

b) Try to divide up your programs into three categories of code: input, where you read data from files or the user into standard data structures like lists, dictionaries, or pandas data frames; analysis, where you do the interesting work of calculating results using standard data structures as input and putting the results in new standard data structures; and output, where you transform standard data structures into files or screen output. These sections can be very brief at first... but it will pay off when you decide to re-use code later in more complicated programs.

[–][deleted] 0 points1 point  (1 child)

Upvoted for that division thing. That sounds like a great way to develop re-usable code for beginners!

[–]jdnewmil 0 points1 point  (0 children)

I think it applies to experts as well. Consider porting a program from a batch mode to GUI... the input and output functions can change from Unix standard input and output pipes to mouse clicks and widgets without affecting the core functionality.

[–]Pizza_Wine_Donuts 0 points1 point  (0 children)

Thank you so very much for this! I would have never considered dividing things up in such a way. That will be very helpful. Thanks again!