4 ms·
I think you should teach assembly language first, and then build a few simple high-level langauges on top of that. I suspect it would prevent a lot of mental d
by carapace 5y ago
I think you should teach assembly language first, and then build a few simple high-level langauges on top of that. I suspect it would prevent a lot of mental dross from forming.
- werber 5y agoI’m primarily a front and developer and I wish that was the way I went. When I work in even basic back end code now I feel unprepared. I highly doubt I’ll ever write assembly code and if someone was to ask me to I would essentially face plant
- alejohausner 5y agoI agree. At the very least, teach assembly in the first term, at the same time as students are learning a high level language. If you know assembly, you can understand why arrays exist in C ( because CPUs have base-and-offset addressing), why records exist (same reason), what pointers are (assembly is pretty much about pointers), why ints are different from floats (ADD vs FADD) and so on, how functions are called (system stack). Absolutely. My first year of programming we took both Fortran and IBM assembly. It all made a lot more sense, and still does.
- nsonha 5y agoWe have dedicated classes in computer architecture to learn all the things you mention, it's not the job of a programming language to teach them to you When I first learn C in highschool the asign statement was what bugged me the most because I had already has a math background at that point so statements such as x = x + 1 made no sense, and even in natural science general, the idea that you can "asign" new intrinsic property to a thing is very unintuitive. 20 years later mutablity is the exact idea that I have to unlearn everyday. My point is all these languages and learning hierarchy were made up by people like us, and in an era when frankly, they had no idea where this field was headed. We should not just blindly think because they're written in a book and sound important, that students should be condescendingly reminded about them in programming languages while they're trying to learn to solve real-world problems.
- AnimalMuppet 5y agoWell, I had a similar experience in algebra. Here's an equation; it's the problem we're trying to solve. And we do this operation to both sides, and we get a simpler problem. OK, I understand that. And we do another thing to both sides, and we get an even simpler problem. Great. And we keep doing it, and we get... the answer??? Not a simpler problem, but the answer? How did that happen? Blew my mind. I eventually decided that what we actually got was a very simple problem, so simple that the answer was trivially obvious. In contrast, it was trivially obvious to me what "x = x + 1" was doing, even on day 1. Maybe I'm unique. But I suspect that different people trip on different things. Some trip on "x = x + 1", but that doesn't mean that it's a bad syntax. "x := x + 1" is going to make you type an extra character in every assignment over the next 40 years, in order to prevent confusion in a high school or college class. That may not be a good trade off. It especially may not be a good trade off when not everybody trips on it. (I didn't ask them to change the way they did algebra problems.)
- nsonha 5y agomy quibble is not really about the equality symbol, more about assignments as a fundamental building concept of code. (Re)assignments exist in social interaction so I guess it's intuitive to people that way, but if you look at code from a perspective of modeling reality that's just not a thing that exists in nature. Maybe it's just me.
- nsonha 5y agoI'm not gonna downvote you but I think you should be. This is already what universities were doing up until recently and I don't think it helped anyone. Some people learn top down and some learn bottom up, some learn... middle-out? what ever their way is, you're just saying everyone has to learn bottom up.
- alejohausner 5y agoAssembly is indeed intimidating for novices. I agree. But I still think that newly minted programmers need to understand something about what's under the hood of languages like python. Maybe a full course in assembly is too much for freshmen, but they should at least understand that RAM isn't like VCR tape: you can fetch any RAM memory location in constant time, unlike with a serial storage medium like tape. And they should know some of the hardware memory addressing mechanisms that make arrays possible.
- nsonha 5y agoNo, asm is not intimidating, it's irrelevant for some people. I guess my point is not to be so close minded and arrogant as to thinking you could possibly know what is and what is not important to someone's job, and dictate how people should do things. As well as thinking there is only one true way of doing things. Again you learn how computer works in computer architecture class, you learn programming already know that, or not, if it's irrelevant to your learning goals. You don't design programming languages to teach how computer works, nor do you learn programming to learn how computer works, that makes zero sense.
- jollybean 5y agoI think they should teach assembly in parrallel but I disagree with the evolution you're suggestion. High level languages are expressing informational logic that actually can have nothing to do with computers, formally. The way that the language maps to assembly, memory, cpus etc. is obviously incredibly important, but that's crossing a major boundary of abstraction. Assembly is an under the hood implementation detail to quite a lot of CS work. That said - of course it has to be taught - but I actually don't believe it's a 'precursor'. That's just how computers evolved. Imagine a day in 50 years when we switch to Quantum computers. Maybe 'assembly' will be something completely different then.
- carapace 5y agoOne of my favorite computer jokes is "Computer Science could be called the post-Turing decline in the study of formal systems." Your criticism is valid, I think, because the chips are now so complex "under the hood" that assembly is, in practice, no longer the thin abstraction it used to be, eh?
- texaslonghorn1 5y agoAt UT Austin, undergraduate electrical and computer engineering students spend roughly the first half of the first semester building up from bits/binary to transistors to logic gates to latches and flip flops and registers. The second half of the semester finally moves on to understanding a "toy" ISA called the Little Computer 3, or LC3, and writing programs in its assembly language. It's a much sharper and better motivated method to teach computer architecture, in my opinion.
- speedgoose 5y agoSchools don't want too many of their students to quit. Especially when other schools start with more friendly programming languages. Assembly is important to know about relatively quickly, but I think it's a recipe to make people hate computer science when it's the first programming language.
- _huayra_ 5y agoThis can work well for folks who want to stick towards the ISA / hw level, but for general coding I don't find assembly more useful than just a simple language like Python. The "simplicity" of assembly evaporates pretty quickly beyond the basic math instructions (e.g. mfence, vector stuff, the concept of a stack). Undoubtedly these things are useful to learn eventually, but they are incredibly daunting to any novice coder. The ultimate frustration is in trying to support beginners in learning assembly, as they will feel absolutely bogged down whenever they hit an error and will be completely incapable of being independent in figuring out their problems. They will lean on the teaching staff like crazy (ask me how I know....) and it's this feeling of "my code is broken and I have no damn clue what is going on!" that drives people away from the field. They have to get eased into it. When I taught undergrads a primarily Python-based class, I spent the first third of the semester teaching them how to effectively use pdb (or better yet, ipdb; tab completion!). Although my section did not get as far as other sections (i.e. we got to the end of the required material only, whereas other sections advanced to some optional stuff like numpy and Django), the profs teaching the following course told me how much they appreciated that the students from my section really could dive in and solve their problems (or at least give them a good first go). If you don't give beginner coders the tools to debug their own problems (which are lacking in the assembly world), it may hamstring them for the rest of their careers.