Archive for November 2016

Progressive Web Apps

November 29th, 2016 — 3:35pm

I recently spent some time researching “Progessive Web Apps”, or PWAs.  They are a relatively new way to make mobile apps which utilize the web browser, rather than requiring full installation via an app store.  Google seems to be driving this particulare movement.  Here are some links I used in my research:

Your First Progressive Web App – how to build a simple, functional app, with a demo included.

Debugging Service Workers – after you get into things, this link comes in handy

Web App Install Banners – this is how you get someone to install your “app” once it’s coded and ready.

Sampling of PWA tools

I’ll update this post as I find more resources, and publish a few PWA’s myself.  I think this is the future for many apps – easier to update and distribute and lower storage requirements on the device.

I was able to get a fairly simple web app set up here: Listomizer.  You can enter in a list of items, then have the app make a random choice, alphabetize them, or randomly sort them.  When you load this, your phone should ask you if you want to add a button to your home screen.  Then it looks like an app when you open it.

Comments Off on Progressive Web Apps | mobile, Programming

Perl – days ago subroutine

November 29th, 2016 — 8:27am

Here’s a small subroutine, written in Perl, which takes a date, and returns the number of days since this date:

#Pass date as mm/dd/yyyy hh:mm:ss and convert it to a # of days ago
sub days_ago {
 use Time::Local;
 my ($t) = @_;
 my ($date,$time) = split(/ /,$t);
 my ($mon,$day,$year) = split(/\//,$date);
 my ($hour,$min,$sec) = split(/:/,$time);
 my $last = timelocal($sec,$min,$hour,$day,$mon-1,$year);
 my $today = time();
 my $since = sprintf("%d",($today-$last)/(60*60*24));
 #print "<!--Days ago: $since - $sec,$min,$hour,$day,$mon,$year -->\n";


print &days_ago("10/01/2016 08:00:00");

Comments Off on Perl – days ago subroutine | Programming

Back to top