Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Learning Computer Science via Assembly Language

Posted by CowboyNeal on Thu Feb 05, 2004 06:46 PM
from the unconventional-approaches dept.
johnnyb writes " A new book was just released which is based on a new concept - teaching computer science through assembly language (Linux x86 assembly language, to be exact). This book teaches how the machine itself operates, rather than just the language. I've found that the key difference between mediocre and excellent programmers is whether or not they know assembly language. Those that do tend to understand computers themselves at a much deeper level. Although unheard of today, this concept isn't really all that new -- there used to not be much choice in years past. Apple computers came with only BASIC and assembly language, and there were books available on assembly language for kids. This is why the old-timers are often viewed as 'wizards': they had to know assembly language programming. Perhaps this current obsession with learning using 'easy' languages is the wrong way to do things. High-level languages are great, but learning them will never teach you about computers. Perhaps it's time that computer science curriculums start teaching assembly language first."
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) | 2 | 3 | 4
  • Linux x86 assembly? (Score:3, Insightful)

    by agm (467017) * on Thursday February 05 2004, @06:46PM (#8195896)
    (http://www.silvermoon.co.nz/)
    Is "Linux x86 assembly" any different to any other kind of "x86 assembly"?
    • Re:Linux x86 assembly? (Score:5, Informative)

      by shaitand (626655) on Thursday February 05 2004, @06:48PM (#8195919)
      (http://www.ganjablogger.com/ | Last Journal: Thursday January 05 2006, @05:36PM)
      It is in the same fashion that win32 asm is different from linux asm. The core is the same but knowing the core of x86 assembler is going to get you far if what you are wanting to do is talk to the kernel.
      [ Parent ]
      • Not the point! (Score:5, Insightful)

        by www.sorehands.com (142825) on Thursday February 05 2004, @07:17PM (#8196316)
        (http://www.barbieslapp.com/)
        The point is the understanding of the workings of the machine. When I was in school, we had to take a computer architecture class which included using AND gates to make counters and such.


        My first IBM PC job was C, but I had to learn 8086 so that I could debug since there was no source level debugging when using overlays.

        Anyways, how do you find a compiler bug, if you can't read the code the compiler generates?

        [ Parent ]
        • Re:Not the point! (Score:4, Funny)

          by EugeneK (50783) on Thursday February 05 2004, @07:49PM (#8196612)
          (http://edg.sourceforge.net/ | Last Journal: Sunday September 02, @12:12PM)
          Luxury! In my day we had to make our own AND gates out of OR and XOR gates!
          [ Parent ]
          • Re:Not the point! (Score:5, Informative)

            by tomstdenis (446163) <tomstdenisNO@SPAMgmail.com> on Thursday February 05 2004, @07:58PM (#8196740)
            (http://libtom.org/)
            Correct me if I'm wrong but isn't the most primitive CMOS gate a NAND gate? So I highly doubt you would make AND out of and XOR gate [XOR being the more costly of the three].

            Tom
            [ Parent ]
            • Re:uhm by Anonymous Coward (Score:1) Thursday February 05 2004, @08:05PM
            • Re:Not the point! by EugeneK (Score:3) Thursday February 05 2004, @08:20PM
            • Re:Not the point! by SkunkPussy (Score:1) Thursday February 05 2004, @09:25PM
            • Re:Not the point! by SkoZombie (Score:1) Thursday February 05 2004, @09:53PM
            • Just to clarify (Score:5, Informative)

              by Raul654 (453029) on Thursday February 05 2004, @10:41PM (#8197903)
              (http://en.wikipedia.org/wiki/User:Raul654)
              The correct answers are down there, but just to collect them and clarify - you can build anything using nothing but NANDS. Alternatively, you can build anything using nothing but XORS. You can prove this easily using demorgan's theorem.

              However, in the real world, NANDS are cheap (2-3 transistors), so that's what everyone uses.
              [ Parent ]
              • And for the record by Raul654 (Score:2) Thursday February 05 2004, @10:45PM

              • However, in the real world, NANDS are cheap (2-3 transistors), so that's what everyone uses.

                Well, NANDs are easy to make with MOSFETs or vacuum tubes.

                But I suggest that, in order to simplify the learning of digital logic and avoid this whole nastiness of DeMorgan, we should adopt relays as our primary logic device.

                Think about it: two relays with their contacts in parallel = OR. Two relays with their contacts in series = AND. A relay with normally-closed contacts = NOT.

                In this way, all design work can be done with natural logic (AND, OR, NOT) rather than "efficient" NAND, NOR, etc.

                On top of that, your computer would make satisfying clicking sounds reminiscent of a pinball machine's scorekeeping system or an old elevator contoller, while you're crunching SETI@Home units.

                I'm building a 4-bit binary full adder with nothing but relays in order to demonstrate their sheer computing power, and was hoping that someone could write me drivers to allow it to have practical uses.

                [ Parent ]
              • Re:Just to clarify by loose electron (Score:1) Friday February 06 2004, @01:11AM
              • in reality... (Score:5, Informative)

                by slew (2918) on Friday February 06 2004, @02:51AM (#8199100)
                For what it's worth, they don't use just NANDs in cmos chip design in the real world. The primary primitive is the AND-OR-INVERT (AOI) structure.

                In the cmos world, pass-gates are much cheaper than amplifying gates (in the size vs speed vs power tradeoff), although you can't put too many pass gates in a row (signal degradation). So in fact MUX (multiplexor to pass one of the two inputs using the control of a third) and XORS (use input A to pass either !B or B) are used quite a bit.

                Some background might be helpful to think about the more complicated AOI struture, though...

                In a cmos NAND-gate, the pull-up side is two p-type pass gates in parallel from the output to Vdd (the positive rail) so that if either of the two p-type gates is low, the output is pulled high. For the pull-down side, two n-type pass gates are in series to ground so both n-type gates have to be low before the output is pulled to ground. This gives us a total of 4 transistors for a cmos-nand where the longest pass gate depth is 2 (the pull-down). The pull-down is restricted to be the complement function of the pull-down in CMOS (otherwize either the pull-up and pull-down will fight or nobody will pull causing the output to float and/or oscillate).

                A 2-input NOR gate has the p-type in series and the n-type in parallel (for the same # of transistors).

                Due to a quirk of semi-conductor technology, n-type transistors are easier to make more powerfull than p-type so usually a NAND is often slightly faster than a NOR (the two series n-types in a NAND gate are better at pulling down than the two series p-types are at pulling up in a NOR gate). However, this isn't the end of the story...

                Notice that you can build a 3-input NAND by just adding more p-type transistors in parallel to the pull-up and more n-type in series to the pull-down. You can make even more complicated logic by putting the pull-up and pull-down transistor in combinations of series and parallel configurations. The most interesting cmos configurations are called AOI (and-or-invert) since they are the ones you can make with simple parallel chains of pass transistors in series for pull-up and pull-down.

                For most cmos semi-conductor technologies, you are limited to about 4 pass gates in series or parallel before the noise margin starts to kill you and you need to stop using pass gates and just start a new amplifying "gate". Thus most chips are designed to use 4 input AOI gates where possible and smaller gates to finish out the logic implementation.

                Thus "everyone" really uses lots of different types of gates (including simple NAND and XORS as well as more complicated AOI).
                [ Parent ]
              • Re:Just to clarify by chthon (Score:2) Friday February 06 2004, @06:58AM
              • Re:Just to clarify by lordholm (Score:1) Friday February 06 2004, @07:13AM
              • Re:Just to clarify by JOKane (Score:1) Friday February 06 2004, @12:12PM
              • Re:4-bit Full Adder Using Relays or Vacuum Tubes by Genda (Score:1) Friday February 06 2004, @03:30AM
              • Actually, you are more right than you know by Raul654 (Score:2) Friday February 06 2004, @07:06AM
              • Re:Just to clarify by Raul654 (Score:2) Friday February 06 2004, @08:36AM
              • Re:4-bit Full Adder Using Relays or Vacuum Tubes by Bitmanhome (Score:1) Friday February 06 2004, @09:51AM
              • Re:4-bit Full Adder Using Relays or Vacuum Tubes by nameer (Score:2) Friday February 06 2004, @10:16AM
              • Re:in reality... by shadowbearer (Score:1) Friday February 06 2004, @11:16PM
              • OT: K'Nex by wolrahnaes (Score:2) Sunday February 08 2004, @12:12AM
              • Re:4-bit Full Adder Using Relays or Vacuum Tubes by BigBlockMopar (Score:2) Monday February 16 2004, @05:29PM
              • 7 replies beneath your current threshold.
            • Re:Not the point! by kcim (Score:1) Thursday February 05 2004, @11:13PM
            • Re:Not the point! by satguy (Score:1) Friday February 06 2004, @12:05AM
              • 1 reply beneath your current threshold.
            • Re:Not the point! by mc6809e (Score:2) Friday February 06 2004, @06:16AM
            • Re:Not the point! by Rick.C (Score:2) Friday February 06 2004, @08:43AM
            • Re:Not the point! by stonecypher (Score:2) Friday February 06 2004, @03:17PM
            • CMOS!? by autopr0n (Score:2) Friday February 06 2004, @03:28PM
            • 3 replies beneath your current threshold.
          • Re:Not the point! by UserGoogol (Score:2) Thursday February 05 2004, @08:09PM
          • Re:Not the point! by mowo (Score:1) Thursday February 05 2004, @08:56PM
          • You lucky b*stards... by Chordonblue (Score:2) Friday February 06 2004, @01:09AM
          • Re:Not the point! by Dark$ide (Score:1) Friday February 06 2004, @03:58AM
        • Re:Not the point! by bob65 (Score:1) Thursday February 05 2004, @09:26PM
        • Re:Not the point! by harlows_monkeys (Score:1) Thursday February 05 2004, @09:35PM
        • Re:Not the point! by neurosis101 (Score:1) Thursday February 05 2004, @10:16PM
        • Re:Not the point! by God of Lemmings (Score:1) Friday February 06 2004, @12:34AM
        • Re:Not the point! by Inspector Lopez (Score:1) Friday February 06 2004, @02:35AM
        • Re:I couldn't read the code my compiler generates by A55M0NKEY (Score:2) Friday February 06 2004, @06:20AM
        • Re:Not the point! by H*(BZ_2)-Module (Score:1) Friday February 06 2004, @10:30AM
        • 2 replies beneath your current threshold.
      • Re:Linux x86 assembly? by whittrash (Score:3) Thursday February 05 2004, @08:05PM
      • Re:Linux x86 assembly? by Anonymous Coward (Score:1) Thursday February 05 2004, @07:07PM
      • Re:Linux x86 assembly? (Score:5, Informative)

        by shaitand (626655) on Thursday February 05 2004, @07:08PM (#8196188)
        (http://www.ganjablogger.com/ | Last Journal: Thursday January 05 2006, @05:36PM)
        Your post makes no sense unless you were confused by my mistype, I meant to say "the x86 core ISN'T going to get you far if what your wanting to do is talk to the kernel". Parts of the kernel ARE in assembler, and the bootloader is largely in ASM.

        So in truth, the kernel is the car. Asm can be the road, it can be the engine, it can be the passengers, it can be the wind resistance, it can be virtually any component. But nonetheless, if your writting an application sitting on top of the kernel you are going to need to speak to the kernel's api at some point (or the api of a layer sitting on top of it), just as if your writting a windows application in asm or c, or vb, you need to be speaking to the win32 api.

        Asm is no different than any other language, knowing the language is great and all, but it's worthless without learning the proper api's you'll need to actually write a program that does something. That's a major flaw in most programming tutorials. They'll teach C or another language and not mention a single word about the api's one needs to know to actually write a program that does more than calculate pie.
        [ Parent ]
        • Re:Linux x86 assembly? (Score:5, Informative)

          by Endive4Ever (742304) on Thursday February 05 2004, @07:53PM (#8196662)
          Well, some of us code assembly on bare hardware. We have to roll our own 'api' and include it in there with the rest of the code.

          I've worked before with programmers who had little experience in programming 'bare hardware'- they do really foolish things like not initing timers, setting up stack pointers, and the like.

          Writing bare ASM code for a processor (where it boots up out of your own EPROM or on an emulator) is good experience in minimalism. It can give you a good feeling when the project is all done and you can say you did it all yourself.

          For those interested in getting into this kind of thing, start with a PIC embedded controller and a cheap programmer. You can get PIC assembly language tools for free, and build a programmer, or buy a kit for a programmer, that plugs into your serial or parallel port. Your first PIC machine can be the CPU, a clock crystal, a few resistors and capacitors, and the LED you want to blink, or whatever other intrigues you. If you're not into complex soldering, and/or layout and complex schematics, you can buy pre-etched boards you just plug the PIC into.

          Another easy-start processor would be the 68HC11. It has a bootstrap built into ROM. Basically, you can jumper the chip so it wakes up listening on the serial port for code you send down the wire at it, and burns it into the EEPROM memory in the 'HC11 chip itself. Move the jumper and reboot the chip, and it's running your code.

          I think this is far more interesting that just writing apps that run on an Operating System you didn't roll yourself.

          [ Parent ]
          • Re:Linux x86 assembly? (Score:5, Informative)

            by Daytona955i (448665) <flynnguy24NO@SPAMyahoo.com> on Thursday February 05 2004, @09:13PM (#8197320)
            That all depends on what you are doing... if you are doing it for fun then yes, I agree with you... however, if you are a programmer who picked up learn c++ in 24 hours, and now call yourself a coder, you have a lot to learn, and x86 asm might be the place to start.
            [ Parent ]
            • Re:Linux x86 assembly? (Score:4, Interesting)

              by Kosgrove (75723) <jkodroff&mail,com> on Thursday February 05 2004, @09:32PM (#8197469)
              I disagree. Assembly has little to nothing to do with either programming or computer science anymore. Computer science (IMHO) deals with the study of software engineering and algorithms (network protocols, etc). Computer engineering deals with custom integrated circuit development, including processor architecture.

              I learned assembly as an undergraduate at Penn State (before attending a year of grad school at Drexel), but what I got out of the course had far more to do with understanding architecture (something not relevant for most developers, but much more relevant for hardware engineers).

              Assembly does not have any of the high-level features (OOP, libraries, etc) features that developers need to know these days. It's rarely used, even in embedded programming since C/C++ compilers have gotten quite efficient and are available even for open-core (similar to open source) procesors for use on FPGA's.

              On the other hand, assembly is important to know for computer engineering undergrads and graduates interested in architecture, and having taught in the CompEng department there, I can say that the depth of assembly in the cirriculum there is not sufficient.
              [ Parent ]
              • Re:Linux x86 assembly? (Score:4, Insightful)

                by Breakfast Pants (323698) on Thursday February 05 2004, @10:22PM (#8197806)
                (Last Journal: Wednesday October 16 2002, @01:31AM)
                To me, not teaching assembly in a CS major would be insane. It would be like teaching physics without any of the history of how it was discovered and without showing how to derive the various equations from the more fundamental equations. My first 3 semesters were in java. My fourth semester I was in a C, Assembly, and an intro ECE class and I am very glad that I was. The combination of these 3 classes at the same time was great. Sometimes it is a lot more helpful to learn why something works or how something works than just learning (heard countless times in my java classes) "Oh don't ask questions about that, its not something you need to know. Java handles this for you automatically." If you want it to only be taught like that thats great; just don't expect any of your students to ever create the next java.

                Also, you do know that compilers are written by programmers don't you?
                [ Parent ]
              • Re:Linux x86 assembly? (Score:5, Insightful)

                by texaport (600120) on Thursday February 05 2004, @10:53PM (#8197987)

                Assembly has little to nothing to do with either programming or computer science anymore. Computer science (IMHO) deals with the study of software engineering and algorithms

                If it truly is a science, then someone who finishes a Bachelors and Masters program in Computer Science had better be capable of contributing to the advancement of this field.

                This could be through the development of new languages, in which case I hope they know a thing or two about assembly in the first place.

                Otherwise, a couple of Computer Science degrees would simply mean someone is a techno-wonk, a professional student, or just a technician rather than a professional engineer/scientist.

                --
                Disclaimer: 90% of the programmers out there do not
                need a Computer Science degree, and 90% of the jobs
                out there for developers don't need CS graduates

                [ Parent ]
              • Question by jadavis (Score:2) Friday February 06 2004, @01:02AM
                • Re:Question by craigtay (Score:2) Friday February 06 2004, @03:07AM
                  • 1 reply beneath your current threshold.
                • Re:Question by douglas jeffries (Score:1) Friday February 06 2004, @06:59AM
                • Re:Question by Endive4Ever (Score:1) Friday February 06 2004, @12:35PM
              • Re:Linux x86 assembly? by zeath (Score:2) Friday February 06 2004, @03:55AM
              • Re:Linux x86 assembly? by lars_stefan_axelsson (Score:2) Friday February 06 2004, @03:55AM
              • Re:Linux x86 assembly? by RagManX (Score:3) Friday February 06 2004, @10:18AM
              • Re:Linux x86 assembly? by wezelboy (Score:2) Friday February 06 2004, @12:53PM
              • Re:Linux x86 assembly? by expro (Score:2) Saturday February 07 2004, @10:56AM
            • Re:Linux x86 assembly? by jrnchimera (Score:1) Friday February 06 2004, @01:05AM
          • Re:Linux x86 assembly? by Mr Pippin (Score:1) Thursday February 05 2004, @09:37PM
          • Re:Linux x86 assembly? by d34thm0nk3y (Score:1) Thursday February 05 2004, @09:40PM
          • Re:Linux x86 assembly? (Score:5, Funny)

            by OECD (639690) on Thursday February 05 2004, @10:15PM (#8197759)
            (Last Journal: Monday August 20, @01:07PM)
            I think this is far more interesting that just writing apps that run on an Operating System you didn't roll yourself.

            What, you don't build your own processors? What fun is that?

            [ Parent ]
          • Re:Linux x86 assembly? by starm_ (Score:1) Thursday February 05 2004, @10:41PM
          • Re:Linux x86 assembly? (Score:4, Insightful)

            by John Courtland (585609) on Friday February 06 2004, @12:50AM (#8198618)
            It also gave me a better appreciation for optimization. The cycle counting, the instruction scheduling, cheap tricks that save 30 cycles here and there (like SHL a few times instead of Multiplying). I miss having that sort of control. Coding for DOS was always a learning experience too, becuase you basically had to write an OS everytime you wanted to do anything non-trivial.

            I learned Asm before I learned C, and I must say that was a good way of going about it. I'm glad I don't view C as some sort of "hocus pocus", and I never did. Everything just made sense. Now-a-days you've got Joe Blow with dollar signs in his eyes and his shiny new degree in using Java, who doesn't understand the little black box he's entering commands into.

            It sort of pisses me off, because I don't want to put gay little buzzwords in my resume like C#, or Java, or .NET. I should be able to put down "Assembler: x86, z80, s/390" and the idiot HR guy should know everything else is a simple matter of syntax.
            [ Parent ]
          • Re:Linux x86 assembly? by Mr Z (Score:1) Friday February 06 2004, @10:25AM
          • Re:Linux x86 assembly? by shaitand (Score:2) Friday February 06 2004, @01:18PM
          • Re:Linux x86 assembly? by stonecypher (Score:2) Friday February 06 2004, @02:53PM
          • Re:Linux x86 assembly? by Viking Coder (Score:2) Friday February 06 2004, @03:50PM
          • Re:Linux x86 assembly? Bicycle computer info by Endive4Ever (Score:1) Friday February 06 2004, @12:45PM
          • 1 reply beneath your current threshold.
        • Re:Linux x86 assembly? by hesiod (Score:2) Friday February 06 2004, @10:01AM
          • 1 reply beneath your current threshold.
        • 3 replies beneath your current threshold.
      • 2 replies beneath your current threshold.
    • Re:Linux x86 assembly? by dysprosia (Score:3) Thursday February 05 2004, @06:51PM
    • Re:Linux x86 assembly? by gangien (Score:1) Thursday February 05 2004, @06:53PM
    • Re:Linux x86 assembly? by jhoger (Score:1) Thursday February 05 2004, @06:55PM
    • Re:Linux x86 assembly? by AndroidCat (Score:1) Thursday February 05 2004, @06:56PM
    • Syntax, OS interfaces... (Score:5, Interesting)

      by Cryptnotic (154382) on Thursday February 05 2004, @06:57PM (#8196035)
      (http://www.gnaa.us/)
      Well, for starters the syntax for assemblers is different. There are two standards, the AT&T standard (which is used by the GNU assembler) and the other one that is more familiar to DOS/Windows x86 assembly programmers (which is used by the NASM assmebler).

      Second, OS interfaces for making system calls (e.g., to read files, open network connections, etc) are different in Linux versus DOS or Windows).

      [ Parent ]
      • Re:Syntax, OS interfaces... (Score:5, Informative)

        by Anonymous Coward on Thursday February 05 2004, @07:14PM (#8196269)
        There are two standards, the AT&T ... and the other one

        Incorrect. There are at least four different assemblers and standards:

        ASM - GNU Assembler. AT&T standard, as commonly used on Linux. The syntax hasn't changed since the 60's - which is both very good and very bad. I personally think it should be retired.

        MASM - Microsoft Assembler. Intel standard assembly. The syntax is nice, but there are some ambiguous operators (is [] address of or address by value? - the meaning changes depending on the context). This is typically what the commercial Windows world uses. MASM itself is mostly obsolete - the Visual C compiler can now do everything that it could and supports all modern CPU instructions (even on Visual C++ 6 if you install the latest CPU pack).

        NASM - Netwide Assembler. An assembler that set out to put right all the things that were wrong with MASM. The syntax is excellent, ambiguous operators are cleared up, documentation is also excellent, it interoperates beautifully with Visual C on Windows and GNU C on Linux. Ideally NASM would replace AS as the standard now that it's open source.

        TASM - Borland Turbo Assembler. Based around the Intel standards, but does things slightly differently. Has extensions which allow for easy object-oriented assembly programming - which can make for some very nice code. Had a MASM compatibility mode, but nobody in their right mind used that if they could help it. I had version 5, but I don't believe they've kept it up to date, so it's obsolete now.

        There are a couple of others as well, most notably AS86 (which was the leading independent solution for writing assembler back in the DOS days).
        [ Parent ]
      • Re:Syntax, OS interfaces... by quantum bit (Score:1) Thursday February 05 2004, @07:59PM
    • Re:Linux x86 assembly? (Score:5, Interesting)

      by pla (258480) on Thursday February 05 2004, @06:58PM (#8196049)
      (Last Journal: Monday April 03 2006, @07:23PM)
      Is "Linux x86 assembly" any different to any other kind of "x86 assembly"?

      Yes. Although it requires understanding the CPU's native capabilities to the same degree, Linux uses AT&T syntax, whereas most of the Wintel world uses (unsurprisingly) Intel/Microsoft syntax.

      Personally, although I far prefer coding C under Linux, I prefer Intel syntax assembly. Even with many years of coding experience, I find AT&T syntax unneccessarily convoluted and somewhat difficult to quickly read through.

      The larger idea holds, however, regardless of what assembler you use. I wholeheartedly agree with the FP - People who know assembly produce better code by almost any measurement except "object-oriented-ness", which assembly makes difficult to an extreme. On that same note, I consider that as one of the better arguments against OO code - It simply does not map well to real-world CPUs, thus introducing inefficiencies in the translation to something the CPU does handle natively.
      [ Parent ]
      • Re:Linux x86 assembly? (Score:5, Insightful)

        by perky (106880) on Thursday February 05 2004, @07:16PM (#8196294)
        On that same note, I consider that as one of the better arguments against OO code - It simply does not map well to real-world CPUs, thus introducing inefficiencies in the translation to something the CPU does handle natively

        maxim: cycles are cheap, people are expensive. For the *vast majority* of software it is significantly better value to design and build a well architected OO solution than to optimise for performance in languages and methodologies that are more difficult to implement and maintain. Who cares if it's not very efficient - it'll run twice as fast in 18 months, and will be a lot cheaper to change when the client figures out what the actually wanted in the first place. But I guess you already knew that.
        [ Parent ]
        • Re:Linux x86 assembly? (Score:5, Interesting)

          by pla (258480) on Thursday February 05 2004, @07:31PM (#8196434)
          (Last Journal: Monday April 03 2006, @07:23PM)
          maxim: cycles are cheap, people are expensive.

          True. This topic, however, goes beyond mere maximizing of program performance. Pur simply, if you know assembler, you can take the CPU's strengths and weaknesses into consideration while still writing readable, maintainable, "good" code. If you do not know assembly, you might produce simply beautiful code, but then have no clue why it runs like a three-legged dog.


          it is significantly better value to design and build a well architected OO solution

          Key phrase there, "well-architected". In practice, the entire idea of "object reuse" counts as a complete myth (I would say "lie", but since it seems like more of a self-deception, I woun't go that far). I have yet to see a project where more than a handful of objects from older code would provide any benefit at all, and even those that did required subclassing them to add and/or modify over half of their existing functionality. On the other hand, I have literally hundreds of vanilla-C functions I've written over the years from which I draw with almost every program I write, and that require no modification to work correctly (in honesty, the second time I use them, I usually need to modify them to generalize better, but after that, c'est fini).


          Who cares if it's not very efficient - it'll run twice as fast in 18 months

          Y'know, I once heard an amusing joke about that... "How can you tell a CS guy from a programmer?" "The CS guy writes code that either won't run on any machine you can fit on a single planet, or will run too slowly to serve its purpose until technology catches up with it in few decades". Something like tha - I killed the joke, but you get the idea.

          Yeah, computers constantly improve. But the clients want their shiny new software to run this year (if not last year, or at least on 5-year old equipment), not two years hence.
          [ Parent ]
          • Re:Linux x86 assembly? (Score:5, Insightful)

            by afidel (530433) on Thursday February 05 2004, @08:11PM (#8196889)
            True. This topic, however, goes beyond mere maximizing of program performance. Pur simply, if you know assembler, you can take the CPU's strengths and weaknesses into consideration while still writing readable, maintainable, "good" code. If you do not know assembly, you might produce simply beautiful code, but then have no clue why it runs like a three-legged dog.

            About .1% of code needs to be so optimized that CPU architecture matters. For the other 99.9% speed improvements are much more likely to come from algorithmic improvements. Not only that but real world experience shows that code written in ASM is NOT maintanable, the indepth knowledge of a specific architecture is fleeting while knowledge of most high level languages lasts a LONG time.
            [ Parent ]
            • Re:Linux x86 assembly? (Score:5, Insightful)

              by pla (258480) on Thursday February 05 2004, @08:44PM (#8197133)
              (Last Journal: Monday April 03 2006, @07:23PM)
              For the other 99.9% speed improvements are much more likely to come from algorithmic improvements.

              Gack! I perhaps have phrased myself rather poorly. Throughout this entire thread, I have not meant to refer to writing even a single line of actual assembly code. I don't mean that humans can do it better than compilers (though often true, for small sections of code), I don't mean that asm always runs faster than the comparable C (again, often true), and I don't in any way mean that asm reads more clearly than a high-level language (about as false as they come).

              Perhaps an example would help...

              In C, I can make a 10-dimensional array (if the compiler will let me) as a nice, easily-readable organization of... Well, of something having 10 dimensions (superstrings?). I can make a pointer to a structure that contains an array of pointers to linked lists (which sounds obscure, but I can imagine it as a straightforward way to implement, say, a collection of variable-length metadata on a set of files). I can choose to have my loop indices run in row-major or column-major order, with no high-level reason to choose either way.

              From an assembly point of view, I realize exactly the hellish task involved in dereferencing the first two example. I realize that row-major vs column-major ordering has a significant impact on the quantity of dereferencing needed. Even further, I realize that by choosing row-major or column-major indexing, I can ensure cache integrity, or obliterate it.

              The specific examples I just gave perhaps seem absurdly obvious to any decent programmer. But countless other, more subtle, differences in how I would choose to lay out my code, come from an understanding of what the compiler will likely do with that code, and how the CPU will eventually have to deal with it. Rather than having a superficially obvious relation to the CPU, such choices would look more like stylistic preferences than careful decisions with significant implications to performance.

              How about the size of an array, for example? Sometimes using a power of two will help immensely (if it allows a constant shift vs a multiply), and sometimes it will hurt immensely (if you plan to use it such that almost every access competes for the same cache line). Things like that, which a high-level-only programmer simply will not know without experiential (ie, programming in assembly) knowledge of the underlying architecture.
              [ Parent ]
            • Re:Linux x86 assembly? (Score:5, Insightful)

              by gweihir (88907) on Thursday February 05 2004, @09:52PM (#8197620)
              Not only that but real world experience shows that code written in ASM is NOT maintanable, the indepth knowledge of a specific architecture is fleeting while knowledge of most high level languages lasts a LONG time.

              That is not the point. The point is that knowing one assembly language gives far more insight into what higher level languages actually do. It is, e.g., very difficult to explain the actual workings of a buffer-overflow exploit to somebody without any assembly knowledge. Or what a pointer is. Or what pageing does. Or what an interrupt is. Or what impact the stack has and how it is being used for function arguments. Or how much memory a variable needs....

              The only processor I know that actually made assembly programming almost a c-like experience was the Motorola 68xxx family. On the Atari ST, e.g., there were complex applications writen entirely in assembly. Today it would indeed be foolish to do a larger project in assembly language, but that is not the point of the book at all.

              Bottom line: You need to understand the basic tools well. You don't need to restrict yourself to their use or even use them often. But there is no substitute for this understanding.
              [ Parent ]
            • Re:WideScreens by tigersha (Score:2) Friday February 06 2004, @06:26AM
          • Re:Linux x86 assembly? by raster (Score:1) Thursday February 05 2004, @08:53PM
          • Re:Linux x86 assembly? by beauzo (Score:1) Thursday February 05 2004, @10:58PM
          • Re:Linux x86 assembly? (Score:5, Insightful)

            by YouHaveSnail (202852) on Thursday February 05 2004, @11:25PM (#8198185)
            I have yet to see a project where more than a handful of objects from older code would provide any benefit at all, and even those that did required subclassing them to add and/or modify over half of their existing functionality.

            Have you never used a decent class library? Writing reusable classes requires a much more careful approach to design and implementation than writing classes for one time use, and most people can't afford to spend that kind of time. The power of reusability lies in the fact that I can go out and buy a library of useful classes and feel pretty good that the code therein has already been well tested, usually at much lower cost and higher quality than I could produce myself.

            Whether it's building a user interface with PowerPlant, Cocoa, or MFC, or manipulating data with STL, the amount of code that I reuse far exceeds the amount that I write myself.
            [ Parent ]
          • Assembly for speed? (Score:5, Insightful)

            by DonGar (204570) on Thursday February 05 2004, @11:42PM (#8198278)
            (http://www.bgb.cc/garrett/)
            I have say that trying to program in low level languages, or worrying about the details of the machine archtecture has usually been (in my experience) counter productive in terms of efficiency.

            I'm not saying that there aren't places where low level details aren't critical, but for the most part they just draw attention away from the thing that has the most impact on performance.

            Application Architecture.

            The choices of algorithms and data structures are far more important than any low level details. But low level details are more fun, and tend to make us feel more manly or guruly or something so we tend to focus on them instead. In practice I find that using low level languages or super optimized tools make it hard to worry about high level structure, so the structure gets ignored.

            I once worked on a project in which people were seriously freaking out over the performance hit in using virtual functions while parsing the configuration file.

            At the same time, the application (a firewall) was performing multiple linear searches through linked lists of several hundred items per packet. These searches were very carefully optimized, so they had to be fast... (sigh). When I switched the system to use STL dictionaries (and later hashes), total throughput jumped three fold, yet some of the developers were worried about the cost of the templates and virtual functions used.

            The fact that the algorithm is more important thatnthe details of implementation is a lesson that everyone (myself included) needs to keep getting pounded into them, because it's so easy to forget.

            There are places where assembler and hardware details matter a great deal. But they are usually places that contain a lot of repetition that can't be removed algorithmically. Graphics are the obvious example.

            A recent example:

            My brother in law gave me one of those boards with pegs in which you try to jump your way down to a single peg remaining. I have no idea what it's called, but anyway....

            I decided to be cute, and wrote a 100 line python scrpt over lunch to find all possible solutions. I was suprised when it hadn't found a single solution by the time I was finished eating. I was a lot more suprised when it hadn't found anything by the end of the day.

            So I killed it and started in optimizing for performance and tweaking and trying different things. This kept me occupied over lunch for a couple of weeks, but didn't produce anything else. Finally I started doing some analysis of the problem. The first thing I found was that the search space (for the board I had) was roughly 10**18.

            I didn't matter how much I tweaked the details of my search, it wasn't going to find very many solutions in less than a century (actually, it looks like a naive full search will take several thousand years).

            So, after wasting several weeks of lunch breaks, I have redefined the problem. Find A solution, and rewritten my search to use a heuristic. I finished everthing but the heuristic at lunch a couple of days ago. The new system will take 100 or even a 1000 times as long to perform a jump, but I'm expecting to find a solution before I'm dead.

            So, don't get bogged down in the details of an implementation. They won't usually take you very far.
            [ Parent ]
          • toupper() call = moron, MOVE by cheekyboy (Score:1) Friday February 06 2004, @06:58AM
          • Re:Linux x86 assembly? by poot_rootbeer (Score:2) Friday February 06 2004, @11:50AM
          • 2 replies beneath your current threshold.
        • Re:Linux x86 assembly? by CosmeticLobotamy (Score:1) Thursday February 05 2004, @07:35PM
        • Pet peeve of the year (was Re:Linux x86 assembly?) by honestpuck (Score:1) Thursday February 05 2004, @07:43PM
        • Re:Linux x86 assembly? by Progman3K (Score:2) Thursday February 05 2004, @07:56PM
        • Re:Linux x86 assembly? by whittrash (Score:1) Thursday February 05 2004, @08:11PM
        • Re:Linux x86 assembly? by turm (Score:1) Thursday February 05 2004, @08:12PM
        • Re:Linux x86 assembly? by Anonymous Coward (Score:1) Thursday February 05 2004, @08:14PM
        • Re:Linux x86 assembly? by studerby (Score:2) Thursday February 05 2004, @08:30PM
        • Re:Linux x86 assembly? by Ralpht (Score:2) Thursday February 05 2004, @08:48PM
        • Re:Linux x86 assembly? by sageman (Score:1) Thursday February 05 2004, @11:51PM
        • 6 replies beneath your current threshold.
      • Re:Linux x86 assembly? by Blakis (Score:1) Thursday February 05 2004, @07:22PM
      • object oriented assembly? by Freedom Bug (Score:2) Thursday February 05 2004, @07:31PM
        • 1 reply beneath your current threshold.
      • Re:Linux x86 assembly? by bmac (Score:2) Thursday February 05 2004, @07:56PM
      • Actually, they DON'T. (Score:5, Interesting)

        by Ungrounded Lightning (62228) on Thursday February 05 2004, @08:09PM (#8196861)
        (Last Journal: Friday November 02, @02:49PM)
        People who know assembly produce better code by almost any measurement except "object-oriented-ness", which assembly makes difficult to an extreme.

        Actually, they don't.

        A study was done, some decades ago, on the issue of whether compilers were approaching the abilities of a good assembly programmer. The results were surprising:

        While a good assembly programmer could usually beat the compiler if he really hunkered down and applied himself to the particular piece of code, on the average his code would be worse - because he didn't maintain that focus on every line of every program.

        The programmer might know all the tricks. But the compiler knew MOST of the tricks, and applied them EVERYWHERE, ALL THE TIME.

        Potentially the programmer could still beat the compiler in reasonable time by focusing on the code that gets most of the execution. But the second part of Knuth's Law applies: "95% of the processor time is spent in 5% of the code - and it's NOT the 5% you THOUGHT it was." You have to do extra tuning passes AFTER the code is working to find and improve the REAL critical 5%. This typically was unnecessary in applications (though it would sometimes get done in OSes and some servers).

        This discovery lead directly to two things:

        1) Because a programmer can get so much more done and working right with a given time and effort using a compiler than using an assembler, and the compiler was emitting better assembly on the average, assember was abandoned for anything where it wasn't really necessary. That typically means:

        - A little bit in the kernel where it can't be avoided (typically bootup, the very start of the interrupt handling, and maybe context switching). (Unix System 6 kernel was 10k lines, of which 1.5k was assembler - and the assembly fraction got squeezed down from then on.)

        - A little bit in the libraries (typically the very start of a program and the system call subroutines)

        - Maybe a few tiny bits embedded in compiler code, to optimize the core of something slow.

        2) The replacement of microcoded CISC processors (i.e. PDP11, VAX, 68K) with RISC processors (i.e. SPARC, MIPS). (x86 was CISC but hung in there due to initera and cheapness.)

        Who cares if it takes three instructions instead of one to do some complex function, or if execution near jumps isn't straightforward? The compiler will crank out the three instructions and keep track of the funny execution sequence. Meanwhile you can shrink the processor and run the instructions at the microcode engine's speed - which can be increased further by reducing the nubmer of gates and length of wiring, and end up with a smaller chip (which means higher yeilds, which means making use of the next, faster, FAB technology sooner.)

        CISC pushed RISK out of general purpose processors again once the die sizes got big: You can use those extra gates for pipelining, branch prediction, and other stuff that lets you gain back more by parallelism than you lost by expanding the execution units. But it's still alive and well in embedded cores (where you need SOME crunch but want to use most of the silicon for other stuff) and in systems that don't need the absolute cutting-edge of speed or DO need a very low power-per-computation figure.

        The compiler advantage over an assembly programmer is extreme both with RISC and with a poorly-designed CISC instruction set (like the early x86es). Well-designed CISC instruction sets (like PDP11, VAX, and 68k) are tuned to simplify the compilers' work - which makes them understandable enough that the tricks are fewer and good code is easier for a human to write. This puts an assembly programmer back in the running. But on the average the compiler still wins.

        (But understanding how assembly instruction sets work, and how compilers work, are both useful for writing better code at the compiler level. Less so now that optimizers are really good - but the understanding is still helpful.)
        [ Parent ]
        • Re:Actually, they DON'T. by ComputerSlicer23 (Score:2) Thursday February 05 2004, @08:37PM
          • Re:Actually, they DON'T. by Anonymous Coward (Score:2) Thursday February 05 2004, @09:12PM
          • Re:Actually, they DON'T. (Score:4, Insightful)

            by Ungrounded Lightning (62228) on Thursday February 05 2004, @09:23PM (#8197395)
            (Last Journal: Friday November 02, @02:49PM)
            Well-designed CISC instruction sets (like PDP11, VAX, and 68k)

            Okay, you had me up to that sentence. It's my understanding from people I know who actually used VAX assembly, that it was a bear. Especially if you had to decode the assembly by hand. It had variable length opcodes, which if I remember right, a single instruction could extend to be upwards of 60 bytes. Oh, and that's not to mention, the 11 different addressing modes, which could be mixed and matched on all three operands (dest, left data, right data). Because all instructions could store directly back to memory, it was a bestie to create.

            Call me crazy, but somehow that much mixing and matching just doesn't sound like [fun].


            I didn't actually use the VAX instruction set - though I did use the PDP11's - both writing and reverse-engineering. They were both designed by the same guy (Gordon Bell) or teams he lead. I'm prepared to defer to people who actually dealt with it that the VAX instruction set was difficult.

            But in the case of the PDP11 (where the few-instructions, lots-of-address-modes style came into its own), the plethora of modes actually simplified the job of the assembly programmer (and the reverse engineer). I can tell you this from experience.

            Multiple address modes shrank the job of understanding the instruction set by splitting it into two parts - the much smaller set of base instructions than you'd need without the symmetry, and the small set of addressing modes. Rather than having an explosion of special purpose instructions with their own addressing modes, you have an explosion of combinations of the members of two small sets. Once you learned the two sets, the proper combination to achieve the result you wanted was obvious.

            The tricks were few - and brilliant.

            - The indirect-increment and indirect-decrement modes let you use any register as a stack pointer or index register, for instance. The "official" stack pointer was just the one that was implied by certain other features: interrupt and subroutine calls, primarily.

            - With the program counter as one of the general registers, applying indirect-auto-increment to it gave you inline constants.

            - The indirect and indirect increment/decrement addressing modes made any register a pointer. (They also led directly to the ++, --, +=, and -= operators of the C language.)

            - The register+offset mode and base/offset duality gets you to particular elements of an argument array, or index into a fixed-location array.

            and so on.

            If you understand a few things about C (Array/pointer duality, walking arrays with auto-increment, etc.), you have exactly the understanding you need to grok the modes of the PDP11 instruction set. (Which is hardly surprising: I understand that much of C was inspired by that instruction set.)
            [ Parent ]
        • Re:Actually, they DON'T. by steveg (Score:2) Thursday February 05 2004, @08:56PM
        • Re:Actually, they DON'T. by be-fan (Score:2) Thursday February 05 2004, @09:41PM
        • Re:Actually, they DON'T. by be-fan (Score:1) Thursday February 05 2004, @09:47PM
        • PDP11, VAX, 68K mislabeled by snStarter (Score:3) Friday February 06 2004, @01:04AM
        • Re:Actually, they DON'T. by Anonymous Coward (Score:1) Friday February 06 2004, @01:33AM
        • Re:Actually, they DON'T. by shmat (Score:1) Friday February 06 2004, @10:47AM
        • Re:Actually, they DON'T. by renoX (Score:2) Friday February 06 2004, @12:47PM
        • 2 replies beneath your current threshold.
      • Re: Assembly Knowlege and OO by A55M0NKEY (Score:2) Friday February 06 2004, @07:17AM
      • Re:Linux x86 assembly? by pla (Score:2) Friday February 06 2004, @02:40AM
      • 3 replies beneath your current threshold.
    • Re:Linux x86 assembly? (Score:5, Interesting)

      by skurk (78980) on Thursday February 05 2004, @07:07PM (#8196170)
      (http://amiga.rules.no/ | Last Journal: Wednesday April 13 2005, @08:12AM)
      You have a good point. I code assembly on many different CPU's, and I can only see a minor difference between them

      For example, on the 6502 family (like the 6510 from the C64), you have only three registers; X, Y and A. These registers can only hold a byte each. Most of the variables you have are stored in zero pointers, a 255-byte range from address $00-$FF.

      Then the 68k CPU (as in the Amiga, Atari, etc) you have several more registers which can be used more freely. You have D0-D7 data registers and A0-A7 address registers. These can be operated as bytes, words or longwords as you wish, from wherever you want.

      The x86 assembly is written the "wrong way", and is pretty confusing at times. Where I would say "move.l 4,a6" on the 68k, I have to say "mov dx,4" on the x86. Takes a few minutes to adjust each time.

      Once you master assembly language on one CPU, it's pretty easy to switch to another.

      I still think the 680x0 series are the best.
      [ Parent ]
    • Re:Linux x86 assembly? by ncc74656 (Score:3) Thursday February 05 2004, @07:29PM
    • Re:Linux x86 assembly? by frovingslosh (Score:2) Thursday February 05 2004, @07:30PM
    • Re:Linux x86 assembly? by snatchitup (Score:2) Thursday February 05 2004, @07:47PM
    • Re:Linux x86 assembly? by WindBourne (Score:2) Thursday February 05 2004, @08:00PM
    • Re:Linux x86 assembly? by rskrishnan (Score:1) Thursday February 05 2004, @08:06PM
    • Big whoop by ArgyleAgent (Score:1) Thursday February 05 2004, @09:13PM
    • Re:Linux x86 assembly? by captainwasabi (Score:1) Thursday February 05 2004, @09:40PM
    • Re:Linux x86 assembly? by kohsuke (Score:1) Thursday February 05 2004, @10:01PM
    • Re:Linux x86 assembly? by ganns.com (Score:1) Thursday February 05 2004, @10:21PM
    • Re:Linux x86 assembly? by dtfinch (Score:2) Friday February 06 2004, @12:04AM
    • Re:Linux x86 assembly? by byolinux (Score:2) Friday February 06 2004, @04:58AM
    • Re:Linux x86 assembly? by hayriye (Score:1) Friday February 06 2004, @07:31AM
    • Re:Linux x86 assembly? by ricksmith (Score:1) Friday February 06 2004, @08:24AM
    • Re:Linux x86 assembly? by grikdog (Score:1) Friday February 06 2004, @09:40AM
    • Yes, Linux x86 assembly is different. by Rhodnius (Score:1) Friday February 06 2004, @12:27PM
    • Re:Linux x86 assembly? by dysprosia (Score:1) Thursday February 05 2004, @06:57PM
    • 5 replies beneath your current threshold.
  • Not So New Concept (Score:5, Insightful)

    by andyrut (300890) on Thursday February 05 2004, @06:47PM (#8195902)
    (http://www.andyrut.com/ | Last Journal: Friday November 05 2004, @04:13PM)
    Although unheard of today, this concept isn't really all that new -- there used to not be much choice in years past.

    While starting Computer Science students off with assembly (without first introducing them to a high-level language) may be a relatively new concept these days, the idea of teaching low-level languages to Computer Science students is not a revolutionary technique whatsoever. Every decent Computer Science curriculum includes several semesters of courses in which assembly language is required, to demonstrate their knowledge of basic computer processes.

    That reminds me of a great fortune:

    "The C Programming Language -- A language which combines the
    flexibility of assembly language with the power of assembly language."
    • Re:Not So New Concept by gid13 (Score:3) Thursday February 05 2004, @06:51PM
      • Re:Not So New Concept by andyrut (Score:2) Thursday February 05 2004, @06:56PM
        • Re:Not So New Concept (Score:5, Interesting)

          I think people that have been out in the real world for a while don't realize how many languages are taught in school's today. I'm in Purdue's computer engineering program, and so far, I have had to learn c, c++, fotran, java, asm, python, bash, and ksh. I'm sure there are some others I have forgotten (like the little bit of perl I know). We also learn ABEL and VHDL, several version control systems and Makefiles. My roommate is taking an AI course right now which is all in scheme. People talk about the old days like their is lost knowledge, we still learn all that. I could write ATARI games in asm if I wanted to, but why do that when tools are available that let me do so much more? For learning, we don't have to learn assembly first anymore, you can start with any language. I think it is good to take a two pronged approach. Learn C first, and at the same time, start learning digital logic. C compilers are forgiving, and warn about obvious errors compared to assembly just doing exactly what you tell it do. When one is comfortable with both, I think learning assembly is much easier. Without this prior knowledge, you are just doing what you are told to do, you do not really understand it, and when you make mistakes, you have a harder time understanding why. After learning asm, it is easier to think like the machine, and easier to write efficient code in other languages.
          [ Parent ]
          • by duck_prime (585628) on Thursday February 05 2004, @08:45PM (#8197142)
            For learning, we don't have to learn assembly first anymore, you can start with any language. I think it is good to take a two pronged approach. Learn C first, and at the same time, start learning digital logic. [...] When one is comfortable with both, I think learning assembly is much easier.
            You are missing the One True Purpose of assembly language, and the One True Reason everyone should learn assembly first:

            Nothing else in the Universe can make students grateful -- grateful! -- to be allowed to use C

            [ Parent ]
          • Re:Not So New Concept by fingusernames (Score:2) Friday February 06 2004, @12:56AM
          • Re:Not So New Concept by Rigor Morty (Score:1) Friday February 06 2004, @05:48AM
          • Re:ATARI games were written in FORTH by cosmo7 (Score:2) Friday February 06 2004, @01:36PM
          • 6 replies beneath your current threshold.
        • Re:Not So New Concept by dev11 (Score:1) Thursday February 05 2004, @07:57PM
        • Re:Not So New Concept by zxqart (Score:1) Thursday February 05 2004, @08:16PM
        • Re:Not So New Concept by macjohn (Score:1) Thursday February 05 2004, @10:46PM
    • Re:Not So New Concept (Score:5, Insightful)

      by rblancarte (213492) on Thursday February 05 2004, @06:58PM (#8196051)
      (http://www.blancarte.com/)
      I was about to say the same thing. I don't think that it is some new "mystical" idea of teaching assembly to students. I am currently taking my THIRD assembly class at the University of Texas. And I know that there are others to take.

      I will agree with the parent post, this is not a new concept. Now teaching assembly to beginners, that might be new.

      And I don't know if "great" coders know assembly, but I think knowing assembly is a useful tool in being able to program efficient code. If you understand concepts like division, how bad it is, what the computer is actually doing when your C/C++ or whatever language (that is not interpreted) is compiled, then you are well on your way to being able to produce efficient code.
      [ Parent ]
    • Re:Not So New Concept by Anonymous Coward (Score:1) Thursday February 05 2004, @06:58PM
    • Re:Not So New Concept by lounger540 (Score:1) Thursday February 05 2004, @07:05PM
    • Re:Not So New Concept (Score:5, Informative)

      by tealover (187148) on Thursday February 05 2004, @07:05PM (#8196151)
      Since this submission is nothing more than an attempt to hawk his one book, on principle I refuse to buy it. I don't like dishonesty in the submission process. He should have come out and directly admitted that it was his book.

      [ Parent ]
    • Re:Not So New Concept by timeOday (Score:2) Thursday February 05 2004, @07:07PM
      • 1 reply beneath your current threshold.
    • Re:Not So New Concept by vt0asta (Score:2) Thursday February 05 2004, @07:08PM
    • Forget Computer Science! by zoney_ie (Score:1) Thursday February 05 2004, @07:09PM
    • Re:Not So New Concept by whorfin (Score:2) Thursday February 05 2004, @07:11PM
    • Re:Not So New Concept by Wakkow (Score:2) Thursday February 05 2004, @07:12PM
    • Good Idea, not appreciated by PHB's, tho by ackthpt (Score:2) Thursday February 05 2004, @07:16PM
    • Totally correct by Atario (Score:2) Thursday February 05 2004, @07:18PM
    • Re:Not So New Concept by sphealey (Score:2) Thursday February 05 2004, @07:18PM
    • Re:Not So New Concept by Dukael_Mikakis (Score:2) Thursday February 05 2004, @07:35PM
    • Re:Not So New Concept (Score:5, Funny)

      by Jester99 (23135) on Thursday February 05 2004, @07:39PM (#8196515)
      (http://www.cs.washington.edu/homes/ak/)
      "The C Programming Language -- A language which combines the
      flexibility of assembly language with the power of assembly language."


      The way I heard it was far drier humor: "C: The language combining the power of assembly with the ease of use of assembly." :)
      [ Parent ]
    • Not So New Concept Indeed! by ZahrGnosis (Score:1) Thursday February 05 2004, @07:47PM
    • Re:Not So New Concept by jholzer (Score:1) Thursday February 05 2004, @08:18PM
    • Re:Not So New Concept by SillySnake (Score:1) Thursday February 05 2004, @08:28PM
    • Re:Not So New Concept (Score:4, Insightful)

      by ca1v1n (135902) <snook@gua[ ]ronic.com ['not' in gap]> on Thursday February 05 2004, @08:28PM (#8197009)
      Starting CS students in assembler isn't a new idea either. It's an old idea that some guy recycled, wrote a book about, and advertised on slashdot. Why are the old guys who started on assembler "wizards"? It's easy. Back then there weren't that many people doing it, and it was really hard. Anyone who stuck with it had to be really good.

      Now for my own rant on the topic:

      My first programming classes at the University of Virginia had me programming in VHDL and m68k assembler. This wasn't the intent of the curriculum or the CS faculty at all, but rather a result of some schedule conflicts and a first year advisor who wasn't in the CS department and didn't know any better. It was a disaster. Normally students here get their first taste of assembly in a course that works its way down to it from the high-level languages they'd been introduced to first. My pain with assembly distracted from the course material on architecture. I learned more about efficient programming during two lectures on C# than I did while banging my head against the desk writing m68k assembler.

      Anyone who has benchmarked the C++ standard template library extensively will tell you that using the fairly complicated, safely implemented data structures are incredibly fast. Using an STL deque as an array, without any deque operations, is actually faster than using an array, which is the same in basically any machine-code language, be it C++ or assembly. The STL vector is even faster.

      Moral of the story? Compilers are amazing. This has not always been the case, but it is now. Writing code in assembly results in a product that takes forever to create, is less likely to correctly handle special cases, is impossible to debug, is unreadable to those who did not write it, and often is slower than compiled high-level code. In fact, JIT compilers are getting good enough that bytecode languages are nearly as fast as well.

      It's true that assembly can often be used to get a bit of a speedup. This is why game developers will often write everything in C or C++ except for 3 or 4 functions that they'll implement in assembly. The advantages that high-level languages give for correctness vastly outweigh any miniscule performance gains in almost all circumstances. Assembly's advantages in compactness are becoming moot too, as embedded devices are now capable enough to run full-fledged operating systems.

      Aside from teaching architecture though, assembly does teach an important skill to CS majors though, and that is staying up all night to find a one-line bug that is making everything go wrong.
      [ Parent ]
    • Re:Not So New Concept by steveg (Score:1) Thursday February 05 2004, @09:07PM
    • Re:Not So New Concept by bobthemuse (Score:2) Thursday February 05 2004, @09:15PM
    • Knuth's Art of Computer Science did it, too by Dorktrix (Score:1) Friday February 06 2004, @12:42AM
    • WHEN should students learn Assemby by Poligraf (Score:2) Friday February 06 2004, @02:26AM
    • Re:Not So New Concept by wrp103 (Score:1) Friday February 06 2004, @10:15AM
    • YALE PATT ALREADY DID THIS by Prof. Pi (Score:2) Friday February 06 2004, @02:26PM
    • Re:Not So New Concept by psb777 (Score:1) Sunday February 08 2004, @08:24PM
    • 3 replies beneath your current threshold.
  • Knuth (Score:5, Informative)

    by red floyd (220712) on Thursday February 05 2004, @06:48PM (#8195909)
    Isn't that what Knuth did with his ASM language? I believe it was a synthetic assembler for a hypothetical stack machine -- hence the name ASM - Abstract Stack Machine.
    • MIXAL by texchanchan (Score:3) Thursday February 05 2004, @07:03PM
      • Re:MIXAL by Slamtilt (Score:3) Thursday February 05 2004, @08:35PM
        • Re:MIXAL by bunratty (Score:3) Thursday February 05 2004, @09:22PM
      • Re:MIXAL by red floyd (Score:2) Thursday February 05 2004, @09:58PM
    • Re:Knuth by d_p (Score:1) Thursday February 05 2004, @08:25PM
    • Re:Knuth by zhenlin (Score:1) Friday February 06 2004, @01:37AM
    • assembler for a hypothetical stack machine is ... by Poligraf (Score:2) Friday February 06 2004, @02:29AM
    • Re:Knuth by jemfinch (Score:2) Friday February 06 2004, @02:44AM
  • Somewhere in the middle... (Score:5, Insightful)

    by shakamojo (518620) * on Thursday February 05 2004, @06:48PM (#8195912)
    My Grandfater worked for IBM in the 70's and 80's. He did all his coding in assembly and machine language. His motto is "Anyone who doesn't know machine language has no business using a computer."

    There has to be a happy medium IMHO, and I think this is a great start. While my Grandfather was on the cutting edge of the PC revolution, he now has trouble figuring out email, etc, because he operates at too LOW a level (and I feel that he now has no business being online!). Then you have the users who have the same problems because they operate at too HIGH a level (AOL, etc...). The majority of programmers nowadays fall about smack in the middle of these two groups, but I'd argue they should be a little closer to the lower levels than they currently are.

    I learned LOGO and BASIC as a kid, then grew into Cobol and C, and learned a little assembly in the process. I now use C++, Perl, and (shudder) Visual Basic (when the need arises). My introduction to programming at a young age through very simple languages really helped to whet my appetite, but I think that my intermediate experiences with low level languages helps me to write code that is a lot tighter than some of my peers. Let's hope this starts a trend, it would be great if more young (and current) programmers appreciated the nuts and bolts!
    • Re:Somewhere in the middle... by CaptainCarrot (Score:2) Thursday February 05 2004, @06:57PM
    • Re:Somewhere in the middle... by digital bath (Score:2) Thursday February 05 2004, @06:57PM
    • Re:Somewhere in the middle... by Supp0rtLinux (Score:2) Thursday February 05 2004, @07:01PM
    • Re:Somewhere in the middle... by mgrennan (Score:1) Thursday February 05 2004, @07:04PM
    • by blixel (158224) on Thursday February 05 2004, @07:06PM (#8196160)
      (http://www.blixel.com/)
      His motto is "Anyone who doesn't know machine language has no business using a computer."

      Just say to him "Well Grandpa, my motto is anyone who can't describe, with exacting detail, all the functions of every organ in the human body doesn't deserve to live."
      [ Parent ]
    • Re:Somewhere in the middle... (Score:5, Insightful)

      by Saven Marek (739395) on Thursday February 05 2004, @07:09PM (#8196209)
      I learned LOGO and BASIC as a kid, then grew into Cobol and C, and learned a little assembly in the process. I now use C++, Perl, and (shudder) Visual Basic (when the need arises). My introduction to programming at a young age through very simple languages really helped to whet my appetite, but I think that my intermediate experiences with low level languages helps me to write code that is a lot tighter than some of my peers.

      I'm with you there. I learned C, C++ and assembler while at university, and came out with the ability to jump into anything. Give me any language and I can guarantee I'll be churning out useful code in a VERY short amount of time.

      Compare this to my brother, 12 years younger than me who has just completed the same comp.sci course at the same uni, and knows only one language; Java. Things change, not always for the better. I know many courses haven't gone to the dogs as much as that, but many have. I'm not surprised the idea of teaching coders how the computer works is considered 'novel'.

      I can see a great benefit for humanity the closer computers move to 'thinking' like people, for people. But that's just not done at the hardware level, it's done higher. The people who can bring that to the world are coders, and as far as I'm concerned thinking in the same way as the hardware works is absolutely essential for comp.sci. Less so for IT.
      [ Parent ]
    • Re:Somewhere in the middle... by line.at.infinity (Score:2) Thursday February 05 2004, @07:19PM
    • Re:Somewhere in the middle... by NanoGator (Score:2) Thursday February 05 2004, @07:22PM
    • Re:Somewhere in the middle... by toggles (Score:1) Thursday February 05 2004, @07:29PM
    • Re:Somewhere in the middle... by oaklybonn (Score:2) Thursday February 05 2004, @08:29PM
    • Re:Somewhere in the middle... (Score:5, Informative)

      by Lord Ender (156273) on Thursday February 05 2004, @08:47PM (#8197155)
      (http://127.31.33.7/)
      This was posted to USENET by its author, Ed Nather, on May 21, 1983.

      A recent article devoted to the *macho* side of programming
      made the bald and unvarnished statement:

      Real Programmers write in FORTRAN.

      Maybe they do now,
      in this decadent era of
      Lite beer, hand calculators, and "user-friendly" software
      but back in the Good Old Days,
      when the term "software" sounded funny
      and Real Computers were made out of drums and vacuum tubes,
      Real Programmers wrote in machine code.
      Not FORTRAN. Not RATFOR. Not, even, assembly language.
      Machine Code.
      Raw, unadorned, inscrutable hexadecimal numbers.

      Lest a whole new generation of programmers
      grow up in ignorance of this glorious past,
      I feel duty-bound to describe,
      as best I can through the generation gap,
      how a Real Programmer wrote code.
      I'll call him Mel,
      because that was his name.

      I first met Mel when I went to work for Royal McBee Computer Corp.,
      a now-defunct subsidiary of the typewriter company.
      The firm manufactured the LGP-30,
      a small, cheap (by the standards of the day)
      drum-memory computer,
      and had just started to manufacture
      the RPC-4000, a much-improved,
      bigger, better, faster --- drum-memory computer.
      Cores cost too much,
      and weren't here to stay, anyway.
      (That's why you haven't heard of the company, or the computer.)

      I had been hired to write a FORTRAN compiler
      Mel didn't approve of compilers.

      "If a program can't rewrite its own code",
      he asked, "what good is it?"

      Mel had written,
      in hexadecimal,
      the most popular computer program the company owned.
      It ran on the LGP-30
      and played blackjack with potential customers
      at computer shows.
      Its effect was always dramatic.
      The LGP-30 booth was packed at every show,
      and the IBM salesmen stood around
      talking to each other.
      Whether or not this actually sold computers
      was a question we never discussed.

      Mel's job was to re-write
      the blackjack program for the RPC-4000.
      (Port? What does that mean?)
      The new computer had a one-plus-one
      addressing scheme,
      in which each machine instruction,
      in addition to the operation code
      and the address of the needed operand,
      had a second address that indicated where, on the revolving drum,
      the next instruction was located.

      In modern parlance,
      every single instruction was followed by a GO TO!
      Put *that* in Pascal's pipe and smoke it.

      Mel loved the RPC-4000
      because he could optimize his code:
      that is, locate instructions on the drum
      so that just as one finished its job,
      the next would be just arriving at the "read head"
      and available for immediate execution.
      There was a program to do that job,
      an "optimizing assembler",
      but Mel refused to use it.

      "You never know where it's going to put things",
      he explained, "so you'd have to use separate constants".
      It was a long time before I understood that remark.
      Since Mel knew the numerical value
      of every operation code,
      and assigned his own drum addresses,
      every instruction he wrote could also be considered
      a numerical constant.
      He could pick up an earlier "add" instruction, say,
      and multiply by it,
      if it had the right numeric value.
      His code was not easy for someone else to modify.

      I compared Mel's hand-optimized programs
      with the same code massaged by the optimizing assembler program,
      and Mel's always ran faster.
      That was because the "top-down" method of program design
      hadn't been invented yet,
      and Mel wouldn't have used it anyway.
      He wrote the innermost parts of his program loops first,
      so they would get first choice
      of the optimum address locations on the drum.
      [ Parent ]
    • 1 reply beneath your current threshold.
  • Ouch by Anonymous Coward (Score:1) Thursday February 05 2004, @06:48PM
    • 1 reply beneath your current threshold.
  • Not necessarily the mark of a great programmer by aligma (Score:1) Thursday February 05 2004, @06:48PM
  • Programming or CompSci (Score:5, Insightful)

    by Sebastopol (189276) on Thursday February 05 2004, @06:48PM (#8195918)
    (http://slashdot.org/)
    Sounds more like a programming book than compsci book.

    writing an RB tree or an A* search an assembly would be a huge pain in the ass, if you ask me.

    compsci is a large part about data structures, how to choose the right datastructure, how to get the most out of an algorithm by picking the best datastructure, etc...

    but i didn't read the book, so i'll just go back to my websurfing now...

  • Not new (Score:3, Informative)

    by El Cabri (13930) on Thursday February 05 2004, @06:49PM (#8195922)
    (Last Journal: Thursday September 15 2005, @12:33PM)
    Knuth's The Art of Computer Programming was illustrating the algorithm in an imaginary assembly language.
  • Good idea, Bad Idea (Score:3, Insightful)

    by lake2112 (748837) on Thursday February 05 2004, @06:49PM (#8195927)
    Good Idea: First teaching simple programming fundamentals through a simple to understand language. Then, confuse the hell out of a student with assembly Bad Idea: Teaching CS by starting with one of the most cryptic languages around, and then trying to teach basic CS fundamentals. There are already problems with people interested in CS getting turned off by intro/intermediate programming classes. Imagine the retention rates once my CS100 class is taught in assembly.
    • Re:Good idea, Bad Idea by tickticker (Score:1) Thursday February 05 2004, @06:57PM
    • Re:Good idea, Bad Idea by AstynaxX (Score:3) Thursday February 05 2004, @07:02PM
      • 1 reply beneath your current threshold.
    • Re:Good idea, Bad Idea by AvitarX (Score:3) Thursday February 05 2004, @07:04PM
    • Re:Good idea, Bad Idea by CaptainCarrot (Score:3) Thursday February 05 2004, @07:08PM
    • Re:Good idea, Bad Idea (Score:5, Insightful)

      by RAMMS+EIN (578166) on Thursday February 05 2004, @07:10PM (#8196217)
      (http://inglorion.net/ | Last Journal: Thursday October 06 2005, @07:17AM)
      ``Bad Idea: Teaching CS by starting with one of the most cryptic languages around, and then trying to teach basic CS fundamentals.''

      I completely disagree. Assembly is actually one of the simplest languages around. There is little syntax, and hardly any magic words that have to be memorized. Assembly makes an excellent tool for learning basic CS fundamentals; you get a very direct feeling for how CPUs work, how data structures can be implemented, and why they behave the way they do. I wouldn't recommend assembly for serious programming, but for getting an understanding of the fundamentals, it's hard to beat.
      [ Parent ]
    • Re:Good idea, Bad Idea (Score:4, Insightful)

      by pla (258480) on Thursday February 05 2004, @07:17PM (#8196302)
      (Last Journal: Monday April 03 2006, @07:23PM)
      Then, confuse the hell out of a student with assembly

      I disagree. Personally, I learned Basic, then x86 asm, then C (then quite a few more, but irrelevant to my point). Although I considered assembly radically different from the Basic I started with, it made the entire concept of "how the hell does that Hello World program actually work?" make a whole lot more sense.

      From the complexity aspect, yeah, optimizing your code for a modern CPU takes a hell of a lot of time, effort and research into the behavior of the CPU itself. But to learn the fundamental skill of coding in assembler, I would consider it far less complex than any high-level language. You have a few hundred instructions (of which under a dozen make up 99% of your code). Compare that to C, where you have literally thousands of standard library functions, a good portion of which you need to understand to write any non-trivial program.


      There are already problems with people interested in CS getting turned off by intro/intermediate programming classes.

      You write that as though you consider it a bad idea...

      We have quite enough mediocre high-level hacks (which I don't mean in the good sense, here) flooding the market. If they decide to switch to English or Art History in their first semester, all the better for those of us who can deal with the physical reality of a modern computer. I don't say that as an "elitist" - I fully support those with the mindset to become "good" programmers (hint: If you consider "CS" to have an "S" in it, you've already missed the boat) in their efforts to learn. But it has grown increasingly common for IT-centric companies to have a handful of gods, with dozens or even hundreds of complete wastes-of-budget who those gods need to spend most of their time cleaning up after. We would do better to get rid of the driftwood. Unfortunately, most HR departments consider the highly-paid gods as the driftwood, then wonder why they can't produce anything decent.

      Hmm, okay, rant over.
      [ Parent ]
    • Re:Good idea, Bad Idea by lake2112 (Score:1) Thursday February 05 2004, @07:32PM
    • And the problem is? by Optical-i (Score:1) Thursday February 05 2004, @08:02PM
    • Re:Good idea, Bad Idea by geekoid (Score:2) Thursday February 05 2004, @09:06PM
    • Re:Good idea, Bad Idea by 706GL (Score:1) Thursday February 05 2004, @09:40PM
    • 4 replies beneath your current threshold.
  • The Art of Assembly book by Anonymous Coward (Score:1) Thursday February 05 2004, @06:49PM
  • Whatever by QuantumG (Score:2) Thursday February 05 2004, @06:49PM
    • Re:Whatever by jhoger (Score:2) Thursday February 05 2004, @07:01PM
      • Re:Whatever by QuantumG (Score:2) Thursday February 05 2004, @10:19PM
        • Re:Whatever by jhoger (Score:2) Thursday February 05 2004, @11:11PM
          • Re:Whatever by QuantumG (Score:2) Thursday February 05 2004, @11:50PM
            • Re:Whatever by jhoger (Score:2) Friday February 06 2004, @12:15AM
  • New? (Score:5, Insightful)

    by Sloppy (14984) * on Thursday February 05 2004, @06:50PM (#8195938)
    (http://www.biglumber.com/ | Last Journal: Tuesday November 27, @12:44PM)
    A new book was just released which is based on a new concept - teaching computer science through assembly language
    Uh, assembly language for teaching isn't exactly a new idea. Knuth's AoCP books used MIX, a "fake" assembly language, even though easy-to-read languages (e.g. ALGOL) were already around at the time. And he wasn't even trying to teach fundamentals about computers work -- he was teaching higher-level stuff, algorithms in those books. Think about just how weird that is.

    Perhaps this current obsession with learning using 'easy' languages is the wrong way to do things.
    That depends on what you're trying to learn. I think someone with a CS degree should have a deep understanding of things, and should have at least some experience working in assembly language, managing memory, writing compilers, etc. But that doesn't mean that high-level languages are a bad idea when they're learning higher-level concepts. Do you want someone wasting their time remembering what is being stored in what register, when they're learning how to write a web browser? Of course not: you want them to be thinking about the real issues at hand.
    • Re:New? by thogard (Score:1) Thursday February 05 2004, @08:09PM
    • Re:New? by Alien_Phreak (Score:1) Thursday February 05 2004, @09:26PM
    • Re:New? by tswann01 (Score:1) Friday February 06 2004, @04:04PM
  • Wussies (Score:5, Funny)

    by mikeophile (647318) on Thursday February 05 2004, @06:51PM (#8195947)
    Real programmers learn machine code.
    • Re:Wussies by blueforce (Score:1) Thursday February 05 2004, @06:54PM
    • Re:Wussies (Score:5, Funny)

      by unix guy (163468) on Thursday February 05 2004, @06:58PM (#8196055)
      (http://www.schronce.net/)
      Real programmers learn machine code.

      REAL programmers use cat > /dev/kmem
      [ Parent ]
      • Re:Wussies by ScrewMaster (Score:2) Thursday February 05 2004, @11:32PM
      • Re:Wussies by jtra (Score:1) Friday February 06 2004, @03:46AM
      • Re:Wussies by GerritHoll (Score:1) Friday February 06 2004, @06:50AM
      • 3 replies beneath your current threshold.
    • Re:Wussies by jhoger (Score:1) Thursday February 05 2004, @07:05PM
      • Re:Wussies by 8282now (Score:2) Thursday February 05 2004, @07:12PM
        • Re:Wussies by pedro (Score:2) Friday February 06 2004, @12:57AM
        • Re:Wussies by PurplePhase (Score:1) Friday February 06 2004, @10:09AM
    • Re:Wussies by prostoalex (Score:1) Thursday February 05 2004, @07:16PM
    • Re:Wussies by bigberk (Score:2) Thursday February 05 2004, @08:20PM
      • Re:Wussies by Jacek Poplawski (Score:2) Friday February 06 2004, @08:24AM
      • 1 reply beneath your current threshold.
    • The Story of Mel by AntiCopyrightRadical (Score:1) Thursday February 05 2004, @08:28PM
      • Link Correction by AntiCopyrightRadical (Score:1) Thursday February 05 2004, @08:34PM
    • Re:Wussies by dpilot (Score:2) Thursday February 05 2004, @08:50PM
      • Re:Wussies by tjb (Score:2) Thursday February 05 2004, @10:21PM
        • Re:Wussies by dpilot (Score:1) Friday February 06 2004, @08:08AM
    • Re:Wussies by rthille (Score:2) Thursday February 05 2004, @09:59PM
    • 7 replies beneath your current threshold.
  • Your book? (Score:5, Informative)

    by Tet (2721) * <slashdot.astradyne@co@uk> on Thursday February 05 2004, @06:51PM (#8195948)
    (http://www.astradyne.co.uk/tet | Last Journal: Friday November 09, @08:34PM)
    A new book was just released

    What you meant to say was that your new book has just been released. If you're going to pimp your wares on Slashdot, at least put an appropriate disclaimer on. That said, I completely agree with the premise of the book. I've met a lot of mediocre programmers, and a few good ones. But I've never yet met a real star that didn't have some background in assembly language programming. Personally, I haven't written anything in assembly in well over a decade. But that fact that I can do so if needed makes me a better programmer, and I'd recommend it to any aspiring coder as a key skill to learn. I wouldn't say IA32 is a particularly nice introduction (I'd start with a cleaner, simpler architecture, such as 6502), but it is at least widely available to anyone that wants to study it...

    • Re:Your book? (Score:5, Interesting)

      by FreshFunk510 (526493) on Thursday February 05 2004, @06:58PM (#8196052)
      Ugh. Johnnyb should've wrote a disclaimer that he was promoting his own book. This type of action turns me away from wanting to support such an individual. Sorry, nothing personal.
      [ Parent ]
      • Re:Your book? by Mr. Darl McBride (Score:2) Thursday February 05 2004, @08:36PM
      • Re:Your book? (Score:5, Interesting)

        by FreshFunk510 (526493) on Thursday February 05 2004, @07:39PM (#8196512)
        Oh, most definitely.

        Had he admitted that it was his own book, I might've actually read about the book, read the summary and saw if I was interested (as I'm a developer and have a degree in CS).

        But when he doesn't admit that and writes obviously biased remarks regarding knowing assembly to be a good programmer, I can't help but view it skeptically. In fact when I saw the response that it was his book I didn't even bother reading it anymore. All the words he posted lose credibility.

        And considering I got Score: 5 quite quick I have a feeling other people would agree with me. People don't like being "tricked" into buying stuff. It's the same reason why people don't like vendor-lock in and hate Microshaft.

        If you tell people its' your book and you give an open and honest review/opinion regarding it people will actually respect that and read about the book. Hey, it's just my guess, but I think I'm right.
        [ Parent ]
        • Re:Your book? by johnnyb (Score:3) Friday February 06 2004, @12:01AM
          • Re:Your book? by FreshFunk510 (Score:2) Friday February 06 2004, @01:40PM
        • Re:Your book? by infochuck (Score:1) Friday February 06 2004, @10:44AM
          • 1 reply beneath your current threshold.
        • 1 reply beneath your current threshold.
      • Re:Disclosure, not disclaimer by FreshFunk510 (Score:2) Thursday February 05 2004, @08:22PM
      • Re:Your book? by FreshFunk510 (Score:2) Thursday February 05 2004, @09:41PM
      • 4 replies beneath your current threshold.
    • You know are a wizard... by sleepingsquirrel (Score:2) Thursday February 05 2004, @07:10PM
    • Re:Your book? by klui (Score:2) Thursday February 05 2004, @07:11PM
    • Re:Your book? by tim1724 (Score:2) Thursday February 05 2004, @07:17PM
      • 1 reply beneath your current threshold.
    • Re:Your book? by wiredbuddy (Score:1) Thursday February 05 2004, @08:07PM
    • Re:Your book? by ocooch (Score:1) Thursday February 05 2004, @08:47PM
    • Re:Your book? by mdw2 (Score:1) Friday February 06 2004, @08:59AM
    • 2 replies beneath your current threshold.
  • nah by galacticdruid (Score:2) Thursday February 05 2004, @06:51PM
    • Re:nah by kreyg (Score:3) Thursday February 05 2004, @08:03PM
    • Re:nah (Score:4, Interesting)

      by dubious9 (580994) on Thursday February 05 2004, @08:26PM (#8196987)
      (Last Journal: Friday June 11 2004, @11:45AM)
      Yeah because you don't use variables, conditionals and types in assembly. Right. You just have to think harder about it.

      Also, you can use object oriented principles in assembly, just like you can in C. There aren't any convenient keywords or enforced methodologies (ie everything is an object), but you can gather sections of code that tie data and associated functionality together. You learn the advantages of modular programs. You learn how to count in binary. It forces you to not code carelessly. You learn good coding principles that you can apply to higher languages. In general you get another tool in your tool box. I'd say there are different flavors of programming and they aren't mutually exclusive. ie:

      Object Oriented
      Procedural
      Event-Based
      Interpreted
      Managed Memory (garbage collection)
      Assembly

      To leave one of these out of a CS program leaves me wondering how good the program is.
      [ Parent ]
  • Assembly language IS EASIER (Score:3, Insightful)

    by Anonymous Coward on Thursday February 05 2004, @06:51PM (#8195955)
    The think concepts of registers and memory locations and stack pointers and branching is easier to understand in assembly. You can teach a simple subset of instructions. It was the way I started back in the day. I scratched my head more later learning C, etc. I guess its just the opposite to kids these days.
  • Development cycle by rteunissen (Score:1) Thursday February 05 2004, @06:51PM
  • Obvious.. by appleLaserWriter (Score:1) Thursday February 05 2004, @06:52PM
  • Highschool Systems by HappyCitizen (Score:1) Thursday February 05 2004, @06:52PM
  • Here this India? by airrage (Score:1) Thursday February 05 2004, @06:53PM
    • Re:Here this India? by The Ape With No Name (Score:1) Thursday February 05 2004, @06:56PM
      • 1 reply beneath your current threshold.
    • 1 reply beneath your current threshold.
  • Probably a bad idea (Score:3, Insightful)

    by Geeyzus (99967) <mark.thatdamnkid@com> on Thursday February 05 2004, @06:53PM (#8195979)
    (http://www.thatdamnkid.com/)
    I think this is a bad idea, for a couple reasons.

    1) Difficulty - Assembly is harder to learn (and create meaningful programs with) than C++, or Java, which is replacing C++ in a lot of college curriculums. This means that students will be spending more time learning assembly, and less time learning about complicated algorithms and the things you really should be learning about (since languages change but algorithms are standard).

    2) Job practicality - 99% of CS grads aren't going to use assembly in their day to day jobs. They will most likely be programming in Java, or VB, or some web language (PHP/ASP/etc). Maybe some C++. But unless you are doing something that requires the control that assembly can provide, like real-time software or game engine development, you simply aren't using assembly at work.

    If it's harder to learn/teach, and you won't use it after you graduate, I can't see the point in teaching it at universities.

    Mark
  • No Way! by Spaceman40 (Score:1) Thursday February 05 2004, @06:53PM
    • Re:No Way! by Futaba-chan (Score:1) Thursday February 05 2004, @07:54PM
  • Whatever by The Ape With No Name (Score:2) Thursday February 05 2004, @06:53PM
    • Re:Whatever by $0 31337 (Score:1) Thursday February 05 2004, @07:15PM
  • I don't know why he didn't mention that this is a free documentation project:

    http://savannah.nongnu.org/projects/pgubook/ [nongnu.org]

    It's also being used at Princeton [princeton.edu]

  • Knowing assembly language is vital, mostly by dysprosia (Score:2) Thursday February 05 2004, @06:54PM
  • by WankersRevenge (452399) on Thursday February 05 2004, @06:54PM (#8195994)
    (http://www.jezner.com/)
    assembly is the great monster that requires fresh blood every year, or the great darkness will fall upon the land. i myself have never dabbled in assembly because i don't like living in an hp lovecraft nightmare.

    For those of you insane enough to take the plunge, check out this FREE online introduction course [ccsu.edu] (no reg, don't ya love it). The guy who wrote it is pretty wacky. I took his java introductory course [ctstateu.edu] and it was hip as well as very educational.
  • Oracle DBMS via Assembler by ackthpt (Score:1) Thursday February 05 2004, @06:55PM
  • From the linked page (Score:5, Funny)

    by LineNoiz (616971) <kal_durak@ya3.14159hoo.com minus pi> on Thursday February 05 2004, @06:55PM (#8196001)
    Get it to your Valentine on time! Choose UPS 2 DAY and pay the price of Ground.

    Yeah. Give my GF a book on Linux Assembly programming. That should get those panties off in a hurry.
  • What about the non-developers? by lake2112 (Score:1) Thursday February 05 2004, @06:55PM
  • Computer Science Curriculums (Score:3, Interesting)

    by pointzero (707900) on Thursday February 05 2004, @06:55PM (#8196009)
    (http://www.rocketek.com/)
    Perhaps it's time that computer science curriculums start teaching assembly language first.
    Here at University of New-Brunswick (Canada), they may not teach assembly language "first", but we do have a second year course dedicated to assembly and the inner workings of computers. My only problem though at the school is that we learn the Motorola M68HC11 cpu and not current ones. Sure it's easier to learn and understand, but most computers we work on today are x86 based.

    My 2 cents.
  • Hey! by fiannaFailMan (Score:2) Thursday February 05 2004, @06:55PM
  • A good idea (Score:3, Insightful)

    by swtaarrs (640506) <swtaarrs.comcast@net> on Thursday February 05 2004, @06:56PM (#8196014)
    I agree that assembly language should be taught, but not necessarily as the first language. BASIC is a good tool for teaching higher level programming ideas like conditional statements, loops, etc... Once those concepts are understood, C should be taught. I was a fairly proficient C programmer before I learned assembly (68k), but even then assembly helped me understand much more about the inner workings of C and what lines of code do. Instead of just knowing that code I write works, I now know why it works and I am able to do much more advanced things with a low-level knowledge of programming.
    • Re:A good idea by smallpaul (Score:2) Thursday February 05 2004, @08:50PM
      • Re:A good idea by swtaarrs (Score:2) Thursday February 05 2004, @11:26PM
  • That's good and all but... by ejaw5 (Score:2) Thursday February 05 2004, @06:56PM
  • Why not just use an HP calc? by teambpsi (Score:2) Thursday February 05 2004, @06:56PM
    • 1 reply beneath your current threshold.
  • For the record (Score:5, Interesting)

    by pclminion (145572) on Thursday February 05 2004, @06:56PM (#8196025)
    The CS program at Portland State University starts with assembly in their introductory classes. At the time I was there, it was x86 assembly, but I've heard that some professors are using Sparc assembly as well -- not a good idea in my opinion, simply because of 1) the delay slot and 2) the sethi instruction, both of which are a little confusing for someone who's never coded before, let alone never coded in assembly language.

    I think it's a little weird to call this "Learning Computer Science via Assembly Language." It's programming, not computer science. Computer science is really only marginally about computers. It has to do more with algorithms, logic, and mathematics.

    You can study computer science, and produce new knowledge in the field, without ever touching a computer.

    This misunderstanding is, I think, part of the reason so many students drop out of CompSci. They head into it thinking it's about programming, and are startled to find that computation and programming are not equivalent.

    That's why the Compilers course at PSU is considered the "filter" which kills all the students who aren't really interested in computer science. They really need to spin off a seperate "Software engineering" school for these students, since what they really want to study is programming.

  • real programmers by lethalwp (Score:2) Thursday February 05 2004, @06:56PM
  • Teach architecture, not assembly by wan-fu (Score:2) Thursday February 05 2004, @06:57PM
  • by Wise Dragon (71071) on Thursday February 05 2004, @06:57PM (#8196041)
    (http://slashdot.org/)
    I think the article should have disclosed that the submitter (johnnyb) is also the author of the book, Jonathan Bartlett. So rather than saying "A new book was just released", I would rather see something like "I wrote this new book." Here is johnnyb's website. http://www.eskimo.com/~johnnyb/

  • Buffer Overflow by Supp0rtLinux (Score:1) Thursday February 05 2004, @06:57PM
  • A nice exercise... by DrCode (Score:2) Thursday February 05 2004, @06:58PM
  • Great concept. (Score:5, Insightful)

    by shaitand (626655) on Thursday February 05 2004, @06:59PM (#8196060)
    (http://www.ganjablogger.com/ | Last Journal: Thursday January 05 2006, @05:36PM)
    I started out learning to code in asm on my c64 and I'd have to say it was a very rewarding experience.

    Anyone who disagrees with this probably doesn't have much experience coding in assembler to begin with. Asm really is fairly easy, the trick is that most who teach asm actually spend too much time on those computer concepts and not enough time on actual real coding. It's wonderful understanding how the machine works, and necessary to write good assembler but you should start with the 2 pages of understanding that is needed to "get" asm at all.

    Then teach language basics and THEN teach about the machine using actual programs (text editor, other simple things) and explaining the reason they are coded the way they are in small chunks. Instead of handing a chart of bios calls and a tutorial on basic assembler, introduce bios calls in actual function in a program, most of them are simple enough that when shown in use they are quite clear and anyone can understand.

    After all assembler, pretty much any assembler, is composed of VERY simple pieces, it's understanding how those pieces can be fit together to form a simple construct and how those simple constructs form together to create a simple function and how those simple functions form together to create a simple yet powerful program that teaches someone programming. Learning to program this way keeps things easy, but still yields a wealth of knowledge about the system.

    It also means that when you write code for the rest of your life you'll have an understanding of what this and that form of loop do in C (insert language here) and why this one is going to be faster since simply looking at the C (insert language here) concepts doesn't show any benefit to one over the other.

  • Bah by be-fan (Score:2) Thursday February 05 2004, @07:00PM
    • Re:Bah by netsharc (Score:2) Thursday February 05 2004, @07:33PM
      • Re:Bah by be-fan (Score:2) Thursday February 05 2004, @07:54PM
    • Re:Bah by Autonomous Coword (Score:1) Thursday February 05 2004, @07:59PM
    • Re:Bah by corngrower (Score:1) Thursday February 05 2004, @10:07PM
      • Re:Bah by be-fan (Score:2) Thursday February 05 2004, @10:20PM
  • Believe it! by mgrennan (Score:1) Thursday February 05 2004, @07:00PM
  • im taking asm right now... by drwhite (Score:1) Thursday February 05 2004, @07:00PM
  • Grounding in the basics by Ra5pu7in (Score:2) Thursday February 05 2004, @07:00PM
  • Assembly language is still relevant today by mpthompson (Score:2) Thursday February 05 2004, @07:00PM
  • Assembly has got nothing to do with cs by Erik Hensema (Score:2) Thursday February 05 2004, @07:00PM
    • 1 reply beneath your current threshold.
  • Back in my day... by Colonel Cholling (Score:1) Thursday February 05 2004, @07:00PM
  • Depends on your needs by el-spectre (Score:2) Thursday February 05 2004, @07:01PM
  • Going even farther than just assembly by jinxidoru (Score:2) Thursday February 05 2004, @07:01PM
  • Ah, the good old days... by bennomatic (Score:2) Thursday February 05 2004, @07:01PM
  • Am I that old? by Anonymous Coward (Score:1) Thursday February 05 2004, @07:02PM
  • Loughborough Uni UK by Anonymous Coward (Score:1) Thursday February 05 2004, @07:02PM
  • CS Fundamentals by ElDuque (Score:1) Thursday February 05 2004, @07:02PM
  • Not language choice, but lack of design/structures by neutron2000 (Score:1) Thursday February 05 2004, @07:02PM
  • I don't know about CS by Valar (Score:2) Thursday February 05 2004, @07:02PM
  • I am not quite dead yet - sir. by northwind (Score:1) Thursday February 05 2004, @07:02PM
  • Yes, hardly a new concept by Flexagon (Score:1) Thursday February 05 2004, @07:03PM
  • X86??? OMG that sucks... (Score:5, Insightful)

    by walt-sjc (145127) on Thursday February 05 2004, @07:03PM (#8196124)
    Of all the processors out there, yes the x86 is common but it has to be one of the WORST instruction sets - one of the most difficult to work with.

    Is it just me???

    I DO think it's a good idea to be teaching assembly, not so sure as the core of a comp sci program however. I started playing with assembly fairly early, on 6052, z80, and then later with 68000 and IBM 370. It's good to know, but I would do major stuff in it anymore. That's what high-level languages are for. You only drop to assembly when you have to for speed or space.
  • Assembly... by thomas536 (Score:1) Thursday February 05 2004, @07:04PM
  • Hear hear! by gerardrj (Score:2) Thursday February 05 2004, @07:05PM
  • Bah. by ProtonMotiveForce (Score:1) Thursday February 05 2004, @07:05PM
  • The concepts in assembly can help by K.B.Zod (Score:1) Thursday February 05 2004, @07:06PM
  • It's how I did it by Gyorg_Lavode (Score:2) Thursday February 05 2004, @07:06PM
  • why stop at assembly by ch-chuck (Score:1) Thursday February 05 2004, @07:06PM
  • I'm not sure I buy that. by mindstrm (Score:1) Thursday February 05 2004, @07:07PM
  • Not a good idea (Score:3, Interesting)

    by El (94934) on Thursday February 05 2004, @07:08PM (#8196192)
    I think one would be much better off writing in C without optimization, then stepping through the execution in a disassembler to see how the resulting machine code operates. Yes, it helps to write more efficient high level code if you know how it is converted to machine code. For example, I had a coworker who made a habit of declaring initialized arrays local to his functions. I had to point out to him: "You do know that this causes the array to be copied onto the stack every time you enter the function, thus really slowing down program execution, don't you?" Apparently this had never occured to him, because he had never actually watched the code execute.
  • emulator (Score:4, Insightful)

    by bcrowell (177657) on Thursday February 05 2004, @07:08PM (#8196195)
    (http://www.lightandmatter.com/)
    When I was a kid, I first learned BASIC on a TRS-80, and then learned Z80 assembler. (There were no compilers available.) Thirteen-year-old me had a really hard time with asembler at first. For example, I thought preprocessor defines were like floating point variables that you could modify at runtime.

    Assembler-first might work with beginners if it was on an emulator where they could see exactly what was happening, and there was no way to crash it. Otherwise, I just don't see the point of making things harder.

    Of course if you really want to make it hard, you hand every twelve-year-old kid a copy of Knuth and a hardware implementation of Knuth's hypothetical processor. Then our generation could be completely assured of job security.

  • My high scoll curriclulum by tickticker (Score:1) Thursday February 05 2004, @07:08PM
  • Elitist crap by alphorn (Score:1) Thursday February 05 2004, @07:09PM
  • Why should programming training differ... by riprjak (Score:1) Thursday February 05 2004, @07:09PM
  • Abstraction by tttonyyy (Score:1) Thursday February 05 2004, @07:10PM
  • double-edged sword by ummit (Score:1) Thursday February 05 2004, @07:10PM
  • by use_compress (627082) on Thursday February 05 2004, @07:10PM (#8196220)
    (Last Journal: Thursday February 26 2004, @12:47AM)
    There are a million fields in CS-- you can view them as points on a line that stretches from engineering to mathematics. The people who work in architecture are at the most extreme end of the engineering section. If you want to go into systems programming or into architecture, then I can see how would want to base everything off of asm. But if you specialize in ai, or algorithms, or theory, you really don't encounter assembly that often... for the most part, the need isn't there to develop extremely high performance, system dependent apps. In these fields, you could do of a cs curriculum (through graduate) entirely in Matlab, Prolog and ML. The emphasis is on the mathematical structures the program represents over how the computer actually deals with them.
    • 1 reply beneath your current threshold.
  • Tail Wagging Hound? by TexVex (Score:2) Thursday February 05 2004, @07:11PM
  • by Cryptnotic (154382) on Thursday February 05 2004, @07:11PM (#8196226)
    (http://www.gnaa.us/)
    A real computer science program will teach generic principles of programming and systems development, with projects that delve into a variety of actual implementations of systems.

    For example, a b-tree data structure is fundamentally the same thing whether you implement it in 32-bit ARM assembly language or 16-bit x86 assembly language or C or Java.

    To understand how assembly language works, you need to understand how a processor works, how instruction decoding works, how register transfer language works, how clocking a processor makes it accomplish things. To understnad how registers hold values electrically and transfer values between registers you need to understand some physics and electronics.

    To understand how a compiler takes a source language and translates it into a target language, you need to understand a little about the kinds of languages computers can understand (Context-Free Languages) and how they can parse them (Context-Free Grammars). Delving into that field will lead to the core theory of computer science, what is possible with machines in general and what is impossible.

    A real computer science program at a university will take you through all of these subjects over several years, allowing for some excursions into other things like databases and cryptography. A real computer science program is always theory with projects that are applied to actual implementations.

  • yep by NemoX (Score:2) Thursday February 05 2004, @07:11PM
  • Race car driver analogy by betis70 (Score:2) Thursday February 05 2004, @07:11PM
    • by xtal (49134) on Thursday February 05 2004, @09:31PM (#8197460)
      (http://www.xdesignlabs.com/)
      I race cars, albeit not professionally. You are very incorrect.

      Being able to tell your crew that you think your car is leaning out under hard accelleration or that your suspension is too stiff or unbalanced is made easier if you understand the physics and engineering involved. Most professional race car drivers know a very great deal about these things indeed. Unless you are born rich, most dedicated racers build and repair their own cars and know a great deal indeed about the tools of their trade.

      I have an EE degreee; I was taught how to build registers from logic gates; how to build counters and adders from those; how to form the basics of a primitive cpu and implement one in vhdl; how to program x86 assembly; I was also taught how the electrical signals interact to make those things possible; the physics of semiconductors and the things that make those logic gates possible. All of those things have made me able to more effectively program computers on a high level. Why would we expect less from a CS program? Computational engines, computers, are the things that drive the CS profession. I would expect anyone in the field to be intimately aware of their theoretical underpinnings.

      Ironically, they have also made me a much better driver as I am intimately aware of the workings and how to tune my car's EFI system than most may be.

      Would you go to a doctor who has never taken chemistry? Didn't think so.
      [ Parent ]
  • Languages I sudied for my CS degree... by Ion Berkley (Score:2) Thursday February 05 2004, @07:12PM
  • How about an alternate? (Score:3, Funny)

    by man_ls (248470) <jkoebel@gmail . c om> on Thursday February 05 2004, @07:13PM (#8196257)
    Just learn C instead. It combines the readability of assembly with the ease of use of assembly.
  • Ugh... x86 (Score:3, Insightful)

    For anybody on here thinking about broadening their CS horizons, I would recommend not learning x86, at least not first. A simpler, RISC(-ish) instruction set is really the way to go. It's a lot more enjoyable to program in. Some good choices are maybe z80 or 68k (program your TI calculator maybe?) or Microchip's PICMicro microcontrollers (most models have under 35 instructions to learn).

    Learning x86 isn't a bad idea, and for most nerds programming assembly that's probably where it will be most useful, but I just think it's a better idea to start off programming ASM on something a little more enjoyable so that you can really learn to appreciate it before diving in with x86.
    • Re:Ugh... x86 by kyoko21 (Score:1) Thursday February 05 2004, @07:17PM
  • Assembler and the dragon book ... by Ulbrekt (Score:1) Thursday February 05 2004, @07:14PM
  • What's this guy trying to do? by l33t-gu3lph1t3 (Score:2) Thursday February 05 2004, @07:16PM
  • Learn assembly first, by all means (Score:4, Insightful)

    by John Jorsett (171560) on Thursday February 05 2004, @07:16PM (#8196295)
    I understand C much better than I would have had I not learned assembly language first. I think of C as a somewhat-more-abstract version of assembly. It has that "down to the bare metal" aspect in much of what you can do with it, particularly pointers.
  • Quick contest by rongage (Score:2) Thursday February 05 2004, @07:16PM
  • Know what you're working with by PaulWay (Score:1) Thursday February 05 2004, @07:16PM
  • The knowledge is still necessary by jkabbe (Score:2) Thursday February 05 2004, @07:17PM
  • Doesn't seem like a good idea by An Onerous Coward (Score:2) Thursday February 05 2004, @07:17PM
  • Everything old is new again by Asprin (Score:2) Thursday February 05 2004, @07:17PM
  • Assembly language not required... (Score:3, Interesting)

    by BigZaphod (12942) on Thursday February 05 2004, @07:17PM (#8196317)
    (http://www.bigzaphod.org/)
    I don't think knowing assembly language is required to become a good programmer, but a good programmer should learn how the computer works at that level at some point in their life. And that's the key. Assembly language isn't a bad way to learn that, but it isn't the only way. And, in many respects, it isn't really the best way, either.

    See, I'm sort of tore. I like this idea since I feel most programmers these days are sorely lacking in the fundamentals. However there are advantages to starting higher. One major advantage I can think of is that when you start so low level, there are certain ideas that may never occur to you. Certain ways of solving problems won't come up because you "know" how the computer works and therefore adapt your thinking to it and seeing things very narrowly. I believe that we should be working towards adapting the computer to us instead. And when students start out learning at higher and higher levels, they start thinking higher and higher level and see connections from their "low level" beginnings to a higher level ideal without being bogged down in the little details. I think that would help drive innovation.
  • This is BS by mslinux (Score:2) Thursday February 05 2004, @07:18PM
  • teaching csci through assembly language by Clod9 (Score:1) Thursday February 05 2004, @07:18PM
  • CS Curriculum by SlySpy007 (Score:1) Thursday February 05 2004, @07:19PM
  • If you really want to learn what's going on... by Rorschach1 (Score:2) Thursday February 05 2004, @07:19PM
  • New?!? by marktwen0 (Score:1) Thursday February 05 2004, @07:20PM
  • Not Either, but Both by DynaSoar (Score:2) Thursday February 05 2004, @07:22PM
  • Teaching assembly good, but perhaps not x86... by GrahamCox (Score:2) Thursday February 05 2004, @07:22PM
  • Assembly is an impediment (Score:3, Informative)

    by Tom7 (102298) on Thursday February 05 2004, @07:23PM (#8196379)
    (http://www.cs.cmu.edu/~tom7/ | Last Journal: Monday January 07 2002, @01:07AM)
    Assembly is an impediment to understanding high-level issues. While I agree 100% that any good CS program should include some discussion of assembly and systems programming (at least a few semesters), there is so much more to CS than systems hacking. There is no way that a whole modern CS curriculum should be taught in assembly language.

    As a starting language it's really a matter of preference: the bottom-up method gets you really understanding the machine (and really yearning for more convenient tools), but it is a slow, painful start. The things you learn are less general and will be less applicable years down the line. On the other hand, learning a high level language can leave you in the dark about what's going on under the hood, which means that some aspects of what you're doing will seem like "magic". For you efficiency addicts, this can mean less efficient code. On the other hand, the world will have fewer efficiency addicts!

    However, I think that assembly will turn a lot of people off of programming that could otherwise be interested in the subject and perhaps productive programmers, if not cowboy kernel hackers.
  • For the poor like me here is the download by Stalin (Score:1) Thursday February 05 2004, @07:26PM
  • In other news... by iamacat (Score:2) Thursday February 05 2004, @07:27PM
  • Computer Science != Programming by Michael Odell (Score:2) Thursday February 05 2004, @07:28PM
  • college by minus_273 (Score:2) Thursday February 05 2004, @07:28PM
  • Perhaps, or perhaps not. by raytracer (Score:2) Thursday February 05 2004, @07:28PM
  • why not make assembly higher level? by Nick haflinger (Score:1) Thursday February 05 2004, @07:28PM
  • Yes! I agree! by ibullard (Score:1) Thursday February 05 2004, @07:29PM
  • assembly and hardware (Score:3, Insightful)

    by jonniesmokes (323978) on Thursday February 05 2004, @07:29PM (#8196424)
    What I like best about computers is that they are super miniature machines. And unlike mechanical machines, they can do the same thing over and over again - not millions - but 10^20 or so times over and over. And they do this really really fast.

    Assembly allows you to get a little closer to the mechanism. And its really nice if your want to know how hardware works. Its especially good if you want to develop robots or gadgets that interface to computers. It's nice to learn about interrupts and flags and such.

    That said - if I can use C, Java, Pascal, Basic or anything higher - I will. Because it'll take 1/10th the time. Plus all those wonderful libraries are a lot easier to interface to. Even for programming the little micro controller's, its really nice to be able to do it in C.

    I started out as a computer programmer and have found myself branching in both the mechanical and electrical realms. Learning assembly:

    "Peter Norton's assembly language guide for the IBM PC" I wrote a disk editor. It took forever - actually - I didn't quite finish. Got about 85% of the way done. Nowadays - I think a microcontroller would be a lot more gratifying.
  • Duh... Computer Organization? by leoxx (Score:1) Thursday February 05 2004, @07:30PM
  • The Art of Assembly Language Programming by CleverDan (Score:2) Thursday February 05 2004, @07:30PM
  • That the worst idea ever by PissingInTheWind (Score:2) Thursday February 05 2004, @07:31PM
  • Excellent Programmers (Score:3, Insightful)

    by RKone2 (720851) on Thursday February 05 2004, @07:32PM (#8196445)
    I've found that the key difference between mediocre and excellent programmers is whether or not they know assembly language.

    You've got it backwards I think. The excellent programmers actually care about what they're doing, and as such have all learned assembly.

    Teaching assembly to someone who doesn't care won't turn them into an excellent programmer.
  • I dont think you can compare 1980's to now by doormat (Score:2) Thursday February 05 2004, @07:33PM
  • fundamentals by munkinut (Score:1) Thursday February 05 2004, @07:35PM
  • Pointless by beelsebob (Score:1) Thursday February 05 2004, @07:35PM
  • by PissingInTheWind (573929) on Thursday February 05 2004, @07:36PM (#8196489)
    From the book's presentation page:
    To be a programmer without ever learning assembly language is like being a professional race car driver without understanding how your carburetor (sic) works.

    To which I reply: To be a book writer without ever learning how to spell properly is like trying to teach programming by starting with assembly languages.
  • Any real numbers? by sholden (Score:2) Thursday February 05 2004, @07:37PM
  • Difference in ideas about CSCI (Score:3, Insightful)

    by WolfPup (120228) on Thursday February 05 2004, @07:37PM (#8196496)
    (http://slashdot.org/)
    I think whether this idea is a good one or not depends on what the program considers a Computer Science Degree. Where I have taken classes, the philosophy of Computer Science is more the science of algorithms and mathematics rather than practical programming experience. The idea being the research of new and more efficient algorithms or data structures not tied to a specific language . This is more suited towards graduate work in the field of Mathematics and Computer Science.

    Some other programs may approach the degree as a professional/vocational type of program preparing the student for eventual work in the field of programming.

    Learning assembly may be more beneficial to the student learning as an eventual programmer in that understanding some of the low level work that the computer is doing could be important in programming.

    I'm not sure that the mathematics and concept work would help as much considering a lot of the ideas in this is more general and not tied to any specific architecture, so learning the low level process may not help as much.
  • Assembler is good by kiwirob (Score:1) Thursday February 05 2004, @07:38PM
  • Untaught Golden Rule Of Assembly... by snatchitup (Score:2) Thursday February 05 2004, @07:38PM
  • Elitist argument. by Vellmont (Score:2) Thursday February 05 2004, @07:38PM
    • 1 reply beneath your current threshold.
  • by Wolfier (94144) on Thursday February 05 2004, @07:39PM (#8196509)
    It is not assembly language. It is the way we think - and in the world of computers there are 5 types of languages that will make you take on anything very easy.

    1. Procedural (Pascal/C/BASIC)
    2. Object-Oriented (Eiffel/Smalltalk/Java/C++)
    3. Functional (Scheme/Lisp/Logo)
    4. Declarative (Prolog/Forth)
    5. Assembly (x86 etc.)

  • New thing? by Shant3030 (Score:2) Thursday February 05 2004, @07:39PM
  • I agree. by atheken (Score:1) Thursday February 05 2004, @07:40PM
  • Get it to your valentine! by PissingInTheWind (Score:2) Thursday February 05 2004, @07:40PM
  • Unfortunately ... by krygny (Score:1) Thursday February 05 2004, @07:41PM
  • This is a BAD idea by 11223 (Score:2) Thursday February 05 2004, @07:46PM
  • An (informed) dissenting opinion... by turm (Score:2) Thursday February 05 2004, @07:46PM
  • I know assembly. by Albert Sandberg (Score:1) Thursday February 05 2004, @07:47PM
  • Is this anything new? by Covener (Score:2) Thursday February 05 2004, @07:50PM
  • Assembly teaches good programming practices by ca1v1n (Score:2) Thursday February 05 2004, @07:50PM
  • x86? That's not a real instruction set by biscuit67 (Score:2) Thursday February 05 2004, @07:50PM
  • Something like MC68000 would be better by ishmalius (Score:2) Thursday February 05 2004, @07:51PM
  • Plus ca change, Plus ca meme chose by UtilityFog (Score:1) Thursday February 05 2004, @07:52PM
  • For CS students, sure by ArchAngelQ (Score:1) Thursday February 05 2004, @07:53PM
  • high level languages are just tools. by vijayiyer (Score:1) Thursday February 05 2004, @07:54PM
  • Everything old is new again by snStarter (Score:2) Thursday February 05 2004, @07:55PM
  • "Tight" code not always necessary (Score:3, Insightful)

    by James Lewis (641198) on Thursday February 05 2004, @07:55PM (#8196692)
    "Old School" programmers tend to have this obsession with "tight" code, and very effecient code that Assembly language programming teaches. The problem is that some of them lose sight of reality, and sometimes they become downright elitist. The author of this book certainly falls in this category. He says, "The difference between mediocre and star programmers is that star programmers understand assembly language, whether or not they use it on a daily basis." Bullshit. Since when did what language you know determine how good a programmer you are?

    The fact is, MOST of today's programming requirements do not need tight code. Computers have become so fast that even a few million extra operations isn't going to make a percievable difference. That's not to say that there isn't a need for programmers who can program tight code, but the point is that it depends on the application and the platform it will be running on. Programming a huge text editor program like Microsoft Word is going to need good OO code that is easy to follow. You don't want a C hacker trying to squeeze .00000001 seconds out of the spell checker, making the code unfollowable to normal coders in the process, just because he thought it was cool. The fact is, he probably gets a kick out of writing code few others can follow. Maybe that's worth it for applications that need to be very efficient, but for other types of applications it isn't and it is just selfish of a coder to do that to the rest of his team so he can feel superior.

    In the end, how "good" a programmer is depends on how useful their code is and how quickly they can produce it. Usefulness isn't determined by efficiency alone, but by its maintainability and reusabiltiy as well. For some applications, assembly will help you, for others, it won't. Knowing assembly certainly gives you more flexibility, but not knowing it doesn't turn you into a "mediocre programmer". Hopefully, knowing it won't turn you into an elitist bastard like the author. It didn't me :)

  • Teaching assembly language by Tim C (Score:2) Thursday February 05 2004, @07:55PM
  • Depends doesn't it? by Kitsune (Score:1) Thursday February 05 2004, @07:56PM
  • ASM is not the place to start. (Score:5, Informative)

    by John Whitley (6067) on Thursday February 05 2004, @07:57PM (#8196725)
    (http://bangpath.org/)
    Perhaps it's time that computer science curriculums start teaching assembly language first.

    Having taught an assembly/into computer arch class, I agree with the sentiment that students who get "under the hood" gain valuable knowledge and working skills. Not just pounding ASM, but in learning how the machine works. Point agreed.

    Also having taught first year computer science students, and seen how some of academia's transitions in pedagogy affected students... I have to say that the idea of teaching first year students in assembly is friggin' daft.

    My reasoning is the same as why I strongly advocated an objects-first teaching model. It is increasingly critical for students to build a strong sense of software design and abstraction early on. This foundation makes students much better prepared to solve problems of many different scales (asm to component-systems) in the long run.

    There's evidence from a paper in one of the Empirical Studies of Programmers workshops that this approach does trade off design skills for purely algorithmic reasoning for students at the end of their first year. But my own experience, as well as that of some prominent Comp Sci Education (CSE) folks seems to indicate that this is far more than compensated for as a student's skills grow.

    Here's my theory as to why this is the case:
    The details of debugging, alogrithmic thinking, and problem solving are very much skill building exercises that really require time of exposure to improve. But it is much more difficult in my experience for students to build good design sense on their own. Once the framework for thinking in terms of good abstractions is laid down, it provides much stronger support for later filling all of those gory low-level details.

    Historical perspective: Ironically, this same reasoning is much of why I believe that academia's switch to C++ from languages like Pascal, Modula-2, etc. was an educational disaster for many years. The astute reader is now thinking: "hey, you just said you like objects-first; what up?" In the Procedural Era, many schools wouldn't expose students to C in the first year, as it had too many pitfalls that distracted from learning the basics of algorithmic thinking and important abstraction skills. Once the foundation was put in place, it was okay to swtich 'em to C for the rest of the program.

    When C++ and the early object boom really hit, this put on big pressure to teach first year students using C++. At one point in the mid-90's, upwards of 75% of 4-year institutions were teaching their first year in C++. Thus a language that had plenty more pitfalls than C, previously shunned for its pedagogical failings, entered the classroom. Combined with a lack of of proper OO mental retooling on the part of first year instructors and faculty made for something of a skills disaster on a broad scale. At best, students learned "Modula-C" instead of good OO style. At worst, they were so confused by this melange of one-instance classes and sloppy hybrid typing that they didn't get a cohesive foundation whatsoever.
  • Knuth did this 30 years ago by treerex (Score:1) Thursday February 05 2004, @07:58PM
  • Why stop at Assembly language? by Timbotronic (Score:2) Thursday February 05 2004, @08:02PM
  • asm training is essential by presearch (Score:2) Thursday February 05 2004, @08:04PM
  • Cool by mnmn (Score:2) Thursday February 05 2004, @08:04PM
  • Teaching Assembly by FBP (Score:1) Thursday February 05 2004, @08:06PM
  • Really -- the rich and cutting edge disagree by Anonymous Coward (Score:1) Thursday February 05 2004, @08:07PM
  • I wouldn't buy it w/o seeing more by glitch23 (Score:1) Thursday February 05 2004, @08:09PM
  • Assembly to teach architecture: A new concept? by scdeimos (Score:1) Thursday February 05 2004, @08:10PM
  • Race car driver? by Roger_Wilco (Score:1) Thursday February 05 2004, @08:11PM
  • Good programming practices by Kris2k (Score:1) Thursday February 05 2004, @08:11PM
  • I taught myself assembly, and I disagree by ScorpiusFan (Score:1) Thursday February 05 2004, @08:11PM
  • There's a certain point... by IshanCaspian (Score:2) Thursday February 05 2004, @08:11PM
  • Its about time some one woke up by nurb432 (Score:2) Thursday February 05 2004, @08:11PM
  • Download the book for free (Score:3, Informative)

    by milesw (91604) on Thursday February 05 2004, @08:11PM (#8196885)
    (http://tinyapps.org/)
    The book was released under the GNU Free Documentation License, and it can be downloaded for free (in PDF format) from: http://savannah.nongnu.org/projects/pgubook/ .
  • Lusers...I programin BINARY!!! by asternick (Score:2) Thursday February 05 2004, @08:13PM
  • I started learning with assembly by bigberk (Score:2) Thursday February 05 2004, @08:15PM
  • Huh? by FreemanPatrickHenry (Score:2) Thursday February 05 2004, @08:16PM
  • The only way by tuxlove (Score:1) Thursday February 05 2004, @08:19PM
  • Why stop at assembly? by BlueLlama (Score:2) Thursday February 05 2004, @08:20PM
  • Computer Engineering Perhaps? by Venner (Score:2) Thursday February 05 2004, @08:29PM
    • 1 reply beneath your current threshold.
  • I'm a current CS Major by 1000101 (Score:2) Thursday February 05 2004, @08:32PM
  • I'm sorry... by NewWaveNet (Score:1) Thursday February 05 2004, @08:33PM
  • by ca1v1n (135902) <snook@gua[ ]ronic.com ['not' in gap]> on Thursday February 05 2004, @08:36PM (#8197087)
    From the description:

    To be a programmer without ever learning assembly language is like being a professional race car driver without understanding how your carburetor works.

    My corollary:

    To program in assembly language is like driving in the Indy 500 in a car that doesn't have fuel injection.
  • I understand that x86 is the dominant architecture by vlad_petric (Score:2) Thursday February 05 2004, @08:39PM
  • This book (Score:5, Informative)

    by voodoo1man (594237) on Thursday February 05 2004, @08:43PM (#8197123)
    has been available [nongnu.org] for some time under the GNU Free Documentation License. I tried to use it a while back when I decided to learn assembler, but I found Paul Carter's PC Assembly Language [drpaulcarter.com] to be a much better introduction.
    • Re:This book by happyfrogcow (Score:2) Friday February 06 2004, @11:35AM
  • On programming in a CS curriculum by DingoBueno (Score:2) Thursday February 05 2004, @08:44PM
  • Pitt computer science by 4of11 (Score:1) Thursday February 05 2004, @08:48PM
  • It's great by Balthisar (Score:2) Thursday February 05 2004, @08:48PM
  • um... did no one else see this problem? by surfsalot (Score:1) Thursday February 05 2004, @08:48PM
  • An alternate view by ttfkam (Score:2) Thursday February 05 2004, @08:48PM
  • C++ useless unless you know ASM by blueworm (Score:1) Thursday February 05 2004, @08:49PM
  • Assembly is good for some, but not all by cpane (Score:1) Thursday February 05 2004, @08:54PM
  • Teach easier langauges first by prozac79 (Score:2) Thursday February 05 2004, @08:55PM
  • bold statements... by phish (Score:1) Thursday February 05 2004, @08:55PM
  • u have it backwards by cinnamon colbert (Score:1) Thursday February 05 2004, @08:56PM
  • Elitist, perhaps? (Score:3, Interesting)

    by mblase (200735) on Thursday February 05 2004, @09:00PM (#8197244)
    Perhaps it's time that computer science curriculums start teaching assembly language first.

    Yeah, as a mathematics major I've often felt that number theory is glanced over far too often in high schools. Kids really ought to learn why 1+1=2 and how to strictly define multiplication of integers before getting into such oversimplifications of mathematics as the Pythagorean Theorem.

    I think the submitter is proceeding from a false assumption. Anyone who's really pursuing a BS in Computer Science (from a reputable school, anyway) is probably going to get a course in assembly language whether they like it or not, and anyone who hasn't earned a BS shouldn't be calling themselves a "computer scientist."
    • 1 reply beneath your current threshold.
  • I'm appalled(sp) by SpacePunk (Score:2) Thursday February 05 2004, @09:06PM
  • I'm not even a software developer! But.... by King_TJ (Score:2) Thursday February 05 2004, @09:09PM
  • Since when is this a "new" concept? by Daytona955i (Score:2) Thursday February 05 2004, @09:09PM
  • Excellent vs. Mediocre programmers? by PanamaCongress (Score:1) Thursday February 05 2004, @09:11PM
  • This isn't new by KalvinB (Score:2) Thursday February 05 2004, @09:11PM
  • The Misfits of Science... by frobnoid (Score:2) Thursday February 05 2004, @09:13PM
  • Who cares about learning about computers? by jsburke (Score:2) Thursday February 05 2004, @09:15PM
  • Start with something simpler by wrmrxxx (Score:2) Thursday February 05 2004, @09:17PM
  • Anyone ever seen Steve Gibsons stuff? (Score:3, Interesting)

    by Phil John (576633) <.phil. .at. .webstarsltd.com.> on Thursday February 05 2004, @09:21PM (#8197381)
    ...his site is at http://www.grc.com [grc.com], he's got loads of security related info on his page and a shedload of Win32 progs coded entirely in assembler, every last line of em. He also created the very neat ShieldsUp tool to scare people into getting a personal firewall installed (like listing their netbios share names, doing a remote port scan and telling them the gory details of what people could do to their computer etc.).

    Most of the progs are under 30k in size, including a very cool sub-pixel font-rendering demo, and ones to disable messenger, dcom and upnp. A really nice touch is that some of them have sound fx, produced by a simple virtual synth, also coded in assembler...just cause he could (a true geek!)
  • It's available online (Score:3, Informative)

    by revery (456516) * <(ten.2cac) (ta) (selrahc)> on Thursday February 05 2004, @09:30PM (#8197453)
    (http://thepreacher.cac2.net/)
    Sorry if this has already been mentioned, but the book is available for dowload from this [nongnu.org] site, under the filelist link. Here is a direct link [nongnu.org] to the pdf.

    --

    Was it the sheep climbing onto the altar, or the cattle lowing to be slain,
    or the Son of God hanging dead and bloodied on a cross that told me this was a world condemned, but loved and bought with blood.
  • Suspicious... by zungu (Score:1) Thursday February 05 2004, @09:32PM
  • CS != Computers by jared9900 (Score:1) Thursday February 05 2004, @09:32PM
  • Theory is more important by rufusdufus (Score:2) Thursday February 05 2004, @09:34PM
    • 1 reply beneath your current threshold.
  • M68K-asm at Indiana University. by garlic_b (Score:1) Thursday February 05 2004, @09:37PM
  • by smoon (16873) on Thursday February 05 2004, @09:40PM (#8197536)
    (http://www.sagentusers.com/sagent/)
    The problem is that computer scientists don't make good programmers and vice-versa. If you're good with code and hunker down to write lots of programs, then you tend to clash with the all-theory-no-code camp that delights in big-O notation and graph theory. Of course there is a lot of middle ground, but in general the PHd professor types that staff CompSci departments I've been in tend to have stopped learning about computers as soon as they finished their doctorate and instead concentrate on internecine politics, incomprehensible papers, and teaching the occaisional class (leaving most of that to T.A.'s who actually teach the class and understand how to compile programs).

    Meanwhile the coder types graduate with a B.S. or maybe a masters then go into commercial development shops and crank out code, forgetting as much as they can about red-black trees and other subtle CompSci concepts.

    So if you want to crank out programmers, then assembly is probably a good thing. God knows I learned a lot from the assembly classes I took.

    If you're trying to scare students away then assembly is also a good tactic. Nothing like a good hex dump to get some non CompSci students eyes to glaze over. Sort of like making people take Biology or Physics, but instead of teaching about cells and newtonian motion, jump right into the finer points of quantum mechanics or amino acid chemistry.

    On the other hand, for 2nd year CompSci students, Assembly is probably a good thing to get out of the way. It really sucks, for example to take economics for 4 years only to learn at the end "just kidding, reality is too complex to model so these are all just gross oversimplifications." Sort of like thinking programming == Java then finding out how it all _really_ works.

  • This is new? by jimfrost (Score:2) Thursday February 05 2004, @09:43PM
  • Kids these days... or, everything old is new again by twalton (Score:1) Thursday February 05 2004, @09:51PM
  • Assembly is KEY to a CS major by Biff98 (Score:1) Thursday February 05 2004, @09:54PM
  • CS != uber-coder degree (Score:5, Insightful)

    by Senior Frac (110715) on Thursday February 05 2004, @09:59PM (#8197670)
    (http://slashdot.org/)

    Perhaps it's time that computer science curriculums start teaching assembly language first.

    It's more critical they actually teach computer science first, instead of programming. A new CS hire, assuming their school was worth a damn, can learn a new language. I want to know if they have the math background to understand the problems that will be handed to them and that they have the ability to self-learn.

  • Why not start with Rocky's Boots? by otis wildflower (Score:1) Thursday February 05 2004, @10:02PM
  • Comments from an old fart programmer by cdn-programmer (Score:2) Thursday February 05 2004, @10:06PM
  • Processors are for wusses by highwindarea (Score:1) Thursday February 05 2004, @10:07PM
  • Learn from the best by akuma(x86) (Score:2) Thursday February 05 2004, @10:08PM
  • Dijkstra doesn't think so by alien_blueprint (Score:2) Thursday February 05 2004, @10:13PM
  • Ahhh... brings back memories... by divisionbyzero (Score:1) Thursday February 05 2004, @10:18PM
  • Old School by Doc Ruby (Score:2) Thursday February 05 2004, @10:19PM
  • Who is Jon von Neumann? If you don't know and are planning on programming you should find out. Worse, if you already have a CS degree and don't know about "von Neumann" architecture then you missed am important topic.

    If you want high performance code, you must understand procedural programming and assembly language. You must understand the components of the modern "von Neumann" architecture [princeton.edu] like RAM, Registeres, L1 cache, L2 cache, ALU etc ....

    While everyone has gone OOP (Object Oriented) crazy, the "von Neumann" architecture is NOT optimized for OOP programming. Because modern CPU's have lots of cache, the latency that exists between the CPU and Memory is reduced. This is called "faking" memory bandwidth, read this article on the von Nuemann bottleneck [knozall.com].

    Serious coders should learn ASM, then move to a higher level language like 'C' then see how the 'C' statements compile in ASM and then analyze efficiency.

    Modern wisdom says, be wasteful, vendors will make bigger/faster machines and we won't have to care that our code is slow, inefficient, and not optimized for the architecture. Keep in mind, you can save substantially on hardware expenditures by hiring good coders that know how to tune and optimize code but, if you don't want to be bothered, just plan on large capital expenditures every couple of years. Also write everything is JAVA and make sure you create indexes on every column of every table in your database for faster lookups.. ( I am joking, don't really do this. )
  • Book is GPL by Anonymous Coward (Score:1) Thursday February 05 2004, @10:25PM
  • I DID learn to program in an assembly language by Mr. Neutron (Score:2) Thursday February 05 2004, @10:28PM
  • Bill doesn't want you to know assembly by DuctTape (Score:1) Thursday February 05 2004, @10:34PM
  • What Goes Around, Comes Around by Anonymous Coward (Score:1) Thursday February 05 2004, @10:46PM
  • SICP (Score:3, Interesting)

    by paxil (99137) on Thursday February 05 2004, @10:46PM (#8197933)
    Sounds like a bad idea to me, for reasons pointed out in other posts.

    For a first course in CS, I think it would be hard to do better than one based on Structure and Interpretation of Computer Programs [mit.edu].

    This book takes one from zero to writing a compiler in a few hundred pages, including a chapter on writing code for register machines which gives the student a good idea of what is going on "under the hood."

    To those who would say that Scheme is useless outside of academics, I would counter that once the concepts in this text are mastered, it is easy to transfer them to other languages.
    • Re:SICP by johnnyb (Score:2) Friday February 06 2004, @12:36AM
    • Re:SICP by markprus (Score:1) Friday February 06 2004, @01:01AM
  • You have it completely backwards by Kor49 (Score:1) Thursday February 05 2004, @10:58PM
  • Amen! by SuperChuck69 (Score:2) Thursday February 05 2004, @11:12PM
  • As a CS student... by verbatim_verbose (Score:1) Thursday February 05 2004, @11:33PM
  • You're a little bit confused. (Score:5, Insightful)

    by Jerk City Troll (661616) on Thursday February 05 2004, @11:37PM (#8198243)
    (http://anti-slash.org/)

    Computer science isn't "knowing computers on a deeper level." Computer science is algorithms and lots of math. Computer scientists don't care about how a computer works. They don't care about the language either. They are interested in data structures and how to work with them. What language is in use is really unimportant, be it Java or Assembly.

  • Assembly is a waste of time, mostly by Erwos (Score:2) Thursday February 05 2004, @11:39PM
  • what schools don't do assembly by steak (Score:1) Thursday February 05 2004, @11:43PM
  • Good, but not a good starting point (Score:3, Informative)

    by RallyDriver (49641) on Thursday February 05 2004, @11:44PM (#8198291)
    (http://www.dcc.vu/)
    Speaking from some experience (CS undergrad TA while in grad school)....

    A few thoughts:

    It's essential to teach some assembly at some point in a CS undergrad - A CS course should give full insight into the workings of a real CPU, and should give as wide a variety as possible.

    At Edinburgh [ed.ac.uk] the first year CS course included assembly, C, and ... wait for it ... PostScript. PS sounds wacky but it's the only stack based language widely used on modern computers (APL and Forth have died out).

    When I was a CS undergrad we had practical classes in no fewer than 17 languages, covering the range of imperative, declarative, functional and stack based, plus specialist toys like theorem provers and SQL.

    The best starting point for a university level course is the good old procedural language - in my day it was Pascal, C++ and Modula-3, these days I'd use Java (and many CS departments do).

    Also, when you do get to assembler, I don't think using a real assembler is the best teaching tool - assemblers are intended for developing real low level code, or as back end targets for compilers. For teaching at Edinburgh, we used an X11 based tool called xspim which simulated a MIPS R2000 (we actually ran it on Sun Sparc-II's, not that it matters), and it let you single step and examine registers without the complexity of adding a debugger, and had a window where you could see the registers, CPU pipeline etc. displayed.

    For introducing programming concepts to a younger audience I think an interpreted language which will execute command lines, allowing them to experiment while avoiding the edit-compile-run cycle, is very important. Some are better than others; when I was a kid the 8 bit micros (Apple, Commodore, Atari, ...) had BASIC interpreters in ROM, and they were mostly OK, though the only one with a really good BASIC language (proper procedures, not GOSUB) was the Acorn BBC [nvg.ntnu.no].

    I don't like Pilot or Comal for teaching (failed experiments of the 1980's) but I think LOGO [mit.edu] is a very commendable way to make concepts accessible to the young.

    A perhaps unexpected place I was made to learn with an interpreted environment was as an undergrad at Cambridge University [cam.ac.uk], where the first programming language taught is ML [ed.ac.uk] which for the CS people who haven't heard of is an implementation of lambda calculus with a sane syntax.
  • New? by imnoteddy (Score:2) Thursday February 05 2004, @11:45PM
  • Assembly Language is essential by jamej (Score:1) Friday February 06 2004, @12:11AM
  • From a ring counter to OOP (Score:5, Interesting)

    by rcpitt (711863) * on Friday February 06 2004, @12:18AM (#8198466)
    (http://richard.pacdat.net/ | Last Journal: Sunday October 26 2003, @03:09PM)
    The first piece of digital gear I ever had my hands on was the size of a small desk and about 5' high. It had just enough "logic" on it to create an eight bit ring counter (0 1 10 11 100...)

    That was in 1965 and the unit was the only one for our whole school district and worth about $30,000 (CDN - about $35000 US at the time)

    From there to today's Object Oriented Programming languages has been an interesting time. I wouldn't have missed it for anything, and I honestly think that living through it has given me a perspective that many more recent programmers don't have and IMHO need, sometimes.

    Where "brute force and ignorance" solutions are practical, there is no gain in knowing enough about the underlying hardware and bit twiddling to make things run 1000% faster after spending 6 months re-programming to manually optimize. In fact, since (C and other) compilers have become easily architecture tuned, there really are few areas where speed gains from hardware knowledge can be had, let alone made cost effective. Most are at the hardware interface level - the drivers - most recently USB for example.

    If you're happy with programming Visual Basic and your employer can afford the hardware costs that ramping up your single CPU "solution" to deal with millions of visitors instead of hundreds, then you don't need to know anything about the underlying hardware at the bit level.

    On the other hand, if you need to wring the most "visits" out of off-the-shelf hardware somehow, then you need to know enough to calculate the theoretical CPU cycles per visit.

    Somewhere between these two extremes lies reality.

    Today I use my hardware knowledge mostly as a "bullshit filter" when dealing with claims and statistics from various vendors. I have an empiric understanding of why (and under what circumstances) a processor with 512 Megs of level 1 cache and a front-side bus at 500MHz might be faster than a processor with 256 Megs of L1 cache and a 800MHz FSB and vice versa. Same thing for cost effectiveness of SCSI vs IDE when dealing with a database app vs. access to large images in a file system (something that came up today with a customer when spec'ing a pair of file servers, one for each type application)

    Back in the mid 70s I dealt with people who optimized applications on million $ machines capable of about 100 online users at one time. Today I deal with optimization on $1000-$3000 machines with thousands of 'active' sessions and millions of 'hits' per day. Different situations but similar problems. Major difference is in the cost of "throwing hardware at the problem" (and throwing the operating systems to go with the HW - but then I use Linux so not much of a difference ;)

    Bottom line is that understanding the underlying hardware helps me quite a bit - but only as a specialist in optimization and cost-effectiveness now, not in getting things to work at all as in the past.

  • Then make it binary! by Anonymous Coward (Score:1) Friday February 06 2004, @12:33AM
  • Better for computer engineers by ashot (Score:2) Friday February 06 2004, @12:44AM
  • Oh, Wow. Deja Vu Again by Bob Munck (Score:2) Friday February 06 2004, @01:10AM
  • debug for dos by ender-iii (Score:1) Friday February 06 2004, @01:36AM
  • Bollocks. Not a new idea, nor a good one by ajv (Score:2) Friday February 06 2004, @01:44AM
  • Said Gandalf... (the Wizard, get it?) by Esion Modnar (Score:2) Friday February 06 2004, @01:48AM
  • Computer Systems, not Science by ajayvb (Score:1) Friday February 06 2004, @02:18AM
  • Hmm.. by rfernand79 (Score:1) Friday February 06 2004, @02:26AM
  • That's how I learned by jbohumil (Score:1) Friday February 06 2004, @02:29AM
  • I read it online, as for learning the assembler... by JollyFinn (Score:2) Friday February 06 2004, @03:09AM
  • Oooh, good plan by Rogerborg (Score:2) Friday February 06 2004, @03:52AM
  • Another book by the same name.... by hyph-n (Score:1) Friday February 06 2004, @03:59AM
  • Assembly = excellent programmer ? by cr_nucleus (Score:2) Friday February 06 2004, @04:17AM
  • Remember the days by Evets (Score:1) Friday February 06 2004, @04:43AM
  • It's the tools, not the language by Cardbox (Score:1) Friday February 06 2004, @04:52AM
  • Bring back assembler! by Zog The Undeniable (Score:2) Friday February 06 2004, @05:10AM
  • start teaching assembly language first...... by martin (Score:2) Friday February 06 2004, @05:13AM
  • A new concept? by chris_sawtell (Score:2) Friday February 06 2004, @05:33AM
  • Balanced approach needed by DollyTheSheep (Score:1) Friday February 06 2004, @05:34AM
  • Ex M68K programmer by HogynCymraeg (Score:1) Friday February 06 2004, @05:35AM
  • Nobody gets it by slashdot_commentator (Score:2) Friday February 06 2004, @05:36AM
  • Clever code? Unmaintainable code! by Lio (Score:1) Friday February 06 2004, @06:11AM
  • Spare me from these please by varjag (Score:2) Friday February 06 2004, @06:23AM
  • Just what exactly IS "Linux assembly language"? by gatkinso (Score:2) Friday February 06 2004, @06:27AM
  • Teach how computers work LOL by salesgeek (Score:2) Friday February 06 2004, @06:41AM
  • A recipe for disaster by twem2 (Score:1) Friday February 06 2004, @07:04AM
  • so true... by mmu_man (Score:1) Friday February 06 2004, @07:09AM
  • Really Simple Machines instead.... by 16K Ram Pack (Score:2) Friday February 06 2004, @07:13AM
  • Assembly Language is another tool, one of many. by rben (Score:1) Friday February 06 2004, @07:35AM
  • Great idea by photon317 (Score:2) Friday February 06 2004, @07:56AM
  • Teach Compilers by Evl (Score:1) Friday February 06 2004, @08:11AM
  • Another great book on ASM by curtisk (Score:2) Friday February 06 2004, @08:18AM
  • Knuth by Anonymous Coward (Score:1) Friday February 06 2004, @08:21AM
  • Assembly first would be wrong by slaad (Score:1) Friday February 06 2004, @08:29AM
    • 1 reply beneath your current threshold.
  • The lost art of Assembly Language by Pedrito (Score:2) Friday February 06 2004, @08:34AM
  • They do. by lburdet (Score:1) Friday February 06 2004, @08:43AM
  • Taking One by Malvegil (Score:1) Friday February 06 2004, @09:14AM
  • Assembly language is misunderstood by Junks Jerzey (Score:2) Friday February 06 2004, @09:39AM
  • Use C by jabber01 (Score:2) Friday February 06 2004, @10:19AM
  • Moo by Chacham (Score:2) Friday February 06 2004, @10:36AM
  • Other books already do this... by Mixel (Score:1) Friday February 06 2004, @10:36AM
  • AMEN! Finally! by The Spoonman (Score:1) Friday February 06 2004, @10:43AM
  • data structures in assembly? by gugux (Score:1) Friday February 06 2004, @10:51AM
    • 1 reply beneath your current threshold.
  • Back when I was a boy... by ExRex (Score:1) Friday February 06 2004, @10:58AM
  • Software Engineering by Watcher (Score:2) Friday February 06 2004, @11:12AM
  • Top down please by Aidtopia (Score:2) Friday February 06 2004, @11:16AM
  • Don't confuse cause and effect by Dr. Smooth (Score:1) Friday February 06 2004, @11:33AM
  • Rubbish! by a1englishman (Score:1) Friday February 06 2004, @11:37AM
    • Re:Rubbish! by gugux (Score:1) Friday February 06 2004, @01:06PM
  • Another old timer :) by System_390 (Score:1) Friday February 06 2004, @12:33PM
  • Assembly by fadethepolice (Score:2) Friday February 06 2004, @12:47PM
  • Not a new idea by RCR (Score:2) Friday February 06 2004, @01:31PM
  • Assembly Language Step-by-Step by ninejaguar (Score:2) Friday February 06 2004, @03:39PM
  • silver jubilee by zihamesh (Score:1) Friday February 06 2004, @05:25PM
  • Link to online version by Hobart (Score:2) Friday February 06 2004, @05:57PM
  • disagree by samantha (Score:2) Friday February 06 2004, @06:22PM
  • Anyone ever heard of Barbiac? by GorillaTest (Score:2) Friday February 06 2004, @08:15PM
  • Some ideas by Rick BigNail (Score:1) Saturday February 07 2004, @07:41AM
  • A great way to learn assembly language... by Ann Elk (Score:1) Saturday February 07 2004, @08:11AM
  • "Computer Science" is not or"computer programming" by chris-johnson (Score:1) Saturday February 07 2004, @02:20PM
  • So is this all from someone shilling his own book? by multiplexo (Score:2) Monday February 09 2004, @12:08AM
  • Re:Assembly Language by Valar (Score:1) Thursday February 05 2004, @06:55PM
  • Re:Assembly Language by fiannaFailMan (Score:2) Thursday February 05 2004, @07:01PM
  • Re:well, by An Onerous Coward (Score:2) Thursday February 05 2004, @07:27PM
  • Re:Learn x86 assembly - realize x86 is a bad platf by bcd (Score:1) Thursday February 05 2004, @08:06PM
  • Re:asm in cs curriculum by cpex (Score:1) Friday February 06 2004, @05:46AM
  • Re:object oriented by GorillaTest (Score:1) Friday February 06 2004, @08:20PM
  • 72 replies beneath your current threshold.
(1) | 2 | 3 | 4