2 points · by TruthElixirX · 14y ago · 4 comments
The professor doesn't provide any material to prepare for the tests and the too easy to prepare for the test.
I'm looking for some sort of resource to practice reading hard to understand code, particularly java. Does HN have any suggestions?
Books/websites/videos/etc are all welcome.
EDIT:: The examples below are a little too hard. I'm looking for something that is entry level stuff.
I would look for random code people wrote, for example on github:
https://github.com/search?utf8=%E2%9C%93&q=sort&repo...
And then just look at the code and try to understand how it works. This result for example seems to implement basic functions and is well commented:
https://github.com/erlide/erlide/blob/6b836bcb0770d23c4471f4...
Hope this helps
perlmonks: http://www.perlmonks.org/?node=Obfuscated%20Code
You could play with eyedrops: http://search.cpan.org/dist/Acme-EyeDrops/lib/Acme/EyeDrops....
I'm not responsible for damage to your mind.
Think about what could cause loops to behave in unexpected ways. Consider off-by-one loop errors like >= where > was needed and vice versa, or a loop condition being assignment (x=y where y is nonzero, so it resolves to true) instead of testing for equality (x == y). Write code for long enough and you will make these errors yourself and debug them so you will become very good at recognizing them. Also be aware of the break, continue, return, and finally keywords.