Workflow of command-rand-response with API


After more than a year of hiatus, I am back on this series. This is Part III of the series discussing one way to integrate IoT device with AWS IoT using Python. Other parts of the series are listed below:


This is a chapter-by-chapter summary (including my own insights) of Dr. Russell’s book Human Compatible. It is a great read as it raises a lot of questions, invokes quite a few debates, and provides some answers. Dr. Russell is a serious researcher in AI, so I do not doubt him…

Using fastlane screengrab on react native app is also challenging

This is a sister article of Make Fastlane Snapshot Work with React Native. While fastlane snapshot works with iOS app, fastlane screengrab is its Android version that programmatically takes Android app screenshots using the UI Testing functionality supported by Android Studio. Although the screenshot requirement on Android Play Store is…

Using fastlane snapshot on react native app requires quite some efforts

Since we wrote this article, our code base has experienced significant change, including an almost rewrite of the app itself and upgrade of most of the tools we use (e.g. Xcode, React Native, and fastlane). Unsurprisingly, these changes break the UI Test script we wrote before. But what is surprising…

I have ditched the enzyme solution and fully embraced @testing-library/react-native , which makes testing hooks and triggering events much easier. The same testing as shown in the original article can be written in just a few lines and without the need to mock.

Updated testing code using @testing-library/react-native

Recently, I…

Workflow of command-and-response using AWS IoT Jobs

Due to modification of some AWS console UI (e.g. IoT jobs), small changes have been made to better accommodate the new UI.


This is Part II of a series discussing one way to integrate IoT device with AWS IoT using Python. Other parts of the series are listed below:

Workflow of uploading data from IoT device to AWS IoT MQTT topic

AWS console UI has undergone significant change since this article was published. Some instructions are updated due to the new UI deviating too much from the old version. However, if the deviation is not too big, the wording of the old version is kept intact.


This is part I of…

Column names “displ” and “hwy” not in scope. The code executes correctly, but the warning scorches my eyes.

Since I just started to learn R, I wanted to do as many things correctly as possible the first time. Therefore, I turned on all the diagnostics in RStudio, including “Warn if variable used has no definition in scope”, which by default was not selected.

Five minutes later, I ran…

I have been working on IoT devices recently and one of the tasks is to figure out an easy way to perform Over The Air (OTA) software update. Given that our IoT devices are registered under AWS IoT, and that the executable binary is quite small (about 6 MB), a…

Python with Log

In Python3, logging into a single file from different multiprocessing.Process is not supported, because there is no way to “serialize access to a single file across multiple processes in Python”. However, this document provides a brilliant solution to work around the limitation. Basically, we set up ONE logger in a…


Hi, I am from the Earth. And you?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store