Wordsmith.org
Posted By: dalehileman algorithm, routine - 11/07/06 01:26 PM
routine: a set sequence of steps, part of larger computer program--OneLook

On one of the other word-origin-usage boards I visit, don't remember which one, I was joshed mercilessly about using "algorithm" too often, and therefore I set about looking for a synonym and was surprised to find that there's apparently only one really good one, that is "routine"

I wonder if that's because the former as applied to PC's has only been around a couple of decades

Also I wonder if without making it a major research project you might be able to come up with other synonyms as good as or as close as "routine"--thanks all

Edited to indicate that "subroutine" has popped up as a possibility, and it too is a good one tho I hate to use both "routine" and "subroutine" in the same thread
Posted By: Aramis Re: algorithm, routine - 11/07/06 06:24 PM
Well with the rug yanked on 'subroutine', even leafing through a C book does not come up with much more than 'function' or 'process', neither quite on target to replace 'algorithm'.
Posted By: ParkinT Re: algorithm, routine - 11/07/06 06:39 PM
al-go-rithm
–noun a set of rules for solving a problem in a finite number of steps, as for finding the greatest common divisor.
===================================================
That is a 'process' or a 'method'.

al-go-rhythm
-noun a set of rules for solving a problem; set to music!
Posted By: TheFallibleFiend Re: algorithm, routine - 11/07/06 06:41 PM
An algorithm is a set of steps for solving a problem. I'm pretty sure the usage has been around for about 7 or 8 decades at least. I'm not sure that it's actually applied to PC's, per se, but to the programs that run on them. The advent of the PC almost certainly had the effect of widening the use of the term, as did the subsequent rise of the net.

Knuth's "The Art of Computer Programming", the first book of which is entitled "Fundamental Algorithms" was started in 1962 according to wiki, but it the concept was developed even long before that by church and Turing:
http://en.wikipedia.org/wiki/Algorithm

In practice, I seldom see the words routine and algorithm used interchangeably. Usually a routine refers to a piece of code, while an algorithm refers to "pseudocode", or to a verbal description of a process, or sometimes to just a set of equations or a mathematical formulation. (That's not *really* the correct use of the term algorithm either, but that's the way people use it.)

Other similar words are "procedure", "subroutine", "module" (often a collection of related routines), program, code (as "a code"), "method", "function", "subprogram" - again, though, none of these are exactly the same. In some sense you might be able to use the term lay term "process", except that word is already laden with meaning in CS.
Posted By: dalehileman Re: algorithm, routine - 11/07/06 06:51 PM
Guys thank you most kindly for all that. It is rapidly becoming clear that "routine" is the closest if not the only synonym. But keep 'em coming
Posted By: TheFallibleFiend Re: algorithm, routine - 11/08/06 01:50 PM
Procedure and routine are closer than algorithm and routine. (I consider them identical and use them interchangably.) If routine is a synonym of algorithm, I think procedure is just as good. Neither word is exactly the same as algorithm, though both are very close.
Posted By: ParkinT Re: algorithm, routine - 11/08/06 02:01 PM
In my experience (in a technical field for over 30 years) algorithm has been used more to describe a "special or unique way to solve a problem" whereas procedure or routine indicates the process. Many algorithms have been named on patents.

In other words, I have always considered ALGORITHM to be more coneptual and creative; ROUTINE is more .... well, routine
Posted By: TheFallibleFiend Re: algorithm, routine - 11/08/06 02:43 PM
I agree with the main point.
routine == procedure (routine is identical to procedure)
routine ~= algorithm (routine is approximately algorithm)

Routines (procedures) are implementions.
Algorithms are conceptual.
Routines implement algorithms.

I agree that algorithms are conceptual, but not that they're more creative.

"whereas procedure or routine indicates the process"
To me process has a definite meaning that is more than just routine. A process is a bit of code, with memory allocated to it, a name-space assigned to it, and in the list of processes the OS is currently executing (but possibly currently swapped out).

I think it's approximately the same as routine, but even more concrete

Algorithm is more conceptual than routine.
Routine is more conceptual than process.

I read algorithms in English (or pseudocode).
I read routines in the source Language (C, FORTRAN).
I can't actually "read" a process without doing a memory dump.

Using a functional programming paradigm (instead of OO paradigm) -
Start with a problem definition.
Break it into steps (create an algorithm).
Translate the algorithm to higher level code. (program composed of routines/ procedures)
Translate the higher level code to machine code (possibly through some middle step).
Tell the OS to execute the (machine) code
The OS allocates memory for the code, loads in program, setting registers as appropriate, adds it to current list of tasks and maybe a little more bookkeeping. At this point our algorithm is embodied in a process.

That's for compiled languages. Scripting languages are a little different, as are languages that use a virtual machines or some other kind of byte codes, like Java.
Posted By: dalehileman Re: algorithm, routine - 11/08/06 03:50 PM
Fal's analysis agrees with one I have turned up elsewhere that seems to indicatethat not only is there no exact synonym for the partial program I incorrectly used to call an algorithm but there's no word for it

"Procedure" doesn't work because it is a more general term which encompasses algorithms, routines, processes, etc with no apecial applicability to computers

So far, "routine" seems to be the only term that sticks:

routine: a set sequence of steps, part of larger computer program--OneLook
Posted By: zmjezhd Re: algorithm, routine - 11/08/06 04:41 PM
Routine is the only one that sticks in your mind. A routine (procedure, function, method, operation) is a part of a program. (NB: there are other different parts to programs, too: threads, objects, queues, etc.) There is no necessary one-to-one mapping between a routine and an algorithm. If you wish to talk about something a program does, you can speak specifically about its functionality. Like the spell-check function in a word processor or an email client.

You can also have many different algorithms that solve the same problem, e.g., sorting. In the end you want your numbers sorted, which algorithm you choose to implement in your program will have an impact on things like speed, efficiancy, etc.
Posted By: ParkinT Re: algorithm, routine - 11/10/06 01:41 PM
Fallible,
I do not disagree with your comments (thoughts) but feel compelled to point out that your point of reference is too limited.
Although I am a professional software developer (as it appears are you), my comments were to the more broad meaning of 'process', 'routine', et al.

An algorithm is a way of doing something. {an idea}
A routine is a repeatable process/procedure. Housework is very routine.
A process, in many circles, represents a well-defined and carefully documented list of repeatable steps to a very specific goal. For example, CMMI or ISO9001

There's my 2 cents. May I have some change back?
Posted By: TheFallibleFiend Re: algorithm, routine - 11/10/06 09:32 PM
"your point of reference is too limited."
You're right.

"An algorithm is a way of doing something. {an idea}"
I agree with the first part, but not the part in the brackets.

"A routine is a repeatable process/procedure. Housework is very routine."
Okay.

"A process, in many circles, represents a well-defined and carefully documented list of repeatable steps to a very specific goal."
You're absolutely right. I wasn't thinking correctly. "Process" can mean two very different things, even in the narrow realm of software engineering.

"There's my 2 cents. May I have some change back? "
Sorry, I might need it for bus fare later.
© Wordsmith.org