Friday, April 10, 2020

Dashboard: Recurring Events

Now that we're all stuck in our house together, I'm building a dashboard to show what's upcoming on our combined calendar.  I'm using Google Sheets because I can display it large on our TV and we can see what's coming up next.  I wanted a countdown that shows how many minutes to the next event and I wanted events to disappear 5 minutes after they start.

One thing I quickly discovered that if an event happened every day, I was having to update it each day.  I figured there must be a way to do this programmatically.  So, I want it to be today's date, until after the date has passed and then I want it to be the next day instead.

Recurring Daily Event at 8:30 am:

=datevalue(now())+if(hour(now())>8,1,0)+(8.5/24)

(a) Start with the value for today's date.
(b) If it's past 8 am, add 1, otherwise, add 0.
(c) Add 8.5 hours.

On a given date, before 9 am, it will be set to today's date at 8:30 am.  At 9 am, it will switch over to 8:30 on tomorrow's date.  (Since it's hidden at 8:35 am, this gap is fine.)

Use military time and fractional time.  
For 2:45 pm, you'd change 8 to 14 and 8.5 to 14.75.
For 5 pm, you'd change 8 to 17 and 8.5 to 17.
For 10:15 pm, you'd change 8 to 20 and 8.5 to 20.25.

Recurring Weekly Event at 2 pm every Monday:

=datevalue(now())+if(weekday(now())>2,9-weekday(now()),2-weekday(now()))+(14/24)

(a) Start with the value for today's date.
(b) If it's past Monday, set it to next Monday, otherwise set it to this Monday (including today).
(c) Add 14 hours (2 pm) - see above for examples.

For this example, on Tuesday at midnight, it will switch to next Monday at 2 pm.  Before Tuesday at midnight, it will be set to this week on Monday at 2 pm.  (Since it's hidden at 2:05 pm, this gap is fine. You can work out more complex logic -- if (weekday > 2) or (weekday = 2 and hour > 14) -- if you need it to disappear quicker.)

You need two numbers for this to work:
(1) The weekday.  For me, the week goes 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday. This may be different based on your settings or locale, if you put "=weekday(now())" in a cell in Google Sheets or Excel you should be able to tell if your settings are different.  You'll use this number in the purple and red sections.

(2) How many days to the next weekday (from Sunday).  This is weekday + 7.  8=Sunday, 9=Monday, 10=Tuesday, 11=Wednesday, 12=Thursday, 13=Friday, 14=Saturday.  You'll use this number in the orange section. (Note: This is not QA tested over the course of an actual week yet, I'll update this if any adjustments are needed).



Wednesday, April 08, 2020

Dashboard Project

Now that we're all stuck together under house arrest, I've had a few spare moments here and there to work on a project I've always wanted - a dashboard.  I can project it onto the big TV, or eventually, a dedicated monitor in the kitchen. I'm starting with the calendar and I have a few goals - I want events to be displayed in chronological order, I want events to disappear 5 minutes after the event starts and I want a countdown to the event start. We all have separate calendars, so for now it's a manual process to enter items, but I want them in the correct order, no matter how I enter them, and I want recurring events to update themselves without any intervention from me.  


In the past, I've done smaller scale things, like a dashboard for my wife so she could see where I was along my commute or something that told me what emails I'd received recently, but none were polished or long-term. I'm thinking about what else I could do, like weather or Alexa stuff with IFTTT.

I'll blog about any interesting things I figure out along the way.

Wednesday, March 04, 2020

@GoogleMaps, this is wrong (S. Marengo Ave.)

Dear Google Maps - in Pasadena, California at S. Marengo Avenue and Green Street, when you're traveling south on S. Marengo, Google Maps Directions shows four lanes - two left turns onto eastbound E. Green St. and two straight lanes continuing onto Marengo St.



But there's actually only three lanes here - one left turn and two straight.


Here's the streetview, facing south.


And here's an earlier street view (2016) where you can see that they used to have a sign at this intersection because it used to be four lanes but they reduced it to three lanes and covered up one of the arrows on the sign.  Go even further back and you'll see that even in 2014 street view the sign is still only showing 3 lanes.


@GoogleMaps, this is wrong (Burbank Blvd.)



Dear Google Maps - there is no exit from northbound Interstate 5 in Burbank, California onto westbound Burbank Blvd.  I thought it had been removed from the map, but it seems to be back.



Here is Google Maps telling me to take that exit:


Here is the exit.  On the far right, you can see the orange construction notice on the exit sign indicating that the westbound exit is closed.


Zoomed in - where it would normally say "WEST" with an arrow to the left it now says "CLOSED" in black on an orange background.  If you took exit 146B you'd see barricades blocking the former lane which is now just dirt (they've already removed the lane).


The exit used to parallel the freeway under Burbank Blvd. and then curve back around.


But now it's a big pile of dirt.  Soon they will be removing the Burbank Blvd. bridge entirely to rebuild around March 14.


See also:

P.S. Thanks for finally adding the Empire Blvd. interchange (directly to the north on the 5)

Bring on the Coronavirus

It's been too long since I've recorded notes. I've been busy, I've been discouraged and any notes might have gotten me flagged by the secret service or referred for therapy. Maybe today will be a little calmer. I stayed home sick from work today. I've struggled with sleep issues ever since we had children and a decade and a half later I've finally started getting treatment for it. It's hard to know if it's working. I think it is. We also bought a much firmer mattress a few days ago and I think that's helping as well. Except last night I stayed up too late reading, couldn't sleep, and then had to get up multiple times with our son. So I was exhausted this morning and knew if I went to work I'd be crabby, tired, not thinking clearly and the drive would be a struggle. So I stayed home sick.

And thought I had found some time to write. But even this has already been interrupted with a rather lengthy unplanned family-related task. And I hate being interrupted when I'm writing. It's one of the reasons I write less, because I realized interrupted writing isn't worth the anger it generates, so I try to save it for a time when the likelihood of interruption is near zero.  Today, I was wrong.

Yeah, so I've been really discouraged lately. While certainly not the worst in human history, we are at a really low point in our nation''s history. We are divided, full of hate, and evil is winning. I say evil is winning because the spirit in this country right now is one where people are only looking out for themselves, except when they can control others. And a large group of people have been convinced that things are going in their favor while in many ways, the protections are being eroded. 

And then there's this whole slow moving pandemic. I guess it's spreading less than the flu, but its ability to spread has a really low bar. I'm not sure how both of those are true. I think I sort of know. But, interestingly, it's also sparing children. Apparently the weird cocktail of germs and antibodies in kids is enough to arrest the virus for most of them.

I felt better today. I'm really tired, but staying home meant a slow day (I still participated in a conference call), working in the yard, cleaning up some email, getting some other stuff done off my to do list. The idea that it could all be for nothing if I end up getting sick and dying in the near future makes me want to just spray groundclear across everything and then throw the whole lot in the greens can, except that I know my son likes playing in the backyard and that our neighbors like how our front yard looks (though they probably wish I was faster on weed patrol).

I just keep circling back around to being tired. Tired, discouraged, defeated, ready for bed. A wish to sleep for a long, long time.

Thursday, February 27, 2020

120: Tsunami

At first, it was a little water, creeping onto the pavement. And then a little more.  And soon water was sliding over the entire driveway, slowly rising up the wheels of the cars. The water kept coming, moving northward across the lot.  Before long, it was up to the tops of the wheels.  Larger and larger pieces of debris flowed with the water, first curving around the cars, but eventually smashing right into the cars.  The cars began to shudder from the force of the water, yielding and then pushing back. But the water, it just kept coming. One of the smaller cars gave up, allowing itself to be lifted on the wave and pushed down the aisle.  A large truck held its ground, getting beat mercilessly by the water and the debris.  A few more cars succumbed, sluggishly bobbing free of gravity, pushed away by the water.  A large plank slammed into a van, shattering the windows and sealing its fate.  It would not become a boat today, water rushing to fill the insides, it would remain on the ground, eventually rolled end over end, not that anyone would see it.  It was time to move up to the third floor.

"120" is the umbrella under which I place my creative writing (it's been a long time! Again!) - it refers to one of the practices: writing for 120 seconds on a single topic with no chance to go back and edit - there may be mistakes, typos, embarrassing spelling errors.  Such is the nature.  I might continue writing after the timer ends, but it's about sitting down and writing something. This particular effort was because I watched a video today from 2011 where the tsunami in Japan overran and airport. Click here to read more 120s.

Thursday, February 06, 2020

So... @Amazon @AmazonHelp needs a @Gmail / @outlook competitor

I'm getting stuck trying to submit this through the appropriate channels to Amazon.  So I'll just put it out here.

A Gmail competitor could...

...directly integrate with AWS where businesses are sending email (instant delivery, no worries about a competitor blocking or delaying email)

...be the default connection on Kindle devices

...be the source/container for inbound Alexa notifications

...integrate with Amazon shopping/notifications (especially in the web browser) including a new place to sell advertising to partners

...be a B2B corporate product for companies looking for an alternative to Google and Microsoft

...keep Amazon emails out of the prying eyes of other inbox providers