September 17, 2019

Imperative vs Functional

Difference between Imperative languages and Functional languages: Imperative languages are based on assignment sequences whereas functional languages are based on nested function calls. In imperative languages, the same name may be associated with several values, whereas in functional languages a name is only associated with one value. Imperative languages have fixed evaluation orders whereas functional languages need not.(1) In imperative languages, new values may be associated with the same name through command repetition whereas in functional languages new names are associated with new values through recursive function call nesting. Read more

August 15, 2019

Boundaries for algorithm analysis

Some boundaries you should know to approximate time and space complexity of your algorithm. $2^{10} = 1,024 \approx 10^{3}, 2^{20} = 1,048,576 \approx 10^{6}$ 32-bit signed integers (int) and 64-bit signed integers (long long) have upper limits of $2^{31} − 1 \approx 2 \times 10^{9}$ (safe for up to $\approx 9$ decimal digits) and $2^{63} − 1 \approx 9 \times 10^{18}$ (safe for up to $\approx 18$ decimal digits) respectively. Read more

July 10, 2019

Migrate to NoSql

Một điều được nhắc đến rất nhiệu khi chuyển từ sql sang nosql là cách để lưu trữ quan hệ giữa các đối tượng trong database. Một đối tượng thường rất ít khi tồn tại độc lâp trong một hệ thống mà nắm giữ 1 phần thông tin được sử dụng để tạo ra một đối tượng khác. Các dạng quan hệ chính giữa các đối tượng có thể lưu được trong cơ sở dữ liệu quan hệ bao gồm Read more

March 25, 2019

Type embedding not inheritance

Since we don’t have classes in go, you can say struct will do a job to make objects. So how 4 principles of object-oriented programming represent in golang? In this post, we will discuss about the principle of OOP that make golang more better than other object oriented programming language: inheritance. A simple question, how does Golang represent inheritance principle even if it doesn’t have extends? We can easily find out the answer of this question: embedding type Read more

March 23, 2019

Why can't initialize object from abstract class (java)

Difference between Abstract class and Interface is one of the most be confused problem when the first time I learnt Java. In which case we should use Abstract class and which case we should use Interface? Let’s take a deeper look in this two of concepts. By defination, the Abstract class (java) is a class but unlike a simple java class, it’s may not only contain regular defined methods but may also contain abstract methods or a mix of regular and abstract methods. Read more

© khanhtc 2019