[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] How you can help

From: Avdi Grimm
Subject: Re: [Orgmode] How you can help
Date: Thu, 23 Oct 2008 15:10:42 -0400

On Thu, Oct 23, 2008 at 1:33 PM, Sebastian Rose <address@hidden> wrote:
> Hm - how about:
> 1. A not yet existent elisp file test-worg.el, that defines a function
> hello-worg, and a variable lang, and simply puts "Hello Worg"into the
> minibuffer (if (string= lang "en")) and "Hallo Worg" (if (string= lang
> "de")) ?

I'd prefer something that would be of concrete value to someone in
using org-mode - made-up scenarios tend to lead to unrealistic tests.

> Did you work with unit-testing frameworks for elisp already?
> Which one?

I have not.  I've done test-driven development in Java, C#, Ruby, and
C++(!) though, and if I can do it in C++ I think I can get up to speed
in any language pretty quickly ;-)

> Recommendations?

As I said in another comment, I'm liking the look of Emacs Lisp
Expectations a *lot*.  Partly because I think Jay Fields is bang on
the money for how maintain good habits in your tests, and partly
because it has a mocking framework to go with it.  Testing without a
mocking framework is less fun than testing with.  However, I haven't
actually used it yet, so I can't responsibly recommend it.  Let's just
say that the discovery of it recently was the thing that got me
excited about doing some serious ELisp development.

> Could say something about the effort to get started with such a
> framework?

I think if you have some *running* examples to crib from it shouldn't
take someone who is already ELisp-savvy more than a few hours to get
the hang of it.

> Can we add it without changing Org's code? If understand 2. correctly - yes?

In a dynamic language like ELisp, any testing framework that requires
you to change the code just to get it under test isn't worth using.
No, you should not have to change org-mode's code to get started with

That said, developing in concert with a test suite will definitely
tend to influence how you write the code.  Generally speaking,
developing with tests encourages smaller functions which do one thing
and one thing alone and don't have a lot of non-obvious inputs and
outputs.  Since this is usually the direction you *want* your code to
go in anyway, it's a virtuous cycle.


Home: http://avdi.org
Developer Blog: http://avdi.org/devblog/
Twitter: http://twitter.com/avdi
Journal: http://avdi.livejournal.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]