header image
Genome
March 24th, 2009 under Biology, Digital Rights, InfoSec, Life, rengolin. [ Comments: none ]

Would you give away your genome to research? It’s a bit tricky to define what kind of research and who will have access to it to do what…

I would kindly give mine, if it was licensed GPLv3.


Paying tomorrow’s pension
February 16th, 2009 under Biology, Life, Politics, rengolin, World. [ Comments: none ]

Pension plans are always too optimistic, and in this case, being optimistic is not at all a good thing. It’s actually getting the situation worse and, if nothing is done about it, it’ll be impossible to make the work force pay the pension for the huge retired population.

During the 80′s and 90′s we learned in school that European countries’ population pyramid had clear signs of development, because it had low birth rate and high life expectancy. Opposed, of course, to those from Brazil at that time, which was pretty much triangular, especially in the poorest regions.

This is obviously a problem as much more children are being born and dying, due to lack of education of the parents (that have dozens of children rather than a couple) and complete lack of health care. They were adopting the R-selection (as insects and lower organisms), where the more children you have, the higher are the chances of having grandchildren (and so, propagate your genes). It may sound terrible, but if you actually go there and talk to those people, that’s what they say. If you say you only have two children they think it’s an absurd, asking: “what would you do if one or two die?”. It’s not lack of love for all of them, it’s the hard truth they have to live with.

Now, terrible as it is, let’s see the other way around. In a high educated society, with excellent public health care, you normally see couples with none, one or at most two children. Seeing three is ok, but four is an absurd. How can you cope with all of them? Imagine the cost of childcare! (Note that this is no problem for those that have 15 in the situation above). What happens is that, with time, less children become adults and the number of retired people get bigger than those that pay for their pensions.

You may think that you (retired folks) have paid already your public and private pension in the past, but truth is that both the government and the banks already spent your money on something else (probably paying the pension of your parents). They never think soo long term as they ask you to. They force you to think on your own pension when you’re around 30 years old but all that money is being re-invested, lost and getting money from the government to pay the bill. Government money (from your tax and pension payments) were actually to pay other bills they had in the past, and they hope they’ll have money in 30 years to pay yours.

The big problem is that, today, the number of employed and retired people are still similar, but in 50 years it’ll be very unequal. With better health care (as we all expect), with stem cell research, gene therapy, cloning and other wonders of modern medicine we’ll probably be immortals by the end of the century. How can a small group of people between 20 and 65 years can ever pay for the pension of 65 until 200 years old? We don’t have to go so sci-fi, nor so distant in the future, some predictions are telling that the size of the work-force is going to be much smaller. Either the pensions payments go up or it’ll be impossible to pay up.

Have more children?

Until now the answer is “Have more children!”. Lots of couples in “baby-age” nowadays are having more than three children. They do it because, in developed countries, it’s cheap. Health care is free, schools are free, medicines and most services are free too. Who is paying for that? All of us. What happens with having more children is that, not only the work force is paying for the pension of the old, but also for the joy of the young. If it’s already a disaster to rely on such a small work force to pay the pension, how fair is it to demand them to pay for the young too?

But there is another, even bigger, question: Isn’t the population already big enough? Can we ever give decent food to every single living being (including animals, of course) that already exists in the world? Do we really need more? Shall we let people kill babies in China with the one-child policy while we have joy with our 10 children? If we really need those babies, shouldn’t we be adopting the “unwanted” Chinese, Ethiopian, etc?

Well, I particularly don’t believe in cheap charity. As my mother always said (and stuck for life in my mind): “Give the fishing pole and teach them how to fish”. So, I still think we should promote education and health care for countries in need so they can also have a population pyramid like the developed countries, but the policy of children, pension and taxes has to change. Of course, education and health care do take some time to evolve, and the children on those countries today won’t benefit from that, so plain old charity IS also fundamental to help those regions.

Managing the retirement age

People’s health is better today that it was 30 years ago. More and more people today retire older and older (quick Google for “increase retirement age” and you’ll see), and some countries are even increasing the official retirement age. That helps a lot, of course, but it’s only temporary and can work against the people. What happens, for instance, if the average retirement age decreases from one year to another? Would the official age reduce too? Is it fair for everyone, between one year and the other? I don’t think so.

One possible solution is to provide incrementing retirement payments, proportional to age and external remuneration. Say I turn 55 and, because of health problem, I need to reduce my work load by one third. I should be able to get one third of my retirement and keep on working, until I need another break and get, say, half of it by the age of 65. I could have gotten the full amount, but because I’m still working (or getting funds from elsewhere), I only get the amount proportional to what I was earning before and am now.

In numbers: With 55, I’m earning 60K a year. I have to work only 2/3 and therefore get only 40K. My pension is total of 30K, and 1/3 is 10K, so my new salary is 50K. With 60 years I need another break, so my new salary is 1/2 (30K) plus 1/2 of my pension (15K) = 45K. If I stop completely, I’ll only receive the 30K or my pension. Of course, if you want more you can always make a private pension plan and trust your bank won’t go bankrupt in the next 30 years.

Why this is fair?

  1. If you’re still working full steam you should not get money from the government.
  2. If you still want to work but can’t full time, you should get a proportional help from the government, but only what the government can afford to pay
  3. If you can’t work at all, you should receive the full amount, exactly what the government already pays you today

This is just an example of how things can be worked out, not intended to be extensive not exhaustive. There are plenty of room for good ideas, we just need to get people talking about the alternatives rather than only thinking about how to get MORE money.

Why is retirement SO important?

Simply because there is just too much people in the world. Malthus would say: “Kill’em all”. I’d rather say: “Don’t let them be born at such an enormous rate”. If the solution for the future recession is having more babies, we’ll get ourselves into yet another one, much worse, in the next generation, like a snowball.

We have to stop having babies right now, deal with the consequences right now and hopefully in the future, our grandchildren will be better off. According to the CIA, the world population has just passed 6.7 billion people. With birth rate at 20/1000 and death rate around 8/1000 (same source), it’s not going to lower so soon. Raising 2% per year and with mortality rate extremely lower than in nature (which varies a lot, but seldom reach 0.8%), it’s very likely that in a few decades we’ll be the only animal on the planet. In a few centuries maybe the only living being (if you can say so).

Will we discover how to do photosynthesis with melanin? Or will we become cannibals?


Ad infinitum
February 12th, 2009 under Algorithms, Devel, Life, OSS, Physics, rengolin, World. [ Comments: none ]

Quality is fundamental in any job, and software is no exception. Although fairly good software is relatively easy to do, really good software is an art that few can truly reach.

While in some places you see a complete lack of understanding about the minimal standards of software development, in others you see it in excess. It’s no good either. In the end, as we all know, the only thing that prevails is common sense. Quality management, all sorts of tests and refactoring is fundamental to the agile development, but being agile doesn’t mean being time-proof.

One might argue that, if you keep on refactoring your code, one day it’ll be perfect. That if you have unit tests, regression tests, usability test (and they’re also being constantly refactored), you won’t be able to revive old bugs. That if you have a team always testing your programs, building a huge infrastructure to assure everything is user proof, users will never get a product they can’t handle. It won’t happen.

It’s like general relativity, the more speed you get, the heavier you become and it gets more difficult to get more speed. Unlike physics, though, there is a clear ceiling to your growth curve, from where you fall rather than stabilize. It’s the moment when you have to let go, take out what you’ve learned and start all over again, probably making the same mistakes and certainly making new ones.

Cost

It’s all about cost analysis. It’s not just money, it’s also about time, passion, hobbies. It’s about what you’re going to show your children when they grow up. You don’t have much time (they grow pretty fast!), so you need to be efficient.

Being efficient is quite different on achieving the best quality possible, and being efficient locally can also be very deceiving. Hacking your way through every problem, unworried about the near future is one way of screwing up things pretty badly, but being agile can lead you to the same places, just over prettier roads.

When the team is bigger than one person, you can’t possibly know everything that is going on. You trust other peoples judgements, you understand things differently and you end up assuming too much about some of the things. Those little things add up to the amount of tests and refactoring you have to run for each and every little change and your system will indubitably cripple up to a halt.

Time

For some, time is money. For me, it’s much more than that. I won’t have time to do everything I want, so I better choose wisely putting all correct weights on the things I love or must do. We’re not alone, nor is all we do for ourselves, so it’s pretty clear that we all want our things to last.

Time, for software, is not a trivial concept. Some good software don’t even get the chance while some really bad things are still being massively used. Take the OS/2 vs. Windows case. But also some good software (or algorithms or protocols) have proven to be much more valuable and stable than anyone ever predicted. Take the IPv4 networking and the Unix operating system (with new clothes nowadays) as examples.

We desperately need to move to IPv6 but there’s a big fear. Some people are advocating for decades now that Unix is already decades deprecated and still it’s by far the best operating system we have available today. Is it really necessary to deprecate Unix? Is hardware really ready to take the best out of micro-kernel written in functional programming languages?

For how long does a software lives, then?

It depends on so many things that it’s impossible to answer that question, but there are some general rules:

  • Is it well written enough to be easy to enhance to users’ request? AND
  • Is it stable enough that won’t drive people away due to constant errors? AND
  • Does it really makes the difference to people’s lives? AND
  • Are people constantly being reminded that your software exists (both intentionally and unintentionally)? AND
  • Isn’t there something else much better? AND
  • Is the community big enough to make migration difficult?

If you answered no to two or more questions, be sure to review your strategy, you might already be loosing users.

There is another path you might find your answers:

  • Is the code so bad that no one (not even its creator) understand it anymore? OR
  • The dependency chain is so unbearably complicated, recursive and fails (or works) sporadically? OR
  • The creator left the company/group and won’t give a blimp to answer your emails? OR
  • You’re relying on closed-source/proprietary libraries/programs/operating systems, or they have no support anymore? OR
  • Your library or operating system has no support anymore?

If you answered yes to two or more questions, be sure to review your strategy, you might already be on a one-way dead-end.

Ad infinitum

One thing is for sure, the only thing that is really unlimited is stupidity. There are some things that are infinite, but limited. Take a sphere, you can walk on a great circle until the end of all universes and you won’t reach the end, but the sphere is limited in radius, thus, size. Things are, ultimately, limited in the number of dimensions they’re unlimited.

Stupidity in unlimitedly unlimited. If the universe really has 10 dimensions, stupidity has 11. Or more. The only thing that will endure, when the last creature of the last planet of the last galaxy is alive is his/her own stupidity. It’ll probably have the chance to propagate itself and the universe for another age, but it won’t.

In software, then, bugs are bound to happen. Bad design has to take part and there will be a time when you have to leave your software rest in peace. Use your time in a more creative way because for you, there is no infinite time or resources. Your children (and other people’s children too) will grow quick and deprecate you.


Scientific explanation about the Force
November 17th, 2008 under Fun, rengolin, Science. [ Comments: 2 ]

Before the second trilogy (actually the first three films) came, the force was something spiritual that some people had more than others. As Obi-wan described: “an energy field created by all living things, that surrounds and penetrates living beings and binds the galaxy together”, the force was magical and intended to be interpreted as some form of God’s will.

Then the first film came with the midi-chlorians non-sense, trying to please religious as well as sceptical people, but failed to explain why midi-chlorians would please the gods more than normal cells would. After all, aren’t we all “sons of God”? Apparently, only the midi-chlorians were…

Anyway, getting rid of all that God stuff, I came up to a perfectly rational explanation of how the midi-chlorians work (not that I like them more than the energy field).

It’s actually quite simple. As Qui-Gon Jinn explains to Anakin when he was just a boy (before the pod race), the force helps you predict when things are going to happen, so you can avoid them before they actually happen.

Throughout the film, Jedi are always happily (and effortlessly) avoiding all moving boulders, laser shots, attacks from behind, and things like that. They can easily avoid danger but rarely love. Anakin couldn’t avoid fallnig in love with Padmé, not even the force, for he was the chosen one, could help him with that matter.

So, as it’s shown over and over on all six films, the force helps you avoid bad things, not good things. This brings me back to the famous axiom that we all know to be true, but was beautifully postulated by Douglas Adams:

Axiom #1: “Nothing travels faster than light, with the possible exception of bad news, which follows its own rules”.

Now, if you’re following my thinking you’ve guessed already. Midi-chlorians are nothing more than “bad news detectors“. If you haven’t been in sync with recent physics you might be puzzled, but the fact is that faster-than-light travel actually goes back in time!

Now, if midi-chlorians are bad news detectors, it’s perfectly clear that they will detect them in the past! So, you (in the past) will detect (bad) things that are about to happen, like: “Your head was just smashed by that boulder” or “Darth Vader has just cut your head off with his light sabre.”

Being trained in the Jedi art is to be able to understand this information faster than they do actually happen, otherwise you’re a dead Jedi.

Disturbances in the force

Now, you can often see Jedi masters saying “I sense a disturbing in the force” when some serious shit happened elsewhere in the galaxy but not a single master (not even Yoda) sensed that Obi-wan was in danger when he went after Jango Fett. He had to send a crappy message through Anakin to the high council in Coruscan to be heard.

This reinforces the idea that the midi-chlorians are detectors, and that the detection quality (or precision) depends on the distance of the event and the strength of the original signal.

What about the rest?

It still doesn’t explain how a Jedi can move boulders in the first place. Nor how can the light in the light sabre be confined to a limited range and interact with light from other sources.

Indeed, it’s all connected. We cannot throw away a very good theory like that just because it doesn’t address all the points of reality. Therefore, we force reality to fit our model, as usual.

So, the light sabre is not made of light, but some condensed bad news, confined by a midi-chlorian rich crystal. As we all know, bad news comes in bunch. A bunch of bad news is worse than just bad news, so when two sabres hit each other, sparks comes out of them.

Also, some bad news won’t cope with other bad news. Like, bad news for a Jedi is a Jedi dead, which in turn, is a good news for a Sith. So, when the sabre of a Jedi clash with the sabre of a Sith, the universe conspire to not allow them to co-exist in the same space, otherwise the whole universe will cease to exist in a picosecond. Pretty much the same way the black holes protect our universe from singularities.

In a similar way, Jedi (and Sith) can lift thing just by thinking of doing some really bad things to the universe just above the boulder. That thinking will make the universe emit help signals to every Jedi or Sith around. Emissions must carry energy, otherwise they wouldn’t be detected by anyone. Loosing energy makes the space around the boulder have a negative pressure (of energy or mass) and therefore move the object towards it.

Because bad news travel in the past, you don’t have to actually do anything to the universe at all, as thinking to do something in the future will act in the past (your present) and lift the boulder right now. If you keep doing that in straight lines you can actually make it move in any direction you want.

As confirmation of this statement, watch the films again and see the faces of Jedi masters moving boulders (except for Darth Vader, of course, we can’t see his face). Yoda lifting Luke’s ship or protecting Obi-wan and Anakin from the pole Count Dooku threw at them cowardly to escape in his cool ship.

They all do pretty bad faces. They’re obviously thinking some serious shit on the universe around things. I can almost hear Yoda thinking about the air above Luke’s ship: “I’m going to transform all your atoms into plasma soup and rip your space-time continuum and mix it with a Tom Jones’ album”. That would freak me out for sure!


On Knowledge and Power
October 14th, 2008 under Politics, rengolin, Science, World. [ Comments: 7 ]

Knowledge was always hand in hand with power. Still is, but recently there seems to be an unusually high value, higher than most concrete things, like land. The last 10 years of the financial market shows us a bit of this shift.

In the beginning…

… there was land. The old empires, from Sumer to Mongols, had a big fixation on land. The more the better. It was quite obvious, more land always means more food, slaves and tax payers. During that period, though, much was achieved on science. Astronomy, mathematics and philosophy were the biggest advances from that age, and they had a lot to do with power, as all good kings had their own good scientists around.

But there was something missing on that connection… The scientist had the power to give advices but the kings had the power to ignore them. Astronomy was entangled with astrology, chemistry with alchemy, biology with religion… The true scientist didn’t have any power whatsoever, as kings always liked best those that would say everything would be all right.

Land is not enough (aka. knowledge goes dead)

After the first period of land-setting, when all kings and landlords had their share, it was obvious that they needed a new coin to get richer. With the collapse of the trade network during the (so called) dark ages, new forms of power came to surface. Faith was by far the greatest. The catholic church (and lots of sub-divisions of it) became the most powerful entity world has known so far. This power comes from the opposite of knowledge, unfortunately, and many scientists lost their lives fighting against it.

Other things were also highly valuable, like gold and gems, vassals and slaves, soldiers and castles. And they had lots of them. With the discovery of the new world, there was a new boost for land, but the old emperors were smart already and knew that it was only a matter of time to consume all that land.

It was actually easier to work it around, when the Spanish found an unbelievable amount of gold on Central America. Most colonialists started to ripping off their colonies of whatever they could find, and knowledge, science or wisdom is hardly ever associated with power in that period.

People have brains, after all

Renaissance fighting bravely the dark ages (for science, at least), came the age of enlightenment, when science had, once again, its role on power. Descartes, Newton and many others were not only digressing, but defining the intrinsic mechanisms of the universe. Later on, Darwin would set the final course for life, and Adam Smith and Karl Marx would define the next centuries in politics and economy.

Those thinkers had a huge power in their hands, they were shaping how we understand life, the universe and everything, but yet concrete values were still concrete. Money was more valuable than ever, fact, but land was still a stable market. Trade routes, consumers and the food market was still at the top of most governments.

Image is everything…

When we get to the 20th century that things start to get fuzzy. The consumer market turned into the most important thing in the world. More than land, trade routes and food, consumers would buy anything. If they don’t need it, you can advertise as fundamental to their existence and they will buy it. Advertisement surpassed even faith in matters of power. It doesn’t matter your religion, skin colour, place of birth, as long as you keep buying. See the fantastic Story of Stuff to know more about it.

Nevertheless, science didn’t stop being important to power. The atomic bomb and the impressive developments on computing is a clear outcome of that. It was so important that the image of the scientist changed from the weird guy in the dark room to the visionary guy on wheelchairs. The computer nerd image changed from the long-bearded-large-glasses weirdo to the charming multi-billionaire on his private cruiser.

People are now trying to become smarter for some time in order to reach this grail, a clear demonstration of this power.

But with this power also comes corruption. Like in the old days, pure science is a rare myth. Governments will always prefer to invest in science that has a solid return in money.

The last 10 years and the image of knowledge

Even though Wall Street assured the world that the crisis of 1929 would never happen again, banks lending more than they should made a new crisis this year. Other crisis happened in the late 90′s and early 2000. The problem this time is the image of knowledge.

In the late 90′s, the trust on the power of the internet (a technological and scientific concept) was so great that many old investors got greedy enough to spend millions on crap or non-existent projects. The usual risk is invest in 10 to get 1 good return, but in this case the return was close to nothing. The image was everything.

A Harvard PhD’s paper was enough to release half-million investments. Closer to the dot-com bubble‘s climax, even smart kids would get their funding anyway, leading to the collapse of the whole internet and technological market.

Speaking of image, what better case than Enron’s? They sold the image of electricity, gas and even broadband! Today we call this vapour-ware, and they managed to make billions only on that. Fooling the government, all major banks in the world and consumers.

Short selling was again the cause of the new financial crisis. Blamed also for the 1929 crisis, it consist in selling something you will have in the near future, as in, selling before you buy. Two things can happen wrong with that:

  1. Chain of short-selling: when you sell to someone who will sell to another person (again and again) before you even bought it in the first place. It’s not hard to see that this is a recipe to disaster. This was responsible for the 1929 and the current crisis.
  2. Not buying at all: As soon as you get the money you don’t actually have to buy the thing anyway. You just pretend to have it and delay the delivery. You can also borrow from someone else and give it to the other, in a circular dependency and never (ever) having to actually buy anything at all. Enron and the internet bubble were cases like this.

What’s the knowledge’s role on that?

Simple: Knowledge is difficult to acquire and accumulate. It’s also quite often difficult to test and assure consistency throughout all the scientific domain. As with every single program written, it’s impossible not to have bugs. There is no such thing as a perfectly safe system.

Nobel prizes were won defining “the rules” of short-selling. When such beautiful differential equations are demonstrated by famous professors and the whole economic community laureates this very idea with a Nobel prize, it’s quite difficult to be sceptical about it.

The pen is mightier than the sword, knowledge is mightier than land. Houses lost their real value and began spiralling to imaginary prices. Banks hoping for increasing prices forgot that it was all a dream and lent more money than they had, and it all ended in this.

Quants, locked in their hedge-funds offices, with pens and computers, dictates the future of the market. They change the way we, non-investors, buy houses to live and raise families.

In turn, computer nerds define the way people buy clothes and books, search for knowledge and talk to their granny and grand-children. All this technology and science is shaping the world of tomorrow. It’s defining how we think, who we are and how our children will be.

Do your part!

If you have this power, do your part. If you’re a quant, do it with responsibility. If you’re a programmer, think about the future. Think about the world tomorrow, not just your pocket today. Freedom is more important than money. Education, health and security is more important than the financial market. Think on the planet, think green!

Above all, please be sensible. There is no win-win situations, someone (or ultimately Earth) will always loose. And the more you gain, the more they (or it) will loose.


Calliper, chalks and the axe!
September 10th, 2008 under Algorithms, Devel, Physics, rengolin. [ Comments: none ]

Years ago, when I was still doing physics university in São Paulo, a friend biochemist stated one of the biggest truths about physics: Physicist is the one that measures with a calliper, marks with chalk and cuts with an axe!.

I didn’t get it until I got through some courses that teaches how to use the mathematical tools available, extrapolate to the most infamous case, than expand in a series, take the first argument and prove the theorem. If you get the second argument, you’re doing fine physics (but floating point precision will screw up anyway).

Only recently I’ve learnt that some scientists are really doing a lot by following in the opposite direction. While most molecular dynamics simulation are going to the quantum level, taking ages to get to an averagely reasonable result (by quantum standards), some labs are actually beating them in speed and quality of results by focusing on software optimizations rather than going berzerk on the physical model.

It’s not like the infamous Russian pen (which is a hoax, by the way), it’s only the normal over-engineering that we normally see when people are trying to impress the rest of the world. The Russians themselves can do some pretty dumb simplifications like the cucumber picker or over-engineering like the Screw Drive that, in the end, created more problems than solved.

Very clear, in software development, the situation can be as bad as that. The complexity of over-designed interfaces or over-engineered libraries can render a project useless in a matter of months. Working around would increase the big ball of mud and re-writing from scratch would take a long time, not to mention include more bugs than it solves.

Things that I’ve recently seen as over-engineering were:

  • Immutable objects (as arguments or on polymorphic lists): When you build some objects and feed them to polymorphic immutable lists (when creating a bigger object, for instance) and then need to change that afterwards you have to copy, change and then write back.
    This is not only annoying but is utterly ineffective when the list is big (and thousands of objects need to be copied back and forth). The way out of it is to use the bridge pattern and create several (RW) implementations of your objects and lists and whatever you have but that also increases a lot on code complexity and maintenance.
    My view of the matter is: protect your stuff from other people, not from yourself. As in “Library Consistent” or “Package-wise Consistent”.
  • Abuse of “Standard algorithms“: Ok, one of the important concepts in software quality is the use of standards. I’ve written it myself, over and over. But, like water, using no standards will kill your project the same way as abusing of them.
    So, if you create a std::set that gives you the power of log(N) searches, why the heck you’d use std::find_if ( begin(), end(), MyComparator() );, that gives you linear searches? Worse, that find was actually before each and every insert! std::set guarantees at least N.log(N) speed on insertion, but the “standard fail-safe assurance” was giving it N².log(N). For what? To assure no duplicated entries were ever inserted in the set, what was yet another thing guaranteed by the default container in question.
    All in all, the programmer was only trying to follow the same pattern over the entire code. A noble cause, indeed.

Now, I’m still defining what’s worse: over-engineering or under-engineering… Funny, though, both have very similar effects on our lives…


Silly project of the week: molecule dynamics
July 9th, 2008 under Algorithms, Devel, Physics, rengolin. [ Comments: 1 ]

This week’s project is a molecular dynamics simulation. Don’t get too excited, it’s not using any of the state-of-art algorithms nor is assembling 3-dimensional structures of complex proteins. I began with a simple carbon chain using only coulomb’s law in a spring-mass system.

The molecule I’m using is this:

Molecular Dynamics

The drawing program is quite simple and wont work for most molecules, but for the 2-dimensional simple molecules (max. of 3 connections per atom) it kinda works.

Later on, putting the program to run, each atom “pushes” all others electrically and the spring “pulls” them back. A good way to solve that is to say that q1 . q2 / x² = – k . x = m . d²x/dx² (where x is a vector) and integrate numerically using Runge-Kutta.

But that’s my first openGL program, so I decided to go easy on the model and actually see it pseudo-working with an iterative-based simulation following the same equations above. This picture is a frame after a few iterations.

Quoting its page: “As this simulation is not using any differential solution, the forces grow and grow until the atom becomes unstable and break apart. Some Runge-Kutta is required to push the realism further.

UPDATE:

The webpage of the fully-functional prototype is HERE.


What is bioinformatics anyway?
June 24th, 2008 under Bioinformatics, Devel, rengolin. [ Comments: 4 ]

After almost three years in the field I’m pretty sure I have no idea. A few months ago I though I knew and wrote an essay about software quality on bioinformatics but I now figured out that, even though those things might make sense to the rest of us, for bioinformatics it doesn’t.

Wikipedia (which have a much higher quality than many papers I’ve read) defines software as: “a general term used to describe a collection of computer programs, procedures and documentation that perform some tasks on a computer system”. It also defines programming as: “the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs”.

So, every one that writes programs (let’s forget about documentation, tests, maintenance etc for now) is a programmer. But a computer programmer IS NOT a software engineer. Programmers can write as much code as they want but without formal definitions, metrics, good design decisions and practices, tests, documentation and so on, they are useless as ants without pheromone.

Quick tip: Whenever you see a job for a software engineer in a bioinformatics institute, beware: It generally means a developer to maintain random code and make random changes in random environments.

So what?

I might not have a clue about what bioinformatics is, but now I’m pretty sure what it ISN’T: Software Engineering. You will find a huge amount of code, scripts, programs, databases but rarely find a fair piece of software. Therefore, my previous ideas could be valid for software quality, but not at all to bioinformatics.

Don’t get me wrong, I know some bioinformaticians (and programmers around) that understand the basic ideas about software and quality and why we should have them, but the whole structure, the scientific community, the people that give them money, have no idea whatsoever of what software really is or where it fits in the loop.

Still, bioinformaticians are getting half-programming and half-biology degrees, on two fields that each has more to know than the whole humanity can hold on their brains added up. How is it possible (and fair) to put those poor guys to work on such sub-human conditions, without any guidance or quality control, without any clue, in fact, to what they really should be doing in the first place.

Some of them come out pretty well, so well that they abandon the field and go work on better companies, with much better software strategies, proper engineering, scientific development in the right place (sandboxes) and production code done by real engineers with solid experience in mission-critical environments.

In the end, it leaves bioinformatics (to be fair, the informatics part only) in the hands of inexperienced people in all sorts of fields and levels, students writing production software, people that never saw a mission-critical environment coordinating databases, filesystems and development, with one bad decision after the other.

Is it just a rant, then?

No, not really. It’s a liberation. For a while I struggled to understand the motives behind those weird decisions. I knew that, in every industry, you have a whole set of values and people can, sometimes take completely awkward decisions, which turns out to be the right one. I’ve seen it happening when moving between jobs, especially when I worked at Yahoo! (big company, big culture). But with time, the awkward decisions still sounded awkward, even after considering all the new information I had.

Other people got fed up with all this and left, one after the other. I talked to them, and the answer was always the same: random (generally bad) decisions, ego in astronomic proportions and zero technical knowledge from all parts. Now I’m leaving for good and you won’t need to ask me why, will you?

I generally need a very good reason to leave a work place. I was feeling out-placed but couldn’t leave without a very good reason, but now I got a good bunch of them…

A liberation indeed!

Is there a way out?

Seriously, no. In 10 years definitely no. In 15 quite likely no. In 20, maybe… but things must start changing now!

Being optimistic, assuming they stop running like headless chickens, they would still need a strong guidance, which is virtually impossible to happen because of the strong ego of scientists in general. Bioinformatics exists for decades already, who is the software engineer that will tell them they’re doing all wrong?

Besides, the people that grant them money (governments) have no clue about software engineering (nor they should) and they will keep sending money every year, as long as, in the reports, they pretend to be doing great things. In fact, most could’ve been done in a few weeks with two or three people prepared to compromise.

Who doesn’t want a job where they can do almost nothing at all, get paid every month without even the remote fear of loosing their jobs and still pretend they’re doing great things? Who say no to this and start working for real gets a really bad reputation… While this win-win situation keeps going, there is little or zero chance of doing real stuff in the field and bioinformatics is doomed to constant failure and ineffectiveness.

At last, it’s not a specific problem, where you can just change a couple of people and everything will be all right, as many believe. This is nobody’s fault, it’s just the way the two fields: biology and informatics, joined together some decades ago and was never straightened. If there is a way out, I’d be very glad to see and will congratulate those who managed to do it, but this is much more politics than software development and I am, very luckily, just a programmer…


Book: Flat and Curved Space Times
May 8th, 2008 under Books, Physics, rengolin. [ Comments: none ]

The first time I read this book was during my special relativity course at university. I couldn’t understand a thing the teacher was saying (probably because his explanations were always: “you won’t be able to understand that”) and I needed to replace a 35% grade I got in the first exam to complete the course.

Well, hopeless as I was, headed to the library in search of a magical book (other classmates were helpless as well) and found this one. The magic in it is that, instead of trying to force the Lorentz transformations down the throat first and then explain the basic principles of relativity, it does it by simply showing the topology of the space and assuming that the speed of light is constant (pretty much the same path Einstein took in the first place).

So, the first chapter has no equations whatsoever, only graphics with light waves going back and forth and he derives the light-cones automagically from it, what happens to the “world” at high speeds and how does it affect our senses of reality. It goes on for all kinematic principles only using Newton equations and gamma. Lorentz transformations only appear in the fourth chapter.

After that, not only I could understand relativity as a whole, but I also got 90% grade on the final exam! It’s an old (88) book but time has no meaning for a very good book, especially for a subject that hasn’t changed that much in the last decades.

I recommend it to physics-wannabe as well as lay people with little background in math, and if your teacher is as hopeless as mine was, ignore him and read this book.

Click here for the US version.


Serial thinking
March 11th, 2008 under Algorithms, Computers, Devel, Fun, Physics, rengolin. [ Comments: 2 ]

I wonder why the human race is so tied up with serial thinking… We are so limited that even when we think in parallel, each parallel line is serial!

What?

Take the universe. Every single particle in the universe know all the rules (not many) that they need to follow. On themselves, the rules are dumb: you have weight, charge and can move freely round the empty space. But join several particles together and they form a complex atom with much more rules (combined from the first ones) that, if combined again form molecules that form macro-molecules that form cells that form organs that form organisms that form societies etc. Each level makes an exponential leap on the number of rules from the previous one.

Than, the stupid humanoid looks at reality and says: “That’s too complex, I’ll do one thing at a time”. That’s complete rubbish! His zillions of cells are doing zillions of different things each, his brain is interconnecting everything at the same time and that’s the only reason he can breathe wee and whistle at the same time.

Now take machines. The industrialization revolutionized the world by putting one thing after the other, Alan Turing revolutionized the world again by putting one cell after the other in the Turing tape. Today’s processors can only think of one thing after the other because of that.

Today you have multi-core processors doing different things but still each one is doing things in serial (Intel’s HyperThreading is inefficiently working in serial). Vector processors like graphic cards and big machines like the old Crays were doing exactly the same thing over a list of different values and Quantum computers will do the same operation over an entangled bunch of qbits (which is quite impressive) but still, all of it is serial thinking!

Optimization of code is to reduce the number of serial steps, parallelization of code is to put smaller sets of serial instructions to work at the same time, even message passing is serial on each node, the same with functional programming, asynchronous communications, everything is serial at some point.

Trying to map today’s programming languages or machines to work at the holographic level (such as the universe) is not only difficult, it’s impossible. The Turing machine is serial by concept, so everything built on top of it will be serial at one point. There must be a new concept of holographic (or fractal) machine, where each part knows all rules but only with volume you can create meaningful results, where code is not done by organizing the high-level rules but by creating a dynamic for the simple rules that will lead to the expected result.

How then?

Such holographic machine would have a few very simple “machine instruction” like “weight of photon is 0×000″ or “charge of electron is 1.60217646 × 10^-19″ and time will define the dynamics. Functions would be a pre-defined arrangement of basic rules that must be stable, otherwise it’d blow up (like too many protons in the nucleus), but it wouldn’t blow up the universe (as in throw exceptions), it would blow up the group itself and it would become lots of smaller groups, up to the indivisible particle.

The operating system of such machine should take care of the smaller groups and try to keep the groups as big as possible by rearranging them in a stable manner, pretty much as a God would do to its universe when it goes crazy. Programs running on this operating system would be able to use God’s power (GodOS libraries) to manipulate the groups at their own discretion, creating higher beings, able to interact, think and create new things… maybe another machine… maybe another machine able to answer the ultimate question of Life, the Universe and Everything.

I know letting the machine live would be the proper way of doing it but that could take a few billion years or I’ll be quite tired of engineering the machine and it’s OS and I’ll just want to the the job done quickly after that…

Why?

There is a big fuzz about Non-Polynomial time problems (NP-complete), those that can’t be solved in a reasonable (polynomial) time. The classic example is the travelling salesman problem where a salesman has to go to each one of a number of cities. Which is the best path to follow to visit all of them in the smallest distance possible? With 3 or 4 it’s quite simple but when you have lots like 300 it becomes impossible for normal (serial) computers to solve.

Another problem quite fancy is the Steiner tree problem, where you have some points and you want to connect them using the least amount of strings. This is as complex as the problem above, can take forever (longer than the age of the universe) for relatively small sets of points, but if you use water and soap the problem is solved almost instantly.

Of course, soap films cannot calculate the last digit of PI but because every part of it know a small list of basic rules (surface tension increased by the soap molecules derived from opposite charges between atoms) every particle of the machine works together at the same time and the result is only achieved because the dynamic of the system has it’s least energy (least amount of strings) in that state.

It’s true that today’s computers are very efficient on working on a wide range of problems (thanks to Turing proving the classes of problems his tape could solve) but there are some that it can’t, given that we only have a few billion years yet of universe to spare. Such problems could be solved if there was a holographic machine.

UPDATE:

More or less what I said was practically applied here. Thanks André for the link, this video is great!


« Previous entries Next entries »