by Matthew Gipp

Daylight.js Webpage

I just published a webpage for Daylight.js, the JavaScript plugin I recently released (and previously wrote about).

I did it for two reasons:

  1. I wanted to create a nice, unambiguous demonstration of how one might use it.
  2. The thing needed a useful FAQ section.

So that’s that. Have a look!

A Brief History of Mathematics

Starting near the end of September, the BBC began airing A Brief History of Mathematics, a 10-part series of 15-minute podcasts about the lives of celebrated mathematicians. They’re available for download, and they’re more than worth the time.

This Lonely Scene, the Galaxies Like Dust

A classic short documentary that offers a little perspective on orders of magnitude and the grand cosmic scale.

via Jeremy Keith

Exploring Systems

Bret Victor is the sort of guy who’s so smart that it makes you want to hang up your spikes. He put together Up and Down the Ladder of Abstraction, a lengthy essay (with interactive asides) that walks the reader through the process of exploring problems with data visualization.

The subject matter is completely fascinating, but I’m especially awed by the presentation. This is what a science textbook looks like in Tomorrowland.

Range

A piece of what I’m working on today:

Daylight.js

(Updated November 22, 2011 at 8:20 PM)

You may have noticed that this blog looks a little different after the sun goes down. That’s because I’m field testing Daylight.js, a lightweight JavaScript plugin I wrote last week to calculate a user’s local sunrise and sunset. I’ve put it up on GitHub – my first repository!

You can use it to do all sorts of cool things. In this example – ripped right from the header of this blog – a “night” stylesheet is added to the page if the function night() returns true.

if (night()) {
document.write('<link rel="stylesheet" href="http://number61.net/wp-content/themes/N61/night.css" type="text/css" media="screen" />');
}

Piece of cake. There’s also a day() function that does the same thing, only, well, you know. (You can pop the hood for more fine-grained control, but I’ll leave that as an exercise for the reader.)

Drawbacks

But there’s a drawback: Daylight works by detecting the number of hours between a user’s current time and the time at the prime meridian, so it’s only ballpark-accurate.

Consider this: though both Augusta, ME and Indianapolis, IN are in the Eastern time zone, the sun sets on Augusta about 70 minutes earlier than it does on Indianapolis. Daylight thinks in terms of time zones, so it can’t handle that level of accuracy.

Sure, I could have used the HTML5 geolocation API to determine the user’s exact longitude – by definition, the most accurate measure of the distance between a given location and the prime meridian. That produces an answer that’s good enough for a meteorologist.

But that method has its own drawback: the browser will have to ask the user for permission to use geolocation every time the user visits the site. Daylight is intended to be completely unobtrusive, so that kind of interruption is unacceptable. It would break the illusion of seamlessness. And it would really annoying. So I decided to trade accuracy for friendliness.

So what’s it good for?

Sites like this one. Sites where this sort of functionality is cool, but non-essential. Use your imagination!

Like I said, it’s on GitHub. Give it a whirl if you think it might be useful.

Tagged: ,

iOS GUI Elements .psd (Version 5) from Teehan + Lax

Do you do your iOS mockups the hard way, e.g. by taking a bunch of screenshots and laboriously extracting interface elements from the bitmaps while you push through a suffocating cloud of self-doubt and the distinct feeling that you’re doing everything all wrong?

Uh. Yeah! Me neither! (You’d probably have to be some sort of idiot to make things that complicated, right?)

Anyway. I’m smarter now. Go get it!.

Look Alive

Might as well get a few items out of my system before my ambition deserts me:

  • Introducing Riser

    I’ve made a teaser site for Riser, the top-secret iOS project I’ve been working on. It’s coming soon, but only in the geological sense of the word. (You’ll probably see it sometime before the universe ends. Probably.)

  • The Thread Needler 2.0

    I just put the finishing touches on a responsive redesign of The Thread Needler. It’s got a growing stable of smart, handsome writers and some of the best content around.

  • A Redesigned Portfolio

    Third, I recently spent some time rebuilding my portfolio page. Have a look!

Salad Days

Behind-the-scenes videos from the golden age of the grandaddy of VFX studios: Industrial Light and Magic. Via Jeremy Keith.

The Truth Cabin

Because of my embarrassingly well-documented fascination with Ricky Williams, I would probably be remiss if I did not mention this. Director Sean Pamphilon1 is looking for Kickstarter funding for a new project: The Truth Cabin.

I lived and worked in a California ashram for 3 months with Ricky Williams, who in 2004 retired from his Hall of Fame track NFL career to pursue other interests. [. . .] I was there, at his request, to capture the scene as it unraveled and to tell Ricky’s story. To tell the Truth.

  1. Pamphilon directed Run Ricky Run, an episode of ESPN’s 30 for 30 []