comp.lang.ada
 help / color / mirror / Atom feed
* QuickSort notes & How many programming languages do I have to know?
@ 1996-08-26  0:00 Kenneth Mays
  0 siblings, 0 replies; only message in thread
From: Kenneth Mays @ 1996-08-26  0:00 UTC (permalink / raw)



Greetings:

I wanted to comment on the QuickSort routine. I hadn't worked on the 
assembly language algorithm in 16 years since I read it in some 
Commodore 64 magazine from a machine language guru named Jim 
Butterfield. Like someone stated, you first have to sort the data 
before you use the QuickSort routine. But, don't forget to optimize 
the indexed-sort routine! There were a lot of tricks to make a Super 
Quicksort, but I think Oracle has patented sorts now.  O:o) 

What we did back then, was to sort the data using pointer addresses 
instead of the actual arrays. This decreased the garbage collection 
and sped up the cons of moving arrays around. This is a little 
advanced, but it was needed because of the speed of the CPU back then 
(1979), 64K memory limitation, and slow MicroSoft BASIC (or later the 
Commodore-128 and we were happy people). Actually, BASIC was a great 
programming language allowing us to peek and poke to assembly 
routines. 
 
We've come a long way, but I still see companies using the 8051 chip for
assembly language programming of embedded controllers. Do you tell them
to use Ada95 with assembly language routines for optimal performance? 
Or for us Software engineers, tell them to use C/C++ for the 
optimized code and Ada95 for the bulk? The diffrence is that you can 
find a Assembler/C compiler for the Intel 8051, but an Ada95 compiler 
(like GNAT) is something else.

Sorting algorithms are similar. What works the best for what you are 
trying to do? Why teach students about bubblesorts when you have the 
new algorithms? Why teach programmers about pointers when Java tries 
to get rid of them. Why know about garbage collection when the latest 
state of the art programming languages does it for you ((Java) and 
washes your dishes too)?

Just remember sometimes its good to know the old things so we don't 
reinvent the wheel. We just need to know what is useful to the 
college grad and what is not. Most colleges teach theory, since 
technology changes by the time you get your next Sunday paper. Most 
CS grads may not know about Oracle DBA or SQL programming, or even 
know what "PowerBuilder" means, but blame the professors for not 
opening up these students eyes to the REAL world. Some graduate 
student in Australia just commented on how Ada was only used in 
defense related corporations. I beg to differ since aviation 
companies have moved to Ada, NASA for one, and Ada is what is used in 
traffic lights or most embedded controllers by the S.M.A.R.T. 
companies).

They are asking us what is the best language to learn while in 
college or as a beginner. I'd say BASIC!!! But, if you want to do it 
right then learn C++ programming and assembler. Anything else is your 
own choice to get your next job. I prefer Ada95 and C++ nowadays, but 
that's me. There are so many jobs out there for Smalltalk, Java, 
COBOL, Pascal/Delphi, Visual Basic, MUMPS, and Fortran...that you can 
find a job just knowing two languages fluently. Its just like 
QuickSort, prioritize your data to find the information you need and 
sort through it for the skills you have to acquire. Its as easy as 
SWAP (A,B).

Ken Mays, MIS
Ada95 Reseacher - Computer Science & Engineering

"A pig could fly, a donkey can dance, and a monkey can do the 
jig...if you believe you can write code better in C than in Ada -  
even though its so wickedly big?" comments while admiring the Diamond 
Monster 3D graphics board.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-08-26  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-26  0:00 QuickSort notes & How many programming languages do I have to know? Kenneth Mays

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox