On Mon, Aug 17, 2009 at 12:44 PM, Marechiare wrote: >>>> The foreground code grabs the current period value >>>> maybe twice a second, inverts it to make speed, and >>>> displays the result. >>> >>> There should be middle level (I'd say Business Level) code to deal >>> with the persisted state. Its output should be meaningful values, like >>> speed, distance etc. >>> >>> And there should be UI (User Interface) level code to display the BL >>> level output. >> >> I agree that what I called "foreground code" would actually be several >> modules. =A0However, there is no point computing speed from period excep= t when >> it's needed, which is whenever you want to display a new speed value. > > I agree that there is no such point for the app at this stage of the > development. But later the calculated values will be needed for other > functionality. So to make the app consistent snd to avoid unneeded > recalculations it would make sense to provide complex calcs at some > reasonable period. > YAGNI. http://c2.com/xp/YouArentGonnaNeedIt.html Especially in embedded programming, you should endeavor to not add features until they are needed. Regards, Mark markrages@gmail -- = Mark Rages, Engineer Midwest Telecine LLC markrages@midwesttelecine.com -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist