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:
The goal of this article is to set up a simple REST API using AWS resources such that we can conduct command-and-response without relying on the AWS IoT console. One benefit…
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 when he suggests that based on the three fundamental guidelines he proposes (very different from the three laws of robots in Asimov’s work), we will be able to construct a beneficial AI sometime in the future. …
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 less stringent than that on Apple App Store (no hard requirement on dimension, can skip tablets, etc.), the journey of getting
fastlane screengrab to work with React Native is still quite a mouthful. …
Update 02/10/2021: for the Android version, i.e.
fastlane screengrab, we have shared our experience in Make Fastlane Screengrab Work with React Native.
We recently submitted an app made in react native to Apple App Store. The whole process was highly complex, but with the help of
fastlane, it was bumpy but still manageable…until we started to generate screenshots of the app. Screenshots are required by Apple App Store for two sizes of iPhone (6.5-inch and 5.5-inch) and two versions of iPad Pro (12.9-inch 2nd and 3rd generation). Although screenshots can be produced manually, it is not a scalable solution once…
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.
Recently, I need to write tests for a functional component that uses
useEffect to toggle an internal state based on whether the virtual keyboard shows up. A simplified version of the functional component is displayed below.
The basic functionality is that a piece of…
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:
For background information of this series, please refer to the Introduction section of Part I.
It is highly recommended that you go…
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 a series discussing one way to integrate IoT device with AWS IoT using Python. Other parts of the series are listed below:
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 into a problem.
I was following the code on this reference. Upon copying
ggplot(mpg) + geom_point(aes(displ, hwy)) to the diagnostics-enabled RStudio text editor, I got this warning:
no symbol named ‘displ’ in scope
no symbol named ‘hwy’ in scope
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 fairly straightforward solution is to put the updated binary on an internal S3 bucket, which will be downloaded by each IoT device whenever update is needed.
However, looking deeper into this, I realized that AWS IoT authenticates IoT devices differently from other AWS resources (such as S3). The former uses…
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 listener process to handle log writing exclusively, while all other loggers log their messages to a queue that is processed by the listener process. However, the demo code in the document doesn’t cover some of the nuances that I encountered when trying to make it work for my own project…