[Tutor] software carpentry
rio
vagemulo at yahoo.es
Sat Feb 25 20:42:43 CET 2006
I set out to learn programming with a single practical task in mind, a
cross-platform literal translation tool. I've included more detail below
for those who are curious. Not terribly fond of programming, I initially
hoped for an easy out, that I could find some existing code to modify to
my needs without really becoming a "real" programmer. So I set about
learning Java, but in my search for source code, I came across the Natural
Language Toolkit:
nltk.sourceforge.net/lite/doc/en/
which led me to the tutorials often cited on this list:
www.diveintopython.org
www.byteofpython.info/read
www.freenetpages.co.uk/hp/alan.gauld
which thoroughly convinced me that Python was the way to go. But I
couldn't find tools in the NLTKit or elsewhere specific to the task. I
installed IDLE and began coding in order to learn more. I got more
confidence and realised I could probably write it from scratch and slowly
began to see satisfying results. I think I was quite lucky to find Python,
it is great! After several trips back to the drawing board, I'm not
completely cured of the sensation of reinventing the wheel, and I have
trouble reading my own code. I realized I needed to know more about
program design....
The style guide was useful:
www.python.org/doc/essays/styleguide.html
But the Software Carpentry Workshop was a revelation. It gives a great
deal of advice based on empirical studies on effective programming
practices. I´m partway through - it's a multiweek course. University
lecturer Greg Wilson offers thorough notes to accompany the .mp3 lectures,
all of which is downloadable:
www.third-bit.com/swc/
Throughout this process, I've been coming to terms with the fact that in
order to really get the most out of my code, and to save myself time in
the long run, I should learn to become a good programmer, and master the
language (which compared to natural languages is easy!) Wilson
convincingly argues that certain things which require more time up front
save a great deal of time down the road. He stresses using a version
control system, a debugger, test-driven development, and reading lots of
code.
1) Is subversion really a good tool for the beginning programmmer, or a
single programmer? If not which version control system would you
recommend? what about tortoiseSVN? Up til now i've just been saving
multiple filenames of my code.
2) Which debugger should I use if I do most of my work in XP with IDLE? Up
til now I've just been using print statements. who knew?
3) Before setting out to write in Spanish, for example, I´d of course read
many dozens of books, while I'm setting out to write Python without having
read anything more than a few tutorial examples. How and where do I look
for (well-written) code? Is it a good idea to look in the standard
libraries for ideas, or code to modify? How are large applications usually
organized, and how do you find a specific part of it? How can you find
code specific to certain tasks?
Thanks so much,
brian russell (barcelona)
**************************************************************
The cross-platform open source natural language application i hope to
create would be a literal translation tool for txt and html, to help
automate the creation of language instruction materials. For example, the
tool could take english text and convert it into phonetic english, or
butchered spanish:
"President Z. <b>lies</b> like a rug."
"Prezidint Z. <b>liez>/b> liek u rug." (in truespel)
"Presidente Z. miente como a alfombra." (in spanglish)
Untranslatables (not found in the dictionary) like Z would be left
untranslated, and - here's the real use of the tool - markup code can be
added to the dictionaries.
much of the application would automate the creation of missing dictionary
entries ....
___________________________________________________________
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars online! http://uk.cars.yahoo.com/
More information about the Tutor
mailing list