From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_50,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4ef702b936d1f2a,start X-Google-Attributes: gid103376,public From: KMays@msn.com (Kenneth Mays) Subject: QuickSort notes & How many programming languages do I have to know? Date: 1996/08/26 Message-ID: <00001a73+000032f1@msn.com>#1/1 X-Deja-AN: 176529499 organization: The Microsoft Network (msn.com) newsgroups: comp.lang.ada Date: 1996-08-26T00:00:00+00:00 List-Id: 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.