Thomas, <div><br></div><div>Thanks for the excellent suggestions.</div><div><br></div><div>Generator is certainly an interesting subject.</div><div><br></div><div>From what i understand, the advantage of generator is mainly about saving memory, right? (i.e. no need to create a list in memory before iterate thru it)</div>

<div><br></div><div>Duck typing... Although it can be easily demonstrated, I find it hard to explain its advantages to Java developers who are so used to Interfaces. (Is it about the certainty of type info... I am not sure about their concern actually)</div>

<div><br></div><div>Jython is not a possibility, but I will show them an example anyway. We can use it to write some support script, I suppose.</div><div><br></div><div>(Off topic) Monkey patching - It is a term used by Ruby developer a lot. If it means to change a function's implementation in run-time, i think python can achieve the same, right? Is it equivalent to Mixin?</div>

<div><br></div><div>Cheers</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Jul 12, 2011 at 2:00 AM, Thomas Jollans <span dir="ltr"><<a href="mailto:t@jollybox.de">t@jollybox.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 07/11/2011 05:07 PM, Anthony Kong wrote:<br>
> Hi, all,<br>
><br>
> Lately I am giving some presentations to my colleagues about the python<br>
> language. A new internal project is coming up which will require the use<br>
> of python.<br>
><br>
> One of the goals of the presentations, as told by the 'sponsor' of the<br>
> presentation, is to help the existing Java/Excel VBA programming team to<br>
> become productive in python asap.<br>
><br>
> I have a feeling that they are asking it based on their Java/Eclipse<br>
> experience. By productive they are actually looking for some GUI tools<br>
> that are as helpful as Eclipse.<br>
><br>
> Having done Java programming before, I am thinking of answering the<br>
> question this way:<br>
><br>
> 1) For many of us, vi/emacs are sufficient for python development. (I<br>
> used vim + ctags as my primary IDE for a very long time)<br>
><br>
> 2) For a feature-rich GUI environment, we can consider pyCharm. (I was<br>
> totally 'wowed' by it, and has convinced my last employer to purchased a<br>
> few enterprise licenses)<br>
><br>
> 3) The Python language itself is actually small and concise. The need<br>
> for a full-blown IDE is less. The language itself could be counted as a<br>
> part of the productive tool.<br>
<br>
</div>If your colleagues are used to Eclipse, it's almost certainly best to<br>
continue using Eclipse, with PyDev. Don't make a big deal of the tools,<br>
just say that many Pythonista don't use a heavy IDE, mention PyDev, and,<br>
if you want to, recommend pyCharm.<br>
<div class="im"><br>
> 4) The functional aspect of the language (e.g. map, reduce, partial)<br>
> helps to make program shorter and easier to understand<br>
<br>
</div>Don't overemphasize this. Those functions can be very useful, and using<br>
them can lead to very concise and simple code, but (big BUT) more often<br>
than not, they're overly cryptic when compared to list comprehension and<br>
generator expressions.<br>
<br>
Do make a huge case for generator expressions/list comprehension, and<br>
generators.<br>
<div class="im"><br>
> 5) The 'battery included' standard library helps to avoid the need of<br>
> complicated build tool.<br>
><br>
> 6) The interactive shell helps to test out solutions in smaller units.<br>
<br>
</div>Speaking of testing: introduce them to the doctest module.<br>
<div class="im"><br>
> It is probably not the team is expecting. Do you have more to add? What<br>
> do you think about this 'answer'?<br>
<br>
</div>If using Jython is an option, present it! Jython will allow Java<br>
programmers to use their existing knowledge of the Java standard library.<br>
<br>
Explain, and make the case for, duck typing.<br>
<br>
While actual functional programming is, as I said, a bit "out there"<br>
from a Java/VBA standpoint, do show off function objects.<br>
<br>
If you know what they're going to do with Python, you should point them<br>
to relevant libraries/modules.<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br><div><br></div><div>Tony Kong</div><div><b>blog:</b> <a href="http://www.ahwkong.com" target="_blank">www.ahwkong.com</a></div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

Don’t EVER make the mistake that you can design something better than what you get from ruthless massively parallel trial-and-error with a feedback cycle. That’s giving your intelligence <i>much</i> too much credit.</blockquote>

<br>- Linus Torvalds<br><br><br>
</div>