OneExtraPixel wrote up "10 Principles for Keeping Your Programming Code Clean," a page that looks like it's kinda aimed at web designers, but has general applications. One of the tips is to avoid indiscriminate mixing of coding languages.
The ten tips are:
- Revise Your Logic Before Coding
- Clearly Expose the Structure of the Page (this is why I think it's aimed at web designers, although I think the advice is smart)
- Use the Correct Indentation, impossible to avoid if you're stuck with Python
- Write Explanatory Comments
- Avoid Abusing Comments, unless I guess you're explaining the abuse of comments
- Avoid Extremely Large Functions, advice that's probably good in most areas of life, because you don't want to write these giant blocks of anything that only confuse people if they even bother to read them, and they probably won't because they're extremely large and people don't really care that much, they'd rather just rewrite them or ignore whatever you've done and keep going, looking for stuff elsewhere
- Use Naming Standards for Functions and Variables
- Treat Changes with Caution, which the TDD crowd would think was a matter of course
- Summarize Your Imports
It's mostly advice aimed at the web, but I think a lot of the stuff in it is applicable to Java programmers and programmers of all types, too.