Excellent books to expand programming skills.

Kotlin and Android Development featuring Jetpack – Covers a vast array of Kotlin features, with a good focus on Jetpack. This may have been the most difficult read I’ve ever encountered, but I started it with almost no understanding of app development with Kotlin, never mind Jetpack. I highly recommend this book to anyone currently…(Continue Reading)

Use Care in Kotlin when Calculating Future Dates with Epoch Times

So, I’m left for my sage advice of the moment: “Use care in Kotlin when calculating future dates with epoch times”. Make sure any amounts you add to an epoch time are of the Long data type, just in case you edit the code later and forget to change it.

Easy Perl Dispatch Tables with Security Levels

The vast majority of Perl scripts that I write are for managing information via HTML forms. The script will generate the form, and then process the results when the user hits submit. In order to keep track of what form the user is submitting data for, I’ve generally used a hidden form variable named “state”.…(Continue Reading)

Firebase Database paths must not contain ‘.’, ‘#’, ‘$’, ‘[‘, or ‘]’

I’m trying to minimize the amount of data downloaded for subscriber accounts. I’d like to store all of my subscribers in the path /subscribers/[emailAddress]/ on my Firebase Database. If I can’t use the email address as part of the path, I’ll be forced to download the entire list of subscribers and then search through the…(Continue Reading)

Replicate a Firebase Real-Time Database with a simple Perl script

Here is a very simple script to replicate data from one Firebase RTD to a backup RTD. Just be sure to modify the array of root keys (@firebaseBackupKeys) to reflect your database. This version can be called from a web browser, or via a cron job. #!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); print ‘Content-type: text/html’, “\n\n”; use…(Continue Reading)

Install Firebase Perl module with Bitvise SSH

Connect to your web host, then click the “New Terminal Console” button. 2. Type “cpan” at the command prompt: 3. If cpan requires configuration, select “local::lib” by pressing enter, or sudo if you have permission for the server. In my instance, my web host does not allow sudo. 4. Once cpan finishes configuration, note the…(Continue Reading)

postValue() not working from MainActivity.kt

I have a View Model named “subsViewModel” that I’m storing subscription details for use by various fragments and MainActivity.kt. When a user authenticates with Google Firebase authentication, I want to store the user’s details into subsViewModel as shown below: Authenticate, Store Firebase User Information // Authenticate users: auth = Firebase.auth if (auth.currentUser == null){ //…(Continue Reading)

java.text.ParseException: Unparseable date: “”

Logcat Fatal Exception caused by: subscription?.nextExpirationAsEpoch = SimpleDateFormat(“MM/dd/yyyy”).parse(subscription?.nextExpiration).time

When reading subscription records from a firebase realtime database.
Fatal Exception when iterating over firebase real-time database keys caused by a blank secondary database key. Possible fixes included ensuring the secondary key and the date string are not null, as well as logging errors with a toast.