Re:An introduction to parallel programming using Python's mu...
by roadie on Sunday July 13, 2014 @12:51PM
(#8027875)
Will use this as ammo next time someone complains about my minimalist approach to commenting.
I think comments need to be targeted at a specific audience. If you know that only professionals are going to work on your code then I think only high-level comments are probably OK.
Re:An introduction to parallel programming using Python's mu...
by yohanatan on Sunday July 13, 2014 @02:47AM
(#8026833)
In the case where the reader doesn't understand `.join()`, they should look up the following page and read its documentation (which is about as clear as it can possibly be):
https://docs.python.org/2/library/multiprocessing.html#multi...
Also, I would suggest that the physicist in your example hire a software practitioner [who can be expected to know 'join'] to write his software correctly (rather than trying to half-ass it himself).
It isn't if you have been programming using threads before ,"join" is obvious then
But if you haven't and maybe you are a physicist trying to get something done in python, "p.join()" could mean anything -- "Join to what?", "Why is there no argument to join()?" "We are joining the data togther there like a list..." "It looks like we should be stopping the processes but the method is not called 'stop()' so that's not it"...
That is the problem of teaching this stuff by someone who has been programming for a while, this kind of stuff gets internalized and becomes obvious but it is not obvious to a beginner.