DNS, or the Domain Name System, translates human readable domain names (for example, www.amazon.com) to machine readable IP addresses (for example, 192.0.2.44). DNS system is a public, hierarchical, distributed and heavily cached database. DNS queries go through the following steps: User sends a recursive DNS query to a resolver. Resolver...
[Read More]
The Great Firewall (GFW) is the infrastructure that filters and blocks internet traffic to and from China. It is widely known to censor and block access to certain foreign websites from inside of China and thus a frequent accusation point by China critics. But it is less known to defend...
[Read More]
This post introduces Home Assistant, an open-source home IoT automation that puts local control and privacy first. it also helps address many IoT platform by providing a cross-vendor management interface.
[Read More]
This is the course notes I took when studying Programming Languages (Part A), offered by Coursera. Subsequently I studied Part B and Part C.
[Read More]
Java is a strongly object-oriented language. Only object and primitive types can be part of function input and output. In other languages, function is just another type, allowing the creation of higher-order functions that take functions as input or return a function as output. Being object oriented is not bad,...
[Read More]
Aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding additional behavior to existing code (an advice) without modifying the code itself, instead separately specifying which code is modified via a “pointcut” specification. This allows behaviors...
[Read More]
Often we need a named data holder to store data according to certain schema. The object-oriented way is to create data classes with typed fields. For example, in Java we can create Java POJO, and with the help of Lombok, it is pretty simple:
[Read More]
There are many resources, such as file handles, sockets, or buffers, must be closed after use to avoid resource leakage. It is easy to forget to do so or implement it in an incorrect way. In Python, the with statement simplifies the management of closable resources by automatically invoking it’s...
[Read More]
Recently, after an EdgeOS upgrade, I started to see intermittent DHCP timeouts from my UniFi controller, mostly from new clients. Then after flushing the DHCP lease, all devices are unable to obtain an IP address, indicating a problem with the DHCP server.
[Read More]