thinking

A breakthrough of my mind

thinking tactics
Today I got a really nice chess puzzle that makes me review all of my knowledge, or even more important - the way I should think strategically. 🤔 via chess.com The puzzle starts with black makes Na5, white to move. To this day, what I have learned about chess strategies could be shortened into: seek to prevail. There are many shapes of prevail, that is: checkmate the opposite king gain the advantage in trading pieces (sacrifice) take the advantage of space (suppress, narrow the opponent’s scope of activity) promotion Apply to the current situation, white wins one piece (a pawn which means 1 point but it’s just a gambit), a little bit advantage of space (a pawn in d5 followed by Bishop at c4), a bad move of black pawn f7. Read more...

Imperative vs Functional

design thinking programming
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...

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

oop thinking design
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...

How much your objects encapsulate ?

oop thinking design
Encapsulate ( tài liệu tiếng Việt thường dịch là đóng gói ) hay được nhắc đến và ví dụ như là cách để che giấu thông tin trong lập trình hướng đối tượng. Tức là trạng thái của đối tượng được bảo vệ không cho các truy cập từ code bên ngoài như thay đổi trong thái hay nhìn trực tiếp. Việc cho phép môi trường bên ngoài tác động lên các dữ liệu nội tại của một đối tượng theo cách nào là hoàn toàn tùy thuộc vào người viết mã. Read more...

1 of 1