How to Write a Simple Android Wear OS Hello World Application

A few months back I treated myself to a new watch, and I decided to finally try a smartwatch. I haven’t thought that I’d use it as much as I ended up doing, but I noticed that the Android device lacks a few features that I’d previously found on the Apple Watch, most notably a native stocks app that helps keep track of my portfolio. Granted, I don’t know why I’d like to see my life savings disappear in real-time, but I decided to try and write a simple stock tracking app for Wear OS devices just for the sake of it. However, this article discusses how to get started with writing a custom program for Wear OS devices.

Continue reading How to Write a Simple Android Wear OS Hello World Application

How to get the current time from an NTP Server using an Arduino, ESP32, or ESP8266 [shorts #4]

Arduino-based clock projects are a staple in the maker and DIY community, and I’ve built a few ones myself. Such projects typically incorporate a real-time clock (RTC) module that keeps track of the time. However, once the battery on the RTC module runs flat, it forgets the previously set time. Another option involves adding a few push buttons to allow users to set the time. The Arduino itself keeps track of the time as long as it’s plugged into a power supply, and it forgets the settings once you disconnect it from the power source. This short article discusses a third option that allows you to make your clock projects much more user-friendly by automatically setting and adjusting the time when necessary.

Continue reading How to get the current time from an NTP Server using an Arduino, ESP32, or ESP8266 [shorts #4]

How to resize bitmap images using C++ [shorts #2]

Since 2016, I’ve always returned back to my Macintosh Classic CRT build, constantly trying to refine the project and make it easier to reproduce my results. In my latest attempt, I used a Raspberry Pi to communicate with the monitor. While that method worked like a charm for me, others have reported a few problems they’ve encountered and possible solutions. In my next attempt to finally get this project right, I decided to go down another path. Without going into too much detail here, the new method required me to implement a simple scaling and dithering algorithm in C++. This short article discusses my image scaling solution in C++.

Continue reading How to resize bitmap images using C++ [shorts #2]

Writing a Quick and Easy Thread-Monitor (Watchdog) in Python [shorts #1]

A thread-monitor, often also referred to as a watchdog, is extremely helpful when building multi-threaded and reliable applications. In its simplest form, a watchdog should detect when one or more threads hang or crash, and it should restart the problematic threads if necessary. Depending on your use-case, you could implement this helper in a variety of ways, and you could add many more features such as a heartbeat function that allows each thread to report its progress to the monitor.

Continue reading Writing a Quick and Easy Thread-Monitor (Watchdog) in Python [shorts #1]

Simple Swinging Power Lines and Ropes in Unity

I wanted to create dynamic power lines for a game that I’ve been working on in Unity for the last few weeks. I couldn’t find a solution that satisfied my requirements, and so I decided to implement a custom solution, which I wanted to share with you.

Continue reading Simple Swinging Power Lines and Ropes in Unity

How to program an arcball (orbiting) camera in Unity using spherical coordinates

A while ago, I wrote this article about a simple implementation of an Arcball camera in C++. In it, I described how that could get done without using Quaternions, spherical coordinates, or a lookAt function. Anyway, just out of curiosity, I decided to create a minimal implementation of an orbiting arcball camera in C# using spherical coordinates.

Continue reading How to program an arcball (orbiting) camera in Unity using spherical coordinates

Functional-Style Operations in Java with the Stream API

I discussed Java Lambda Expressions quite a time ago in another article. Those were not the only new thing that got implemented in Java 8. Besides Lambdas, Type-Annotations, and Default methods in interfaces, version 8 of the Java API added support for functional-style operations. Because I think that this is quite a rarely discussed feature, I decided to write this short introduction to the Java Stream API and how it can be used for basic functional-style programming in Java.

Continue reading Functional-Style Operations in Java with the Stream API