Monthly Archives: December 2018

How to set up an iDevices switch as a blind person.

Posted on December 18, 2018

All over the internet you can find people write phrases like: “first world problems”. Here’s one probably most people haven’t heard before: “blind world problems”. E.g. problems sighted people will probably never experience.
Earlier this month, I setup my first iDevices switch, but until I knew what I was   doing, it was quite a challenge. I had bought it some time ago so I didn’t have the box anymore, so I  couldn’t get the number needed to set it up in the iDevices app from there. I looked all around on the device for the number using Seeing AI (except for the side with the plug that goes into the wall, didn’t think it would be there) and and gave up for the day. The next day, I got sighted help and was told it was on the side by the plug, that faces the wall, where I didn’t look. So blind readers, the 8 digit number you need for setting up iDevices is on the side of the switch facing the wall , in the space  closest to where you would plug in the thing you want to  control. .
Once I knew that, setting up the switch was very easy. Both Seeing AI and the iDevices app could see it, and the iDevices app is quite accessible.
There are 2 ways to get the number of your iDevice switch into the app during setup. You could paste or type it in to the edit box, but I just capture it with my iPhone’s camera, which, even as a blind person is very doable. When the app wants the number and displays the camera view:
1. Make sure you have good lighting, Even if you used the flash, which the iDevices app isn’t capable of, the number seems unreadable in low light.
2 place the iDevice switch on a flat surface with the plug that goes into the wall facing up.
3. hold the phone directly   above the switch  so the camera lens is positioned next to the plug that goes into the wall, towards   where you would plug in the thing to control.
4. Slowly raise the phone straight up about 1cm per second. You should hear that the number capture was successful within 5 seconds or so.
Beyond that, the setup was very easy and accessible.
People say a picture is worth a thousand words, so I needed almost that many to try and explain where the number was on the switch. Let me know if it made sense. 
One more thing,   I use the same camera technique mentioned above for capturing the number on the iDevices switch when I setup my Apple watch. It  works very well there also.

My beginning explorations about less visual alternatives to spreadsheets for screen reader users

Posted on December 12, 2018

Almost 2 weeks ago  I was listening to the Mac Power Users podcast with David Sparks and Katie Floyd, the episode had one of the best titles I’d ever seen,  “My Life Is a Subscription” this could be a blog rant all by itself, but what they wanted the listener to get out of that episode was how to be aware of and manage their subscriptions. Sadly for me, they used the sighted person’s go-to, the spreadsheet. If you can see spreadsheets are nice and visual, convenient, but not so much when using a screen reader. Especially if using Apple’s Numbers program, because there is no go to cell keyboard shortcut  command. Beyond that, even if there was one, like in Microsoft Excel it still leaves it up to the user to figure out which cell they want to navigate to.   I’d been frustrated before by how people love their spreadsheets, and even complained about this in a speech I gave at Madison UX 2014.  David and Katie reminded me of this frustration, so I  decided to explore if there were less visual   alternatives.
My friend Kyle Borah suggested databases, so I went there first.
The mac has sqlite installed by default, and sqlite can run on just about anything. The lite really only means that it doesn’t run on a server and doesn’t allow for concurrent users, but for an individual person, it can work very well. SQL  was originally called SEQL (structured English query language) so now we know why people say sequel today. SQL is easier to learn than many other programming languages and will probably be where I play and blog about in the future, but then I remembered I had a cool little app on both macOS and iOS called Soulver, and for this case, managing my subscriptions, Soulver was more than equal to the task.
Soulver is kind of like the Microsoft program called  notepad and a calculator, so you can write things in a sort of natural language and it will do the math for you. lines beginning with // are comments so you can write notes to yourself. I didn’t feel like putting my real subscriptions into a public blog though, so I made some up. Besides, that way I could show currency conversions.

//fictitious subscriptions

//say that 3 times fast

//subscription 1 renews on January 1

sub1Annual = 100 GBP in USD = 125.69 USD

sub1month = sub1Annual/12 = $10.47

//subscription 2 renews on the 10th of the month

sub2month = $5 = $5.00

//subscription 3 renews on the 21st of the month

sub3month = $2.99 = $2.99

sub1month + sub2month + sub3month = $18.46


Here’s what the developers of Soulver call “back of the envelope calculations”.


//my fictitious  day trip to Chicago

//oh wait, I actually did something almost like this back in 2015

//some of these prices are also  fictitious, though I tried to be somewhat accurate The bus roundtrip from Madison was $62 = $62.00

Tickets to the Shedd aquarium and 2 other museums cost $65 = $65.00

Transportation on the L cost $15 = $15.00

two  meals and a snack cost $30 = $30.00
//that Chicago pizza was worth it.



In this last example I didn’t use variables, I just wrote how someone might write down notes on the fly. Most reviews I’ve seen unfortunately showoff Soulver with screenshots, but that would be disingenuous of me, so I exported my examples from Soulver into .txt files and then pasted them into this post. Soulver can export to html and PDF as well as text, which is great if you want to share calculations with others who don’t have it.


Soulver also has your ensemble of basic scientific functions, it can do quite a bit; so  let’s go further. Wisconsin can get pretty cold  in the winter, and I’ve actually heard some people wonder why heated air inside houses and buildings is so dry then, so here’s a bit of what you might learn in meteorology 101. Depending on the temperature, air can only hold so many grams of   moisture per cubic meter; The warmer the air, the more it can hold. This is usually told to us as relative humidity, but to the meteorologist what’s more important is the dew point. The dew point is the temperature at which the air is totally saturated, e.g. at 100% humidity. So your furnace sucks in a bunch of cold air from outside heats it up to 70 degrees F or 21.1 C and keeps your house warm; but without adding extra moisture to the air, it only has what it could hold when outside. Let’s use Soulver to figure out a real life example. As I write this the current temperature outside my window is 24 F the dew point is 19 F and the relative humidity is 79%Let’s see what the humidity is when that air gets  warmed up to a much more acceptable 70 degrees.
First let’s calculate with the original outside temperature of   24


//calculating relative humidity from air temperature and dew point

//b is a constant used for calculating vapor pressure is in degrees C

b = 237.7 = 237.7

//air temperature and dew point must be converted to Celsius

//with no interface to input data, here’s where we do it

atf = 24 = 24

dpf = 19 = 19

//temperature conversions

atc = (atf-32)/1.8 = -4.4444444444

dpc = (dpf-32)/1.8 = -7.2222222222

//calculating saturation vapor pressure svp,  and actual vapor pressureavp

svp = 6.11*10.0^(7.5*atc/(b+atc)) = 4.3967971796

avp = 6.11*10.0^(7.5*dpc/(b+dpc)) = 3.5564947151

//returning relative humidity

round(avp/svp*100) = 81


I know, it’s 2% off, this formula seems to lose a bit of accuracy when the temperatures go below 0 C.
Now’ with just changing the atf from 24 to 70 I get 14. Now we know. This also demonstrates one thing databases are not so good at that spreadsheets are, what-ifs. When I was talking about this last week with my friend Fintan, he said he uses what-ifs all the time in his spreadsheets at work,  and that was not so convenient with a database; Soulver can easily do what-ifs also, we just saw one above. I also realized something else cool about Soulver.Being a programmer as I am, instead of using Soulver for more advanced calculations like calculating relative humidity, I had already written a function to do it in a python math environment I put together 2 years ago, more blogs about that later. Soulver besides being notepad and being a basic spreadsheet at least in functionality, it can also fill in as a basic programmable calculator. You can’t do if-then, or loops but still a fair amount, more than a TI36 which can do just about anything numerical but has no programmability at all. Soulver could also be useful for someone who wants to figure  out some math but doesn’t  know any   actual programming language at all. As we have found, Soulver is quite useful.
The big down side though is it’s only on Apple devices, but there is a similar program called Calca that works on both Apple and  Microsoft Windows. It seems quite a bit more powerful even able to do some symbolic math including linear algebra, playing with that is probably one of my January projects. Calca’s downside I can see thus far though, is that   Soulver’s way of performing calculations is more convenient, closer to natural language,   and for that  still  keeps a place   in my tool box.

How I can edit files on a remote server using Textedit on my Mac through SSH

Posted on December 1 2018

Two years ago, I wrote about how I use Textedit instead of vi, vim, or nano  when editing files  in my macOS terminal. It’s still working well for me, but then I wanted it when remotely logged into other computers. Textmate can do that, but you need ruby on the remote machine and have to move over a ruby script etc. Last month I got a Ubiquity edge router x which I have no regrets with even after taking all the Cisco classes up to CCNP, configuring Cisco routers for 8 months  as an intern for the state, and running my home network off   Cisco   routers for 14 years  since 2004. I also recently  remembered a Nano Pi Neo, I’d been neglecting for 2 years, and between the 2 devices was needing to edit files on them, and the router doesn’t have ruby installed; I wanted my  Textedit. (Imagines a small child throwing a tantrum because they didn’t have their   security blanket.)
I downloaded Transmit from Panic software which is an awesome program, but its price was also a little too awesome for my wallet, so back to the drawing-board. 
I googled around looking for a way to edit files remotely through SSH connections and found out about SSHFS. FUSE is a way to create a file system in user space, or in simpler language,  to create kind of a virtual file system. SSHFS uses FUSE to create a session in-which a specific folder on a remote machine appears in a specific folder on your  machine in front of you, and then keeps them synced together. This lets me use my Textedit cheat to edit files on my mac as I have been doing for 2 years except in addition now they get synced back to the remote machine through SSH. It’s pretty cool, but if using a mac  you’ll need a few extra pieces to do it.
Hard core *nix users probably argue that a mac really doesn’t have BSD unix because it doesn’t have a package manager, but there are a few. Home brew is probably the best now though it had to compete with several others like Mac Ports and Fink for some years before emerging. You will need Home Brew to eventually get SSHFS so here’s the process for getting itFirst you’ll need Xcode command-line tools if you don’t have them already. Paste the following into the terminal:xcode-select –installand decide if you only want the CLI tools or the whole Xcode install. With only 128gb on my MacBook air, I think you can figure out which I chose. The Xcode command-line tools are very nice to have as they give you gcc clang, and other programming goodies.
Next it’s time for Home brew. Paste/usr/bin/ruby -e “$(curl -fsSL”
Next we will need 2 packages before we can get sshfs working.  brew cask install osxfuse

brew install sshfs

Now we can actually make it happen. 
First on your machine make a folder where you want the files from your remote machine to momentarily exist.
Then type something like sshfs username@server-ip:/path-to-folder ~/folder-for-remote-filesObviously typing server-ip won’t work  neither will username but it should be easy to fill in your specific information there.The first time you do it, you will have to answer some questions from the security and privacy preference pane. After you say yes to them, it should work.
It seems to stay connected until the next reboot. You can do anything to those files you want and changes will sync between both devices. It’s very nice.