Categories
Uncategorized

Solution to NPR puzzle using Raspberry Pi

Intro
Take a common five-letter word. If you add an “e” to the end you’ll get a common six-letter word. or add an ‘e” after the second letter to get a different six-letter word, or an “e” after the fourth letter. what word is it?

The technique
I used the strange dictionary built in to my Raspbery Pi, in /usr/share/dict/american-english.

Key command
$ egrep '^[a‐z]{5,6}$' jhwords > /tmp/five‐six

That leaves us with 11897 words (use wc command to learn this).

Now just look at the six-letter words containing an “e” at the end:

$ egrep '^[a‐z]{5}e$' five‐six > e‐at‐end

Down to 784 words.

Now strip off the terminal “e”.

(steps skipped)

And then…

Candidate word list

ameba
ampul
aorta
avers
blond
brows
cloth
corps
demur
expos
fauna
final
flora
fondu
grill
hears
hydra
karat
larva
loath
local
madam
moral
pleas
psych
regal
scrap
sever
sooth
spars
strip
swath
teeth
tibia
uvula
vulva
zombi

You can scan by hand – the answer jumps out at you.

Conclusion
Another NPR Weekend Edition puzzle is solved by use of some simple linux commands.

References and related
Another NPR puzzle similarly solved.

Categories
Uncategorized

NJ homeowners: how to sell your SRECs from your solar panels

Intro
I was an enthusiast and got solar panels on my roof while there was still a tax credit for doing so. But then i became lazy and didn’t want to bother selling the SRECs I was awarded. Here is what I did.

The details
I got a recommendation from a friend who found a legitimate company who will buy my SRECs with a process so simple no registration is required! And, their prices seem competitive.

Here are the CEPS I’ve accumulated on the PJM-EIS web site. And no, I don’t really know how to use the site other than to report my generation. I just wasn’t that interested.

CEPS from Dr John’s home solar system

CEPS is a synonym for SRECs. SREC is a solar renewable energy credit. It’s a unit of measure = 1 Kilowatt Hour of generation by your system.

Here is the web site of the company I will sell them to: http://njsrec.com/

And their instructions – clearly written for someone not overly familiar with using a computer as everything is spelled out:

NJSREC.COM instructions

I haven’t sold them yet because I will have another one by tomorrow so I’ll wait for that one and bundle them all together. They get credited to your account on the last day of the month. My friend uses them however so I know they are to be trusted. They will simple send you a check in the mail for your CEPS after you follow those simple instructions!

Conclusion
We recommend NJSREC.COM as the simplest way to sell your SRECs and know you are not being taken advantage of. As of this writing July 2018 a quantity of 4 – 10 CEPS is worth $201 per CEPS. The prices have been going down (mostly) and will continue to go down. So don’t hold on too long, i.e., years.

References and related

The GATS web site is https://www.pjm-eis.com/
The buyer’s web site: http://njsrec.com/

Categories
Uncategorized

A few thoughts on Universal Basic Income

Intro
I think the time has come to do some large-scale experimentation with this idea for guaranteeing a basic income for all. We’ll need something as our jobs begin to get eliminated by robots, automation and AI!

Some experiments both government-funded and private are ongoing now. Out of Silican Valley’s idealism emerged givedirectly.org, which is providing a modest UBI to all residents of some undisclosed villages in Kenya for 12 years. They are then going to apply metrics to see what difference the UBI has made for these very poor residents.

References and related
Out of this year’s World Economic Forum came this paper which gives a good and cogent argument in favor of Universal Basic Income (UBI).

This ConsenSys paper combines two favorite topics: universal basic income and Blockchain. It also introduced me to Ethereum, an alternative blockchain to bitcoin. My only insight here is based on pragmatic observation. If the ideas proposed are so compelling, why aren’t they already in adoption in failed states with no effective currency, namely Venezuela? I think the idea is that each and everyone should generate their own currency units, say 1000 units per month, and arrange an equivalent exchange rate so that my unit has the same value as yours, and circles of trust so that my village’s exchange rate is equal to your village’s, etc. But I would love to see a long-form critical review from a subject matter expert.

I looked a tiny bit at ethereum, but it looks pretty Windows-based and I’m not too keen on anything I can’t run on my AWS CentOS server so I gave up for the time being. Ethereum is interesting because it’s open source and it’s specifically mentioned as the basis for the ideas in the ConsenSys paper. I would like to know its capabilities better. ethereum.org

To contribute to one of these efforts which are in the experimentation phase, you can go to givedirectly.org, which was recently featured in a New York Times Magazine article. They are applying some science to these efforts in attempting to measure their effects.

Categories
Uncategorized

How to change Fitbit account from one user to another

Intro
I’ve had a lot of trouble with my Fitbit HR, or more to the point, with the auxiliary programs. Two different Dell computers can’t find it – Bluetooth driver problems perhaps? My Windows phone can’t sync to it 99% of the time. Then I used an old Android phone, but I realized it was set up with my spouse’s account. And there’s no way to change it from the app itself. What to do?

The details for Android devices
Short of a full Fitbit app uninstall, I found what works is to go to the same place where you would uninstall an app, namely, Settings|Application Manager. Scroll to Fitbit. Touch Clear Data.

Then next time you launch the Fitbit app it will walk you through an account setup so you can associate it to your account.

This is the only practical way to do it, and the Fitbit site itself is useless for advice on this topic.

Conclusion
I’ve shown how to change the associated account from one user to another on an Android device. You cannot do it from within the app itself so you could waste a lot of time aimlessly looking around. Hopefully this post will help some people like me who are confounded as to why something so simple should be made so hard.

Categories
Uncategorized

Move phone number from one Verizon phone to another

Intro
I happened to have an old, deactivated Samsung Galaxy S3 lying around and an active one whose screen just went dark. Searches on how to transfer the phone number led to a lot of dead ends and frustration. So i winged it based on common sense.

The details
I suppose this trick will work on any set of closely related phones that use SIM cards, but the best chance of success is to have identical phones.

After trying to call *228, taking out the battery and finding and noting my IMEI number in the end I just decided to swap the SIM and SD cards. And that worked!

So that makes the hardest part of this just getting the SIM cards out, and that’s not too hard at all. I used this video as a guide, though I think this guy must have had contact glue on his fingers to get that thing out so easily!

https://www.youtube.com/watch?v=cFQpQB5Gx5U

I doubt that the apps came over, but the phone number immediately worked, which is my primary focus right now.

Conclusion
Swapping SIM and SD cards permitted me to move a Verizon phone number from a malfunctioning Samsung Galaxy S3 to one that had been deactivated. I did not need to note ESID numbers, call Verizon support or do anything else whatsoever. I don’t think it was even necessary to move the SD card, but perhaps by doing so some of the pictures and application data will be available on the new phone.

References and related
Helpful Youtube video.

Categories
Consumer Tech Uncategorized

Amazon Fire Stick/Sony BRAVIA TV compatibility problem – one solution

Intro
There is a very long discussion of this topic on Amazon.com. Sony BRAVIA models more than five years old may not work perfectly with Amazon’s Fire TV stick. I have this problem and I’ll mention my workaround.

The details
My Sony TV model is BRAVIA XBR 32XBR6. I suppose it’s about five years old. I also have it connected to a Sony Blueray player, which can also play Amazon Prime, Netflix, Hulu Plus, etc. But it isn’t nearly as well designed as the Fire Stick and so I bought the Fire Stick, which has better WiFi support and a faster user interface.

Initially the Fire Stick appears to work with the TV and all is good.

Second day: same thing. All is good.

About the third usage, however, and when playing on-demand content I hear what I’m trying to play but I only see a blue screen with the letters HDCP. I think that indicates a digital copy protection mechanism has kicked in.

Powering down the Fire Stick doesn’t seem to work. Turning the TV off and on doesn’t seem to help.

In my case I had the option to switch to watch the same content through my Blueray player (which never displays this problem). Then next time I went back to the Fire Stick (usually days later) all was good.

So I became suspicious about cause and effect and I shortened the cycle.

Get the HDCP problem. Switch HDMI ports to the Blueray player (using the remote). Initiate the Amazon video service connection on the Player (but don’t bother to actually play anything). Switch back to the Fire Stick’s HDMI port. HDCP problem gone!

This solution was not too painful. I also have a Raspberry Pi connected to yet another HDMI TV port. I’ll see if switching to that will do the trick as well – that would be a cheap option that’s not too painful.

2017 update
I never get this HDCP problem any more. The main difference is that I never use my Sony Blueray player for on-demand programming. The Firestick is superior so I always use it. I only use the Blueray player for DVD playback.

October, 2017 update
I got my birthday present – the updated Fire TV stick with Alexa voice remote, but on the same Sony TV. It does seem to work better. The old one was button press, nothing happens, button press, nothing happens, button press, finally it gets the idea. The new one does seem to be better about that.

July 2019 update
Just go the latest and greatest: fire tv stick 4K on Prime Day a few days ago. On this same, now rather old Sony TV model mentioned above, it works really and surprisingly well! I thought surely this older model will not support newer features such as volume control – but it does. And surely it will not support power control of the TV – but it does! And since volume control works (and you can see it is controlling TV volume, not some kind of HDMI or other volume) of course the mute button also works. All these features had required me, up until now, to schlep around two remote controls: the one for the TV plus the Firestick. Now I’ll just need the one. I could probably use Alexa voice commands but I don’t think I’ll want to.

And, it’s just plain more responsive. Previous models were often a bit slow to react to key presses. This does much better on that front. One last thing, it comes pre-configured with your account already set up so you can be up and running much quicker.

I have no idea about the 4k-ness of the picture quality, but the other features alone make me glad I got it.

Fire TV stick 4K

I wish I could answer all the questions raised in the comments but I just don’t have access to any of those models. I would think it ought to work with any Sony TV made in the last 10 years, but maybe it’s not so simple.

Upgrading to a newer Firestick – what to do with your old one
Now you’ve got a Firestick on all your TVs and you want that latest model, and your relatives don’t want your old one either even though it worked just fine. Around here we’d be tempted to send it to a second-hand store, or worse case, to an electronics recycling program. But remember it has all your logins to Amazon (for sure), maybe Hulu, HBO Now, AT&T Now, Netflix, etc. So you better take an extra few minutes to factory reset it. This is a terrific article that gives five different ways to reset your Firestick to factory defaults: Five ways to reset your Firestick. I just wanted to repeat one. You have to have it connected, unfortunately. Hold the right and back buttons of your remote simultaneously for at least 10 seconds. Then follow the prompts. I have tried it and it works. The reset itself takes about 15 minutes on an older Firestick.

Tip for infrequent users

If like me you only watch a few hours a week because you are that busy, and yuo’ve subscribed to a variety of services (Netflix, Youtube Red, Amazon, …), I have this tip to save little of your precious time. You could see pop-ups suggesting to update to the latest version. I suggest to ignore those and wait until you have a bigger block of time. If you only have an hour you don’t want to waste the first five minutes upgrading an app you may have only used once (happens to me a lot). Let’s face it, these things don’t boot up quickly as it is.

Conclusion
A solution is offered to the dreaded HDCP problem for Amazon Fire Stick/Sony BRAVIA TV. More research needs to be done to reduce the solution to its essence.

References and related
Here’s the link to that lengthy discussion: http://www.amazon.com/gp/help/customer/forums/ref=cs_hc_g_pg_pg1?ie=UTF8&forumID=Fx1SKFFP8U1B6N5&cdSort&cdThread=Tx1A10FFQXCSZ2M&cdPage=1

Fire TV Stick (2019 model). This is the regular model. You probably don’t need the 4K model unless you have a super TV…

How to reset your (old) Firestick because you’ve upgraded: https://www.guidingtech.com/reset-fire-tv-stick-factory-settings/

Categories
Uncategorized

Keyboard macro programming

Intro
I had the perfect motivation to learn a new tool. I had hundreds of repetitive keyboard clicks in my future. So my strong motivation was to save time.

The details

I needed to cancel about 300 changes in the Helpdesk system AHD (Advanced Helpdesk) from CA. First I turned to the team with the power tools and showed them what I needed. It looked readily doable. Move the mouse over here. Click. New Window pops up, in focus. Click on this drop-down menu item. Chance status to Cancel and Save. But for whatever reason they couldn’t do more than two, and then they lost their motivation.

Meanwhile my friend Nix told me about alternatives I could try on my own.

Workstation Macro Recorder from Automation Anywhere
First I tried this one. You only get a 30-day free trial. It was supposed to record my clicks and other keystrokes and then play them back. It didn’t work. Running it seemed to interfere with the browser window and the Javascript, which normally displays a menu during a mouse-over event was not behaving that way: no menu was popping up as long as this program was running.

AutoHotkey
So Nix suggested AutoHotkey. He warned it was a little buggy and cantankerous, but probably suitable for the task at hand.

There’s learning a language theoretically and learning a language to accomplish a very specific task. I’m not too good at the former, just doesn’t interest me and motivate me. But as I was saying I had great motivation for the latter. It wasn’t obvious at first how to proceed. But I started with a test script, which of course initially didn’t do anything at all. And then I slowly built up in complexity for the task at hand. It probably took several hours in total time spent over a few days.

The actual, working script, tested and used on my Windows 7 laptop, test.ahk

; launch by holding down Windows key, then pressing z key.
#z::
; loop five times
loop, 5 {
; Rt-arrow key
send {Right}
sleep, 100
; cancel out my AHD changes. u is for update
send u
sleep, 6000 ; 6 seconds
; now we need 3 tabs
loop, 3 {
send {tab}
sleep, 300
}
send Change is being cancelled.
;
loop, 6 {
sleep, 100
send {tab}
}
sleep 200
; c is for cancel
send c
; save it
send !s
sleep, 5000
; make next change the active one
send {tab}
sleep, 100
send {tab}
sleep, 100
}


Can you use AHD without mouse movement?

The problem I was solving is two-fold. AutoHotkey is not really great at mouse movement. So I needed to understand how to interact with AHD without using the mouse at all. It tuns out to be possible, at least mostly and sufficiently for my purposes. And I think it is important to mention because most users never get to this level: most programs do offer you a keyboard alternative to mouse movements and in fact it’s probably worth the time to find out what those are as it will almost always be faster than dragging that mouse pointer around to the precise locale of your next click.

I never did get the script to perfection, but that wasn’t the point. The point was to save my mind and my time. And it did work for that! There were always special conditions, etc which I did not code for and wasn’t motivated to code for. So I plowed through cancelling five changes at a time.

Conclusion
AutoHotkey proved to be quite helpful. Did I mention it is free? I recommend to use it to save on keystrokes for repetitive things.

References
Auto HotKey web site.

Categories
Uncategorized

SANSA flying Adventure in Costa Rica

Intro
This is not a technical post but I wanted to document it here anyways. It’s good to be king!

The details
I was with my family recently in Costa Rica. I booked the flights late and paid dearly as a result. In fact the best direct flights were sold out. I ended up relying on Orbitz for a “mutliple carriers” flight from Liberia to San Jose (SANSA Airlines, and then from San Jose to the US (United).

The flight to Liberia was a direct United flight, so no problems there. My phone did not work in Costa Rica so I only had sporadic Internet access at the occasional Wifi-enabled restaurant. My time-share place did not have a working Wifi, either.

We had this early flgiht out of Liberia Saturday so we booked a room at the Hilton airport hotel, which has all the conveniences you’d expect. So I catch up on email. There’s nothing recent from Orbitz. So I try to ensure we have boarding passes.

Imagine my horror when after finally managing to check the Orbitz record locator only one of the four passengers is listed!

Then I manage to find separate United Airlines record locators. Another of the four passengers has a unique record locator, and is booked straight through Liberia to the US. The two remaining passengers have record locators that only show the San Jose to US trip, but I can find no information whatsoever about the Liberia to San Jose leg!

I ask the Concierge to call Sansa. They are very helpful, by the way and they do that. But it’s after 5 PM and they’re closed until 8 AM tomorrow. The flight is scheduled to leave at 7:57 AM, however.

So I get back to the hotel room and tell my fmaily “It’s a cluster mess!” And I use Skype to call Orbitz from my cell phone. After 90 minutes or so on the call they agree that although I bought tickets for four people, only one now shows up in their system with their record locator. They say it is a problem with the airline who has taken over the ticket, United, or SANSA, and that I need to straighten this out with them.

well, we know we can’t call SANSA, so we try United. But it just happens to be when a giant blizzard had cancelled lots of flights in the previous days. First I am on hold for 45 minutes and then dropped without warning. Then I cannot get back through at all.

We make contingent plans to take a private car service to San Jose since our other flight isn’t until 2:20 PM anyways and we probably should have done it that way to begin with. Again the Hotel is helpful contacting that service and getting the price for that ($240 for four people).

Now we have to go to sleep and just wing it, like in the old days. Either SANSA will have our reservations or they won’t, and there’s nothing we can do about it either way…

Turns out the airport is sort of a sleepy place before 6 AM, when suddenly velvet barriers start going up and airline check-in agents appear. So we’re tired and nervously waiting.

Turns out…

To be continued…

Categories
Uncategorized

Measuring the speed of a fast-moving NJ Transit train

Intro
I’m trying to measure the speed of a NJ Transit train that really hauls past my station. I’ll compare results using two different methods, but no fancy equipment like radar guns. Just a Smartphone a ruler and some common sense.

To be continued…

Categories
Uncategorized

The most natural ringtone of all

Intro
A couple years ago I heard about conceptual art on public radio. It’s intriguing and begs the question what is art. The example provided was something like this: the artist proscribes via written instructions what the owner should do to realize the physical manifestation of the artwork, such as
– Take a 24″ x 36″ bank canvas
– draw an X near the upper right corner
– draw a horizontal line to the left of the X until the border

That’s it! A proscription like this by a famous artist is actually has value, just like physical art.

OK, so how about conceptual technology?

The details
I wanted a ring tone that was as unobtrusive as possible, and yet still audible because the vibration-only setting on a Samsung just doesn’t deliver enough vibrating energy as compared to my old Blackberry Bold. So in vibrate-only I missed too many calls. And yet i find all ring tones to be offensive in some sense – disruptive to their surrounding environment.

So I finally hit on it. Here is the conceptual technology:

– record the sound of yourself exhaling* for about 3 seconds of sound.
– turn it into a mp3 file
– download it to your phone’s ringtones
– choose it as your ringtone

* Avoid recoding the full breathing cycle of inhaling and exhaling because that’s just going to sound like panting, and that gets weird! And when I say “exhale” I mean more “sigh,” that will be more effective.

That’s it! Is it art or technology?

I’m not 100% sure it will work out long term. For instance, every time I hear someone in the office sigh loudly I check my phone! But I’ve stuck with it so far so it can’t be all bad. Funny thing is, no matter how often I’ve heard it, I’m always caught by surprise when my phone rings with that ringtone! It’s always “What the heck?” before I come to my senses.

For those who want to skip the first step I’ve made my exhaling sounds available for download.

Exhale ringtone.

You can right-click on it and do a Save link as… to save it somewhere.

I purposely made it soft as I wanted to avoid drawing too much attention.

Conclusion
Conceptual technology is presented for what might be the most natural ringtone of all – the sound of yourself breathing. When it comes time to turn off your cellphone it may not be necessary. Everyone is allowed to let out a sigh now and then, right?

Appendix
For the curious, I used Audacity to record my exhale sound, which I edited to stretch it to three seconds and made sure it begins with an exhale sound followed by silence. A ringtone seems to be played in a loop by the phone. I found 3 seconds a good length between “rings.”

Some have suggested it sounds mildly obscene or creepy. Oh, well. that wasn’t what I was going for. As I say the jury’s still out…