Archive for the ‘Uncategorized’ Category

Netcraft confirms: Java is dying.

Read this: And this: (german)

I cannot disagree. With Oracle in total control over the Java programming language and the JCP finally revealed as the hogwash it has always been, the future of Java as anything different than a replacement for Cobol is very uncertain.

Why not throw Oracle Java out the OpenSource stack completely? Let’s build upon Google’s work, use the Dalvik virtual machine and – starting from the current Harmony implementations – diverge from the Java language an bring it forwards to the 21 Century. There is so much innovation going on in the Java worlds that does and did not stem from either Sun or Oracle. Think about the Spring Framework, about Play or Wicket.

I’d love to see the Open Source community start a true JCP, taking over control of the language. And since not even Gosling is happy the way Oracle handles the situation, it might be fairly easy to get prominence on board.

Just thinking…

Fisher-Yates shuffle in python

For a pet project I needed a array randomizer. I thought up an algorithm that I thought should work. It did, but funnily enough; I ended up re-discovering the Fisher-Yates shuffle. Here’s an implementation in Python.

import random
import math

def array_randomizer(arr):
	index = len(arr) - 1
#	print "index is ", index
	while index > 0:
		rand = math.floor(random.random() * (index + 1))
		picked_element = int(rand)
		arr[index], arr[picked_element] = arr[picked_element], arr[index]
		index -= 1
	return arr
def analyze_array(template_arr, arr):
	ret = []
	for element in template_arr:
		v = arr.index(element)
	return ret
def summarize(sum_array, val_array):
	for index in range(len(val_array)):
		sum_array[index] = val_array[index] + sum_array[index]

if __name__ == '__main__':
	a = ['a', 'b', 'c', 'd', 'e', 'f' ]
	sum_array = [0.0] * 6 # initialize array with zeros
	runs = 100000
 	for i in range(0,runs):	
		res_array = array_randomizer(a[:]) # copy array
#		print "random: ", res_array
		val_array = analyze_array(a, res_array)
		summarize(sum_array, val_array)

	print map( lambda x: x / runs, sum_array)

Pax Americana, Part 2: Education

Empire, part 2: Education

In my first post about the current state of the USA I mentioned a broken education system. In this post I will expand on that topic. The basic premise: the public schools are too expensive and inefficient whereas the private schools – through a blatant elitism that denies the lower and middle classes access to higher education – are actively limiting the social mobility of the U.S. citizens.

K12: Elementary school and secondary education

“According to a 2005 report from the OECD, the United States is tied for first place with Switzerland when it comes to annual spending per student on its public schools, with each of those two countries spending more than $11,000 (in U.S. currency).[79] Despite this high level of funding, according to the OECD, U.S. public schools lag behind the schools of other developed countries in the areas of reading, math, and science.” –

Now, what else is there to say? Probably that while the public schools in the U.S. of A. are mediocre at best, the private schools are not bad at all and score consistently better than public schools (, NAEP Report Cards). But while the tuition fees of public schools get paid by the state, private K12 schools are very, very expensive. The typical yearly tuition fee for a private high school is about 15’000 USD.

Almost 24% of the children coming from families with a income of more than 150’000 USD are visiting private high schools and are therefore receiving superior education. For families with an income between 100’000 and 149’999 USD this number goes down to about 13% and even further down to 6.7 percent for the whole population. The conclusion; money buys a better education.

Higher Education:

In higher education on can see the same In contrast to the European mainland, the universities in the USA are mostly private institutions. This means they are for-profit and profit-oriented organisations that do not provide a public service for the society, but rather a private service for their customers. And though that service is quite good, it’s very expensive. Other than in France, Germany or Austria where most of the costs caused by students are covered by the state via taxes, students in the USA have to pay the full tuition fee. This is not cheap. Even college is awfully expensive:

* College years 1 to 2: $9489 (per year)
* College years 3 to 4: $11901 (per year)

Total, four year schooling: $42780

* College years 5 or plus: $13669 (per year)
* Vocational, technical, business or other: $7401 (per year)

(figures from Wikipedia:

Now, this is only College. If students want to visit proper universities earning a Master’s degree or even a PhD, they face annual tuition fees of 15’000 USD up to 50’000 USD, not including living expenses, additional school fees, insurances and so on. This is prohibitively expensive, especially for middle class families. Coming from a poor family, your chance to get into a University is awfully small. Add to that the policy of legacy preference, in that the children and even grandchildren of alumni are given preferred access to educational institutes. The only way for a low or middle class family to afford sending a child to a university is a scholarship. And those don’t come easy.
There are also other education topics I could write about, like the practically non-existing vocational schooling system. But this post is long enough already. To summarize my critique: the U.S. American educational system is broken. It empowers not according to skill but according to heritage and wealth and does little or nothing to promote social mobility.

Stay tuned for Pax Americana part 3, Political Stalemate

Pax Americana, Part 3: Political Stalemate

The 21st century started with the U.S.A. the predominant nation on the planet. Just about ten years ago it had out-competed the Sovyet Union in an epic arms race that had brought mankind to the brink of destruction. But now the SU was gone, the U.S. of A. were undefeated and there was no one to challenge the position as leader of the world. The economy was booming, the dotcoms and the internet were promising a new wealth and liberty. Everything was well in the Garden of Eden. Or not.

The incredible internet boom was just a bubble, created by the FED’s policy of loose money. And instead of biting into the sour apple and letting the economy slip into a recession, Greenspan opened the money valves. Easy money was the result, eroding the stability of the economy, though slowly but surely.
Meanwhile, newly elected (or was he?) president George W. Bush, after almost a year of doing nothing in office, was confronted with the terrible atrocity of 9/11. Whipping the USA into a frenzy he first started a war in Afghanistan and a year later one in Irak. None of which he did end.

Over the next eight years, the two wars proved to be more difficult to win than to start. Just ask the Russians or the Brits what they think about invading Afghanistan. The conflict, thought to be won quickly, proved to be a nagging sore. And Irak – quickly descending into civil war – was not a iota better. Over the next 9 years, the United States would spend about 1.1 Trillion Dollars.

In 2006 and 2007 it came apparent that something was amiss in the house of Bush. The first signs of the housing market bubble were popping up and the voices in the wilderness are finally getting some attention, at least. But not enough, it seems.

In 2008 it all comes down. The housing market crashes, banks go bankrupt. But instead of fixing the system – breaking up the big banks, fixing the monetary system and coming down onto the speculation economy – President George W. Bush gives the biggest banks a 700 Billion bailout. The big banks controlling the FED immediately used that money to buy their erstwhile competitors and to get even bigger. Attaboy!

Nowadays, autumn of 2010, the United States of America find themselves in what may be the most critical time since the War of Secession. The Pax Americana is over, and although the USA may try to hold on to military power, its economic strength is broken. The divide between rich and poor, the failing infrastructure, the crumbling social systems, the biased educational system and the staggering debts of the States and the State are making drastic policy chances an imperative. But exactly these changes have been blocked by partisanship and political opportunism. Healthcare reform was upheld for month, labour reform is not possible, neither is a meaningful reform of the banking system or the breakup of the big banks.

President Barrack Obama will have a hard time in the coming two years. He was the reform candidate two years ago and somehow got stuck with the blame for the economic trouble the USA find themselves in. Yesterdays midterm-elections proved that much. And with a republican dominated congress, making a meaningful reform and bringing the USA onto a new course will not get easier. The republicans are strongly opposed to any government spending, even in the infrastructure projects the USA needs so dearly. Even for schools or education or research. And with Obama a lame duck for the next two years, a republican presidency in 2012 seems almost a certainty.

This does not bode well for the United States of America. This nation is deeply divided and as long as its wealth is stuck in Wall-street’s casinos and not used to create real value and create real jobs, there is not much that can bring the USA back to their feet. High unemployment and a ever more fragile currency might result in hyper-inflation, opening the path for political extremists. And these people will flourish in the racially, economically and culturally divided USA.

Pax Americana, Part I: Introduction

That the USA are an empire in the past tense I think most people have realised nowadays. But few really see how close the USA are to their downfall. This has many economic and social reasons, as well as some psychological ones.

First, many people in the USA are poor. And not just poor in the european sense. Most countries in the EU have elaborate social security nets to help people back on their feet. This is a nod to the power of the socialist and social-democratic parties. Europe has rich socialist past. The ideas of Marx and other socialist theorists were not simply discarded and disdained as dangerous and hunted down – from the late seventies on the ideas so called 68er-generation were actually included into the political process.

This has never happened in the United States. Even nowadays the word ‘socialist’ is used to derogate political opponents and paint them as enemies to America, as traitors and radicals. Synthesis has not been allowed to happen. The poor and the left-behinds are – well – left behind. Little thought is spent on them, political discussion focuses on tax cuts for the rich.

This has created a lot of poor and super-poor, unable to help themselves or help others. If you’re down, you stay down. The tent cities in the parks and outskirts of many US cities are just one indicator. And though – that’s the good part – poverty is not limited to the non-whites any more, most of the poor are either black or latin. White caucasian male is only the newcommer on the block. An unlike blacks and latinos, white caucasian male are not used to being on the bottom. Well, except for the Irish.

This gap between super-rich and super-poor is getting wider every day. True; some are getting rich but a lot more are getting poor. A lot of frustration and anger is created, pressure is building up.

Next part will focus on the US american system of education and why it’s broken.

Open Letter to HTC; the HTC Hero and Android 1.6 / Android 2.0 firmware upgrades

Dear HTP-People,
I recently bought (for the first time, I used to use used ones) my first mobile phone, the HTC Hero.

My purchase was made with the decision, to buy the best Android phone out there. And thus far I am quite satisfied with it.

Unfortunately, the phone’s software hasn’t been updated for three month. Two major upgrades for the Android operating system have been made by the Android community and Google Inc. in that time, and HTC has skipped the first one and didn’t even bother to acknowledge the second one.

I’d be happy to buy another HTC phone in the nearer future, but for that to happen I have to be convinced by HTC’s product commitment. That includes regular updates for hardware, also for older hardware. The responsibility for a product does not end at its sale.

I would eagerly buy another Android based HTC phone. But until I see a more committed product support by HTC, I cannot consider HTC Phones as an option.

Raphael Bosshard

Futile attempts to crop freedom – why ACTA won’t work

The ACTA (Anti-Counterfeiting Trade Agreement) is a secret, multi-national treaty to “to the increase in global trade of counterfeit goods and pirated copyright protected works.” In other words; it’s (amongst other things) another try to regulate Internet communication and stop so called ‘Intellectual property piracy’, e.g. unlicensed copying.

The first funny thing about ACTA is that our elected leaders are trying hide what they are doing. Now I might be wrong, but the first thing about democracy is transparency; if you don’t know who’s doing what, how else do you know whom to kick out of office? Fortunately, in Switzerland we have the possibility of a referendum, but still; what the fuck? Working in secrecy on international agreements and then trying to force it down our throats? Go die in pain.

The second funny thing about the ACTA is it’s futileness. Even if the big media corporations (who else do you think could have an interest in such an agreement) are successful in convincing our own governments to play kindergarden cop because they themselves are unable to cope with a changed environment, it will be a pyrrhic victory; the harder such laws are enforced, the stronger the opposing reaction. Governments forcing providers to cut off their own customers will just drive those customers into the Undernet. Anonymous encrypted peer-to-peer networks with network storage capability? Here we come. Trying to stop that will break the internet. And not even Big Media can afford that. Sure; bandwidth will be small, in the first few years. But hey; I remember a time of 5kB/s, I can cope with it again.

Intel pushing Linux even further

ACPI has always been a problem for the Linux kernel. Be it suspend and resume, power management, screen brightness or any other function provided by ACPI; it never really worked for and with Linux. The reason for that is the immense size of the ACPI specification. And the fact that almost ever manufacturer has a private interpretation of said standard.

The solution for Linux, up to now, was to stop being Linux and pretend to be Windows, e.g., emulate all the bugs and implementation details of Windows’ APCI implementation and hope that it somehow works. Most of the time it did. Sometimes it didn’t. And instead of blaming the manufacturers and Microsoft for not adhering to the standards, Linux was blamed for trying to implement the ACPI standard to the letter.

However; this is – hopefully – going to change. For Intel released a new firmware interface (providing all the functionality of ACPI), with a reference implementation for – you guessed it – the Linux kernel. And whereas the APCI standard (version 4.0 was released only recently) spans over 727 pages (, the new firmware interface ( needs only 9 pages in its current incarnation (draft 0.6).

Now SFI is not going to change the world overnight. But I hope to see SFI gaining traction within the next three to five years. I’m crossing my fingers.

The End of the Pax America?

As a read a report about the lastest BRIC meeting , I was wondering if I this might be the end of the Pax America.

Ready – Set – Fight

Now it’s official; for the first time ever Microsoft sued another company over patent issues related to the use of Linux. Now we’re really in the ‘Fight’ stage of Ghandi’s old saying: “First they ignore you, then they laugh at you, then they fight you, then you win.” Tomtom was sued for the use of the FAT file system in some of its devices. Apparently there are some patents related to the inherent filesystem-management of Linux. I’m curious how these hold up in court.