Usually I do it a bit differently. I make the directory structure first, and put everything in the file in the organized-ish way that it should eventually be. I load the file multiple times, first with USE: vocab-name and then later with reload-all, and test words interactively at the REPL as I write them. Since the editor and REPL both only require 80 columns, I have them side by side on the same screen, so I can look at both at once. I find this development method easier than others because I don't have to worry about organization later. Anyway, in Factor, there's not much overhead for proper organization. Word names are rarely shadowed so they are always accessible for testing.
Daniel Ehrenberg On 10/24/07, Phil Dawes <[EMAIL PROTECTED]> wrote: > Hi Factor list, > > I was just wondering how other people develop code in factor to see if > I'm missing any tricks. Here's how I do it: > > I got used to using a repl when programming with scheme and so I do a > similar thing in factor. I have a factor source file open in emacs and > paste code into the listener (with C-r). I also have the habit of doing > test-first, so I tend to write the test and then write the function > above it. I then repeatedly paste both function and test to the listener > until the test passes. > > At this stage the file is never loaded by factor, so it tends to be > littered with comments and scrap code. Once I've got some functionality > resembling a module I then create the directory structure, tidy up the > code and separate out the tests. Then finally I might get round to > writing some documentation. > > Is this a common pattern of development, or do you guys do something > different? > > Cheers, > > Phil > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Factor-talk mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/factor-talk > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
