header image
Eventually everyone wants to be AOL
January 25th, 2012 under Articles, Corporate, Media, Politics, rengolin, Web. [ Comments: none ]

After a good week battling against SOPA, it’s time to go back to real life, to battling our own close enemies.

As was reported over, and over, and over again (at least in this blog), Google is dragging itself towards a giant dominant player it’s becoming, much like Yahoo! and AOL in previous times.

Lifehacker has a very good post about the same subject (from where the title of this post was deliberately taken), around Google+ and the new Search+ (or whatever they’re calling that), and how the giant is loosing its steam and trying so solidify its market, where it’ll comfortably lay until the end of its days.

True, Google has a somewhat strong research department, and is working towards new TCP/IP standards, but much of it was done by Yahoo! in the past, towards FreeBSD, PHP and MySQL. Yahoo! actually hired top notch BSD kernel hackers (like Paul Saab), MySQL gurus (like Jimi Cole and Zawodny) and the PHP creator, Rasmus Lerdorf. And they put a lot back to the community. But none of that is true revolution, only short reforms to keep themselves in power for a bit longer.

The issue is simple, Google doesn’t need to innovate as much as they did in the past, as did Yahoo! and AOL. Even Microsoft and Apple need to innovate more than Google, because they have to sell things. Software, hardware and services, not only cost money, and time, but they age too rapidly and it’s not hard to throw loads of money at a project that is borne dead (like Vista). But Google get its money for free (so to speak), their users are not paying a penny for their services. How hard it is to compete with that model?

Like Google, Yahoo! had the same comfort in their days. They had more users than anyone else, and that was the same as money. They did get money from ads, like Google, only not as efficient. And that put them in a comfort zone that it’s hard not to get used to, which was their ultimate doom. This is why, after 25 and so years failing, Microsoft is still a strong player. This is why Apple, after being in the shadow for than 20 years, got to be the biggest Tech company in the world. The must innovate at every turn.

Yahoo! displaced AOL and bought pretty much everyone else because they’ve outsmarted the competition, by doing the same thing, but cheaper and easier. Google repeated the same stunt, on Yahoo! and is beginning to age. How long would that last? When the next big thing appears, making money even easier, Google will be a giant. An arrogant, slow and blind giant. And natural selection will take care of them as quick as it took of AOL and Yahoo!


Post-SOPA-protest, what’s on?
January 19th, 2012 under Corporate, Digital Rights, Life, Politics, rengolin, Web, World. [ Comments: none ]

So, the day has ended and we’ve seen many protests around the world. Did it help? Well, a bit, but don’t hold your breath right now.

European citizens are still being sued by the American government and being extradited to the US because their sites had links to copyrighted material. So, in a way, what SOPA and PIPA stands for is already reality, but it takes the US government a lot of effort and money to do so. With SOPA and PIPA, enyone in the world could end up in Guantanamo Bay, as easy as any American.

While I welcome the protest, and feel that Americans did a good job converting 30 more senators to their cause (it was 5, now it’s 35), it’s far from enough. I think people still haven’t realised that this is not an American issue. Just like American copyright laws have bankrupted creativity around the world (think Mickey Mouse effect) and the American patent system has destroyed technological advancement (patent trolls, et al), SOPA and PIPA will spread throughout the world and be the icing on their cake.

The people that are so desperate to preserve their profits by breaking the rest of the world are the people that already have more than anyone. Last year, Viacom’s CEO had a 50mi raise in his salary. Not a bonus, mind you, a raise. To protect those people’s profits, we’re letting them destroy the entire world, stop technological advancements (that don’t give profits to them) and kill all the artists in the process.

If you, like me, are outside of the US, please make sure your government stops short of bending to the US government, as they always do. Europe, and particularly UK and France, has been America’s puppet for far too long. The US is not the only country in the world, and nowadays, it’s not even the most important one. We need to change the world to multi-polar and promote countries like China, Russia, Brazil, India. Not that I like any of them, but we must not put all our coins into one crazy country, we need more crazy countries to re-balance the world.

Now, for some of the protests

Apart from the obvious Wikipedia, Google, WordPress, there were some others I’ve seen that are worth mentioning.

It was not just that, some people actually went on to the streets (NY and SF) and it seems most senators’ phones and websites went dead for the traffic. It’s working, but this is not the end, nor this is just about copyright. This is about freedom of thought, freedom to share, freedom to be a human being. Stopping SOPA/PIPA is just the first step, we need to undo most of what the media/war/oil/tobacco industry has done for the past 80 years, unless you like dictatorships, of course.


Wikipedia Blackout (a.k.a. SOPA strike)
January 17th, 2012 under Digital Rights, Politics, rengolin, Web. [ Comments: none ]

To protest against absurd piracy counter-measures in US, the Wikimedia foundation (and others) will be shutting down this Wednesday.

We’ll be supporting the act by shutting down our blog, too. Not that our blog makes any difference, it’s more for the protest than anything else.

UPDATE: More sites, including Google and WordPress, are joining the strike.


Dad, what is war?
December 12th, 2011 under Fun, rengolin, Stories, World. [ Comments: 2 ]

There’s this little girl on the hotel’s lobby. She seems very smart, but at odds with one of the popular magazines she’s reading. It looks like one of those low-quality magazines that people publish for children, assuming they’re dumb and can’t take a bit of logic. This one seems to be about history, mostly relating facts to simple conclusions and trying to get started the child’s imagination on what would be like hundreds of years ago.

I’m only waiting for them to get my room ready, so anything to pass the time is game, and watching the puzzled face of that little girl looking at a picture of what looks like a war scene is, at least, entertaining. Her dad is busy with some details of his bill, so she refrains from interrupting him, but enough is enough, I can see that she must ask what that is. And so she does.

“Dad, what is war?”. A bit puzzled with the numbers still floating in his mind and having to cope with such an unexpected question, he stops for a moment. “I, uh… war is… er, like… why do you ask?”. The little girl flips the magazine without letting it go, so her dad can read, and look at him with those big reflecting eyes, demanding a fair answer.

After switching his mind quickly yo cope with the upside-down writings and the glare from the sun outside on the screen, her dad finally tries to answer. “Well, honey. War is when people get angry and fight.” That was really amazing, because you could clearly see how fast her mind was pattern-matching in all her reactions. The involuntary contraction of her neck, the slight tilt of her head and the eyes going back and forth looking at nothing in particular. About a second later, she concluded. “Oh, I see, like you and mum?”

At this time the father wasn’t listening any more, and just issued the standard “uh-huh”. It was clear as filtered air that, in the next seconds, lots of memories of her family would be unequivocally associated with war, and at a later stage (if she ever became a historian), she would have to deal with that. It seems silly for me to interfere, but learning is an emergent behaviour, and she could have other unpredictable side-effects that would ruin her life for a number of reasons.

I looked around and there was no sign of the hotel staff bringing me my key, so I put my reservation aside and dived in. “Hello, little girl. How is your magazine?”. She looked at me in a slight panic, but my smiling face is anything but threatening. She looked at her dad, than at me. Her dad didn’t seem particularly worried, so she relaxed and continued the conversation.

“This is a magazine about the dark ages. I’ve learned dark ages at school and that people used to fight a lot, but I’ve never seen pictures of a real war before.” I said, “Well, these pictures are very old and bi-dimensional, it’s hard to see anything in them. Besides, they were usually taken by one or the other side, so you never knew how bad things really were other than what people told in the news or left in the pictures.”

She still seemd a bit confused, and not because of the quality of the pictures, I have to say. “I imagine how angry these people had to be to come to this…”. There was my cue. “You see, this has nothing to do with being angry… Your mum and dad will never go to war for disagreeing, because war is not about anyone’s feelings, really”.

Nevertheless, she seemed very resolute in her fantasy of mum and dad waging wars. “When they got separated, my mum said she was going to kill dad if he ever showed up again…”. But I was not going to give up, “That doesn’t mean it’s war. She was just angry and I’m sure she won’t kill anyone.”

By that time, my keys had arrived and I was ready to leave, but the little girls’ eyes weren’t stable enough for me to leave. Not just yet. “I don’t get it. If people were not mad, why did they fight?”. I could not hold my urge to elaborate… so I did.

“You see, back in the 21st century, people used to be a lot less rational than today. They used to call the early days as ‘dark ages’, only that those days were a lot less dark than – what we call today – the dark ages. People had a very blurry view of what science is or can do, and religion was still a strong player in worlds business.”

“Not only that, but people also had a very limited point of view. They thought only about their own profit and even then, only their short term profit – think about a month or so, no more – so they were always taking rapid-firing short-sighted decisions. For instance, they would wage wars in the – then, called middle east – area to control the oil production, even decades after realising fossil fuels weren’t good at all. Even mother China would wage wars with our neighbours because of their political agenda…” “Not mother China! We’d never do that!” I was taken aback a bit for her reaction, but continued nevertheless… “Hundreds of years ago, dear, everyone did that, even mother China.”

She was puzzled. Maybe I was making it worse, which was another reason to continue…

“Let’s go back a bit. When science was still at its early stages, there were some fundamental questions that people couldn’t answer, like ‘where do we come from’ and ‘why are we here’” “But that’s non-sense!” “Yes, yes, calm down, we’re talking about back then, remember?” “Oh, yes, sorry.” “Those questions, however irrelevant to the universe, were fundamental to even the most prodigious scientists of that era. It was not all bad, since most of the discoveries of that time came from trying to find the ultimate truth.”

“Religion is that stuff about the universe being created, right?” “Exactly, there is a deity that is more powerful than us and have created us. Somewhat like man and ants, we could do whatever we wanted with them…” “but we didn’t create the ants!” “Yes, I was, uh, trying to come up with an analogy, sorry. You see, that’s one of the reasons why it failed over the time, people ran out of stupid analogies and science took care of the rest. With time, we stopped asking stupid questions as well, so the long sought answers about the universe died out and, well, came the age of enlightenment.”

“What does that have to do with war?” “Oh, yes, war. So, ever since the stone age, most wars were waged for religious reasons. It may not make a lot of sense now, but different people had different religions, and they could not accept that other people could believe in a different deity, or even in the same deity, with slightly different rules. That has led to a lot of controversy, and due to the lack of diplomacy, wars.”

“However, after a while, people realised that religion was not just a matter of belief, it was a powerful weapon. If you could make people believe in what you want – that you are in direct communication with such deity, for instance – you would recruit every single man that believes in that deity to your cause. With time, when money came into scene, that was the most powerful way to acquire money. Later on, when religion started to fail, people had to create different fears, such as their own safety. That’s when terrorism came to scene, but again, that had strong religious roots.”

“So, war was about money, then?” “Exactly! Money and power, which invariably leads to more money (or power).” “Oh, that’s stupid! Everyone knows you get more if you cooperate than if you fight over something…” She was warming up and I’d lose my meeting but I wouldn’t stop now!

“Have you ever heard of John Nash?” “Hey, John Nash, I know him! Game theory, right?” “Well done!” I was really impressed, they normally learn that stuff at 10, but she was barely 7 years old. “There were some people a bit ahead of their time, like John Nash and Stephen Hawking, but they were few. Most of the prodigious scientists were all looking for the ultimate answer. And funny enough, for more than a century after John Nash, people still waged wars for money…”

She was looking down, and a bit sad… “My mum always say that I don’t listen and I only learn through pain… I guess this was their problem, wasn’t it?” “I think so” said I, resolute. “I think there’s yet another explanation that fits into Nash’s predictions. There were so many factors into why waging wars actually makes less profit than not, that people could not see it straight away. Whoever said that was taken as an anarchist, or an idiot – which at the time, was almost the same thing…” “What’s an anarchist?” That truly took me out of balance… I wasn’t prepared to elaborate on that. So I didn’t.

“Back to war… Nash’s idea, and that we all take for granted today, is that collaboration is far more stable and profitable than competition. I personally think that, what was really difficult for them to realise, was that competition is what made men evolve, but that’s also what made men stop evolving for millennia. Learning to collaborate was the single most important change in the world over the last three hundred years, and also what made our fauna and flora to go back to its original intent, and thanks to that, we still have our planet to live in.”

“Of course we do! Where else? Ha!” She was laughing seriously loud now. I believe a man of that age would not understand why, but I did.

My watch went crazy on the alarm, reminding me I had a meeting in 15 minutes, and I even hadn’t had a shower. That was my cue to leave, so just made some silly moves like pointing at the watch and smirking, and she got it straight away. Clever girl.


Privacy on Modern Societies
November 21st, 2011 under Life, Politics, rengolin, Science, World. [ Comments: none ]

The concept of privacy is born from the antagonism between individuality and the desire to belong to a group. The instinctive drive to form groups – for protection, mating and warmth – is much older than the human race itself. It’s an instinct of almost every animal, and a successful characteristic or many plants and fungi. Individuality itself comes from pride and greed, two characteristics more specific to higher animals (such as felines, canines and primates).

Pack animals, like zebras, benefit a lot from being indistinguishable from each other (this is why they have stripes). Other animals, such as most felines, have leaders and there’s a succession line (much like royalty, but favouring physical strength). However, even on hierarchical species, the people is just the people, and they’re fine with it. Even on primates, you seldom see identification of one’s work or specific concerns with privacy. You can see them mimic privacy (if you beat them when doing something you wouldn’t do in public), but that’s Pavlov’s conditioning more than anything else.

Communism

However, group behaviour’s strengths and benefits if applied to the human race are quickly dismissed as communism.

There was a lot of group psychology in Marx’s political views (and a lot of Marxism in Pavlov’s ideas), hence, there was a strong rejection of any conditionalization of the people impose by the state or any strong enough body, on the capitalist side of the world.

The individual entrepreneurism of modern capitalism (as opposed to the original binary model from Adam Smith and co.), borne during the colonisation of America (no rules, no government), has been revamped by communism fears during the cold war, Cuba and now China.

Faith

As with any faith, the belief that individuality is the landmark of the human race brought its own problems.

First, individuality goes against most of other values we have as humans. My right to fart in a bloated bus goes against the respect I should have for others. My right to eat my pudding goes against the compassion I should have to spend the same amount for the mains of an impoverished child. My right to press the tooth-paste in the middle goes against my love for my wife.

Putting individuality higher than other important human values, such as respect, compassion and love, makes it a lot harder to live in societies. And given that we are now passing the 7 billion people, it’ll be a lot harder to be alone. But faith has no boundaries, nor logic. People were raised believing their individuality is more important than anything else and they die for it.

Biting the hand…

But life has it’s ways of being ironic, and deeply satisfying at it, for the bystanders. Extremely capitalist countries (like UK and US) have figured out long ago that such freedom cannot be. There is no society based on individuality (they’re antagonistic, after all). Worse still, a society that is purely based on individuality is a society without government. That, whose people have the right to do whatever they please. For this society to thrive, people would choose the right thing to do more often than not. That apolitical society has a name: anarchy. I don’t believe any government would like that!

To control people without telling them they’re being controlled, you have to resort to subversive techniques, extensively described in Orwell’s 1984. For centuries, both sides of the Atlantic have resorted to such measures, but today, no country is more Orwellian than the US.

Countries in Latin America or old USSR are failed nations (in the ayes of the American Government), where people know how bad it is and, well, live with it.

West European countries have, to a certain extent, succeeded in creating a more stable, if somewhat socialist, government. People still have their own liberties, but the government is strong and has it’s strong hand (NHS, public schools, social security, etc.). While they could do much better on many things, people know the failures and, well, live with it.

But the US is a special case. And the critical elements in the country’s history of the aggressive capitalism (internally and externally), individualism and greed, is biting the hand that fed it. For decades now, the government is increasing the grip on people’s freedoms, while increasing the liberty of major industries such as media, software, pharmaceutical, weapons on its grip of the government. After all, the recent breakdowns (like the one in 1929) of Enron, the Internet bubble and now the housing market and the financial crisis are signs that capitalism still has a lot to go wrong if unrestrained.

And still, the government gives more power to those same companies every year. The social reform Obama promised is yet to be seen, the technology-savvy campaign he did turned out on a technology-moron government, failing to understand basic concepts of day-to-day life that most Americans already know for ages. And since the US has such a power on the world’s economy, they’re spreading their chaos to Europe, as they did with Latin America for centuries (ever since Monroe Doctrine).

Recent court battles in EU for copyright infringements, the three-strike laws (rushed in by puppy Sarkozy even before the US) and all the prosecutions over Europe regarding software (Microsoft) and stupid hardware patents (Samsung vs. Apple), shows that stupidity took over the world, for good.

SOPA

After the recording industry successfully convincing underpaid musicians that they were being robbed by piracy, and the successful creation of the the Digital Millennium Copyright Act, making legal things such as DRM (and illegal to have the right of privacy), and crippling their own patent system with useless patents (giving birth to a whole new industry, called patent trolls), the US government now is superseding itself by creating the Stop Online Piracy Act, the new idiocy that goes beyond any idiot boundaries any human being has ever gone.

The US government has consistently and strongly reminding us, the rest of the world, of countries like China, where people don’t have the right to freely access the internet (due to the Big Firewall of China), and how much better is the freedom that capitalist countries give you. That freedom, ultimately linked to individuality and the greed to make more money that your peers, is what makes the American capitalism thrive. But every action, every argument has been destroying this dream, for more than a decade already.

Of course, as with any decent Orwellian government, they don’t tell you your freedoms are being displaced. And people that do say that, like Richard Stallman, are tagged as crazy lunatics, in spite of what GNU has done for society in the last 30 years. Anyway, the government’s arguments are, actually, promoting freedom. The freedom for the companies to make pornographic profits at the expense of the population’s freedom.

We, the people

But the people is not fooled. Recent movements to occupy Wall Street and the increasing mention that capitalism is failing in the alternative media (blogs, independent media channels, etc.) are clear indications that the nation’s mindset is changing.

A recent survey has shown that 75% of the Americans disagree with the outrageous fines (or any fine at all) for copyright infringement. Actually, most of them are knowingly infringing copyright themselves.

So, how does this happen? From a nation that valued their individuality and community to a nation of filthy pirates that don’t give a dime about other people’s property? Well, nothing has actually happened. To the people, I mean. But two things have, indeed, happened to the government.

First, the notion of property, individuality and respect, that were never meant individually, are now showing its colour. Second, the greed in which people were bred made them respect so much their individuality that other people’s profit is not as important as their own comfort. While this is the driving factor behind the population fight against the failed patent and copyright system (a fight that I do support), it’s for the wrong reasons.

Respect

My view is that the patent system, copyright, the media industry, the firewall of China, etc. fail on a basic respect level. Not only individualism, mas also the sense of society and community. Respect is by far more important than individualism or community. It’s a concept that, when applied correctly, can derive communities that do respect your right to individuality and privacy, at the same time that it stops abuse short of damaging others.

Respect is not perfect, nor equal to everyone. There are always those that abuse of the system and people will get hurt, or killed, before the community can do anything about it. But isn’t it true to every kind of community? Do you really believe that SOPA will stop piracy more than harm loyal customers? Did DRM? Did DMCA? Did the Terrorism Act really stopped more terrorists than it locked up regular air travellers?

All those solutions were direct infringements of privacy, the right to defend yourself (ex. Guantanamo Bay and patent trolls), the right to share and give away (DRM), the right to use your property where and how it’s meant to be used (DRM). Now, the US is also losing the right to use the Internet. And don’t think that this is staying within their borders… it’s most definitely not!

Expect Cameron and Sarkozy to be adhering to that idea sooner than the Americans do…


The doctor and the programmer
October 23rd, 2011 under Devel, Life, rengolin, World. [ Comments: none ]

About 15 years ago, when I was working on a dodgy Brazilian firm, I had a conversation with an older programmer that I never forgot. He said something along the lines of:

Medicine is way easier than computer science. Doctors are still using the same books, written decades ago, while we have to buy only the latest ones. Our reality gets rewritten every five years or so, and by the time you leave university, you’re already outdated.

There is a lot of merit in this argument. Even though the common cold’s strain changes every week, its symptoms are exactly the same. Cancer, HIV, malaria, Lupus and other big diseases are treated more or less the same way as they were when first treated, and GPs still give you aspirin/paracetamol/ibuprofen for any kind of pain.

Human anatomy, physiology and psychology doesn’t change at all. Broken legs, runny noses and swollen tonsils are the same on every person and they require the same treatment for everyone.

While doctors kill one patient when they do make a mistake, developers can kill hundreds if they happen to introduce a bug on the Airbus fault-tolerant fail-over system.

But recently, I had to re-think this through, and I have to say I’m not 100% in agreement any more.

When programmers change jobs, they get a few weeks to get used to the new system. They might get months to actually be productive as their peers and will mature within a few years working with the same piece of software. Programmers can run tests, regression tests and usability tests, unit tests, etc, which is something a bit complicated with human beings.

When a doctor gets a new patient, it’s like getting a new programming job. It’s the same language, but the system is completely different. It might take you weeks to start getting the prognosis right, and in a few months you’ll be able to get it right before your patient even tells you the symptoms.

The similarities are remarkable

Consultant programmers get new systems to work on every week. Like ER doctors. They do what they can, with the time they have and the solution is most of the time acceptable. A more stable doctor or programmer might look at the job and cry, but the job was done, the fire was put off and the “patient” is out of the door.

Family doctors, that were there when you were born, know you better than yourself. They know when your symptoms are only psychological and what cause that and when it’s going to go away. They rarely touch the “system”, but normally fix an unrelated bug and you’re good as new.

But not everybody is lucky enough to have such doctors. They are expensive, and there aren’t enough good doctors in the health system of any country to account for every family. Even if the doctor share a hundred families, it’s still very far from enough.

This is the reason that systems fail, and get half-fixed, and why most GPs will send you home with a paracetamol unless you’re dying in front of them.

If doctors and programmers had such a different world, the emergent behaviour wouldn’t be that similar, I believe.


And he’s dead…
October 13th, 2011 under Computers, Life, rengolin, World. [ Comments: 1 ]

No, not the one everyone is talking about. The one that actually made it all work.

Not the one that was worried about uniforms and style, the one that actually designed and develop the foundations of modern society.

Not the one that enclosed people into a dungeon of usability, but the one that created the tools to enable everyone’s freedom.

The one whose work made possible the computer revolution in the 70s, the micro-computer revolution in the 80s, the open-source revolution in the 90s and the mobile revolution this last decade. Without Unix and C, and their simplistic but elegant design, the stronghold of modern society, none of this would be possible. We’d still be fighting over who invented the bloody pipe.

Rest in peace, Dennis MacAlistair Ritchie and may your wisdom embedded in the world today, linger as much as possible in our minds.

UPDATE: (Wired) Dennis Ritchie: The Shoulders Steve Jobs Stood On


The OFF button
September 26th, 2011 under Fun, rengolin, Stories. [ Comments: none ]

Geeks like to hack stuff, especially if they’re not meant to be hacked. But hacking computers or mobile phones is piece of cake, so some, more adventurous geeks hack cars. The Toyota Prius is a particularly interesting car to hack, since a lot of its functionality is based on control systems and they have interface ports that you can plug in debug systems and change (or add) behaviour to your car.

For instance, you can enable the SatNav screen to play video CDs or MP3s, since the system supports it, but there aren’t enough buttons on the panel and, well, you shouldn’t be watching videos while you drive, anyway.

Another less common hack, but doable is to change the voice commands. They’re normally hard-coded to respond when you press a button on the steering wheel and say something. For instance, on my Prius, if you say “fire photon torpedoes” it puts the air condition temperature down a bit. If you say “Khaaaaaaaan!” it turns off the radio, and so on.

Some controls are a bit less harmless, like activating the breaks or turning off the car, but normally you can’t access them from the control panel, anyway. That is, unless you by-pass the CAN network and connect the central control with the control panel.

Legend tells that a geek bypassed the system and, just for fun, added a voice command to turn off the car when he’d say “off“. That was his pride and joy, and (geek) friends would go jealous of his control over his car. Until the day the car was too old and he decided to buy a new one, with even more technology. Only he forgot to disable the “off” button.

A few months later, they say, the new owner was having a fight with his girlfriend on M11 at full speed and, well, as many would do in those circumstances, he was swearing a lot. Loudly. His unfortunate last minute of life began when he accidentally pressed the “talk” button and said something along the lines of “f*** off …”.

The car dutifully acknowledged the command and, since the previous owner forgot to add any security checks, turned itself off at once. Havoc and carnage followed, but that’s another story.

Now you know why Toyota voids your warranty when you open the panel…


FreeCell puzzles solver API
September 25th, 2011 under Algorithms, Devel, Fun, Games, rengolin. [ Comments: none ]

This is a little pet project I did a while ago. It’s a FreeCell puzzle‘s solver API.

The idea is to provide a basic validation engine and board management (pretty much like my old chess validation), so people can write FreeCell solvers on top of it. It has basic board setup (of multiple sizes), movement legalisation, and a basic Solver class, which you must derive to create your own solvers.

There’s even a BruteFroceSolver that can solve a few small boards, and that gives you an idea on how to create your own solvers. However, the API is not clear enough yet that children could start playing with it, and that’s the real goal of this project: to get kids interested in solving complex optimisation problems in an easy way.

Freecell is a perfect game for it. Most boards can be solved (only a handful of them were proven – by exhaustion – not solvable), some movements can be rolled back and you can freely re-use cards that have already been placed into the foundations (their final destination) back in the game again.

It’s out of the scope of this project to produce a full-featured graphic interface for kids, but making the API easy enough so they understand the concepts without dragging themselves into idiosyncrasies of C++ is important.

Compiler optimisations

The reason why I did this was to make some of the optimisations compiler engineers have to do more appealing to non-compiler engineers or children with a taste for complex problems. But what does this have to do with compilers? The analogy is a bit far-fetching and somewhat reverse, but it’s interesting nevertheless and it was worth the shot.

Programming languages are transformed into graphs inside the compiler, which should represent the intentions of the original programmer. This graphs are often optimised multiple times until you end up with a stream of instructions representing the source code in the machine language.

Ignore for now the optimisations on those graphs, and focus on the final part: selecting machine instructions that can represent that final graph in the machine language (assembly). This selection can pick any assembly instruction at will, but it has to put them into a very specific order to represent the same semantics (not just syntactic) of the original program. Since many instructions have side effects, pipeline interactions, special flags set or cleaned up, it’s not trivial to produce correct code if you don’t check and re-check all conditions every time. This is a known complex optimisation problem and can be responsible for changes in speed or code size in orders of magnitude.

What does it have to do with the Freecell puzzle? Well, in Freecell, you have a number of cards and you have to put them in a specific order, just like assembly instructions. But in this case, the analogy is reverse: the “sequence” is trivial, but the “instructions” are hard to get.

There are other similarities. For example, you have four free cells, and they can only hold one value at a time. They are similar to registers, and manipulating them, gives you a good taste of how hard it is to do register scheduling when building the assembly result. But in this case, it’s much harder to spill (move the data back to memory, or in this case, card back to cascades), since there are strict rules on how to move cards around.

Reusing cards from the foundations is similar to expanding single instructions into a sequence of them in order to circumvent pipeline stalls. In real compilers you could expand a multiply+add (very useful for digital signal processing) into two instructions: multiply and add, if that gives you some advantage on special cases on special chips. In Freecell, you can use a 9 on top of a 10, to move an 8 from another cascade and free up a card that you need to clean up your freecells (registers).

I’m sure you can find many more similarities, even if you have to skew the rules a bit (or completely reverse them), but that’s not the point. The point is to interest people into complex optimisation techniques without the hassle of learning a whole new section of computer science, especially if that section puts fear in most people in the first place.


Science vs. Business
July 30th, 2011 under Computers, Corporate, OSS, Politics, rengolin, Science. [ Comments: none ]

Since the end of the dark ages, and the emergence of modern capitalism, science has been connected to business, in one way or another.

During my academic life and later (when I moved to business), I saw the battle of those that would only do pure science (with government funding) and those that would mainly do business science (with private money). There were only few in between the two groups and most of them argued that it was possible to use private money to promote and develop science.

For years I believed that it was possible, and in my book, the title of this post wouldn’t make sense. But as I dove into the business side, every step closer to business research than before, I realised that there is no such thing as business science. It is such a fundamental aspect of capitalism, profit, that make it so.

Copy cats

Good mathematicians copy, best mathematicians steal. The three biggest revolutions in computing during the last three decades were the PC, the Open Source and Apple.

The PC revolution was started by IBM (with open platforms and standard components) but it was really driven by Bill Gates and Microsoft, and that’s what generated most of his fortune. However, it was a great business idea, not a great scientific one, as Bill Gates copied from a company (the size of a government), such as IBM. His business model’s return on investment was instantaneous and gigantic.

Apple, on the other hand, never made much money (not as much as IBM or Microsoft) until recently with the iPhone and iPad. That is, I believe, because Steve Jobs copied from a visionary, Douglas Engelbart, rather than a business model. His return on investment took decades and he took one step at a time.

However, even copying from a true scientist, he had to have a business model. It was impossible for him to open the platform (as MS did), because that was where all the value was located. Apple’s graphical interface (with the first Macs), the mouse etc (all blatantly copied from Engelbart). They couldn’t control the quality of the software for their platform (they still can’t today on AppStore) and they opted for doing everything themselves. That was the business model getting in the way of a true revolution.

Until today, Apple tries to do the coolest system on the planet, only to fall short because of the business model. The draconian methods Microsoft took on competitors, Apple takes on the customers. Honestly, I don’t know what’s worse.

On the other hand, Open Source was born as the real business-free deal. But its success has nothing to do with science, nor with the business-freeness. Most companies that profit with open source, do so by exploiting the benefits and putting little back. There isn’t any other way to turn open source into profit, since profit is basically to gain more than what you spend.

This is not all bad. Most successful Open source systems (such as Apache, MySQL, Hadoop, GCC, LLVM, etc) are so because big companies (like Intel, Apple, Yahoo) put a lot of effort into it. Managing the private changes is a big pain, especially if more than one company is a major contributor, but it’s more profitable than putting everything into the open. Getting the balance right is what boosts, or breaks, those companies.

Physics

The same rules also apply to other sciences, like physics. The United States are governed by big companies (oil, weapons, pharma, media) and not by its own government (which is only a puppet for the big companies). There, science is mostly applied to those fields.

Nuclear physics was only developed at such a fast pace because of the bomb. Laser, nuclear fusion, carbon nanotubes are mostly done with military funding, or via the government, for military purposes. Computer science (both hardware and software) are mainly done on the big companies and with a business background, so again not real science.

Only the EU, a less business oriented government (but still, not that much less), could spend a gigantic amount of money on the LHC at CERN to search for a mere boson. I still don’t understand what’s the commercial applicability of finding the Higgs boson and why the EU has agreed to spend such money on it. I’m not yet ready to accept that it was all in the name of science…

But while physics has clear military and power-related objectives, computing, or rather, social computing, has little to no impact. Radar technologies, heavy-load simulations, and prediction networks receive a strong budget from governments (especially US, Russia), while other topics such as how to make the world a better place with technology, has little or no space is either business or government sponsored research.

That is why, in my humble opinion, technology has yet to flourish. Computers today create more problems than they solve. Operating systems make our life harder than they should, office tools are not intuitive enough for every one to use, compilers always fall short of doing a great job, the human interface is still dominated by the mouse, invented by Engelbart himself in the 60′s.

Not to mention the rampant race to keep Moore’s law (in both cycles and profit) at the cost of everything else, most notably the environment. Chip companies want to sell more and more, obsolete last year’s chip and send it to the land fills, as there is no efficient recycling technology yet for chips and circuits.

Unsolved questions of the last century

Like Fermat’s theorems, computer scientists had loads of ideas last century, at the dawn of computing era, that are still unsolved. Problems that everybody tries to solve the wrong way, as if they were going to make that person famous, or rich. The most important problems, as I see, are:

  • Computer-human interaction: How to develop an efficient interface between humans and computers as to remove all barriers on communication and ease the development of effective systems
  • Artificial Intelligence: As in real intelligence, not mimicking animal behaviour, not solving subset of problems. Solutions that are based on emergent behaviour, probabilistic networks and automatons.
  • Parallel Computation: Natural brains are parallel in nature, yet, computers are serial. Even parallel computers nowadays (multi-core) are only parallel to a point, where they go back on being serial. Serial barriers must be broken, we need to scratch the theory so far and think again. We need to ask ourselves: “what happens when I’m at the speed of light and I look into the mirror?“.
  • Environmentally friendly computing: Most components on chips and boards are not recyclable, and yet, they’re replaced every year. Does the hardware really need to be more advanced, or the software is being dumber and dumber, driving the hardware complexity up? Can we use the same hardware with smarter software? Is the hardware smart enough to last a decade? Was it really meant to last that long?

All those questions are, in a nutshell, in a scientific nature. If you take the business approach, you’ll end up with a simple answer to all of them: it’s not worth the trouble. It is impossible, at short and medium term, to profit from any of those routes. Some of them won’t generate profit even in the long term.

That’s why there is no advance in that area. Scientists that study such topics are alone and most of the time trying to make money out of it (thus, going the wrong way and not hitting the bull’s eye). One of the gurus in AI at the University of Cambridge is a physicist, and his company does anything new in AI, but exploits the little effort on old school data-mining to generate profit.

They do generate profit, of course, but does it help to develop the field of computer science? Does it help tailor technology to better ourselves? To make the world a better place? I think not.


« Previous entries