Page 3 of 3

Re: Machine code and assembly are necessary currently?

Posted: Wed Mar 28, 2018 8:12 am
by Schol-R-LEA
igorov70 wrote:
StudlyCaps wrote: ......
He backing up oppinion with his 30 years not me i dont have 30 years and not me who must show thing. BUT: https://imgur.com/a/1edUT This i has made for a high scool for teach x86 assembly.
I meant to ask about this earlier: was that the link you meant to give us? It seems to be a slide from a talk about assembly programming (or more likely, compiler optimization - I will explain why I am saying this shortly). It seems to be showing a graphical debugger displaying the progress of a program as it adds a value to every element of an array, as a series of individual instructions in a linear sequence. While preparing such a slide does require some understanding of assembly, it is not a program itself, only a fragment of one, and a very small fragment at that.

I am assuming you meant to link to a repo somewhere, rather than this.

Or maybe not, given what we can surmise about the slide itself.

My impression is that it is meant to show how a short loop can be unrolled, a typical method of trading space for speed (as even a branch to a target that is inside the CPU pipeline is costly, so the idea is that if the loop body is short, you can stretch it out to almost fill the pipeline and branch less often).

While it does come up in hand-coded assembly a lot, this sort of slide seems a lot more typical of one that would be used in a talk on writing a peephole optimizer which would transform the output of a compiler's code generator to unroll such loops automatically.

It is also a technique associated less with microcontrollers (which are often memory-constrained, but do not have extremely high speed performance demands) than with general-purpose systems (where programmers generally can afford to apply extra memory to break speed bottlenecks). While unrolling loops does make sense in some contexts regardless of whether the CPU has an instruction pipeline or not (8-bit and 16-bit architectures generally don't, 32-bit and 64-bit ones almost invariably do), when there is an instruction pipeline, then the value of unrolling is tightly determined by the pipeline size, so hand-unrolling becomes much harder on a pipelined architecture.The pipeline sizes in a CPU family can vary from model to model, so either it has to be applied separately for each CPU model (and the installer would then need to use the correct version for the machine in question), or it has to target the lowest common denominator and lose some of the benefits of unrolling.

Presumably, this is why the slide is showing x86 assembly language, rather than, say, 8051 or AVR. While the 80186 is still fairly common for some embedded work, in general x86 family chips are only found on systems derived from the PC these days (an irony I have discussed before, given Intel's intentions with the 8086 line). Since this code is for a later 32-bit model (given the reference to the 32-bit EIP rather than the 16-bit IP of the 8086/8088, 80186, and 80286), that mostly rules out it's use in an embedded system (though not entirely, as the Edison series chips do have roles of that sort). Given what I already said about pipelines, this lend further credence to the idea that it is from a lecture on compiler optimization rather than one about general assembly programming.

You did say it was for a course, though, so perhaps the class could have been about PC assembly programming. Nonetheless, I still think compiler design is the more likely subject of this slide.

If your intent was to show your assembly programming skill, well, the slide you have given us only raises more questions. I am will to give you the benefit of the doubt, however, and assume that this was not what you meant to post.

I am similarly interested in hearing your explanation of the comment about 'programming microcode', since, if taken at face value, it seems like an absurd claim - microcode is only 'programmed' in the loosest of senses, and that work would generally be the province of the CPU designers, not software engineers. I am still guessing that you meant some other sort of firmware, but I would prefer to hear what you have to say on that rather than make blind assumptions.

Re: Machine code and assembly are necessary currently?

Posted: Sat Mar 31, 2018 4:36 pm
by manhobby
Schol-R-LEA wrote: The jobs which do exist for assembly programming are few and far between, and while an experienced assembly programmer will often get paid very well for it, it is their experience - experience over decades of low-level programming, in most cases - that they are paid for. A novice assembly programmer probably wouldn't find a job for that niche, and if they did, they would probably get paid far worse than most other programmers (if they actually got their paychecks at all), as the sort of company that would have such a novice assembly programming position is likely to be pretty fly-by-night.

A more reputable company might have what would be essentially an assistant or apprentice position training under a master assembly programmer, to try and train the newbie up for when the master retires, but it would be very rare to find something like that, and would earn trainee salaries for at least a few years. Such a job would be very specific to the hardware, as well, probably in some kind of highly specialized embedded controllers (as even those are mostly programmed in high-level languages these days) and the position would be tightly bound to the success of that specific company.
Schol-R-LEA

Currently are employed experienceds machine code programmers?

If not, why?

Currently are employed novices machine code programmers?

If not, why?

Currently are employed experienced assembly programmers?

If not, why?

Currently are employed novice assembly programmers?

If not, why?

I'm asking these questions because I really like the subject.

Re: Machine code and assembly are necessary currently?

Posted: Sat Mar 31, 2018 7:36 pm
by Brendan
Hi,
manhobby wrote:Currently are employed experienceds machine code programmers?

If not, why?

Currently are employed novices machine code programmers?

If not, why?
No. It makes no sense when assembly/disassembly is so much easy and more powerful.

Even in extreme cases (e.g. writing an assembler/disassembler for a CPU that never existed before) people just look up opcodes from a reference manual without remembering them (typically, while writing code in a language like C).
manhobby wrote:Currently are employed experienced assembly programmers?

If not, why?

Currently are employed novice assembly programmers?

If not, why?
There are assembly language programmers that are employed to write C code, employed to paint houses, employed to work in fast food restaurants, etc.

There are a relatively small number of assembly language programmers employed to write assembly language, either for optimising very performance critical code or for other reasons (e.g. early firmware stuff). Note: by "relatively small number" I mean that there's probably 1000 times more people employed to do web development.

The reason is that assembly language takes longer to write, is harder to maintain, and isn't portable; and performance of the resulting code is worse than compiler generated code unless you significantly increase the time it takes to write and maintain. Mostly, except for rare niches (where nothing else can be used), the expense of assembly language can't be justified.


Cheers,

Brendan

Re: Machine code and assembly are necessary currently?

Posted: Sun Apr 01, 2018 7:59 pm
by manhobby
Schol-R-LEA wrote:Fair enough.

Anyway, the whole matter seems to hinge on @igorov70 misreading what I said: I said that paid assembly programming was uncommon. I never claimed such jobs didn't exist, just that the majority of programmers I have known have never needed it, and didn't know it.

If the problem is that @igorov70 doesn't believe me on this, well, (semi-)objective evidence isn't hard to find. If we look at the TIOBE Index, we find that assembly language in general - not any specific assembly language, but as a category - ranks 16th in 'popularity', at 1.7% of distribution based on the number of programmers experienced in it and the number of positions listed for it.

While this ranking isn't entirely objective, and does call for some interpretation, it does indicate that assembly language is not a necessary skill for programmers in general, which is what the OP, @ManHobby, asked about.

(I would argue that even web programmers would benefit from knowing something of assembly programming, as it would give them a better idea of what their code is actually doing, but that doesn't mean it is necessary.)

Why @igorov70 felt the need to contest my admittedly anecdotal statements, based on the lack of output in a hobby group, while claiming that this 'proved' I didn't have real-world experience (where the basis of my statements lay in experience during professional work, most of which was on proprietary code, which by definition would not be reflected here) isn't clear.

So I repeat my claims: I haven't seen many companies hiring for assembly programming jobs (which is to say, jobs in which any assembly programming is required). I have seen some, but only a very few, and the ones I have personally seen were all expert-level positions calling for programmers with extensive experience, not novices.

I said that I have personally only known a handful of programmers who have worked in such jobs, most of whom were older programmers with decades of experience under their belt.

And I said that any novice jobs that do exist appeared to be exceedingly rare, and that I didn't expect that they would pay especially well compared to, say, a PHP coding position.

That is based on whom I have known personally, and my experience in what the industry is doing. My claims would have been just as valid (or invalid) if I had been a hiring manager or a QA tester, and never done any professional programming work at all, as it was about how common jobs involving assembly programming are. Hell, even if I had just been a content editor on a career site such a Monster or LinkedIn, it would have been enough for me to give meaningful anecdotal evidence, and while anecdotal evidence isn't proof, it can be supportive of a claim such as "no, assembly programming isn't a necessary skill for all programmers".
Schol-R-LEA, Brendan, all, please, answer.

Currently the experienceds machine code programmers are paid especially well compared to the high level programmers?

For example, currently the experienceds machine code programmers are paid especially well compared to, say, a PHP, JavaScript, Java or C coding position?

If not, why?

Currently the novices machine code programmers are paid especially well compared to the high level programmers?

For example, currently the novices machine code programmers are paid especially well compared to, say, a PHP, JavaScript, Java or C coding position?

If not, why?

Currently the experienceds Assembly programmers are paid especially well compared to the high level programmers?

For example, currently the experienceds Assembly programmers are paid especially well compared to, say, a PHP, JavaScript, Java or C coding position?

If not, why?

Currently the novices Assembly programmers are paid especially well compared to the high level programmers?

For example, currently the novices Assembly programmers are paid especially well compared to, say, a PHP, JavaScript, Java or C coding position?

If not, why?

Re: Machine code and assembly are necessary currently?

Posted: Sun Apr 01, 2018 11:04 pm
by Brendan
Hi,
manhobby wrote:Currently the experienceds machine code programmers are paid especially well compared to the high level programmers?

Currently the novices machine code programmers are paid especially well compared to the high level programmers?
These people still don't exist, so there's no way to tell what they'd be paid if they did exist.
manhobby wrote:Currently the experienceds Assembly programmers are paid especially well compared to the high level programmers?
Where, and in which industry? Someone writing assembly language for a large company (e.g. Apple?) on the west coast of USA probably gets paid a lot more than someone writing assembly language for game engines in Korea.

Note that I'd strongly recommend looking at job adverts for where you are (or where you want to be). These will give you a much better idea of the types of jobs and their pay.
manhobby wrote:Currently the novices Assembly programmers are paid especially well compared to the high level programmers?
Unless you're related to the boss or sleeping with the boss (or both); novices don't get hired and aren't paid.


Cheers,

Brendan

Re: Machine code and assembly are necessary currently?

Posted: Mon Apr 02, 2018 12:07 am
by manhobby
Schol-R-LEA wrote:The jobs which do exist for assembly programming are few and far between, and while an experienced assembly programmer will often get paid very well for it, it is their experience - experience over decades of low-level programming, in most cases - that they are paid for. A novice assembly programmer probably wouldn't find a job for that niche, and if they did, they would probably get paid far worse than most other programmers (if they actually got their paychecks at all), as the sort of company that would have such a novice assembly programming position is likely to be pretty fly-by-night.

A more reputable company might have what would be essentially an assistant or apprentice position training under a master assembly programmer, to try and train the newbie up for when the master retires, but it would be very rare to find something like that, and would earn trainee salaries for at least a few years. Such a job would be very specific to the hardware, as well, probably in some kind of highly specialized embedded controllers (as even those are mostly programmed in high-level languages these days) and the position would be tightly bound to the success of that specific company.
Schol-R-LEA wrote:Fair enough.

Anyway, the whole matter seems to hinge on @igorov70 misreading what I said: I said that paid assembly programming was uncommon. I never claimed such jobs didn't exist, just that the majority of programmers I have known have never needed it, and didn't know it.

If the problem is that @igorov70 doesn't believe me on this, well, (semi-)objective evidence isn't hard to find. If we look at the TIOBE Index, we find that assembly language in general - not any specific assembly language, but as a category - ranks 16th in 'popularity', at 1.7% of distribution based on the number of programmers experienced in it and the number of positions listed for it.

While this ranking isn't entirely objective, and does call for some interpretation, it does indicate that assembly language is not a necessary skill for programmers in general, which is what the OP, @ManHobby, asked about.

(I would argue that even web programmers would benefit from knowing something of assembly programming, as it would give them a better idea of what their code is actually doing, but that doesn't mean it is necessary.)

Why @igorov70 felt the need to contest my admittedly anecdotal statements, based on the lack of output in a hobby group, while claiming that this 'proved' I didn't have real-world experience (where the basis of my statements lay in experience during professional work, most of which was on proprietary code, which by definition would not be reflected here) isn't clear.

So I repeat my claims: I haven't seen many companies hiring for assembly programming jobs (which is to say, jobs in which any assembly programming is required). I have seen some, but only a very few, and the ones I have personally seen were all expert-level positions calling for programmers with extensive experience, not novices.

I said that I have personally only known a handful of programmers who have worked in such jobs, most of whom were older programmers with decades of experience under their belt.

And I said that any novice jobs that do exist appeared to be exceedingly rare, and that I didn't expect that they would pay especially well compared to, say, a PHP coding position.

That is based on whom I have known personally, and my experience in what the industry is doing. My claims would have been just as valid (or invalid) if I had been a hiring manager or a QA tester, and never done any professional programming work at all, as it was about how common jobs involving assembly programming are. Hell, even if I had just been a content editor on a career site such a Monster or LinkedIn, it would have been enough for me to give meaningful anecdotal evidence, and while anecdotal evidence isn't proof, it can be supportive of a claim such as "no, assembly programming isn't a necessary skill for all programmers".
Brendan wrote:Hi,
manhobby wrote:Currently the experienceds machine code programmers are paid especially well compared to the high level programmers?

Currently the novices machine code programmers are paid especially well compared to the high level programmers?
These people still don't exist, so there's no way to tell what they'd be paid if they did exist.
manhobby wrote:Currently the experienceds Assembly programmers are paid especially well compared to the high level programmers?
Where, and in which industry? Someone writing assembly language for a large company (e.g. Apple?) on the west coast of USA probably gets paid a lot more than someone writing assembly language for game engines in Korea.

Note that I'd strongly recommend looking at job adverts for where you are (or where you want to be). These will give you a much better idea of the types of jobs and their pay.
manhobby wrote:Currently the novices Assembly programmers are paid especially well compared to the high level programmers?
Unless you're related to the boss or sleeping with the boss (or both); novices don't get hired and aren't paid.


Cheers,

Brendan
Brendan, the Schol-R-LEA said that "amore reputable company might have what would be essentially an assistant or apprentice position training under a master assembly programmer, to try and train the newbie up for when the master retires, but it would be very rare to find something like that, and would earn trainee salaries for at least a few years".

Brendan, the Schol-R-LEA said that "any novice jobs that do exist appeared to be exceedingly rare, and that I didn't expect that they would pay especially well compared to, say, a PHP coding position."

Second the TIOBE Index, the current percentage of use of Assembly is 1.7%.

Reference: https://www.tiobe.com/tiobe-index/

Brendan, in which source did you learn that currently the experienceds and novices machine code programmers still don't exist?

Brendan, in which source did you learn that novices Assembly programmers don't get hired and aren't paid?

Re: Machine code and assembly are necessary currently?

Posted: Mon Apr 02, 2018 6:00 am
by Brendan
Hi,
manhobby wrote:Brendan, the Schol-R-LEA said that "amore reputable company might have what would be essentially an assistant or apprentice position training under a master assembly programmer, to try and train the newbie up for when the master retires, but it would be very rare to find something like that, and would earn trainee salaries for at least a few years".
Let's say that a novice has less than a 2 months of experience and will not be hired; but someone with 2 years of experience might get hired (and might be placed in a position intended to help them gain more experience working with a master), and a master might have more than 5 years of experience.
manhobby wrote:Second the TIOBE Index, the current percentage of use of Assembly is 1.7%.
Yes. Assembly language is one of the many languages taught in (good) University courses because it help people understand architecture and be better high level language programmers. This means a lot of University students searching for information on assembly language (who will most likely never get employed to write assembly language), which means that the TIOBE index (which is based on web activity and has nothing to do with employment whatsoever) is higher. Note: It's also possible that TIOBE got confused between assembly languages and web assembly, or consider it the same thing(!).

For statistics based on job openings (which would more accurately represent employment and not just how bad/confusing a language's documentation is), I found some information here (the statistics in the middle of the page from "indeed.com"); where assembly language simply wasn't enough to be mentioned at all.
manhobby wrote:Brendan, in which source did you learn that currently the experienceds and novices machine code programmers still don't exist?

Brendan, in which source did you learn that novices Assembly programmers don't get hired and aren't paid?
The only sane answer is "the Internet" - several thousand people in several hundred places over a period of about 20 years. Note that for all that time I have been an assembly language programmer; and even though I check for job openings more than most people I can't remember ever seeing a single advert for a job programming in assembly language.


Cheers,

Brendan

Re: Machine code and assembly are necessary currently?

Posted: Mon Apr 02, 2018 6:07 am
by simeonz
manhobby wrote:I am so curios in this topic because I like the subject and I've heard that assembly code is extremely expensive, if it's true that assembly code is extremely expensive, I'll try to make lots of money programming in assembly.
Most likely they meant that it was time consuming to do and therefore it costed more development and maintenance hours for which the company has to pay. That is why it is avoided in general. It costs too much.
manhobby wrote:Currently the experienceds Assembly programmers are paid especially well compared to the high level programmers?
Let's consult an arbitrary UK job index. UK is not my country of residence, in case you are wondering, so I cannot attest for the data, not to mention that it may not translate to your area's job market. This is from a google query for "job distribution assembler programming" - third item in my case.

The highlights are - roughly 15 in 10,000 programming jobs indicate desire for assembler competence from the applicant, 2/3rds of which also indicate they additionally expect a C and/or C++ competence (scroll towards the middle). In other words, at most 5 in 10000 programming jobs are pure assembler development, at a very optimistic best. But most likely less than that. You can check the "Assembly Language Vacancies" and the 1st job - "Test Technician" - involves electronic wiring and mounting skills. Also, it actually involves mostly interpretational, not coding assembler skills. A lot of the other jobs have embedded C/C++ as their primary or secondary requirements. That is, coding in assembler is rarely the sole or primary activity for the job title.

The median and 90th percentile (highest paying) salaries are slightly below the industry average. The long term trend for the number of jobs is consistently decreasing (see the plot they offer on that page), while the same trend for the salaries in the job offers is increasing. This includes all jobs that have assembler language skill as one of their requirements. The site does not seem to have exclusivity filter or statistics (, probably because they think it is pointless, for any kind of competence, not just assembler.)
manhobby wrote:Currently the novices Assembly programmers are paid especially well compared to the high level programmers?
Assembler code produced by a novice programmer is more expensive to make (requires more time and troubleshooting) than C/C++ code (especially C) produced by a novice. It also has lower performance in most cases, since a novice programmer would not take into account all architecture specifics, such as alignment, cache effects, pipeline effects, etc. And without taking into account all architecture specifics (which is difficult even for experienced programmers), they will botch the job. Thus, unless the company has money to burn on HR strategies and offers an internship of sorts, it is unlikely that anyone would hire such a person to turn a profit.
manhobby wrote:Brendan, the Schol-R-LEA said that "amore reputable company might have what would be essentially an assistant or apprentice position training under a master assembly programmer, to try and train the newbie up for when the master retires, but it would be very rare to find something like that, and would earn trainee salaries for at least a few years".
Probably, the hint was that a person already working for a company in a different position (say, embedded C) and has demonstrated some affinity to the hardware architecture concepts for the target platform, may be transferred in the nuts-and-bolts development department of the company (, where they do some/more assembler development), under the tutelage of a senior. A just-graduated developer is extremely unlikely to get a "junior assembler developer" job. (Consult the source above.)
manhobby wrote:Currently the experienceds machine code programmers are paid especially well compared to the high level programmers?
manhobby wrote:Currently the novices machine code programmers are paid especially well compared to the high level programmers?
If you consult the job index I quoted, you will find that they do not feature such category at all. That is because assembler and machine code are for the most part, the same competence. This is like saying that being a novel author using word and being a novel author using notepad are different occupations. The requirement in both cases is that you understand the target architecture and the performance variables in its operation. The actual language skills and tools are simplistic when compared to higher-level languages, where they actually matter. And second, this relates to another point that was already made - there is no such thing as assembler programming competence in general. It is very platform specific. We are not talking at the instruction level, but the hardware architecture level, which changes from chip generation to the next.
manhobby wrote:If not, why?
Imagine you were a manager or company director. Why would you commission assembler development positions in your company? Why would you do so in preference to C/C++ ones? Especially, since many C/C++ developers can program some assembler if required. My point is, how much differential advantage will the exclusive specialist offer to the company, or value to the customer, and how much monetization will result from it, in order to justify the salary of that person, compared to a more versatile employee?

Re: Machine code and assembly are necessary currently?

Posted: Mon Apr 02, 2018 8:31 pm
by manhobby
Brendan, simeonz, many thanks for your help.

To end the topic: Schol-R-LEA, you will answer here on the topic the questions I asked for you?

Re: Machine code and assembly are necessary currently?

Posted: Mon Apr 02, 2018 9:41 pm
by Schol-R-LEA
manhobby wrote:Brendan, simeonz, many thanks for your help.

To end the topic: Schol-R-LEA, you will answer here on the topic the questions I asked for you?
Uhm, well, I really don't have anything else to add... Brendan and simeonz pretty much covered it.

Re: Machine code and assembly are necessary currently?

Posted: Wed Apr 04, 2018 12:01 pm
by ~
You need them to write compilers, linkers, loaders, and to write the hardware platform specific parts of your programs.

You will also need it for anything you want to do from scratch by hand without other tools, for example writing executable and other file formats by yourself instead of using a linker.