16 Tons

This is the lyrics of the song ”16 tons” as sung by Tennessee Ernie Ford. I have put them here because I just really like them.

Some people say a man is made outta mud
A poor man’s made outta muscle and blood
Muscle and blood and skin and bones
A mind that’s a-weak and a back that’s strong

You load sixteen tons, what do you get?
Another day older and deeper in debt
Saint Peter don’t you call me ’cause I can’t go
I owe my soul to the company store

I was born one mornin’ when the sun didn’t shine
I picked up my shovel and I walked to the mine
I loaded sixteen tons of number nine coal
And the straw boss said ”Well, a-bless my soul”

You load sixteen tons, what do you get?
Another day older and deeper in debt
Saint Peter don’t you call me ’cause I can’t go
I owe my soul to the company store

I was born one mornin’, it was drizzlin’ rain
Fightin’ and trouble are my middle name
I was raised in the canebrake* by an ol’ mama lion
Cain’t no-a high-toned woman make me walk the line

You load sixteen tons, what do you get?
Another day older and deeper in debt
Saint Peter don’t you call me ’cause I can’t go
I owe my soul to the company store

If you see me comin’, better step aside
A lotta men didn’t, a lotta men died
One fist of iron, the other of steel
If the right one don’t a-get you, then the left one will

You load sixteen tons, what do you get?
Another day older and deeper in debt
Saint Peter don’t you call me ’cause I can’t go
I owe my soul to the company store

FNV-Hash

Recently I needed a fast an reliable hash function with good statistics on distribution and I came across what is commonly known as the FNV-hash function. FNV is short for Fowler / Noll / Vo the last names of the three most prominent people contributing to the hashing function.

Basically the FNV algorithm is a very simple one but it is effective and yields astonishingly well differentiated hashes. It has been used in many different codes and both the algoritm itself and a standard source coude has been released into the public domain.

Pseudo code

hash = offset_basis
for each octet_of_data to be hashed
	hash = hash * FNV_prime
	hash = hash xor octet_of_data
return has

The above is called the FNV-1 algorithm. If the multiplication and the XOR change place we get a variant called the FNV-1a which is very similar in all aspects of the first one. I decided to implement both and hash both as 32 bit numbers and then put them together into one 64 bit number creating a very fast and even spread of hashed numbers.

Prime and offsets

32 bit
Prime: 16777619 offset: 2166136261
64 bit
Prime: 1099511628211 offset: 14695981039346656037

Here is a page on FNV that is a good source of information.

Kungsträdgården metro station

Kungsträdgården is one of the most remarkable underground metro stations in the Stockholm Metro system. It is the south end point of the blue line and from here it goes to both Akalla and Hjulsta. The Kungsträdgården stop is just one stop south of the central station, T-Centralen.

The station is located in the bedrock under Jakobsgatan, Jakobs church and Arsenalsgatan through the Kungsträdgården park area. The platform is about 35 meters below ground and can be reached through the entrances placed at Regeringsgatan/Gallerian or Arsenalsgatan. There are two tracks here and trains going to Hjulsta and Akalla always starts from the same side. The Akalla line sometimes have to cross tracks with south going trains and this causes frequent delays. Both tracks may change sides to left hand side traffic north of the platform since the whole metro system makes use of left hand side driving of the trains.

The artist who did the fabulous work in this station is called Ulrik Samuelson and he has found inspiration from the palaces around kungsträdgården. The red man here is a war god that used to sit on Riddarhusets (house of knights) roof there are also male and female torsos and many many other beautiful things to see here. If you are visiting Stockholm don’t miss this station!

The red guy
The Warrior God, or as he is well known as "the red guy"
Rockwall
One of the installations on either side of the entrance from Arsenalsgatan
Tunnel Art
Entrance from Arsenalsgatan showing the decorated roof, the floor and the installations on either side of the walkway.

Ethanol Driving us Crazy

In Sweden there is a lowered tax on fuels considered environmentally friendly and cars that can use such fuels (or are extremely conservative with normal fuels) are considered environmentally friendly and therefore get a lot of benefits such as lower taxes. The government even pays you the equivalent of €120, $1500 when you buy that kind of car instead of a normal petrol or diesel-guzzling vehicle. You can park for free in many places in the city if you have a car like that, you don’t have to pay congestion charge for going in and out of the city in the day and so on. These things are done to stimulate people to chose more environmentally friendly cars.

Parked cars in Sundbyberg one autumn day...
Parked cars in Sundbyberg one autumn day...

For the last few years the ethyl alcohol or methanol cars have been touted as the environmental friendly personal transport for the future; and subsequently a whole chain of events started that probably could have been foreseen but was never really looked into when the decision was made. On the surface it looks like a good deal, alcohol is rather cheap, it is bio-renewable the exhausts are far cleaner than gasoline/petrol or diesel vehicles gives us and above all, most cars engines can be converted to run on alcohol without too much trouble or cost.

These days many petrol stations have designated pumps for alcohol fueled cars and more are coming. The fuel is called E85 and consists in the summertime of 15% ordinary gasoline and 85% ethanol. However most environmentally friendly alcohol cars are still driven on ordinary petrol and the reason are that the difference in price is not really encouraging people to spend the extra time finding a place where you can fill it up. Other problems are also that the energy content per liter of fuel is not that good meaning the car is a little thirstier than usual so if you add that up you don’t save a lot of money and you get a lot of extra hassle trying to find a station to fill it up with alcohol. On top of that it is also difficult to start cars that runs on pure alcohol in the north of Sweden when it is really cold meaning that in the winter time you will have to mix it with more petrol. The fuel does not burn easily when its -30 °C and so that is also a problem that is perhaps more specific to us in the north here. Therefore in the winter the mixture is not 85/15 any more but changed to contain far more gasoline than in the summer time.

What’s even worse is that the industrial alcohol used is made from sugar beets, a crop that does exist but is not wide spread here because of the climate so lots of them are from Brazil where rain forests have to give in for vast plantations of the fermentation friendly vegetable. This is madness in more than one way of course but that’s the way it is – the cheapest route to make alcohol is to ferment a sugar mash basically. It is also made from various grains – that’s basically human food – this drives up the price of wheat and other grains suitable for putting into fermentation to get alcohol, prices that we in the west may have the money to pay for our foods but certainly people in the third world can’t. So while people starve we use their food to power our vehicles. Triple madness.

So what would be a good alternative? Fuel cells are not really ready for this kind of application yet, hydrogen/oxygen is hard to store, extremely volatile, has to be kept refrigerated (or hydrogen dissipates) under high pressure – there are still ways to go here. There are of course natural gas engines and this is coming more and it could be an alternative but the whole point of the exercise is really to get away from fossil fuels, is it not?

The most successful environmentally friendly car right now over here is the petrol/electrical hybrid car. At best it cuts the petrol use by half by using an assisting electrical engine, a rather large and heavy battery bank and in most cases it still saves something like 20-30% compared to a similar all-petrol car. The most used, liked and famous car is the Toyota Prius which I think pretty much every taxi driver is using these days. Lovely car, would not mind one myself really. At least not until it is time to renovate the battery bank in it.

Filling up with E85
Filling up with E85

The fully electrical car is being talked about a lot and for many people the thought of driving into your ”gas”-station, connect an electrical cord to charge your car while you get two packs of milk and some candy for the kids is a very compelling picture. The problem here is that it won’t work. First of all the energy spent going to and from the store would require several hours of charging to replenish. For many people charge over night, go to work, charge at work, go home could work – but for longer trips it would not work. Battery chemistry is just not good enough that you can re-charge them so quickly. Not to mention that the sheer current needed is much higher than what any normal household outlet can deliver. We are now talking industry sized connectors here carying at least a hundred ampere in order to charge enough energy to drive around for a day in say ten minutes time. So not a very practical solution.

The collective transport system here in Stockholm is excellent if not even brilliant but in many parts of the country, the rural parts and in the north there aren’t as many choices as here. I get around in the city almost exclusively by collective transport these days using the underground metro, commuter trains, buses and ferries daily but in the country side you have only buses really and the need for people to transport themselves is not going to become less in the future, if anything the new economy requires people to be able to transport themselves even more than before as the job market becomes more dynamic.

I don’t really have a working solution but I know that ethanol is not the solution, instead it has pretty much stopped the Swedish car manufacturers Volvo and SAAB from continuing a sound development of hybrid cars or alternate fuels since it was so much easier to convert what was already there to alcohol fuel which we now are starting to realize actually in many ways is not at all better for the environment than ordinary petrol (which already has a 15% mix-in of ethanol if you did not know that).

Suggestions?

Avian Flu Medication Lost its Potency

H5N1 in a computer rendering of its protein shell.

Today the Swedish radio reported that in one year the most commonly used medication against influenza viruses; Tamiflu the medication each and everyone stockpiled in 2005 and actually one of the few medications that was somewhat useful in the treatment of bird flu infected humans have lost a lot of its potency because the flu strains has become resistant to it.

This is a problematic development because there are not many other medications that have effect on this dangerous illness and the scare that it would combine with an ordinary flu to form a ”super flu” for which we do not have a treatment has been actualized again because of this.

In fact several countries who stockpiled Tamiflu are now just going to destroy it – basically incinerate it. In many cases this is a result of decision makers not listening to the scientists telling them that Tamiflu would probably not be the best way to spend the resources to combat avian flu virus.

Last time when the bird flu was on everybody’s lips (figuratively) many voices where heard crying out that the government should start stockpiling Tamiflu, licencse it and start whole new factories to make extremely large quantities of such medications in order to have ”enough medication for everyon”  in the event that bird flu should become the pandemic that some thought it might become.

The scientists at the time tried to explain that it was a bad use of resources for several reasons including the very true reason that the human version of the bird flu, the ”super flu” would be different from the bird flu virus in several ways and the Tamiflu medication may not have any effect at all on this form if it formed and in fact it was better to work from the other end with more research on bird flu itself and to prepare to find a more suitable medication tailored to the new flu when it emerged.

But this is very difficult to do unless you have an infected population to work from and to create a medication for an illness that does not exist is very difficult to not say rather impossible.

The Avian Flu virus have mutated into several strains since it was observed closely in 2005 and common antigens have been found but there is enough variation within the group of avian flu viruses that it is not possible to create a single ”strike all” medication and therefore stockpiling the Tamiflu is at best a waste of money.

Now we have observed strains that are resistant to the drug and therefore can not effectively be treated with it so if the resources had been spent on more and better research instead we might have had a broad spectrum antiviral agent or at least better anti-ful agents for the strains that are most likely to combine with a human flu and form a ”super flu” that we all dread.

Fortsätt läsa Avian Flu Medication Lost its Potency

The Bridges

I am sometimes fascinated by bridges. They have been around a long time and take many shapes and forms and they are always a bit suggestive to photograph.

Over the years I have been collecting a few bridges and I want to present some of my favourites here.

Stone bridge
My first bridge is the old stone bridge in the center of the old city of Skopje in Macedonia on the Balkans. This bridge dates back to the roman empire and have of course been enhanced and worked on from time to time but the general construction is there as you can see. It is a bridge in more than the obvious way, it is a bridge between the new part of Skopje and the Old Town so it bridges in several ways in history. Last time I was there they talked about replacing it with a new bridge but I don't think the people living there would accept that if there is any alternative.
The Bridge
The Golden Gate in San Franscisco. Words are superfluous, what is not to like about this smashing piece of engineering splendour? My own relation to the bridge is that I did not think it was as impressing in real life as on picture but then again if you consider when it was built, the height, the sheer number of bolts used it comes back, grows on you becomes more impressive even. This must be the most famous bridge in the US and probably in the world by now as many movies, TV series and other media it's been in until today and it still stands strong. Check out the thickness of the cables...
DSC_1362
My next bridge is the Humber Bridge. Located in Yorkshire in the north of England this was once the world's longest suspension bridge. My relation to this bridge is that I lived close to it for a time in 1996-1997 when I worked as a games programmer at a company called Perceptions writing computer games for a console that never hit the market but wasnamed "M2" by Matsushita. To bad the company whent bust eventually. In 2006 I went back and took some more pictures of the place and I got a lovely bridge photo that I used to have hanging on the wall where I worked.
Walkingbridge
The last bridge is one very close to my home here in Järfälla. This one leads over parts of a small pond and in the summertime it is usually just a gorgerous greenery around it that makes it into my favourite list of bridges.

These bridges are my favourite bridges so far in the world. Of all of them the bridge in Skopje is the most symbolic and the one I like the best. I miss going to Macedonia meeting the great people there and the country side and the food and everything else…

Expressen and Dagens Nyheter

Expressen // Dagens Nyheter
Expressen and Dagens Nyheter are two well known newspapers that's been around for a long time here in Sweden. This photo was taken on a grey day when I was walking from Gamla stan to Slussen and then further on to Mariatorget to finish at Medborgarplatsen.

There are many houses around this area with old ”commercial messages”. One of the most famous ones is the Stomatol tooth paste ad that you can see if you are looking towards Slussen from the traffic careousel at Södermalmstorg.

On purpose I changed the contrasts and sepia-coloured this photography. I think it is rather timeless with a few exceptions, the Taxi Stockholm car is pretty new and shiny and the traffic light also tells us it is a modern picture. But the storefront windows, the house and the ads on top of it are pretty historical in a modern sense… :)

Slussen – Gamla Stan

On my way from Gamla Stan, the old town, to the south end of the city I stopped on the bridge and decided to try to get a handheld panorama of this part of the city. Usually I am not too much a fan of panorama pictures, they have a tendency to be awkward to frame if you know what I mean.

But I shot using my 16-85 set somewhere around 30 mm focal length and handheld. This pano is composed of 6 stitched pictures, all done manually in Photoshop. If you really want to see the picture you must click on it and view it full size, the limits in width on this blog does in no way make it justice.

Winter Panorama
You are seeing the Stockholm south end shoreline on the left hand side and parts of the old town on the right hand side. The boat at the quay side is a night club actually. The bride in the middle of the picture is where the metro underground trains pass from station Gamla Stan to station Slussen.

I did not modify the picture in any way except that I worked a little bit with the contrast since it was a bit of a dull light in the air.

The tower in the far background is actually the city hall.

Fatburen

Fatburen is a small area in the south end of Stockholm. These days you find it between Medborgarplatsen and the Stockholm Södra train station roughly and the blocks in between. There are many very modern buildings here and fortunately the Fatburen park has been saved, fatbursparken in Swedish.

I passed by here last Monday and had the camera with me which was quite lucky because I got a picture that I have had in my head for some time now that we have finally gotten a bit of proper winter even here in Stockholm.

Fatbursparken
Fatbursparken in all it's winter glory. Click on the picture and then on the picture page you can find the map where this picture was taken. Like most of my pictures it is geotagged when published on the Internet.

The picture is a full colour picture but the whole world seemed very black and white at this moment. The park was full of people as well and tourists taking pictures of each other with their cameras. So I had to wait for the right moment before I could squeeze off a few pictures and this is the result.

At the left in the very far reach of the picture is part of the railway that goes under the city into the Central station. This part will be rebuilt and probably covered to the dismay of some of the train spotters who use this place to spot trains passing by. I just hope that they will preserve this park even if it is a park that has a bit of a drug problem going in the late summer evenings…

The Padlock

I did not realise it until last time I uploaded yet another picture of my favourite padlock that I have come back to this place over and over again visiting the same place and always stopping to take a picture of that.

I wonder what compelled me to take a photograph of it the first time, but I think I know what it was now, the structure on the steel casing. It is a hard steel casing in stainless steel alloy, hardened to make it difficult to saw into and break yet not too brittle as to be easy to crack with a switft blow of a stone.

The first time I just wanted to see how well my campera would focus and then it became a ritual, now I have shot this padlock with pretty much every lens I have ever used. Strange thing that.

DSCN0395
This is the first time I visit the lock with my camera. I used a handy point and shoot at this time, a Nikon 8700, something of a step between your casual point and shoot and an entry-level SLR camera. This was just before I got my Nikon D70s camera. For that camera there was a built-in lens that would extend with 10x zoom factor, roughly in 35mm equivalency probably 24-240 mm focal length. This camera re-ignited my interest for photography and particularly digital photography when I got it for more than four years ago.
Padlock on the gate
This was taken the second time I visited the gate. It has now been painted over and som paint have splashed over it. This was shot with my trusty Nikon D70s that I have used for many years now. These days Jeanette is using it mostly with the fabulous 18-200 mm lens that I came to love so much with that camera. It is the perfect combo really, ready for almost anything at any time and still light weight, truly automatic and easy to use.
Anchor Lock
The last picture is taken with my latest camera the Nikon D300 using the 16-85 mm lens that I use quite often with this camera. The lock is now attacked by some rust in some places, but not badly so and it is a great combination that covers a reasonable wide angle up to normal portrait focal lengths.

Now you have seen three representative pictures of an Anchor padlock. But wait. The one in the middle picture is actually not the same lock. Take a look at the numbers at the top of the lock. In the middle picture the numbers are not the same or are they? Perhaps the lock has just been turned around. Or did they chage it and then back again?

The plot thickens.