Friday, July 23, 2010

Being politically correct when talking to Jakub

So you happen to be in a situation which involves talking to me. That is fine. I like to talk to people. There are, however, certain phrases that can easily alienate you as a speaker from me during a dialogue. If you use them you lose all my sympathies and you are basically done. Specifically, these include referring to the Czech Republic as to Eastern Europe or a post-communist country. While the latter simply feels annoyingly outdated 20+ years after the communists have lost it here and is a similar faux pas as referring to Germany or Austria as to post-Nazi countries (now or in 1965), the former is plainly wrong on all scale.

Geographically speaking, Czech Republic surely belongs to the western half of the continent. Looking on the map, the geographical border between western and eastern Europe is somewhere on the line connecting Finland in the north and Greece in the south, passing through Estonia, Latvia, Lithuania, Belarus, Ukraine, Romania and Bulgaria.

Historically and culturally, Czech Republic has been one of the countries in the Central European region. This was long before and now also after the Cold War, when the Iron Curtain and the communist orientation of Czechoslovakia put it to Eastern Europe. However this period was relatively short - only some 40 years - in comparison with the Central European cultural tradition of the country originating in the 17th century.

Politically, Czech Republic is no doubt in the western part of the continent as a full member of NATO and EU.

I prefer referring to my country as to a Central European country and am glad that some organizations, for example CIA, do the same. Unfortunately, there are also organizations, UN for instance, who get it completely wrong and do a favor to the increasingly self-confident Russian foreign policy. I am always ready to advocate for using the politically and geographically correct term Central Europe instead of Eastern Europe as I did and encountered partial success when BBC kept on using "Eastern Europe" in this context. On the other hand, I have recently heard some Czechs employed by one large American IT company to deliberately go with the Eastern European classification of their own country. I simply could not understand that.

Don't get me wrong - I think it is perfectly okay to refer to a geographically Eastern European country, such as Russia, Romania or Greece, as to an Eastern European country. But I can't stand when the term Eastern European is used inappropriately. When used in this way to refer to the countries that were once to the east of the Iron Curtain it has a very stigmatizing connotation which is very politically incorrect from today's perspective. Why should two similarly located Central European countries - Austria and the Czech Republic - be classified differently?

Friday, July 2, 2010

Prevention or post-integration fire-fighting?

I've recently integrated fixes for the following four Solaris bugs:
6957730 cpuid_amd_getids() uses uninitialized variable coreidsz
6957751 nb_fini() leaks memory
6957783 nb_dev_reinit() leaks memory
6957795 Use-after-free in fm_nvlist_create()
which were found, along the following one:
6957739 rankaddr_to_chanaddr() may return undefined value
using the Coverity static checker.

The interesting observation here is that four of the above five bugs (only the use-after-free bug having a good excuse) would not most likely make it to the source gate at all, had the build process utilized all possible and available ways of checking for problems like that. In other words, it looks like that during the build process, we are deliberately suppressing some of the most useful warnings and errors such as those about uninitialized variables and code which has no effect. Of course, there is a feeble justification for it. The compilers are sometimes stupid and produce false-positives. So we rather silence those warnings and give no false-positive a chance to spoil our build logs that could stop our integration attempt.

The above bugs are mostly harmless as they appear in de facto unreachable code or in very rarely executed error paths, but two of my older blog entries (here and here) prove my case with real crashes caused by uninitialized variables.

And the solution? Utilize all the warnings, of course. Impossible you say? Certainly not. If you take a look for example at HelenOS, you will see its code base, say 150 000 LOC, being compiled with all warnings on (-Wall and -Wextra gcc switches) and all warnings turned into errors (-Werror gcc switch). Any warning thus has the power to fail the build, forcing the developer to either fix it if it is a real bug or work around it if it is a false positive. I am firmly convinced that working around the false positives is the bearable necessary evil, which many times outweighs the real evils described above.

Even though a time consuming task, enabling the warnings in Solaris (or at least in the onnv consolidation) and fixing what needs to be fixed in order to be able to build again will bring some long-term benefits, such as code quality improvements and software engineers not wasting their time by root causing and fixing bugs that were obvious and should not have been overlooked upon integration.