Hacking Heaven - Leo+XEmacs Integrated

Hemanth P.S. hemanth_sethuram at yahoo.com
Wed Jan 29 01:07:55 EST 2003


I had the unenviable task of reverse engineering an MPEG2 decoder with
absolutely no comments whatsoever and a complicated mishmash of
if-else-if code structure, some if blocks nested upto 7 levels. I used
Leo's import feature and it cleanly created nodes at the file,
functions and structure definition level.
I then traversed the nodes and chunked blocks of code under sub-nodes
with meaningful names. I iterated over each sub-node many times and
repeated the steps until I had blocks of code of readable size. I
inserted comments into this code as I understood better and better of
the code.

The design of the code has not been changed yet and if I look at the
source code it is the same mess. But now if I view through Leo, I am
able to traverse the code at any desired abstraction level and
understand it.

Leo has definitely made me more productive than any other tool I have
used in my task. I was looking at this tool from the last 2 years but
could not understand how to use it in a real project. After reading
the Leo tutorial, I got a vague idea of how to use it and then started
using it 4 months back on the above project. I still don't know how to
make Leo use a different font for displaying code. I have to play
around with its configuration. I definitely would prefer if I can work
with vim key bindings in leo.

I suggest give it a try; you may like it.

--Hemanth

Jack Diederich <jack at performancedrivers.com> wrote in message news:<mailman.1043790291.22980.python-list at python.org>...
> On Tue, Jan 28, 2003 at 09:18:25PM +1300, Aum wrote:
> > Some months ago, the 'metastructural' editor 'Leo' (http://leo.sf.net) got 
> > covered on Slashdot. Seeing the power it offered to boost my productivity 
> > with code editing, I immediately downloaded it.
> > 
> 
> I looked at the leo site, and a bunch of Literate Programming sites
> and the intros all sucked.  hard.  Couldn't be more vague.
> Do you have a favorite one-pager intro?  I like the concept but it is very 
> ill-defined.  Even a couple paragraphs about how you use/how it changed your 
> cycle it would be nice.
> 
> Obviously it would be the view of a convert, but I'd like to hear about
> how it works in practice.  Unless a project has everyone using the same
> tool, is it hard to publish or hard to incorporate patches from people
> that aren't using it?
> 
> I'll-try-anything-that-makes-me-more-productive-ly,
> 
> -jackdied




More information about the Python-list mailing list