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.

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 80×50 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!

A Clever Tabletop Stove Concept

Ingenious design alert, check it out. The William is a table-top stove concept which I would love to have.

What I like most is the hexagonal heat-element pattern that adapts to the container size – I think it might save energy and allow the entire area of the stove to be used. And, of course, the detailed heat readout with an integrated timer is quite a nice feature for perfecting the recipes.

I’m slightly suspicious about the touch control. I’ve seen touch activated ovens with touch control for heat levels, and they all had pretty poor responsiveness. I can only imagine it gets worse once you try to reduce the heat by poking your finger at a layer of bechamel sauce which just overboiled over the controls.

God’s Number is 20, Says a Thousand or So CPUs

Take a Rubik’s cube. Shuffle it. It can be solved with at most 20 moves. That is a fascinating result!

From the article:

Finally, we were able to distribute the 55,882,296 cosets of H among a large number of computers at Google and complete the computation in just a few weeks. Google does not release information on their computer systems, but it would take a good desktop PC (Intel Nehalem, four-core, 2.8GHz) 1.1 billion seconds, or about 35 CPU years, to perform this calculation.

And now, some late-night number shuffling.

First, let’s make an educated guess of one quad-core 2.8 GHz Intel Nehalem doing about, say, 11.2 GFLOPS. Then, given 1.1 billion seconds spent for the task, the total task used up a total of about 2^63 floating point operations (an interesting power of 2, no?). Google’s computers did this in “just a few weeks” (2 weeks = 1209600 seconds), so that’s about 2^43 floating point operations per second for the mystery number of computers, i.e. the computers achieved a total of 10185 GFLOPS = ca. 10 TFLOPS. Divided with the GFLOPS per CPU, that’d mean about 909 CPUs, given the initial guesstimated specs for the Nehalems.

Yes, an easier way to calculate is to find how how many parallel units there were by calculating 1.1 billion seconds / 1209600 seconds = 909, but the above description is nicer to follow. YMMV.

So, according to my back-of-the-envelope calculations, and factoring in some uncertainties about the times, Davidson, Dethridge, Kociemba and Rokicki used a grand total of about a 1000 or so quad-core Intel Nehalem 2.8 GHz CPUs (or equivalent) for the task.

Anyway, 10 TFLOPS in itself is a nice number but really nothing special. It is not enough to reach even the 500th supercomputer position of the June 2010 list of top500.org. However, do keep in mind that the number of CPUs used for the Rubik’s cube task was obviously but a small fraction of the real ultimate Ninja CPU power that Google can harness at will.

And now, good night!

A Zenburn WP Theme called ZenSandbox

David Beckingsale mailed me to say he has started a WordPress-theme that is a derivative of Sandbox, with Zenburn colours. Nice! Grab it from Github: http://github.com/davidbeckingsale/ZenSandbox

CSS gurus ahoy, David also wanted to say that he’s happy to receive contributions to the theme if people feel any aspects of the theme can be improved.

Does HFT Behaviour Amplify via Stigmergy?

Back in late June, I was discussing algorithmic trading and HFT (high-frequency trading) with some friends. A sudden realization hit me, and I realized exactly why I’ve had this nagging idea that wide-spread HFT usage is fundamentally a bad idea due to the weird market behaviour it most likely leads to.

Here’s a cleaned up mail I sent, with some links added. What do you think?
(more…)

Kind of Like Watching a Lava Lamp and Playing It Too

I recently had the luck of finding out about a computer game called Osmos.

The game itself is very simple; you’re a blob of energy or somesuch, and you grow bigger by consuming blobs smaller than you. You can move around by expelling small pieces of your mass, this makes you smaller and more vulnerable to other blobs.

Sounds maybe too simple? Well! Not quite, the blobs have inertia, there is repulsing blobs and so on.

Also, the presentation is simply so wonderfully calm and beautiful. Set on an ambient music background, playing the game has some sort of tranquilling effect on me. It’s kind of like watching a lava lamp, and playing it too.

Check out the Osmos demo, and if you like it, buy it. It’s only $10. I bought it and I think it’s well worth the money.

AI Memo 239

Some reading for lazy weekend evenings. The MIT AI Memo 239, also known as “HAKMEM” contains mathematical and programmatical hacks from the times when computers were wood and men were steel. You can read it here: HAKMEM.

PS. See item 63 for description why 239 is a nice number.

“Looting Main Street”

JP Morgan accumulate profit margin invest destroy in full effect!

Check out a quite interesting/entertaining/sad article in the Rolling Stone magazine. It’s a story about corruption on so many levels.

It’s like gambling on the weather. If your bondholders are expecting you to pay an interest rate based on the average temperature in Alabama, you don’t do a rate swap with a bank that gives you back a rate pegged to the temperature in Nome, Alaska.

Not unless you’re a fucking moron. Or your banker is JP Morgan.

(Cheers to Global Guerrillas for the link.)

Swedish e-Legitimation, Part II – “The Signing”

You’ve perhaps read part I and tried it. Everything works until the moment when you need to electronically sign a document. The web browser barfs an error message, you cannot sign anything.

The good news is that this is super simple to fix.
(more…)