05/10/2024
ဒီတစ်ခေါက်ကတော့ programming iceberg ဟာသလေး share ပေးချင်လို့ပါ။ ပုံလေးက အဓိကခြုံကြည့်မယ်ဆိုရင် JavaScript/ Python တွေက Programming လောကရဲ့ ဖျားဖျားလေးပဲရှိပါသေးတယ် 🥹
Javscript နဲ့ python ထက်ကို ပိုပြီးနက်နက်တဲ့ Bash Scripting တို့။ အောက်မှာပိုပြီး complex ဖြစ်လာတဲ့ Java, Dart, TypeScript, Low level Language တွေဖြစ်တဲ့ C, C++, Legacy Languages တွေဖြစ်တဲ့ Erlang, COBOL, ALGOL, Fortran, Pascal, APL အစရှိတာတွေအပြင် machine level code တွေဖြစ်တဲ့ assembly language တို့ပါပါဝင်ပါတယ်
သင် က python မှာ print(“hello world”) လို့ရေးလို့ရပေမယ့် Java မှာကျတော့
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
ရေးပြီးထုတ်ရတယ်
Legacy Language တစ်ခုဖြစ်တဲ့ COBOL မှာကျတော့
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
DISPLAY 'Hello, World!'.
STOP RUN.
ထုတ်ရသလို
Assembly language မှာကျတော့ Hello World ထုတ်ဖို့ဆိုရင်တော့
section .data
hello db 'Hello, World!', 0
section .text
global _start
_start:
; write(1, hello, 13)
mov eax, 4 ; system call for sys_write
mov ebx, 1 ; file descriptor 1 (stdout)
mov ecx, hello ; pointer to the hello message
mov edx, 13 ; length of the message
int 0x80 ; interrupt to call the kernel
; exit(0)
mov eax, 1 ; system call for sys_exit
xor ebx, ebx ; return 0 status
int 0x80 ; interrupt to call the kernel
ဒါတွေ အကုန်ရေးရပါတယ်။
Programming iceberg မှာ အောက်ရောက်လေလေ complex လည်းဖြစ်သလို performance လည်းကောင်းနိုင်တယ်ဆိုပေမယ့် မသင်ယူမီခင် စဉ်းစားသင့်ပါတယ်။ ကိုယ်သင်မယ့် language က ကိုယ်ရဲ့ career အတွက် အကျိုးပြုနိုင်လားကို စဉ်းစားပြီးမှ သင်သင့်ပါတယ် မဟုတ်ရင် အချိန်လည်းကုန်သလို သင်ရတာ အဖတ်ပဲတင်မှာပါ။