debug and refactor
Aug 13th, 2008 by ellen
Programmers know that when a software system grows into a certain size, bugs are not avoidable. We write and run all kinds of tests for quality control. Still, error-free is extremely difficult to achieve. The only constant in the software business is “change”. We debug, we refactor, we rewrite a system from ground-up if affordable or had to.
At the moment, the political/cultural system in China is just like a software system whose codebase is worlds larger than any Linux kernel or Windows-whatever-version. There are all kinds of bugs and miserable architectural failures in this system: extreme difference of the financial situations between the rich and poor, abuse of people, lack of press freedom, the stupid great firewall, environment pollution, over-populated cities and under-populated villages … this list goes on and on, it reminds me the looooooong bug-list and todo-list of some FOSS projects that I personally involve in. Just like a software project team, the Chinese people and government do maintain an error-database. The challenges and miserable architecture failures are well persisted and constantly being checked. Debugging, patching, and refactoring are happening all the time.
If you are a programmer, you know you cannot change the codebase too much at once. Correct a bit, run tests, then correct another bit. When I just started to work in a software house, my managers kept kindly telling me how much risk there is to change a running system. Before I make any significant change to the legacy codebase, I must raise the
proposal to the whole team and the initiative would have to be discussed first. Risks must be evaluated by people that have a variety of interests, from very different perspectives. The size of my company is relatively compact. Nevertheless, this change-management process still takes time. The China-system is so incredibly complex. So many
components are half-baked, written by people who cannot program at all, or people with malicious intentions of spreading virus. There are so many different interests to balance out when a change-proposal is raised. If you are a programmer, you know how difficult it could be.
Democracy is a good thing. A well-designed, democratic system is much more reliable than brilliant and lovable personal qualities of one or twelve top leaders. Sometimes it might turn out inefficient if something has to be done, but when it comes to avoiding humanity disasters, it works worlds better than any other systems. The happiness, freedom and satisfaction of individuals are much, much more valuable than any skyscraper or stunning ceremonies, after all. Chinese people deserve democracy, the sooner, the better. However, while throwing away the old codebase all at once would just cost a lot of money for software projects, throwing away the legacy codebase of the China-system might mean decades of bloody regional-conflicts, tens of millions of people’s lives, might mean the setback of the macro
economy for decades. The risk is too huge, cost too heavy. Anyone who really cares about humanity won’t feel comfortable to say “let’s sacrifice this generation, xxx millions of people’s lives and enjoy the total freedom in 30 years in poverty.” So, the current option that the Chinese government is carrying out is refactor. Refactor deeply flawed architectures, component by component. So far they have done the presentation tier pretty well. Hopefully they are awaken enough to continue work hard on fixing the logic tier and the persistence tier. During the refactor, many tests will fail. Bugs will keep being exposed. As a software engineer I hope there will be a day when the component called democracy is seamlessly integrated. I hope there will be a day the China-system goes beyond a colourful and flashy Demo on the surface, but also has a beautifully engineered kernel. I hope there will be a day, most of the Chinese people can afford pursuing things that are beyond bread and money. For this day to come as soon as possible, Chinese people need to work hard, the government needs to be much nicer to the people than ever and much more strict to itself than ever.
Refactoring is going on, and milestones are kept being delivered. Stay tuned.
