Slashdot Mirror


Learning Computer Science via Assembly Language

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."

34 of 1,328 comments (clear)

  1. Ouch by Anonymous Coward · · Score: 1, Funny

    This is akin to learning medical science by practicing on yourself :)

  2. Wussies by mikeophile · · Score: 4, Funny

    Real programmers learn machine code.

    1. Re:Wussies by unix+guy · · Score: 5, Funny

      Real programmers learn machine code.

      REAL programmers use cat > /dev/kmem

      --
      "Straddling the sword of technology..."
    2. Re:Wussies by 8282now · · Score: 2, Funny

      no. no... 8 toggles switches for code/data input and 8 led's for a "data display"
      all, 1 byte at a time.

  3. Re:Not necessarily the mark of a great programmer by s20451 · · Score: 3, Funny

    I'm not a great programmer, but I never really understood programming -- especially C programming -- until I took 68000 assembly. It also took a digital logic course so I could imagine how a processor was built. It's just abstract manipulation of symbols until you can imagine exactly how your printf("Hello World!\n"); gets broken up into neat little binary chunks.

    ps. Don't make them learn x86 assembly. I think that's banned under the Geneva convention.

    --
    Toronto-area transit rider? Rate your ride.
  4. Whatever by The+Ape+With+No+Name · · Score: 1, Funny

    If it isn't worth doing in Brainfuck*, then it isn't worth doing.

    *Author's note: Brainfuck can be replaced with Perl.

    --
    Comparing it to Windows will be a moot point, since El Dorado is going to have a 40% larger code base than XP.
  5. From the linked page by LineNoiz · · Score: 5, Funny

    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.

    --
    "Quotation is a serviceable substitute for wit." --Oscar Wilde
    1. Re:From the linked page by kurosawdust · · Score: 2, Funny

      Well, it's a hell of a lot faster than trying to get her panties off using some high-level language.

    2. Re:From the linked page by glitch23 · · Score: 2, Funny

      If you had these waiting for you wouldn't you want to give her the book?

      --
      this nation, under God, shall have a new birth of freedom. -- Lincoln, Gettysburg Address
  6. real programmers by lethalwp · · Score: 2, Funny



    real programmers do:
    copy con myprogram.exe

  7. Re:Somewhere in the middle... by Supp0rtLinux · · Score: 2, Funny

    Your grandpa just clicked on the attachment I sent him inadvertently after I got the MyDoom virus after my wife clicked on the attachment her mom sent her after her husband opened the attachment your grandpa's system sent him.

  8. Re:Somewhere in the middle... by blixel · · Score: 5, Funny

    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."

  9. Re:Linux x86 assembly? by Anonymous Coward · · Score: 1, Funny
    Asm is tha car, the kernel is the road.

    And a win kernel is the road to Hades.

  10. How about an alternate? by man_ls · · Score: 2, Funny

    Just learn C instead. It combines the readability of assembly with the ease of use of assembly.

  11. Re:Probably a bad idea by markprus · · Score: 2, Funny

    The language you're referring to is spelled LISP.

  12. Re:Not So New Concept by Anonymous Coward · · Score: 1, Funny

    What a pity that Basic English was not on the menu either.

  13. To be a programmer without ever... by PissingInTheWind · · Score: 3, Funny

    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.

    --

    A message from the system administrator: 'I've upped my priority. Now up yours.'
  14. Re:Not So New Concept by Jester99 · · Score: 5, Funny

    "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." :)

  15. Re:Not the point! by EugeneK · · Score: 4, Funny

    Luxury! In my day we had to make our own AND gates out of OR and XOR gates!

  16. x86? That's not a real instruction set by biscuit67 · · Score: 2, Funny

    Ewh! Yuckky. Teach them a *REAL* assembly language like MIPS or ARM.

    x86 is just an abortion that got to full term.

  17. Re:Somewhere in the middle... by NanoGator · · Score: 2, Funny

    "Never fear a guy with a goatee, a black turtleneck, and a beret."

    You're confusing 3D artists for Mac users.

    --
    "Derp de derp."
  18. Re:uhm by Anonymous Coward · · Score: 1, Funny

    how about I correct you if you're anal?

  19. Re:Linux x86 assembly? by whittrash · · Score: 3, Funny

    I don't know why, but just saying the words 'assembly language', sends a chill down my spine. I guess I am too weak minded to learn it.

  20. Lusers...I programin BINARY!!! by asternick · · Score: 2, Funny

    Anyone who cannot simultaneously consider the position of every logic gate and every memory register has NO business being in the same time zone as a computer.

  21. Bad analogy in the book description by ca1v1n · · Score: 2, Funny

    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.

  22. Forgetting the Most Important Point by duck_prime · · Score: 4, Funny
    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

  23. Re:Not the point! by mowo · · Score: 1, Funny

    Uphill...BOTH ways!

  24. The Misfits of Science... by frobnoid · · Score: 2, Funny

    JohnnyB, use your lightning powers to teach us ASM!

  25. Re:Linux x86 assembly? by OECD · · Score: 4, Funny
    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?

    --
    One man's -1 Flamebait is another man's +5 Funny.
  26. Re:Vacume tubes? by root:DavidOgg · · Score: 5, Funny

    When *I* was young we didn't *have* vacuum in space yet! You post-big-bang kids don't know how easy you have it!

    --
    --AROS is an Open Source AmigaOS clone, and source compatible with AmigaOS! Try the x86 build at http://www.aros.org
  27. 4-bit Full Adder Using Relays or Vacuum Tubes by BigBlockMopar · · Score: 5, Funny

    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.

    --
    Fire and Meat. Yummy.
  28. Oh, Wow. Deja Vu Again by Bob+Munck · · Score: 2, Funny
    We had this discussion at the ACM 20th Conference in 1968. It was me and Andy van Dam from Brown arguing with Al Perlis (Yale), Bernie Galler (UMich), and Harlan Mills (IBM). We used a simplified version of IBM/360 Assembler called SOS in the first-semester CS course, and the big guns on the other side thought we should switch to Algol. I mentioned my IF-THEN-ELSE macros for Assembler, and Harlan really liked the idea.

    Afterward a cute Pembroker in a really short skirt came up to introduce herself. I don't know if she agreed with our argument, but she's been my wife for quite awhile now. I don't teach much any more, but when I teach beginning CS, I teach assembler. The students we taught machine programming to back then have held positions like VP at Microsoft, CS Department Head at MIT, Princeton, Washington, UNH, and Waterloo.

    I wish people wouldn't keep referring to C as a "programming language;" it's a pathology.

  29. Re:Assembly for speed? by hugesmile · · Score: 2, Funny
    If it's a "plus shaped" board, with 32 pegs, and a hole in the middle, it was called "Hi-Q".

    A very efficient algorithm for you is to do a google search and you have a solution.

    Google: thousands of times faster than Assembler.

  30. Re:From a ring counter to OOP by Anonymous Coward · · Score: 1, Funny
    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.


    512 Megs of L1 cache? Where the fuck are you hiding your time machine?