Seeing the Sun’s Path – Android and iPhone apps

I’d like to recommend an Android App for seeing the Sun’s path in Augmented Reality (AR): Sun Surveyor. There is also Sun Seeker for iPhone/iOS, which I haven’t tried since I don’t have an iPhone.

We’re out looking for a house to buy, and for me getting the afternoon and evening sun on the terrace during summer is so incredibly important. This way, I don’t have to take the real-estate agent’s word for where the sun goes down in the summer and whether the trees will create shade on the terrace. I can check it myself. Über-cool!

The graphics are laid out on top of my phone’s camera image, so given the image to the right I can see that on July 9th (almost mid-summer) the sun clears the wall just after 7pm before it goes down at 8:52pm.  A little before that it will be obstructed by the wall in the background though. All visible on one screen.

I guess this could be handy for photographers too, but for buying a house this is indispensable. What surprises me is how all the real-estate agents that I’ve shown it to were blown away by it (or so they pretended :-)) but had never seen or heard about something like that before.

Have fun with it!

Increased surveillance is considered a positive by many? Yikes…

Here in Denmark, we’ve just had an election, and the previous government has been replaced.

A newspaper article [lang=”da”] looks back at what people liked and disliked about what the previous government did.

I have trouble believing, much less understanding, that 68% consider increased surveillance to have had a positive effect for Denmark, 16% believe the effect to be neutral and 16% believe it to be negative.

Wow. The people who believe that our society is better off when the government monitors us more out numbers people like me 4 to 1? Yikes. Has nobody read 1984 or seen Das Leben der Anderen? Doesn’t anybody remember DDR or the Soviet Union? Perhaps China will open source the great firewall too, so we can install it here!

I’m a little sad today about this.

Edit on 2011-10-20. Oh no, it keeps getting worse [lang=”da”].

Natural Sort

Why doesn’t every programming language have “Natural Sorting” built in, out of the box? Natural sorting is the way humans sort, where number substrings are sorted numerically, everything else alphabetically:

Sorted “Asciibetically” (normal computer sort) Sorted “Naturally” (what humans prefer)

Notice how 10 comes before 2 in asciibetical “normal computer sorting” ? Haven’t we all seen user interfaces that like that? Its just plain wrong. :-(

Dave Koelle’s Alphanum Algorithm sorts naturally, but instead of analyzing each array element O(log(N)) times, I present a modified Perl version that allows for Schwartzian transforms, yielding huge performance improvements.

Continue reading Natural Sort

Refresh your browser automatically during web development

Did you ever find that while editing files for the web (e.g. HTML, Javascript, Java/Flash/Ruby, whatever) that it would be cool to have your browser reflect any changes as soon as you hit Save in your IDE without having to Alt-Tab to the browser and hit refresh (Ctrl-R)? That way, you could stay entirely in your browser and just move your eyes to the browser as it refreshes automatically showing you the results of your newest changes.

Well, now you can! I’ve developed a pair of tools for that allow this when used in concert. Both are Open Source, of course.

Continue reading Refresh your browser automatically during web development

Forwarding SNMP ports over SSH using socat

Here is an example of the problem we need to solve: We have SSH access to a network, but want to access an SNMP agent in that network from a local client. We use SNMP here in this example, but it could be any other protocol that uses UDP, such as DNS or TFTP.

We’ll forward the SNMP traffic in a TCP port like this, with “socat” doing the UDP-in-TCP tunneling:

Continue reading Forwarding SNMP ports over SSH using socat