[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: General Layers questions
On Feb 15, 2011, at 9:40 AM, Stephan Boettcher wrote:
> DJ Delorie <dj@xxxxxxxxxxx> writes:
>
>> The two words mean two different things in the English language.
>
> sorry, I wasn't clear on these distinctions.
DJ has a very narrow and negative viewpoint on factoring.
>
>
>> Refactoring means changing nonfunctional attributes of the software
>> (i.e. rearranging code to be more maintainable).
Way, way too narrow. Refactoring can dramatically increase the power at the users' fingertips. Consider a favorite Brian Kernighan example. Take the Multics command:
how_many_users
In Unix, refactor it into:
who | wc -l
Now, you've given the user much more power with fewer commands. For example,
ls | wc -l
counts files, something I recall there was no command for in Multics.
The large suite of inflexible, specialized commands in Multics collapsed into a much smaller set of commands that were specialized in one sense (what abstraction was served) but generalized in another (what end was served) in Unix. This put a lot more power in users' hands: many things that would have required a page of tricky PL/I code in Multics became simple shell one-liners in Unix. It was much easier to master and remember the smaller, but more powerful, set of Unix commands.
>> If we're talking
>> about changing functionality (as we were in this case), we need to use
>> a different word.
Functionality emerges naturally from good factoring. Without good factoring, functionality requires a large number of complex "features" that are difficult to remember and often don't play well with each other.
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user