Mobile Weather

Los Angeles is suing The Weather Channel for selling the data of mobile users. This behaviour shouldn’t be surprising. Most mobile software, from the operating system on up, seems to exist primarily to provide some base modicum of functionality in exchange for the privilege of fucking you in new and exciting ways.

There are exceptions to the rule. I starting using Arcus for mobile weather in 2014, and it seems pretty respectable. But it exists solely to display data from the Dark Sky API, which is something that a web browser is also capable of doing, thus raising the question: why install anything?

About a month ago I simply bookmarked Dark Sky‘s website and had Firefox add a shortcut to that bookmark on my home screen. Dark Sky’s website is responsive, so it works fine in any viewport size. I bookmarked the URL for my home location, allowing me to see weather at home in a single tap. Elsewhere, it required two taps: one tap to open the bookmark, and one tap on their geolocation icon to get the correct forecast for my current location.

I find Dark Sky’s data to be great for reporting on the hyper-local now. For reports that are wider in scope – either in terms of time or space – nothing beats the National Weather Service. They provide a mobile specific site that is perfectly usable on small viewports. Annoyingly, they don’t make use of the web geolocation API, instead requiring users to manually enter a location. When travelling I may not know what zip code I’m in or have a nearby address. To work around this I created a shim with a few lines of Javascript that geolocates the user, uses the resulting coordinates to build the proper NWS URL, and redirects the user to that URL. I also added support for building a Dark Sky URL so that I could avoid that second tap when not at home.

<!doctype html>
        <meta charset="utf-8">
        <link rel="icon" type="image/ico" href="https://www.weather.gov/favicon.ico">
            function geoWeather() {
                navigator.geolocation.getCurrentPosition(function(pos) {
                    var currentURL = new URL(window.location.href);
                    if (currentURL.searchParams.has('darksky')) {
                        var forecastURL = 'https://darksky.net/forecast/' + pos.coords.latitude + ',' + pos.coords.longitude;
                    } else if (window.screen.width < 800) {
                        var forecastURL = 'https://mobile.weather.gov/index.php?lat=' + pos.coords.latitude + '&lon=' + pos.coords.longitude;
                    } else {
                        var forecastURL = 'https://forecast.weather.gov/MapClick.php?lat=' + pos.coords.latitude + '&lon=' + pos.coords.longitude;
                    var el = document.getElementById('result');
                    el.innerHTML = '<p>Forecast URL is <a href="' + forecastURL + '"> ' + forecastURL + '</a></p>';
            window.onload = geoWeather;
        <div id="result"></div>

Now I have two URLs bookmarked on my home screen that accomplish everything I need: one for NWS and one for Dark Sky.

Shortly after creating this shim I discovered that the NWS has a beta website that is intended to replace both the current mobile and standard sites with a consistent interface. This site does make use of the geolocation API, requiring the user to click an icon to get the current location. It is unclear why they have yet to deploy this to their main domain. It’s been available since August 2017 and the data on the beta site seems to be the same as the data on the standard site and the data on the mobile site. For now I’m sticking with the officially supported domains in my shim.

A locally installed weather program is useful if your requirements include lock screen widgets or notifications of hazardous conditions. Mine do not. These two bookmarks provide all the weather information I need on my telephone, and do so in a way that does not expand my attack surface in the way installing software does. They are indicative of the usefulness of this World Wide Web thing – an emerging technology that I intend to watch with great interest. I think it’ll go places.

This post was published on . It was tagged with android.

I don't know anything about, or have much interest in, high-frequency trading.

But some of the technology behind it is fascinating. This past summer the Sniper in Mahwah blog published a four part series investigating the use of shortwave radio as a low latency link in high-frequency trading. I’d call it the best piece of hacker-tourism since Mother Earth Mother Board, but I think it’s probably the only piece of hacker-tourism since Mother Earth Mother Board. It doesn’t have much competition.

The Kindle is a terrible device for reading comics.

It’s the wrong size. The E Ink display is greyscale. Zooming and panning are disruptive. A tablet probably works great, but I don’t know – I’ve never owned one. I solved the problem a while back when I discovered that I could simply rotate my laptop’s display via xrandr.

$ xrandr --output eDP-1 --rotate right --pos 0x0

Adding an autorandr profile for this makes it easy to jump to portrait mode. This is useful for reading any long-form content on the X260. Typing (or mousing) on the rotated device is difficult, so I’ll sometimes plug in my external keyboard if I want to do more than just page through a document.

X260 Portrait Mode

Bruce Sterling is at his best when speaking.

I’ve always found his novels to be underwhelming, but I’ll listen to anything he has to say. When speaking, the lens of his cultural critique is combined with dry wit, a rambling Texan drawl, and a faint sense of bemusement at the weirdness of the world and his place in it. The Long Now Foundation recently released a recording of his talk at The Interval, How to Be Futuristic, which should probably be retitled How to Be Bruce Sterling.

One of my favorite talks by Sterling is The Body in the Virtual World. Recorded in 1994, he was fresh off The Hacker Crackdown, completing Heavy Weather, and at peak cyber-punk.

This post was published on . It was tagged with micro.