Bạn có chắc chắn muốn xóa bài viết này không ?
Bạn có chắc chắn muốn xóa bình luận này không ?
Soothsaying is NOT a science
I found this question in a Vietnamese forum (HERE). The questioner is certainly not a man who's studied Computer Science (or in Vietnamese Congnghe Thongtin or CNTT), but is someone who "self-taught" coding. Otherwise he would be taught in the university about Compiler Technology and the about the SET THEORY, a very advanced and important part of mathematics. Such a lateral coder can only produce bad and buggy application.
First: It's for a Compiler that the parsing of a coding source must be as precise and as quick as possible. Like + for ADD - for SUB or = for equal and > for greater it's easier and faster to recognize an & or | than an AND or OR which can easily confuse the reader between a math-meaning and a natural language understanding. Example: "A & B and C & D are equal" is more comprehensible than "A AND B and C AND D are equal".
Second: It's the matter of mathematics in general. SET Theory is a recognized part of mathematics. And Computer Science has its mathematical root.
BUT the worst is that numerous one-eyed or blind "consultants" stormed in and guessed like the soothsayers with their hands on a blurred crystal globe and then soothsaid wildly. I have to laugh ... Poor questioners and the damned clueless soothsayers. Guessing and Soothsaying simply won't belong to science. DOT! I wonder how people can "learn" from a such forum with a very lofty slogan "Day Nhau Hoc" or roughly in English: Teach each other. And I was flabbergasted to be banned from this forum by the admins as I had criticized some soothsayers for their wild soothsaying. Probably because one of the admins is one of the soothsayers and was angered by the critiques
Some quotes for your entertainment:
Vì người tạo ra ngôn ngữ lập trình quy ước cú pháp nó vậy. Viết script cho hệ điều hành thường dùng từ khóa AND OR NOT còn các ngôn ngữ bậc cao javascript, C# , java, python … đều dùng ký hiệu ! && ||. dùng ký hiệu ngắn hơn, xu hướng ngôn ngữ lập trình bây giờ thích dùng kí hiệu hơn thì phả
mình làm việc với Ruby thì vẫn có and, or và not nhé bạn
nhưng không hoàn toàn giống với &&, || và !
ít nhất là khác nhau về thứ tự ưu tiên
vấn đề này thì là do người lập trình ngôn ngữ quy định thôi, người ta định nghĩa thì sẽ có, còn nếu không thì không có.Vậy tại sao bạn lại chỉ hỏi các phép toán logic mà không hỏi các phép toán khác như add, sub, mul, div, mod?
Kiểu như, tại sao đa số các ngôn ngữ đều dùng 1+2 mà không dùng 1add
2?/>Dùng kí hiệu ! && || dễ nhìn hơn đấy, sau này là do có syntax highlight và muốn “gần gũi” hơn (?!) với ngôn ngữ tự nhiên.
...and more. But: worst of all this following explanation is considered as the SOLUTION:
Các kí hiệu trên bắt nguồn từ C. Một số ngôn ngữ do chịu ảnh hưởng bởi C nên thườg dùng mấy kí hiệu đó.
Còn vì sao Dennis Ritchie - người tạo ra C lại dùng mấy kí hiệu đó thì mình không biết. Chắc là để cho code nhìn gọn hơn và giống các toán tử bên toán
What does the SET Theory say?
Mathematics is the art to solve a problem without verbose words. Nothing to do with C and UNIX ( both came out the Bell lab where Dennis Ritchie and the other who have invented C and UNIX). And if anyone who's familiar with Math won't wonder about the math. symbols like:
- + for ADDITION
- - for SUBTRACTION
- * for MULTIPLICATION
- / or : for DIVISION
- | for OR
- & for AND
- ! or _ over the element for NOT or see above
- ^ for EXCLUSIVE OR
The reasons why the symbols & | ! ^ ~ are used are due to the limited Symbol availability of a keyboard. The correct symbols are:
Btw. LINUX bases on UNIX. Or in other words:
The main difference between Linux and Unix is Linux is a clone of Unix
(more: read the key difference HERE)







