Re:One Sure-Fire Way to Improve Your Coding
by sant0sk1 on Thursday May 27, 2010 @12:33PM
(#1384154)
Good point. In the article I also point out that you should not be reading code passively. You should be running the tests, executing the code, breaking stuff, and trying to fix it.
I noticed that. Perhaps my point is more of a semantic one. It still seems to me that the article seems to focus more on the reading than the modifying though.
This is also a great exercise to improve your writing of prose, if anybody is interested. Take a well-written couple of paragraphs (Hemingway, etc.), and try to write it better. It's a short exercise that teaches you the importance of the subtleties of style.
Re:One Sure-Fire Way to Improve Your Coding
by lanstein on Thursday May 27, 2010 @02:18PM
(#1384492)
That reminds me of a line of code I wrote the other day:
$result->RetrieveResult->DynamicEntity = clone $result->RetrieveResult->DynamicEntity;
it's to get around a PHP bug where the SoapClient returns a half-baked object. At least I preceded it with a comment.
This teaches a few things:
1. How to read code
2. How to write code
3. How not to write code. When you encounter the grinding halt effect I mentioned above, there's a good chance that's how not to write code (but maybe not, some code is naturally tricky).