Dave The Web Guy

Remember Hyperlinks?

Go Back

I'm Lounging Around a Few Days Off Work


I'm on vacation this week but it's a pretty dry one.  I've not arranged any trips, and I certainly wouldn't have the cash for anything too exotic in the first place.  

I go into this peeved because a presentation at work I was responsible for blew up just before I left.  I had spent weeks preparing for it, complete with redundancies, but in the end the technical gods had their say.  The key bomb was that the presentation computer rebooted on its own (peeling back this onion, I learned that the computer was inadvertently classified as one that should reboot, versus what I specifically coded it not to do because, hey, presentation machine), sending everything else careening.  There was a last minute requirement change that fell outside the recovery dry-runs as well that exasperated the situation, though fortunately there was enough of said dry runs that in fact I could recover and at least the presentation could continue in a general sense.  But, it was clumsy and we lost our remote audience.  Argh!  There were subsequent presentations which went smoothly but I didn't want to go into these days off grumbling over any of them, but here we are.  Grumble grumble.

 I'm on day 2 of the "days off" and so far I've spent most of the non-roosting time (read: sleeping, lounging, drinking coffee), coding improvements to how my One Minute Webcams refresh.  

Previously, my camera self-refreshing pop-out pages did a complete reload about once a minute.  I literally mean the whole box and its content refreshed.  That's fine but kind of cheap.  I wanted a cleaner more professional way.  

What I wound up doing was simply dropping in some JavaScript to only update the current snapshot by literally dropping in the latest image over the old one.  Now, if you're staring at the window (you sick bastard), every 60 seconds or so, the image itself changes, which is in fact much, much better.

I'm not a professional coder and the new process initially did not work.  I tested and proved that, mechanically insofar as the code was behaving, it was doing its thing.   But the image itself was not changing from the current to the new.  And there was nothing to explain it.

Something from my deep past in doing real JavaScript work nudged me from the bottom of the neuron pile and suggested it was because the two image file calls I was attempting, involved exactly the same file name.  And as such, in mysterious JavaScript land, the difference were thus not being detected.  To prove my theory I needed to somehow change the file names to make them different, yet, without actually changing the file names -- because the current image and the new image were in fact sourced from the same file name.  And further, the differences in the file name needed to persist; I couldn't just change the file name once, I had to change them every single time the image updated.  Yikes!

It actually was not difficult to do though.  I simply used a JavaScript Math.random(); function to give me a random number, then appeneded that random number to the updated image file name as a query parameter.  I realized that the addition of the query parameter to the file name would "change" the file name of the base image file, but the base image file name itself would stay the same.  When the routine hit the part of the code that placed the updated image, the query parameter information would simply be ignored but it will still be "seen" by my code as a valid change, and hence, a valid update action to fire.

The hunch was spot on and the trick worked.  You can see the results yourself by opening the Allen Street and Delaware Avenue One Minute Webcam pop-up refresh box at Buffcam, (or my own Live Webcam).  The process is much cleaner now. 

If this were a popular commenting forum with real exposure, chances are a lot of coders would jump in and try to point out a better, smarter, way.  I get it. But the fact is I gotta make do on the limited smarts I got, and this solution worked.  

Other than that gratifying evolution of one of my coding projects, I hit the bar downstairs for some social roosting.  I am "practicing", and with success, trying to moderate my behavior in bars while drinking.  This is to say, I am actually moderating any drinking that I do because what I have a tendency to do is to pick up drinking, or "binge drinking", the buzzier and more intoxicated that I get.  This leads to so many problems, starting with I hate being "that guy" in the bar, the spending that gets out of control, and a few other tawdry things which I am not compelled to willfully confess to a public blog, but yeah. 

Moderation is key because I so firmly believe in bar and "night life " culture, and it is something I deeply enjoy.  It fits with my social worldview and, no, the fact that I am an unappealing 55-year-old dude who traverses alone, usually, does not dissuade me in the least.  I enjoy the process as a tourist mining for serendipitous contact with people and bar-side friends.  It can be risky, but that risk can also be managed, and I know that I can, and seem to be proving it.

I'm also using the time to tighten up some organizational issues, personally, financially, household, and with Dave the Web Guy Innovations, LLC.  Organizing is also a cheap soothing fun it turns out, I just never get the real opportunity to do it.  Me organizing things with the sun beaming in and smooth jazz in the background is pretty nice.

And then, finally, I think there is the blogging.  I relaunched Wilkes-Barre Rail about two weeks ago and it, as well as Tampa Rail, need some serious updating.  Both websites deal with transit rail evolutions in the regions they cover, and there have been a lot of developments in wake of Biden's infrastructure plan, as well with private high speed rail connecting to Tampa via Brightline.  I suspect there have to be people in both areas wondering where I am with all those incredible developments, but unfortunately the challenge of not only monitoring all that stuff, simply finding the energy to write about any of it, is daunting.  I have picked up too much with too much youthful optimism regarding my ability to contribute to the "feed", and it's forcing me to either consider giving it up or doing it more efficiently and doing it. 

If you know me, one of my driving mantras is, I'm always the programmer, never the programmed.  In the end I will not be dictated by conventional weights.  If they exist, I will refactor them to my time advantage.  That being said then, which do you think I will do? ;) 

  By Dave for Personal Blog.

itsupport personal

Comments (0) | Promote (0) | PermShare | Focuses (2428)

Register to Comment

Go Back



Sort by Promotion Score

There are no comments. Be the first to make one!

You must be logged in to comment. You can register here.

Go Back

My Blabbity Blabs
Facebook Logo Twitter Logo LinkedIn Logo RSS Logo Reddit Logo Disqus Logo You Tube Logo
Live Webcam