V2057A%TEMPLEVM.BITNET@cornellc.cit.cornell.edu (Juan Jose Noyles) (06/11/90)
That's a nice rendition of a popular saying, but that's not it, buddy. Efficiency is a subjective thing. What may be efficient on one level can also be seen as a total waste of time on another. It's built around conflicting views of what's right, another subjective term. Ever hear the story of the blind men describing an elephant? Effectiveness, however, is straightforward. If you've taken linear algebra, you're familiar with the concept of a kernel, right? That's the thing upon which you base an algebra (or a concept if you keep your analogies straight,) because its the smallest set you can use to describe the algebra (concept). That is what effectiveness is based on. That's also what efficiency is based upon before it is abused. The correct expression of a digital solution to a problem is the kernel solution, and the pursuit of that seems to be what you are railing against. In a kernel solution, there is no waste of time or storage. The only data present in the bounds of the program are those that are necessary. I include code in my specification of data, as well as the proper architecture for the implementation of the program, because all computers are not created equal. Obviously, this means that there will be different kernels for different arch- itectures. Bottom line is this: Writing good programs is something you must care about, otherwise you'll go through your career making excuses and trying to justify code that stinks. No matter what kind of machine it is, do it right or you're just a junior grade hack. Even if you get a Ph.D in some area, you'll still be just an old junior grade hack. They're the only ones that claim that it's okay to waste code because the machine's more powerful, or bitch because it's not. If you don't like the architecture, don't use it. You don't *have* to work on any machine you don't want to, if you're good enough. ABSOLUTE Bottom Line: all programming languages become machine code.
bp@beach.cis.ufl.edu (Brian Pane) (06/11/90)
In article <21640@nigel.udel.EDU> V2057A%TEMPLEVM.BITNET@cornellc.cit.cornell.edu (Juan Jose Noyles) writes: >That's a nice rendition of a popular saying, but that's not it, buddy. > >Efficiency is a subjective thing. What may be efficient on one level can also >be seen as a total waste of time on another. It's built around conflicting >views of what's right, another subjective term. Ever hear the story of the >blind men describing an elephant? > >Effectiveness, however, is straightforward. If you've taken linear algebra, >you're familiar with the concept of a kernel, right? That's the thing upon >which you base an algebra (or a concept if you keep your analogies straight,) >because its the smallest set you can use to describe the algebra (concept). >That is what effectiveness is based on. That's also what efficiency is based >upon before it is abused. The correct expression of a digital solution to a >problem is the kernel solution, and the pursuit of that seems to be what you >are railing against. I think we are all in agreement that programs should be written well. That is, they should use as little time and space as possible and should be easy to read and maintain. These conditions are not mutually exclusive. I "rail against" the purist approach to writing effective software because I view programming from the perspective of an engineer, rather than a mathematician. An optimal solution to a programming problem is of little use if it is completed two weeks (or months, or years) after the deadline. It may also be of limited use if it is too architecture-dependent to port to other machines. Just as fast hardware and the need to produce programs quickly do not justify stupid code, the pursuit of perfection in programming does not justify slow development. Fortunately, as has been mentioned frequently in postings on this thread, writing good (though not optimal) code is often easy if one makes a habit of conserving time and space. Extremism in defense of efficiency or maintainability or ease of implementation appears to be the major concern here. >In a kernel solution, there is no waste of time or storage. The only data >present in the bounds of the program are those that are necessary. I include >code in my specification of data, as well as the proper architecture for the >implementation of the program, because all computers are not created equal. >Obviously, this means that there will be different kernels for different arch- >itectures. Certainly, but unfortunately software is often only a minor criterion in selecting an architecture. The hardware used in a project might be chosen for its low cost, for the ease of connecting the CPU to memory and I/O devices without a lot of glue logic, or for its reputation of reliability. The optimal hardware for the EE's to build or administrators to buy may not provide the optimal kernel on which to build your application. This problem is circumvented, albeit with a loss of performance, by the many layers above the hardware which simulate the environment in which you want your program to run. Operating systems and compilers slow down fast computers and fast software, but programming for a virtual machine is much easier than programming for a kernel based only upon the underlying architecture. Smalltalk may be very wasteful of computer resources, for example, but Smalltalk programmers can develop impressive graphical applications rather quickly. > [...] >ABSOLUTE Bottom Line: all programming languages become machine code. Note that machine code is slow. Reading instructions from memory and parsing them takes a lot of time. Our programs would run much faster if we transformed them into state machines and implemented them with custom hardware. Nobody does this (Well, some people do, but then it's called electrical engineering rather than programming.) because it's a waste of time and money. This is a nice example of my final point: Code should be written well, but the pursuit of efficiency (or effectiveness) in software should not progress to such extremes that it compromises efficiency in the production of software. -Brian F. Pane
umbaugh@evax.arl.utexas.edu (David Umbaugh) (06/11/90)
On 11 Jun 90 04:07:11 GMT, V2057A%TEMPLEVM.BITNET@cornellc.cit.cornell.edu (Juan Jose Noyles) said:Juan> Sender: mmdf@udel.EDU [Lots of blabber about effectiveness, efficiency and kernel omitted.] Juan> just an old junior grade hack. They're the only ones that claim that it's okay Juan> to waste code because the machine's more powerful, or bitch because it's not. I think it was that old junior grade hack, Harlan Mills, who said, "allways use the highest level language that will do the job, even if its JCL." [Quoted from memory, certainly inaccuratly.] Then there was that "Programming Pearls" column in CACM in which Jon Bentley suggested that one might sort a file using a one line shell command rather than to write a sort routine optomized for the specifics of the problem at hand. What a horrible waste of machine cycles. Execution efficiency is only one concern in program design. Often, it is one of the less important considerations. -- L. David (Dave) Umbaugh <umbaugh@evax.arl.utexas.edu> Computer Science Engineering University of Texas at Arlington <B652LDU@UTARLG> BITNET PO Box 19015 Arlington, TX 76012