Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Help wanted

marick edited this page · 6 revisions
Clone this wiki locally

I welcome your help.

  • Midje itself is, in core places, fairly tricksy code because it works via extensively rewriting the facts you give it. Adding new features may be a big leap.

    • Some of the minor features in the Issues list might be a good place to start. That's especially true if they depend on Clojure's use of the JVM (protocols, for example), since I'm JVM-ignorant.

    • A tabular format would probably be a relatively easy way to dive into the code. I'm thinking of this format:

       (fact-table "temperature conversions"
         (de-anachronize fahrenheit) => (roughly celsius 1.0)
         [fahrenheit celsius]  
            32         0   
            70        21
            85        29     "Min. temperature for iguanas to digest properly"
            90        32
           100        38
           212       100 )

      The challenge would be getting the line numbers close to right (using existing mechanism), and it would have to obey per-fact and per-check "background" (setup/teardown).

    • The code that handles (contains ... :in-any-order) has a tricky constraint. Consider this fact:

      ["123" "12" "1"] => (contains [#"1" #"2" #"3"] :in-any-order)

      In a naive implementation, "123" would match #"1", "12" would match #"2", and then "1" would mismatch #"3". However, there's another order of matching that works (the reverse order). My slightly-less-naive implementation handles that. However, it's brute force and awfully inefficient. If you're an algorithms person, I bet you could do better.

    • Midje was originally written to be compatible with Clojure 1.1, so it uses maps heavily instead of new-fangled Clojure 1.2 data structures. Maybe parts of it could benefit from them.

  • One of my long-term goals for Midje is that most syntax errors by users will be met by something more useful than "Argh! Fail! Here's 3000 lines of stack trace." Error message improvements could be added piecemeal, and be a way to learn the code.

  • My days as an Emacs elisp hacker are far behind me. I'm not familiar with current conventions and helper libraries. I bet Midje-mode could be greatly improved, both in how it does what it does now, and by adding new features. My style is to work on tests in the source file, not in a separate test file, so it could probably be greatly improved for those with a different style. It does coexist with clojure-test mode, but awkwardly. (I used the same key bindings for similar functions, but clojure-test mode sometimes keeps hold of them when I'd expect it not to.) There are clojure-test mode features that could be ported over.

  • I'd love to see Midje support added to other IDEs/editors.

  • Both 'lein midje' and 'cake midje' are fairly limited. There are probably abilities that lein test and cake test have that could be ported over.

    • There's a double-loading problem in cake - see the Issues section of the Cake-midje page.
Something went wrong with that request. Please try again.