[Article] Revist 'iterator' in Depth

Introduction I’m using Google Bigquery in Python and find that the library uses iterator a lot. I’m curious about why they design the library in that way. To have a better unstanding, I revisit the concepts of iteratable and iterator. This article will show you the difference between iterator and iteratale, how the for loop works differently on iterator and iteratale. What is the difference between iterator and iteratale? I take the following quote from Python’s wiki: ...

December 22, 2022

[Book] La Fabrique Du Consommateur / 制造消费者

This book tells the story of how humans from working for surviving to for shopping. I already know it, but without a systematic view before reading this book. It makes me realize a big problem in modern society is that we are far away from production and waste in our daily life. We buy everything from supermarkets instead of producing them by ourselves. The wastes are throwed into the trash bin and we don’t have a clear picture about how they are processed or what kind of polutions it will produce. For example, fruits sold in Canada may come from Mexico. The prices are low for mid-income families and they can through their fruits away even though they are still eatable but just not in good shape. What they don’t realize is the men labour behind producing this kind of affordable fruit. Farmer workers in Mexico may struggle to earn in living producing the fruits. The same applies to clothes which are made in Asia with cheap labour. In terms of waste, people who throw away plastics probably don’t realize how waste processing is polluting our environment and killing wild animals. Plastics degraded in nature will also come to water and soil and finally come to us by the food chain. It’s serious and real. ...

September 24, 2022

[Book] What is Education (何谓教育 in CN)

There are two volumes of the book What is Education - Dark in the Light and Light in the Dark. The first volume tells stories where both students and teachers are suffering from the Japanese education system, while the second tells where excellent teachers persist in delivering diverse education and life experiences to students. What described in the book is only the tip of the iceberg. Those stories not only happen in Japan but also in China, Korea and other Asian countries. Schools and universities are more like assembly lines while the students are raw materials. Those institutes deliver “education” which is aligned to a standard defined by the government. Thus, there is little diversity among a large number of institutes within a nation. On the other hand, students are graded by their learning abilities but not personalities. People are more selfish and less resilient than before because of the rating system. ...

September 18, 2022

[Books] 废除文科学部的冲击, 为了生命的闪耀之日

I read these books on the same day and put my records here. 废除文科学部的冲击 This book starts with fake news that the Japanese government will remove liberal arts from universities. The author discusses this fake news and extends the topics to that what universities should be. It’s commonly viewed in Japan that “liberal arts are useless (when compared with engineering and science) but they shouldn’t be removed”. The author argues that liberal arts have long-term value to society which is often neglected by the public. He puts that Liberal arts study human minds and question human societies. (Original Chinese translation: 人类社会学科是怀疑人类自身的知识领域.) ...

August 30, 2022

[Read] Airflow Best Practices

My team is using airflow to deploy jobs. I found this official document when I was searching for test automation in Airflow. After reading this document, I can tell a few bad practices my team is doing: Codes are not optimized, especially using external packages such as pandas and numpy. There is no unit test or integration test. Airflow variable is misused. We use it to store DAG-specific data but it’s not recommended. We should use something else, better if we can put it into the version control system. The upgrade/downgrade process is not automated, partly due to the lack of test automation. The database is not maintained. We should make backups and clean the operational ones. We can use the pendulum module to process the time calculation as our jobs are time-zone specific. Highlights I copy and paste my highlights from the document below. You can skip it if you will read the full document. ...

August 28, 2022

[Book] Tumultuous Times

I’m interested in Japan’s economy bubble so I find this book, written by Masaaki Shirakawa. I read the translated version in Chinese. The book is full of economy jargon which I don’t understand. The only thing I get from the book is that, political policies doesn’t matter much if you are in a bubble. Something will trigger the economy, early or late. The underlying industrial of a nation really matters. ...

August 25, 2022

[Book] The DevOps Handbook

Once my friend mentioned DevOps, and I got very interested in it even though I had heard it many times and seen the infinite loop figure as well. Perhaps it’s because this friend looks professional and I want to look like that as well. As a result, I read this book. Overview It’s a good book for whom have some understanding of the roles in tech companies, such as developers and operational maintainers. A freshman without tech knowledge and experience may feel lost in this book. ...

August 25, 2022

[Book] Principles of Risk Management and Insurance

I read this book, Principles of Risk Management and Insurance (by George E. Rejda and Michael J. McNamara) , because my job is related to the insurance industry. Understanding how insurance works can help me perform better in my daily job. Overview This book brings me a systematic view of the insurance industry, as well as details real-life problems. It’s a good book for whom are not professionals in this area but need some understanding of the insurance market. The chapters are well organized and summarized. Following the book, you will understand: ...

August 25, 2022

React Learning Path

This post records my React learning path. The content is organized by time order. The Official Tutorial The official tutorial guides you to build an online game board. To be honest, this is not a tutorial oriented for beginners with little JS knowledge. I followed the tutorial and was confused at the end of the tutorial. The W3Chools Tutorial The W3Chools Tutorial is well organized. It introduces JS and React and the beginning and then the grammar. Most of my confusion about the official tutorial is cleared. I learned a lot more. ...

August 24, 2022

Posts Archive

This page contains an archive of all posts.