Re: MSIL or Bytecode taught instead of ASM
- From: "cr88192" <cr88192@xxxxxxxxxxx>
- Date: Fri, 14 Dec 2007 12:05:05 +1000
<jehugaleahsa@xxxxxxxxx> wrote in message
news:a3d68ab4-357e-4609-b9c3-fc58c93ca8e9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Dec 12, 12:14 am, "cr88192" <cr88...@xxxxxxxxxxx> wrote:
<jehugalea...@xxxxxxxxx> wrote in message
news:7474cfef-51fe-4e82-8824-ad94ea5db16e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello:
What is going on in schools these days when it comes to teaching
assembly languages? I remember I learned Microsoft Assembler and went
on to learn GASM and NASM. However, is there any true benefit to
learning ASM anymore? Sure, it helps computer science students
understand the fundamentals of computer architecture and basic
language foundations, but is it applicable?
One could argue that it is similar to learning C. It is very useful to
understand how data is transferred/stored/accessed/manipulated, but
can it be a large benefit to the general programming community? It can
in its own way, I suppose. Perhaps something similar would be more
practical and have the same benefits . . .
"to the general programming community"?...
C is in many ways the common subset of the other major HLLs (C++, Java,
and
C#...).
not only that, but, along with C++ and Java, it is in the top 3 of most
heavily used programming languages (whether C, C++, or Java is most
heavily
used, at this point in time, is, AFAIK, a matter of debate).
The market currently is pretty well spread out between C++, Java
and .NET (VB or C#). It would seem that most colleges are moving
toward the route of teaching Java and OOP. However, most OOP courses
completely miss design patterns and only teach architectural patterns,
such as MVC. It is rather frustrating that one of the most important
aspects of the subject are subdued by the overly-naive concept of
"picking out the nouns". In my opinion, schools could spend a little
more time teaching design patterns, better documentation skills and
form design/building.
dunno here.
well, I don't know what job-offerings are like, I had been going more by
what I had known of existing practice.
AFAIK, C is still in very high use (even compared against C++), even though,
hardly anyone seems to really "promote" C anymore (C is there, and still one
of the top-used programming languages, but has somehow "fallen out of the
public radar").
C#, though presently very popular, has AFAIK not caught up with the others
in terms of actual use at this point.
also, many people using .NET, are not necissarily using VB or C#, as options
such as C++.NET are still often used (I don't know, but I would suspect
C++.NET is probably right now still a somewhat 'bigger' language than C# in
terms of actual use).
C# currently has more than a little catching up to do.
C is not the newest or prettiest language, but it has hardly by any real
means fallen into disuse.
What would be the benefit of teaching Bytecode or MSIL instead of ASM?
I think it is as practical to learn for modern college students
learning Java and .NET as it was for me who worked in C/C++. In a
sense, the interpreters are modern-day computer systems, so why not
learn to program in their lowest-level language? Learning how to
generate code dynamically in C# or Java is very practical. It also
improves programmer's ability to understand these more modern
programming languages. Going to the next stage and learning to write
ASM wouldn't be much more challenging.
you seem to be equating "newer" with "better" here, and at this point I
will
somewhat disagree.
Don't get me wrong; I am not saying I have an opinion on the matter. I
am just as big a fan of ASM as I am of MSIL. I suppose my only
argument would be that learning MSIL is substantially easier than
learning ASM straight, considering that ASM becomes completely useless
if it is solely targeted at one platform (so is MSIL). Many professors
don't emphasize the concept, but more the programming. When most
people need to jump from MASM to NASM, they are completely lost. Why
muck through all the file syntax for ASM when you can work in
something you are already familiar with. However, the same thing can
be done in a C++ application using asm {} tags if available. Perhaps
that is what needs to be taught, not straight ASM.
I would probably argue more for straight ASM, but not with a "practical"
bent, rather, serving primarily to give students general fammiliarity and a
basic understanding of what is going on.
as is, x86 assembler is far more heavily used (directly) than either JBC
or
MSIL.
We are getting to a point in technology where the COBOL/Pascal/ASM/C
applications from 20 years ago are easier to rewrite from scratch. We
have software at my job that is being converted from C/C++ to C#. The
difference in complexity is sickening. I love C, but I hate working in
it if I don't have to. My natural language is C++, but, again, it
isn't very fun to work in. Given a nice IDE makes things easier, sure,
but source management is nevertheless difficult. And with all the
coders from decades ago who refuse to keep up-to-date it is hard to
comprehend most systems out there today. Why do we want to generate
another generation of programmers with their heads in the bit clouds?
it is a contrasting set of goals...
the point of the statement was more this though:
direct use of JBC is rare, primarily because people who use Java also tend
to avoid anything "low level", including the JBC (after all, Sun could
suddenly change the JBC and break their old stuff).
but, this goal contrast is something I have dealt with for years...
We have a region here at work where the programmers literally threaten
to quit if they can't write their applications in ASM. They are trying
to get entire applications written in pure ASM. There is no way a
modern-day student could come to work there; their system in almost un-
learnable. ASM is meant for optimization and system-specific needs.
However, it makes code completely unportable and most OpCodes can be
called from libraries anyway.
I write primarily in C, some C++, and some ASM (most of the ASM though, is
self-written by the app, so I deal more in general with ASM meta-coding
issues than actually writing ASM code...).
reason: most people in the Java community, only ever write in Java, and
not
in JBC (anything even assembler-like, including JBC, is strongly avoided
in
this community).
You'll also find a large number of native calls that use libraries
using ASM. They can pretend to avoid it, but the JDK isn't universal
enough to snuff out all ASM.
they call out to, C and ASM land, but not typically JBC, mostly because,
there is not much point in directly using JBC (as it can't really do a whole
lot more than what you can usually do in plain Java...).
as for MSIL, it is still, at this point, well behind more established
technologies, and I personally am not yet convinced of the long-term
survivability of .NET...
I think .NET will survive. I believe it will go through various
alterations over time. However, it is a fairly friendly environment
that any Windows shop can benefit from. I have been working in it for
a while and see obvious benefits over Java. It also has the draw back
that it only runs on Windows machines (excluding the Mono project).
ASP .NET pages are starting to take a larger share of the market. If
it doesn't survive, MS will just come out with something new that is
backware compatible somehow.
at present, I am having doubts about the long term survivability as well...
so, it is Windows vs Linux.
Windows is the popular and entrenched choice, made by a company that likes
to every so often pour crap on everything...
Linux is the lesser used choice, but may well outlive windows and set many
future directions in computing.
my case, I develop for both Windows and Linux, and for x86-32 and 64.
remember that, not that long ago (for most people, myself excluded...)
people were convinced that C was a "dinosaur" to be replaced by the likes
of
Delphi and ADA. and whatever happened?... ADA barely survives, and Delphi
is
steadily losing ground.
In a sense, C is a dinosaur. It lacks many features of what arre
considered "practical paradigms". Sickeningly, a vast majority of
programmers continue down the C route, but they do somewhat hackish
things with their source files to emulate OOP or software management
techniques that are not provided by default (such as namespaces,
classes, etc.). Some people are still trying to stick the square
through the circle.
C lacks many features, yes.
but, "dinosaur", is a subjective description, and does not well reflect the
current state of things.
one needs to realize that now is not just now, but also the accumulation of
past and the foundation of the future.
the world goes on, with a small amount of innovation, and a very large
amount of conservativism.
one needs realize that it is not this way arbitrarily, or because people
simply refuse to "get with the times".
if one tries to look before they leap, they may find they have nowhere to
stand.
often one needs to look backwards before they can move forwards.
many do not stick with C for its limitations or out of ignorance of newer
technologies, but in part because, at this point, this is still what is
needed.
many years later, there was Java, which was hyped to be a new revolution
to
overthrow C and C++. over a decade later, it has managed to "catch up",
but
C and C++ have by no means been dethrowned.
Unfortunately, ASM allows for a lot more control over a computer. It
is neat putting images on a screen or causing your keyboard to flash,
but it that the point?
in general, ASM isn't as useful as say, learning HLLs (C, C++, Java,
...),
however, ASM isn't dead yet either by any means...
It will probably never be dead. I feel that it is essential to
learning the basics of computers.
yes.
it is a "latent" tool. for most things, you don't really need it (there
is
no need to use ASM for what you can much more effectively get done in
ones'
HLL of choice), but when you need it, you need it...
Agreed. The same could be said about MSIL. Only occasionally is it
ever needed. But when it is, it is a life-saver.
yeah, or at least for people developing on .NET...
and, when it turns out to be useful, the utility of this tool is almost
indespensible.
meanwhile, much more high-level languages and frameworks put a roadblock
in
ones' way. they take away all these things that, most of the time, you
don't
need, but when a problem is encountered, then one has a situation that is
very difficult to resolve.
There is almost always a library available for dealing with a specific
issue. Unless working on specialized hardware, someone has already
done it better than you ever will. Optimizers will almost always out-
do your ASM. Modern software rarely needs speed. Most fast software
from 20 years ago is exceptionally buggy and unforgiving.
I will disagree with pretty much every one of your statements here.
many issues lack libraries, or the library has limitations which are not
easily resolved (most common problems have libraries, but uncommon ones do
not).
very often existing code is poorly written and ill suited to a task (and,
especially often, the problems are so damn simple or context-specific, that
one is better off writing their own customized version of the code for the
problems as they exist).
very often, one can get a more useful tool simply by writing it themselves
(many general problems have good solutions, but many less general ones,
don't).
even optimizing compilers tend to produce some pretty damn stupid code
sometimes (the main cost of ASM is that it is so tedious, so most people
tend to write poor code in it, rather than it being somehow impossible to
beat the optimizers, which very often have optimizing abilities inferior to
a human who actually knows what they are doing).
the computer is very often too damn slow for what you want it to do (try to
write a real-time physics simulator for several thousand rigid bodies and
you may see what I mean...).
and, very often, older software can be some of the most stable around (as it
has had a long time for the respective developers to beat out the bugs).
one should weight options and considerations carefully, and be careful what
it is they are willing to depend on.
my policy is to use libraries to what extent I am willing to put up with
them, but very often I end up later writing my own.
in this way, I don't really expect VMs to ever really become the "new
hardware", rather, that is just a kind of semi-delusional fantasy.
IMO, it is much better to stick to the older and more traditional
approaches, aka, targetting the raw hardware, much as we have always done
(and, much as pretty much any piece of technology that has had long-term
stability has done...).
C++ is fairly stable, but most programmers can't manage resources.
Anyone who thinks they can is arrogant. Paradigms targeted to reduce
these types of errors will always be more stable, even if the
framework they depend on is flakey. C++ is riddled with ancient,
mostly-unused classes that should be eliminated, but never will be.
The C++ standard holds too many secrets that end up being discovered
only after undefined behavior halts development. A language is just as
responsible for stability as the libraries it depends on. Software
Engineers and project managers need to consider these types of things
as well. It is a give and take. You shouldn't call C/C++ more stable
simply because it has been picked over. You can call the standard
libraries stable, but the languages themselves need to be considered
as well.
the whole point was missed here.
I meant, whatever we do, the compilers should compile to machine code, and
not to VMs.
nothing stops us from, say, compiling C# or Java directly to machine code
(and, for the latter, this is often what is done by people making use of,
for example, GCJ).
now, as far as languages providing more advanced facilities (Lexical
Scoping, Garbage Collection, or built-in concurrency management), I will
actually agree here.
however, these problems are not ones to be escaped simply by trying to move
to a VM.
as it stands, I have been using Garbage Collection in C for years, as have
many other people, none the less, there are still cases where manual MM
makes more sense than using the GC (in my case, I have a GC that directly
allows both approaches).
"the one binary that works everywhere", is, IMO, a similarly misguided
ideal...
Agreed.
that is not to say I think bytecode and ILs are useless, only that we
need
to keep them in perspective. an IL, is an abstraction over the hardware,
and
not the hardware, and it is almost assuredly the case, there will be
situations where this is not really a sufficient.
The same goes for ASM.
ASM tends to be more powerful than the ILs, as, in the name of portability,
many ILs give up many important aspects of the hardware, and thus they are
not suitible, in all cases, as replacements for the hardware.
however, this portability is also a strong feature, and thus an IL can be a
powerful tool, if its use is "kept in perspective" (it is an abstraction,
and is useful for the most things, but is not to be confused with the
hardware itself).
Are schools moving in this direction already? What do you think about
it?
who knows.
IMO, it is probably best that they teach things like this:
a general introduction/overview of ASM (need not be a whole course, but
hopefully enough that the students have a good solid general
understanding
of the hardware);
then C (not because everyone will use C, but becuase any many ways it is
the
common denominator, and is conceptually simpler than most of the other
languages);
then, a lot more involved with their language of interest (much more in
depth with C, C++, Java, C#, ...).
Trying to teach students advanced concepts almost always requires an
understanding of lower-lever languages. It can some times be the
difference between a good programmer and a great one. A programmer
must also understand a good deal about Data Structures and Algorithms.
Algorithms are somewhat overlooked in colleges as well.
yes.
however, I am not a college-trained programmer, so I am not really sure what
they teach (I am a college student, at a theological college...).
probably, courses covering general unrelated programming languages
(Scheme,
Smalltalk, Self, Haskell, Erlang, ...), not so much because of these
being
useful to most people, but more so that they can have a broader base of
theoretical understanding.
I took a course called Programming Languages. Switching between
Pascal, ADA, JavaScript, PHP, ASP, C++, C#, Python, Haskell,
Smalltalk, Actionscript and LISP is not a problem for me. There is a
slight learning curve and then *BAM* I am off and going. It is very
difficult for new programmers to do this. However, fully understanding
the course required understanding C.
yes.
if the student is still taking classes by this point, then more advanced
topics can be covered, for example, compiler writing, programming
language
design, operating systems, ...
actually, if you really want my opinion, I think it would probably be
useful
for much of the population, if introductory programming and CS courses
were
made a basic part of middle and/or highschool curricula.
Those people who are not technical (and even some who are) complain
with what they need to learn now. The problem is that they start
teaching this stuff too late. Logic bothers people. People aren't used
to it and don't see why it is fun. However, I think it would give
students more of a reason to learn math and retain it. Perhaps
programming should become a vocational study.
yes, probably.
and, more so, more advanced material, as it is both pointless and
demeaning
to have to endlessly retake stupid ms-office and keyboarding classes, as
most people already know this crap, or if they don't, ms-office is by no
means course-demanding meterial.
What is demeaning is that the second-year course teaches the exact
same thing as the first-year course.
hmm...
that is a problem for many classes.
same things, over and over again...
in fact, I would be willing to see this, at the expense of english
courses
(I would rarther see less, and more writing intensive, english courses,
for
example, 3 or 4 semesters with a lot more writing and grammar, rather
than 8
semesters of pointless literature and videos...).
Exactly. I work with people who can't string a sentence together.
People need a reason to read and write. It is a matter of practice.
Documentation is seriously limited where I work and it drives me nuts.
And what documentation there is is poorly written and hard to follow.
I don't read literature; I read programming books because that is what
interests me and benefits me. I read science fiction and fantasy if I
want entertainment. I write documentation and on forums. Sure, I rush
and screw up a lot, but at least people can understand me. High school
and college where of no use at improving reading. I often debate
whether High School and my Gen Eds in college served any purpose at
all.
agreed for the most part.
they can thus use these many freed up semesters, to have more advanced
math,
science, and technical classes (we take, something like 3 semesters of
math,
and 2 of science, where the math is too introductory to be of much use,
and
there is not enough time to teach much of value about science...).
The US worker doesn't provide any competiton in the work force.
Factory workers want to be paid more than in other countries. Students
want to get degrees in things that don't require a lot of effort and
that are not as needed. The US boasts that it produces educated
students, but it isn't keeping up with the science and technology
trend. The US isn't a manufacturing country; it is supposed to be a
development and research country. However, people in the US won't
provoke the ancient school system in this country to revolutionize. No
one should need to pay 50,000$ for an education and schools should
eliminate degrees that aren't practical. Specialist schools should be
made for people who really want to take on a less-applicatable degree.
People should always have a choice over what they do, but people don't
know what they want to do. High school students need to be introduced
to more science and technology at a younger age so they know what is
available for them. Students aren't going into technical degrees
because they don't know how fun they can be. They don't want to work
(which is actually fun when you care).
yeah.
and, when I was in HS, besides keyboarding/office crap (which I also had
to
take in middle, and at damn near every college I have had to go to), none
of
the classes really had "anything" to do with computers or technical
subjects.
General education is so vast nowadays. It is good to have knowledge
about Art, Philosphy, Economics, etc., but it doesn't need to take up
half of one's education. Students should be allowed to limit their
general education courses to things they are actually interested in,
not forced upon them. How does Theatre make me a better person. I
really don't need to know terminology about stages and acting. I
should know about well-known plays, but not how to be in one.
true.
any more, being "well versed", is not really useful, or possible.
better to at least know something well, than to know little about
everything.
maybe they can also cover a lot more material in a much shorter period of
time as well.
I have seen large schools cover programming 1 in a matter of weeks. It
doesn't benefit anyone. General education courses present information
that is immediately forgotten after the test, so they should be
trimmed down. Some parts of CS courses are also elongated at the wrong
parts since the material is impractical. So, why not trim those parts
down.
maybe.
sometimes I watch lectures of various courses online, if they are saying
something interesting (last year, I went a good portion though a course on
biomedical engineering, but it just goes to show how far actual technology
is behind SciFi in these regards).
in SciFi, we have 'Ghost in the Shell' style cyborgs.
in reality, we have joint replacements made out of titanium and high-density
polyethelyne...
and one can watch these lectures and wonder why it wouldn't just be better
to, say, implement an artificial shoulder as a silicone-sheathed multi-axil
u-joint. biomechanically, it wouldn't look or act exactly the same, but it
would likely outlast the user (vs having to be replaced every 10 years or
so...).
the other ideas I had were related to creating natural/synthetic grafts
(basically, how to make meterials that tissues would "grow into"), but this
is harder (graft-longevity would be a problem, as most meterials of this
sort would tend to break down, such as, for example, collagen-polymer
composits).
another possibility would be to make the grafts out of primarily organic
meterials (such as a combination of cells making up tendons, cartalige, and
bone). the tissue could be appropriately shaped and engineered and implanted
along with the implants (for example, made into a semi-disk that would be
put around titanium implants and partly stapled or screwed into place until
it fused), and would be stiched to more organic parts (so that they would
fuse).
being essentially normal tissue (though probably made artificially, for
example, originally from O- doner-cells), it would fuse with normal tissue
and would heal itself (unlike polymers or polymer-protien composits), and in
the presence of titanium, would calcify and turn into a bone-based fuse
point.
the main point of this would be stable trans-dermal structures, for example,
bone-attached supports for mounting prosthesis, ...
or, even better, HS could be made a little more like college...
Young students need direction. They need to a broad pool of topics so
that they can chose a path. Students get out of High School with
little certainty of what they want to do. There is almost always
something that an individual will enjoy to do. The fact is that it is
never brought up in High School. My High School didn't even teach an
introductory programming course. It was entirely MS Office courses. I
could have a used a few more years of programming experience, simply
so I would be better than I am now.
maybe, yes.
actually, from a young age, I wanted to be a programmer.
the problem is that, life, and parents, end up putting a lot of obstacles in
the way.
so, in the 4+4 years of HS+college, one can maybe actually learn
something,
useful, rather than the big pointless waste of time most things turn out
to
be...
I can honestly say that I have difficulty saying what I learned in
High School or whether I could ever use that information in my current
job. I should get reperations for 13 years of enslavement and wasting
my time.
yeah...
.
- References:
- MSIL or Bytecode taught instead of ASM
- From: jehugaleahsa@xxxxxxxxx
- Re: MSIL or Bytecode taught instead of ASM
- From: cr88192
- Re: MSIL or Bytecode taught instead of ASM
- From: jehugaleahsa@xxxxxxxxx
- MSIL or Bytecode taught instead of ASM
- Prev by Date: www.nikepopularshoes.com wholesale nike jordan jordan shoes jordan7 jordan22
- Next by Date: Re: Unix make on Windows and PATH variable length problem
- Previous by thread: Re: MSIL or Bytecode taught instead of ASM
- Next by thread: Re: MSIL or Bytecode taught instead of ASM
- Index(es):
Relevant Pages
|