I recently had to implement a local file cache for a React Native app so that users could play audio and video when offline. There are a number of reasons you might need to make a similar caching system, and this post explains how to set up the basic code.
Often, when developing a new React component for a web app, I find myself with lots to do. For example, I may need to add a Redux container, API endpoint, some Redux actions, and the UI of the component. These tasks are all interconnected and interdependent, so it’s difficult to know where to start and […]
Deleting data in any software system can be a tricky problem. Often, instead of deleting data and permanently losing it, it may be preferable to keep the data, but make it invisible to users.
Active Record is a popular Object Relational Mapping system (ORM) that many web developers find themselves using at some point or another. A lot has been said about the benefits and drawbacks of ORMs in general, and Active Record shares all of them. Regardless of how you feel about it, using Active Record will be […]
Android’s TimePickerDialog is fairly simple to use and works well if all you need to do is to choose hours and minutes. The problem is that you can’t restrict which times can be selected, set time intervals, allow seconds to be chosen, or style it in a meaningful way. The MaterialDateTimePicker library was made to […]
Terraform does a great job of automatically optimizing the creation and modification of obvious dependent resources (correctly ordering and chaining operations). However, it cannot always know about other dependencies implicit in the infrastructure.
Being explicit about the return type of the function is the most under-utilized feature of TypeScript. At least, that’s true for the way I write my code. When I first started using TypeScript, I was really impressed with the way it inferred the return type of the function, and having these types perpetuate throughout the […]
The Pipelines in Azure DevOps now support defining build configurations with YAML files. This is a huge advantage if your project is anything like my team’s and requires you to reproduce old builds.
Over the past six years, I’ve done a lot of iOS development (and written a lot about iOS). I would say it’s been the primary focus of my career. But as a software consultant, I need to be flexible, and I’ve done my fair share of Android development as well. I’m currently working on a […]
As of TypeScript 3.1, the lib.es5.d.ts file provides a couple of predefined types that are very helpful when trying to write generic higher-order functions. In this post, I’m going to show an example of using the Parameters and ReturnType predefined types for just that purpose.