sample34

Learn

Week 14-12-2020

This week I learned

Design patterns in Android: MVC, MVP, MVVM
Data Binding in Android
Introduction to Java Stream
Static Keyword in Java
Serif and Sans-serif in Design


This week I read

Chọn Thành Sếp - Hác Phượng Như

Overall, this book doesn't give me much interesting information but it accentuates these following must-have virtues to become success in work:
+ Be active: Work conscientiously, actively, proactively.
+ Stop complaining: and give more compliments.
+ Diligence: Diligence make success, you know ?
+ Well done is better than well said.
+ Responsibility: After reading this book, I promise myself will never blaming on others ! And whatever I do no matter big or small, it all need to be done perfectly.
+ Be focused: concentrate on what I do. Which field I choose, I must be a best in that field !


Week 07-12-2020

This week I learned

Optional class in Java 8 :

This class provides a quick and succint approach to deal with Null Pointer Exception thanks to these following methods :
+ get(): Return wrapped value inside Optional.
+ isPresent() and isEmpty(): Return a boolean whether the wrapped value is null or not null.
+ ifPresent(): If the wrapped value is present, execute Consumer code, otherwise do nothing.
opt.ifPresent(address -> sout.println(address));
+ orElse() and orElseGet(): If the value is not present, return the value as parameter of orElse() or exectute Supplier code inside orElseGet().
opt.ifPresent(...).orElseGet(() -> "hello")
+ of(value) or ofNullable(value): Return the Optional wrapping the wrapped value. If null, of() throws Null Pointer Exception while ofNullable() returns empty Optional.
+ map() and flatMap(): Allow to transform value. Map() takes the content of the stream not the stream, flatMap() has the effect of replacing each generated stream by the contents of that stream.
+ filter(predicate): Return value that satisfy the predicate. opt.filter(age -> age > 3).ifPresent(() -> sout.println"baby");

This week I read

Hello World: Being Human in the Age of Algorithms - Hannah Fry

This book change the way I think about algorithm or machine affects how we live. Is it good or bad ? , it's all depend on us. The question is: "How to cooperate with machines to get the solutions together in the 4.0 industrial revolution ?"

A Little History of the World - E.H. Gombrich

An summary of the history of the world, especially focusing on Europe. I personally find this book really rewarding because It gives me important knowledge about Alexander The Great, King Darius, various famous empires on the world which was quite ambigious for me before.