Re: FWIW: script vs. configurtion file
Steve Litt writes:
> On Wed, 23 Jul 2014 16:35:01 +0200
> saint@eng.it wrote:
>
> > Steve Litt writes:
> >
> > > Although I spent 14 years making my living as a software developer,
> > > there are times when I don't want the freedom to do absolutely
> > > anything. This is why I switched away from Perl: I needed some
> > > limitations.
> >
> > Despite limits may be a fun challenge, I prefer to give a good
> > configuration ready and let everyone free to do as she likes.
> >
> > That's the Debian way, and works quite well (even if not perfectly
> > well).
>
> So then, it sounds to me like you would want to write your program as
> an API, document the API, and let the user write one or more
> [Perl|Python|Ruby|Lua] programs to use the API to make the program
> work their way.
You have three ways to write a program: write simple programs that do
one thing and can be combined with other programs to do more complex
things (i.e. `ls /bin /usr/bin` #command substitution implied :) ),
write a program with a set of capabilities and write a program with
a set of capabilities PLUS an extension mechanism. An interpreted
language is, in my experience, the easiest way, since the user could
write the extension on the fly.
> So then, for the program, you would use a different
> design process. For instance, when I start to design a program, my first
> question is "what data will be involved?" But to design the program as
> an API, I would think the first question would be "What capabilities
> do I want the user to have?"
Usually a program has "use cases" that is "doing some actions on some
information". You need both of them.
> You know, the beauty of doing it your way would be that various people
> would write all sorts of [Perl|Python|Ruby|Lua] programs to make your
> API do different things, so it would be sort of like you wrote 50
> programs at one time. And of course, the knowledgeable user could
> modify one of those [Perl|Python|Ruby|Lua] programs to make your
> program perform in yet another unique way.
True.
A less knowledgeable user would use the program as is or import
"modules" other people create.
I am not an expert in image manipulation software but I use the modules
other people wrote for The Gimp.
Guess why Emacs is so large :)
--
/\ ___ Ubuntu: ancient
/___/\_|_|\_|__|___Gian Uberto Lauri_____ African word
//--\| | \| | Integralista GNUslamico meaning "I can
\/ coltivatore diretto di software not install
già sistemista a tempo (altrui) perso... Debian"
Warning: gnome-config-daemon considered more dangerous than GOTO
Reply to: