Posted by slinky

The Venusian Emperor


Note: the idea of 'ashen light' is IMO a beautiful example of cognitive biases which hinder objective reasoning.

From the Wikipedia page for Ashen light:
"Ashen light is a subtle glow that is seen from the night side of the planet Venus."

"Before the development of more powerful telescopes, early astronomer Franz von Gruithuisen [March 19, 1774 – June 21, 1852] believed that Ashen light was from the fires from celebration of a new Venusian emperor, and later believed that it was the inhabitants burning vegetation to make room for farmland."

Nice theories, don't you think? It was likely the best speculation of its time, but just consider how human culture centric those thoughts really were.

  1. "fires from celebration of a new Venusian emperor" = Venus has an emperor - implying a hierarchical society - celebrations are conducted on a primitive fashion through the lighting of massive planet-wide fires.
  2. "inhabitants burning vegetation to make room for farmland" = there is a lot of vegetation on Venus, enough so that it needs to be burnt on a massive scale in order to conduct agriculture.

Basically these thoughts mirrored the current sociological-technological-philosophical environment surrounding von Gruithuisen and were projected into an alien environment. The tacit assumption seemed to be that the sociological-technological-philosophical status quo where von Gruithuisen was living in at the time (hierarchical society, all hail the leader, dependence on agriculture, etc.) was the most natural state of things and therefore it was reasonable to think that alien places, even civilizations on other planets, would follow this model.

Let's extend these thoughts to SETI. What are we trying to do with SETI? We're trying to pick up (radio) signals of an alien civilization.

Not withstanding arguments on the necessarily narrow time window when we could pick up anything in the first place, notice that there are many assumptions we're making: radio signals are used, the "water hole" is preferred, potential willingness for the alien race to actively attempt contact, supposition that we could detect and distinguish an artificial signal from a natural one, etc.

What if we're going the way of Baron von Gruithuisen here? What if what we're trying to find is simply so alien, that we cannot comprehend it based on our sociological/technological/philosophical tradition and background? What if we're trying to find traces of a hive mind of superintelligent translucent slime who thinks since they communicate by clanging on pipes of ice under liquid methane oceans, others must surely do the same?

My questions are not meant to imply that SETI is a waste of time and that we should stop it - on the contrary!

What I am saying is we should remember Baron von Gruithuisen, and try to think outside of the box, through de-assumptionizing (does this word win the Scrabble?) and re-thinking the "model of the space alien", since we really have no good reason to assume anything specific in that area.

Pseudorandom Blast from the Past


A friend was messing around with pseudo-random number generators, so I dug this thing up from the historical archives for him.

It's a PRNG implementation done while I was a university student.

The main idea is simple: run multiple Galois-configuration m-sequence LFSRs in parallel, combining their outputs with XOR, thus making an LFSR with a longer sequence than would be possible by running an LCG in the given machine architecture. This is possible because the m-sequences are all co-prime (the length in bits of each individual component LFSR is a Mersenne exponent).

There are several defects: it's not cryptographically secure, nor does it pass Marsaglia's Diehard test battery nor the more modern Dieharder. The LSB is always even. However, it still might be "good enough" for some kind of embedded use, or to be used as a starting point for something better.

The example implementation has a period of about 2\^93, using eight 32-bit values as the internal state and eight bit-masks. The implementation is also quite simple.

Grab it here: lfsr-prng.tar.gz.

The implementation consists of two parts; prng.c contains the actual PRNG, and prngdriver.c exercises the PRNG to output values in some format. As an example it now outputs things in Dieharder-format.

The description from prng.c using my own words (I removed my old mail address):

/* Simple PRNG using a linear feedback shift register (LFSR)  
 * in Galois configuration.  
 *  
 * A primitive polynomial modulo 2 is used for LFSR taps.  
 * Thus each LFSR outputs an m-sequence. The length (in bits)  
 * of each LFSR is a Mersenne exponent. Thus the length of  
 * the m-sequence is a prime number (2^m-1).  
 *  
 * Since the individual periods are relatively prime, the output  
 * period length of LFSR generator combination is the product  
 * of individual LFSR period lengths:  
 *  
 * (2^2-1) * (2^3-1) * (2^5-1) * (2^7-1) * (2^13-1) * (2^17-1)  
 * * (2^19-1) * (2^31-1) = about 2^96.34  
 *  
 * This PRNG was intended for use with machines without /dev/random  
 * (eg. old DOS boxes found from parent's place etc.)  
 *  
 * NOTE: This generator is not good for cryptographical applications!  
 */

Have fun with it!

How Do You Blank Your Screen?


(From a question about screen savers to musings about problems in adopting and providing radically new technology and technological improvements.)

A friend did a poll and asked "which of you use screen savers?". So far there's 4 replies and no-one has fancy animated screensavers, everyone just blanks the screen after a time. Does anyone really use animated screen savers nowadays?

I don't see a point for active animated screensavers, because:

  • Screensavers kick in when computer is unused for some time. Most likely there is no-one around to see the screensaver.
  • The ye olde miniature particle accelerators aka. CRT monitors needed a "screen saver" to prevent burn-patterns, but this is not so on modern LCD/TFT screens.
  • Active screensavers consume electricity. Electricity costs money. Thus you pay for things no-one sees, for no additional utility value.

Note: I can understand something like SETI@Home, Folding@Home and other BOINC-style projects as "screen savers", but those are not really screensavers, they are programs which run when the computer is idle from other work. There just happens to be a fancy visualization to show off what is happening. Conceptually, for a normal user, the software is easier to understand as a "screensaver".

What interested me in this question was the thought that followed afterwards: the world is big, so there are still surely people using animated screen savers. Fair enough; maybe they are around the computer but not using it, and/or think it's pretty, whatever.

Or perhaps they never even considered it. Something was necessary in the past (prevent picture burn-in), things changed (technological developments), but yet some people insist on doing things the way they've always done.

Is it because technology is sufficiently "similar" so people don't feel the need to reconsider the existing patterns of use? A screen is a screen, even if it's flatter, brighter and has a crispier image, and since I've always used the screen saver with a screen, I'll just keep on using it. Investing time and effort to re-think the patterns of use is a trade-off I as a user don't want to make.

This kind of thinking exists in many places, for example, car user interfaces: you've got a hole for the key, you've got a steering wheel, you've got pedals and you've got a gear stick. And this has been more or less unchanged for over 60 years (!). Talk about a stagnated industry. Why not just have something like a joystick with acceleration/deceleration/direction all in one control? The car would be potentially easier to drive, releasing more cognitive capabilities to observing the signs and other traffic and that way making driving safer.

Some of this sticking to the past when it comes to technology improvement is driven by risk-averseness of companies who manufacture the products. They don't want to bring something too disruptive to the market, for a perceived fear of customer rejection of the "alien technology", even if this fear would not be factual. Sometimes excessive cost is quoted - we won't see joysticks in cars because it costs so-and-so much and requires this-and-that. Well, new technology always costs a lot until competition and new technological improvements bring the price down. The thing is, this development will never happen until someone takes the first step.

Naturally, some part of this issue lies on the customers and users themselves. If people just care about the utilitarian aspects of the technology (car takes me from A to B, screen shows me computer stuff) there is little desire or need to learn new things. Even though these new things might save money/time/effort and make the use more efficient and overall make life easier.

The question I want to ask now is: to maximize the benefit of new technology, will the technology have to be sufficiently dissimilar so that people won't get stuck in the old (possibly detrimental) ways of using it, to force people to re-think their usage patterns? And if this is the case, then:

  1. How to drive adoption (user acceptance) if the technology is too different?
  2. How to ensure manufacturers (and not just startups with "nothing to lose") will be bolder and step out of their comfort zones?

Share Your Pictures with kevlarkitten.com


Problem

You need to quickly share images with your friends. Not all of your friends use the same chat programs, social networks, etc.

Solution

kevlarkitten.com runs to the rescue.

It works like this: you upload an image and set an expiration period. You then get a special web address. Before the image expires, it can be seen through this address. After the image expires, it's gone forever.

It's very fast, simple to use and 100% hassle-free. You don't need to login or anything! And only the persons who know the link can see the picture.

History

Many months ago I wanted to learn a web framework, just to learn how it works. Then I just implemented a project I had had in mind. I had a domain which I wasn't using, so I put it up at kevlarkitten.com and told a few of my friends about it to get some beta testers.

A few days later, another friend was asking me "what's the best way to just quickly get you guys these pictures of a potential new office space I'm looking at". I pointed him to the site and he sent us several image links for our amusement. Success!

The site has been up for some time now, so it should be somewhat bug-free. A wider audience is very welcome. If the site makes your life easier, very good.

Note

Huge image sizes are not supported. If you that bothers you, try resizing the image - I think in normal use you won't get such problems. I might implement support for very huge pictures later, but given that I pay for bandwidth, it's not a really high priority for me :P

kevlarkitten.com - it purrs

Qt4.6 Example: Game of Life


As there was occasional downtime at work, I used that time to teach myself the simply wonderful Qt framework. With kind permission of SonyEricsson Mobile Communications I am allowed to release the source.

Example image with trails enabled

Here's a simple Game of Life simulator program implemented in Qt. Download source.

Some example world configurations (use File/Open): example.gol, slurp2.gol, trash.gol and turbine.gol.

Features

  • Toroidal 2-dimensional Conway's Game of Life
  • Moore and von Neumann neighbourhoods
  • Trails mode (UI bling)
  • Load and save world (XML)
  • Edit mode - draw your own pattern
  • Different colours e.g. invert mode
  • Save image
  • Import world from 80x50 black and white PNG image
  • Settings menu

Build it

Qt 4.6 is needed.

Unpack, then go to the folder and:

qmake make

Then run the resulting GameOfLife binary.

It's been tested under Symbian 9.4, Windows and Linux. Works OK, although in Symbian some of the file dialogs were laid out funnily, it ran "mostly OK" anyway.

Note: The doc/ folder contains an UML diagram of the design/structure. It's not really anything fancy, but in case you're wondering about why something is the way it is, it's probably good to check that first.

License

This source code is placed into public domain. Feel free to use it for learning, poke it and see what happens, change it, extend it, etc. Developing it helped my understanding of Qt, maybe it'll do the same for you. Have fun!

If you do anything interesting with it, please drop a comment with a link!