Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!emory!gatech!rutgers!rochester!pt.cs.cmu.edu!a.gp.cs.cmu.edu!koopman From: koopman@a.gp.cs.cmu.edu (Philip Koopman) Newsgroups: comp.lang.forth Subject: Re: Granularity of Forth Programs Summary: magic number is seven +/- 2 Message-ID: <11677@pt.cs.cmu.edu> Date: 26 Jan 91 16:29:56 GMT References: <9101241516.AA11654@ucbvax.Berkeley.EDU> Organization: Carnegie-Mellon University, CS/RI Lines: 20 In article <9101241516.AA11654@ucbvax.Berkeley.EDU>, vme131!lsiserv1!pl@UUNET.UU.NET (Pedro Sanchez) writes: > I was wondering of what would be the ideal granularity of Forth programs. According to Miller, the magic number for anything having to do with human thinking is 7 +/- 2. So (combining with some other theories), there should be seven "chunks" per Forth word. Roughly, each Forth word should also correspond to one chunk (except multiple words used for a single control structure can be grouped as a single chunk) to factor the code appropriately. And, importantly, control structures should seldom be nested, and never more than 2 deep. Alternately, a rule of thumb among many in the Forth community is ten words inside a colon definition. Phil Koopman koopman@greyhound.ece.cmu.edu Arpanet 2525A Wexford Run Rd. Wexford, PA 15090 *** this space for rent ***