I was browsing internet and this weird question came to me mind. Do you think it makes sense to code directly in machine langauge? :)
Code directly in machine language for a few weeks and you'll know the answer. :D
Example of "Hello World" in Assembly language:
DATA SEGMENT
MSG DB "HELLO WORLD$"
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
MOV AH,09H
MOV DX,OFFSET MSG
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
Example of "Hello World" in C:
#include <stdio.h>
#include <conio.h>
int main(void)
{
printf("Hello, world\n");
return EXIT_SUCCESS;
}
Example of "Hello World" in python:
print "hello world"
After looking into this small "Hello World" example and comparing with what all software we are developing today i can say "Writing code in machine language is similar to planning 1000 KM tunnel by using you nail”.
These are general issues we will face:
hmmmm. I kinda feel like this is like asking why don't chefs use firewood for cooking.
https://en.wikipedia.org/wiki/Machine_code machine code is below assembler.
so I don't know about you, but per definition I would have to remember the meaning of
00010010001000100010010001010100010010100101001001010010101010010100100101010101001010
So the first thing that comes to my mind -> I am already to stupid to remember all functions, methods etc in all the languages I write in. How f*cked would I be using machine code.
To quote Gottfried Leibniz -> (translated via google translate)
It is unworthy of wasting the time of excellent people with servile calculations, because even the simplest can safely write down the results when using a machine.
I started my coding life in Assembler on a DEC10 en.wikipedia.org/wiki/PDP-10 back in the late 70's.
While it taught me an enormous amount about how computers work (as you are not abstracted from the low level architecture like with a high level language) it was incredibly inefficient time and productivity wise compared to today's languages and frameworks.
Also built my own computer a few years later from a kit (based on a Z80 chip en.wikipedia.org/wiki/Zilog_Z80) and also programming this in Z80 assembler.
Understanding computers is like the proverbial "onion". You can keep peeling away layers and realise that there is another level that you knew absolutely nothing about. This has kept me passionate about IT and Software development.
imho there has never been a better time to be a Developer than right now which is why I've come back to learn the latest techniques and skills :-)
The same applies to "Why humans don't travel on their own feet and instead using vehicles or animal power?" right.
There are several advantages to not using machine code directly:
As such, it does not make any sense to use machine language directly whenever not necessary.
Footnote: Rust uses the LLVM compiler-suite. LLVM is also used by other compilers (and even transpilers), like Clang and Emscripten.
Assembly level programmers were a hot commodity in the 80s and 90s and perhaps, even before that. This link has the source code for the Apollo 11 Guidance Computer.
That being said, I think assembly language is hard to code in. It's easier to express your thoughts in languages that are closer to English and build whatever you want and let the compiler do the assembly language translation.
Not really, it's just why people use library's for a use, they solve the complex problems and make things easer for the things you want to write, making you code shorter, but also require way less work to do the same thing.
This is why most languages are built on more then one, like PHP is built using C and C is a compiled language.
Can you think what it would take to make a web page when instead of coding in HTML you would be using machine language or even c? You would need to make the system to make the window, the system to handle how things are displayed and so on each time you make a webpage before you even make the webpage content.
You cant make a cake with only one ingredient.
Md Zaid Imam
Let learning process continue | Principal Product Manager
Sagnik Modak
Maybe it's because we are more fluent in the Alphanumeral language, since we have been taught the same from childhood. Infact, it is actually possible to communicate ideas and thoughts in binary, if we decide to reinvent our global language in machine code. Maybe smarter Aliens do that, but nope, not here on Earth. Goodbye Earthlings !
[Translated by Google]
01001101 01100001 01111001 01100010 01100101 00100000 01101001 01110100 00100111 01110011 00100000 01100010 01100101 01100011 01100001 01110101 01110011 01100101 00100000 01110111 01100101 00100000 01100001 01110010 01100101 00100000 01101101 01101111 01110010 01100101 00100000 01100110 01101100 01110101 01100101 01101110 01110100 00100000 01101001 01101110 00100000 01110100 01101000 01100101 00100000 01000001 01101100 01110000 01101000 01100001 01101110 01110101 01101101 01100101 01110010 01100001 01101100 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00101100 00100000 01110011 01101001 01101110 01100011 01100101 00100000 01110111 01100101 00100000 01101000 01100001 01110110 01100101 00100000 01100010 01100101 01100101 01101110 00100000 01110100 01100001 01110101 01100111 01101000 01110100 00100000 01110100 01101000 01100101 00100000 01110011 01100001 01101101 01100101 00100000 01100110 01110010 01101111 01101101 00100000 01100011 01101000 01101001 01101100 01100100 01101000 01101111 01101111 01100100 00101110 00100000 01001001 01101110 01100110 01100001 01100011 01110100 00101100 00100000 01101001 01110100 00100000 01101001 01110011 00100000 01100001 01100011 01110100 01110101 01100001 01101100 01101100 01111001 00100000 01110000 01101111 01110011 01110011 01101001 01100010 01101100 01100101 00100000 01110100 01101111 00100000 01100011 01101111 01101101 01101101 01110101 01101110 01101001 01100011 01100001 01110100 01100101 00100000 01101001 01100100 01100101 01100001 01110011 00100000 01100001 01101110 01100100 00100000 01110100 01101000 01101111 01110101 01100111 01101000 01110100 01110011 00100000 01101001 01101110 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00101100 00100000 01101001 01100110 00100000 01110111 01100101 00100000 01100100 01100101 01100011 01101001 01100100 01100101 00100000 01110100 01101111 00100000 01110010 01100101 01101001 01101110 01110110 01100101 01101110 01110100 00100000 01101111 01110101 01110010 00100000 01100111 01101100 01101111 01100010 01100001 01101100 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01101001 01101110 00100000 01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01100011 01101111 01100100 01100101 00101110 00100000 01001101 01100001 01111001 01100010 01100101 00100000 01110011 01101101 01100001 01110010 01110100 01100101 01110010 00100000 01000001 01101100 01101001 01100101 01101110 01110011 00100000 01100100 01101111 00100000 01110100 01101000 01100001 01110100 00101100 00100000 01100010 01110101 01110100 00100000 01101110 01101111 01110000 01100101 00101100 00100000 01101110 01101111 01110100 00100000 01101000 01100101 01110010 01100101 00100000 01101111 01101110 00100000 01000101 01100001 01110010 01110100 01101000 00101110 00100000 01000111 01101111 01101111 01100100 01100010 01111001 01100101 00100000 01000101 01100001 01110010 01110100 01101000 01101100 01101001 01101110 01100111 01110011 00100000 00100001