Saturday, October 29, 2016

Traffic Light Improvements For the Age of Mobile Communications

I have an issue with traffic lights.

When I'm stuck right behind an inattentive driver at a red light, I get annoyed when the driver doesn't go right after the light turns green.  I get infuriated when the driver waits so long to go that the light turns back to red again before I can get across the intersection.

That's pretty much the only time I use the horn.  And it occurred to me that the traffic light itself should be equipped with its own horn.  It would beep whenever it turns green, relieving other drivers of the effort of doing so.

Inattentive drivers annoy me even when I'm not behind them.  When they remain stopped at a green light while I'm at the red light for the crossing traffic, they cause the signal to take longer to cycle.  The light stays green longer for them and stays red longer for me.  I say aloud, “Go already, so I don't have to stay here forever!”

A few towns have installed traffic light cameras, which take a picture of the license plates of cars that go through red lights.  But I say that these cameras should be used to monitor the faces of drivers who wait at red lights.  Face recognition would be used to determine whether the driver is paying attention to the light, or whether they are reading e-mail or texting.  The light would stay red until the driver's gaze was focused on driving.

What do you think about this?

Friday, September 30, 2016

Presidential Candidates' Answers to the 2016 Top 20 Science and Technology Questions

For this election cycle, ScienceDebate has included the Green and Libertarian party candidates in its list of 20 questions regarding the most pressing "... Science, Engineering, Tech, Health & Environmental Issues in 2016."

You can read it all here: www.sciencedebate.org

Thursday, August 25, 2016

Fitting Data in Excel and OpenOffice Calc

I've stopped installing Microsoft Office onto my home computers. Instead, I installed OpenOffice on my latest two computers. It does everything I need it to do. Or so I thought.

One day I decided I wanted OpenOffice Calc to perform a polynomial fit to some measurements I'd been taking. So I did what I always do in Excel: create a Scatterplot of the data, add a Trendline, choose Polynomial and its order, and then click the checkboxes to display both the equation and the R2 value on the chart. Except there was no polynomial Trendline!

According to the OO help forums, there really is no built-in polynomial trendline in Calc. But there is an extension called CorelPolyGUI that does the trick.

Unfortunately, I wasn't too thrilled with this extension. My measurements were accumulating every week. With Excel, I'd be able to add new data and watch the scatterplot update the polynomial. But CorelPolyGUI doesn't work that way. The result from CorelPolyGUI essentially is a snapshot that's disconnected from the input data. To get it to update, I found that I had to delete the result and then re-invoke the extension with new data ranges. And that was a big problem – I wasn't sure over what extent of my data I wanted to fit. Perhaps I could get a better fit if I omitted some measurements. So I needed to alter the input range a few times and compare the results.

There is another method, that if you're clever, you can program yourself. It's based on the following set of equations (for a second-degree poly fit):



To get the values of A, B and C, you simply matrix multiply the vector on the left side of the last equation with the inverted 3 x 3 matrix on the right hand side. Once you program this into your spreadsheet, you can alter the data and instantly get the polynomial function to update.

But it turns out there's an even easier way. I found it accidentally in the results from my search for how to fit a polynomial in OpenOffice. It involves using LINEST to operate on array data. The web page^3 describes using LINEST in Excel to perform non-linear curve fitting. It turns out that the OpenOffice Calc LINEST function works the same way, albeit with slightly different syntax. And the syntax is different because of how you define an array in Calc, separating the elements with semi-colons instead of commas.

In retrospect, I see now the same solution in the OO help forums. The user Villeroy attached a spreadsheet with an example that uses LINEST. But instead of raising the range of independent values to {1;2}, he added the X2 column and referenced it in LINEST. Same thing, really, but perhaps a bit less elegant.

Wednesday, April 13, 2016

Must-Have Extensions For FireFox and Chrome

FireFox is my favorite browser.  It beats Chrome in terms of usability.  But I'm curious to see if I could live with Chrome for a while.  So I'm taking it for a test drive.

First for safe browsing, I like to have...
NoScript (FireFox) // ScriptNo/ScriptSafe (Chrome)
Blocks all scripts from running.  Allows the user to add exceptions for scripts on any given domain, either just for the current session (temporarily) or also for future sessions (permanently).  I think I like ScriptSafe on Chrome better than NoScript on FireFox.  Why?  Because NoScript will reload the page each time a single host is enabled, whereas ScriptSafe will let you enable multiple host before reloading the page.  And ScriptSafe features color-coded buttons while NoScript differentiates between temporary and permanent whitelist with italics.

WOT (FireFox) // WOT (Chrome)
WOT, or Web Of Trust, warns you in advance when a link leads to a dangerous website, before you even click on it.  The database of dangerous links is maintained by the community of WOT users.  But this sometimes can lead to sites getting blocked when a user disagrees with a site's ideology.  Still, you can get more detail on each website's rating and decide for yourself.


For usability, try these extensions...
FBPurity (FireFox, Chrome, Safari, Opera)
Facebook could be useful if only _______ (fill in the blank).  Well, FBPurity fills in the blanks by filtering out the elements that you don't want to see.  I use it to block "food pron" (plus other annoying and recurrent topics), to keep videos from auto-playing, to hide the reactions bar, to always sort posts in Most Recent order, to hide the newsfeed, etc.

LastTab (FireFox) // CLUT (Chrome)
N either FireFox nor Chrome cycle through tabs with Ctrl-Tab the way Windows cycles through active programs with Alt-Tab.  These extensions alter how these browsers behave when you press Ctrl-Tab.  So rather than cycling tabs from left to right, Ctrl-Tab cycles in Most Recently Used order.  There is one caveat, though.  Chrome extensions are not allowed to redefine default keystrokes (such as Ctrl-Tab), so none of the MRU-type tab managers on Chrome can fix Ctrl-Tab.  However, you can bind CLUT to Ctrl-q and Ctrl-Shift-Q, which is just to the right of Ctrl-Tab and Ctrl-Shift-Tab.

Password Management
Both Chrome and FireFox come out-of-the-box with the ability to remember the username and password needed to log in at each unique website.  However, FireFox can remember multiple usernames and passwords for any given site.  After looking for a Chrome extension to get Chrome to work this way (and failing), I thought I stumbled across an experimental option to enable the behavior.  But perhaps not, since the setting I thought I discovered doesn't affect this at all.  Rather, Chrome (at version 49) just started behaving the way I wanted it to!

View Selection Source
In FireFox, you can select content, right click on it and then choose a command to view the source code for that extension.  Chrome provides an "Inspect" command, but it reveals only the CSS details and not the complete HTML.  The View Selection Source extension for Chrome (or its equivalent) is necessary to see the snippet of HTML that's rendered by the browser for that selected content.  Yes, you can press Ctrl-U to view the source of the entire page in a new tab.  But then you have to search for the content you're interested in.  That's awkward, and it works only if the content can be pasted into the search bar.  The weird thing about the View Selection Source extension is that it doesn't come up if you search for it on Google Play.  I found the link in a post on the Help Center.

Save As... / Print To... PDF
Chrome has a built-in PDF printer that it calls "Save to PDF."  It works great, and there's no need to install a separate printer driver.  But you'll have to choose at least one of these three options to get FireFox to save a page as PDF, too.
  1. Install on your computer a PDF Printer Drive, such as PDFCreator or CutePDF.  (Both are free to download and use.)
  2. Install in FireFox a PDF printer extension.
  3. Use an online Web page to PDF service.
I like the first option, since the extensions I've come across either save the web page as a image or send the HTML over the internet to a server to perform the conversion.  I like the ability to select and copy text from the PDF, which is not possible with an image.  And when I generate PDF, it's usually to record a financial transaction, the details of which I'd rather keep on my local hard drive.

At one point I couldn't get the PDF printer drivers to work with FireFox.  Before giving up and switching to Chrome, I came across this Mozilla support page.  It turned out that resetting the print_printer setting fixed it.  As well, I've had to delete the prefs.js in order to solve a problem with the PDF coming out with all blank pages.

What are your favorite Extensions / Add-ons?


2016-07-09 LG Added the section "Save As... / Print To... PDF"
2016-06-13 LG Added "View Selection Source" paragraph.





Tuesday, April 12, 2016

Notes on Setting Up Windows 7

Recently I had to set up fresh installations of Windows 7 on two computers.  Here are some tips to make that process go a bit smoother...

1. Windows Update #1 -- Microsoft has released hundreds of recommended and important updates for Windows 7 since it was introduced.  All that data is a burden for Windows Update, and the update process can bog down on slower computers.  To remedy this, you'll want to download the update associated with KB3102810 first before you even check for updates.  Adjusting your computer's Power Options so it stays awake during the long update process may also help.

2. Windows Update #2 -- I wrote about this before.  Unless you want to upgrade to Windows 10, you'll want to hide the update KB3035583, or uninstall it if it already got onto your system.

3.  Gadgets -- Third party gadgets are no longer supported due to "serious vulnerabilities" in the Windows Sidebar.  You'll still be able to add the default Microsoft ones, such as "Clock," "Calendar," "Slide Show" and "CPU Usage" (my favorites).  But I also liked the third party "Network Meter," which I'd use often to verify download rates.  Since Network Meter is no longer available, I figured out that I can use ResMon to do something similar.  To have ResMon (almost) mimic Network Meter I minimize the various components in the left pane of ResMon and resize the window so that only the network graphs show up.  And I add a shortcut to ResMon.exe in my StartUp folder.

Do you have any tips for setting up Windows 7?  Please share them!

Saturday, March 26, 2016

Taking the Plunge

Several weeks ago I took the plunge and bought myself a cell phone.  This leaves my brother as possibly the only person in the USA who doesn't have one.

Many years ago I bought cell phones for both my wife and daughter.  But I scoffed at the idea of using one myself.  "No one wants to talk to me," I'd say.  As for emergencies, I'd say, "Everyone else has a cell phone.  I can ask someone to call for help."  And I could send texts via e-mail for free to my daughter's cell phone from my tablet.

So why get one now?  My motivation was not self-interest.  I got one so that my chronically-ill wife could get in touch with me easily in case she had a flare up.  As well, the tablet could send e-mail only when connected to a Wi-Fi network, so I'd have to struggle to find free public Wi-Fi in order to text my daughter.  Now that I have a cell phone, I can exchange texts with her wherever I happen to be.

Which cell phone did I choose?  Which plan?  Naturally, this Luddite was compelled to look for the cheapest and most basic phone and service.  But the Geek in me tempered that with technological requirements.  For example, since we already had two cell phones in use at our home, I looked for a device that would connect to the same (GSM) network.  I also wanted a device that could be charged through a microUSB port so that I could use a generic charger.  And I wanted push buttons, not a touchscreen.

I decided that for my needs, a pay-as-you-go plan would be far cheaper than a contract.  So I researched the plans and found out which providers used the network we were already using.  And I kept my eyes open at drug stores for those providers' phones.  And then I found a push-button phone, discounted 50%, for $4.99.  I bought it, despite the fact that I couldn't tell how it connected to its charger, and despite the nagging feeling that it was already obsolete.

Well, it turned out that it was obsolete -- I wasn't able to activate that $4.99 cell phone.  The company's customer service explained that the device wasn't supported in my area, and that they'd send a different one.  And the phone didn't have a microUSB, either. But I hoped that the replacement device would have one.

I waited, and I waited, for the replacement phone.  Finally, after two extra phone calls to customer service, which involved promises that I'd get it in two days, I got it.

They sent me an LG touchscreen phone.  I was initially disappointed about the touchscreen, but I tried to maintain an open mind.  "At least the device charges through a microUSB port," I told myself.  Also, this device had a "3x minutes, texts and data for life" plan associated with it.

It activated easily enough.  But something seemed wrong.  Every time I tried to make a phone call, the keypad would disappear from the screen as soon as the call connected.  So I wasn't able to "Press 1 for English" or anything like that.  (See, that's why I want a push-button phone.  Real buttons hardly ever disappear.)  Eventually, I figured out how to get the display to turn on.  If I held the power button down as if to turn off the phone, the screen would light up asking if I wanted to turn off the phone.  I could then respond "No" and gain access to the keypad without the phone disconnecting.

Even though I was able to use the phone, I decided that the phone was defective and needed to be replaced.  First, I visited the LG website and quickly found a customer service agent to chat with.  She "talked" me through the steps of rebooting the phone and then asked me to retest the phone.  It continued to misbehave, so she suggested that the proximity sensor was faulty and encouraged me to contact the provider to get the phone replaced.

I saved the chat text and sent it to one of the provider's customer service contacts, who again asked me to reboot the phone and try it again.  Finally, I got them to agree to send yet another phone, which arrived quickly and worked properly.

All of the sending and returning of phones, although time-consuming, was paid for by the provider.  I probably could have asked to have some minutes refunded because of all that I wasted while testing the phone, but I decided I was still ahead.

Eventually I bought more minutes and extended the activation period out 2 years.  I figured that the phone and service cost about $6 per month, assuming the phone lasts the entire two years.  So overall I'm pretty happy about it.  The only issue I have now is this: how do I carry the thing around all the time?

Wednesday, March 16, 2016

How About Never?

A coworker had just bought a refurbished computer with Windows 7 OS and was dutifully applying updates.  He noticed a new icon in the taskbar tray and clicked it.  The program presented him with the opportunity to upgrade to Windows 10.  It implicitly asked when would you like to download Windows 10?  The dialog box offered two buttons labeled "Upgrade now" and "Upgrade tonight."

How about Never?  That was not an option.

The Gwx.exe and GwxUX.exe programs make it easy for users to reserve their free copy of Windows 10.  They appear after the user applies the update associated with KB3035583.  And they disappear after the user uninstalls that update.

This "How To Geek" article describes it all in detail.

My previous post discusses why you might want to avoid upgrading.