Thursday, October 29, 2015

"Learn German virtues" - xenophobia just went mainstream

Note: This post is biased from at least two points of view. The author leans heavily towards an emphasis on - presumably - universal human values. The second bias stems from having lived and worked in several countries on one's own steam.

At issue is an OpEd in Frankfurter Allgemeine, in which the author says that concepts condemned as "right leaning" only yesterday are now firmly part of Germany's "Culture of Welcome", in particular learning how to be German, which means not only learning the language but also German virtues.

It is an OpEd, or as they call it around here, a commentary, so what's the big deal about a statement the blogster does not agree with?

This is where the two biases come in.

Some time ago, there was another wave of "learn the German language" pieces in the media, which was kicked off by the intention of the Bavarian conservative party CSU to include a demand that foreigners not only learn German as mandated by law but also speak German at home.

Part of the problem with the mandate and the planned but dropped call to speak German at home is - very ironically - one of the German virtues: being conscientious and execution oriented.
A legal mandate to learn the prevailing local language has been part of the fashion trend in immigration law for a while. In the case of Germany, the virtue of 'sticking with a decision' (the execution part) has become a problem for thousands of non-EU foreigners who apply for a long term visa: you need to produce a certificate. No certificate - no visa.
Exceptions apply to countries of the closer set of Western cultures.

There is not a single refugee coming to Germany who wakes up in the morning saying" I am so happy I don't speak German.

We jumped into "German virtues" without a definition, so let's try to find one. What virtues are we talking about?

This piece from the Huffington Post claims to list 11, but some are synonyms, and they have really three, which they call "successes and virtues": stability, conscientiousness, and Gemütlichkeit.
A further three of the list are worth mentioning: free public education and a socially responsible free market system, the ability to compromise.

Stability
West Germany enjoyed stability since the 1950s. East Germany had its own less well defined stability (after all the needed a wall to keep people in) for some 40 years and went away. The past 25 years of the "re-united" Germany have been pretty stable.


Conscientiousness
In the eye of the beholder. They do execute pretty well, even if the subject or object of the execution is bad.

Gemütlichkeit
We will not even go near this, because a hard to translate word overlaid with some Alpine lederhosen antics is not a German virtue. Gemütlichkeit really means being cozy, comfortable and relaxed. All mammals can do this, even the smaller, more vulnerable ones who are more frequently on high predator alert.

Free public education
Success or virtue, or a bit of both? Germany still has decent system but it has been under attack for decades and faces mounting budget pressure. So, get it while it is still free.
And Germany is not the only country that has such a system.

Socially responsible free market system
Germans brought the world the first modern social security system. That is as big an achievement as it gets. But the country also has the greatest wealth disparity in Europe and the system has seen serious cutbacks. Somewhat simplified, the current German system is a little bit better than "the best from the more progressive U.S. states plus an improved version of Obamacare".

Ability to compromise
The blogster's understanding of compromise may be - again - biased towards a "win-win" type of conflict resolution. Based on this, Germans do not show a remarkable ability to compromise.
They do negotiate and come to solutions, but the relative calm which the media like to highlight as "ability to compromise" is very misleading. Representatives of big organized groups are very good at making back room deals.

So, in any modern society, there are good things and bad things.

Elevating some to "virtues" is at least good PR.

But asking foreigners to acquire any such virtues is condescending at best and really f***ing racist when you express the demand in a less charitable way.

It implies people show up in your society less are than desirable or Imperfect beings that need to be put though some sort of human equivalent of "doggie school" in order to be acceptable.

And that is not acceptable.

No floor plan? There's an app for that: MagicPlan

In a rural area like ours, the floor plans and construction drawings of many houses  have not survived two world wars and the various smaller disasters, like fire or flooding, or inexplicable bureaucratic mishaps. The floor plans of our house, for example, disappeared in 1938 when they were transferred from the county to the regional planning authority.

So, we measured with tape measure, but shouldn't there be an app for that?

If you work with building interiors as a builder, interior designer or in any capacity that entails work with floor plans, the blogster has a favorite app, MagicPlan.
It allows you to make floor plans for individual rooms or complete houses by taking a series of pictures with your smartphone and letting the app to the math.

The company website lists three steps:
1) Take pictures of your room's corners.
2) Fine tune the room.
3) Repeat and assemble into a foor plan.

There are some limitations on how you work and on precision, so for high precision work in very small rooms, keep the old tape measure. Obviously, if your habitat does not have corners, you are out of luck.

Pacing around in a room while taking picture of the corners is also not an option, although they are apparently working one that.

For now, you pick a spot and stand in that same spot while grabbing the corners. Think of it as being your own surveyor's tripod. Not being allowed to move around explains the issues with rooms that have complex shapes, i.e. shapes where not all angles are visible from a single point in the room.

Of course, you can add objects or mark reference points on the plan, which is why the makers of MagicPlan have a CSI version. It certainly sounds better the image of a police officer drawing an ad hoc floor plan on a small notepad.

An unanswered question about the 'CSI' version is whether modifications are logged to show potential later tampering. But that's more for authors of detective novels to worry about than for regular builders or home improvement workers.

Another app by the maker, Sensopia, is MagicMeasure, hailed as a digital tape measure. We have not tried it out.

It does get even fancier than 2D plans with Floorplaner's 3D plans based on MagicPlan.
Wouldn't it be cool if you could feed the data to a 3D printer to produce a wall segment that needs repair?

If the apps work on very small scales, a project with a lot more immediate potential could be reproductions of antique doll houses.

Note: We have no relationship with any of these companies and are not getting paid to write about their products.

Tuesday, October 27, 2015

Relax, Europe: many of the refugees will not stay for long

In the current cacophony around the European refugee crisis, one big aspect gets almost no audience.

The aspect is: many refugees will not stay in Northern Europe.

The nickname of the apartment complex back in the last city in the U.S. the blogster called home was "the United Nations".

People from around the world lived there, it was the first "pied a terre", foothold, for many new immigrants. The last batch the blogster distinctly recalls were people from Bosnia.

Many of them didn't like Germany.

Because the Germans kicked them out of the country in those mid to late 1990s when the thinly veiled xenophobia of German right leaning politicians was not temporarily covered by the citizens' open "Refugees Welcome".

So, those lucky enough to get a US visa, left Germany for the wide open spaces beyond the Atlantic.

Others returned to their home country when the war was over. Again others went to this or that EU country.

If and when the Middle East becomes more livable again, hundreds of thousands of those who made their way to the cold North will return home. Granted, the Middle East is more fucked up - no apology for strong language - than the Balkans.

The known statistical figures may not apply. In the post Half-life of migrants in Germany from June 2013, we tried to look at the then numbers and the duration of residence.

Refugees made up a much smaller proportion of the figures from two years ago, but this does not change the fact modern day immigration is very different from the historical concept.

Despite the now well covered fact that Europe's population is shrinking so much that they could really need all the immigrants they can get, repeat after me: many hundreds of thousands are unlikely to stay.

This, in turn, also makes some of the utterly condescending demands on refugees pretty ridiculous.

The German media have been buzzing with "you need to learn German fast" as well as the "you need to live by our values" mantra. We'll talk about the latter at some point, but the repeated "learn German fast" should be toned down a bit.

Yes, it helps. No, it is not a good idea to make this a condition for treating people well.

Though we reiterate a point made in another post: You have to be a US citizen in order to vote. Yet, there are counties in the United States where voting ballots are made available in other languages, for example Korean.

This is unimaginable in Germany.

Okay, in today's Germany, you can do your written test for a driver's license in English, which is serious progress. 

But the blogster won't hold its* breath regarding ballots or many other areas of life.

We'll check the numbers a few years down the road to see how many refugees stayed around.

* After some initial hesitation, the blogster likes gender neutrality. It also annoys the right people.

Monday, October 26, 2015

The Greedtocracy: Deutsche Post goes from civil service to day labor

It is outright hilarious how the same people who complain about a loss of social cohesion in modern German society have overseen one aspect of just this fragmentation: measures to make the labor market "more flexible".

To be fair, Germany introduced a national minimum wage on 1 January 2015, once again lagging behind pretty much any other industrialized country. There are exceptions to the minimum wage, with the result that many of those who really need it won't be getting it until 2017, and this coincides with a national election year.
The projected January 2016 hike of health insurance premiums by 0.2 to 0.3 will be borne exclusively by workers after the current government killed the 50% split payment share of employers and workers. Packaged in a law that allows workers to switch insurers at will in order to "promote competition" between insurers, the K-Landnews and some real experts warned it was a poison pill for two reasons: health insurance costs do not have a history of going down, and the structure of the industry and the medical providers are set up in a way that defies competition. 

But compared to a death by a thousand cuts, the labor market measures were more like taking a bulldozer to a kids sand castle.

One of the best examples of this is Deutsche Post (DHL). The post WWII German postal service was a government agency combining telephone, mail operations and a bank. Employees were civil servants, both the privileged lifers "Beamte" and regular white collar government employees - the latter paying payroll taxes and social security deductions, the former not.

Starting in the 1980s, privatization began. New hires could no longer join the privileged ranks of "Beamte" but were unionized employees. Telephone operations were transferred into a separate company that is now Deutsche Telekom. To sweeten the deal, regular citizens were offered discounted shares. It is no coincidence that this model was not limited to Germany, British readers will be familiar with it, too.
The career civil servants, who could not be laid off under the German constitution, continued to enjoy their protected status through an expensive accounting trick. The government continued to be their official employer and the workers were permanently assigned to Telekom, which reimbursed the government.
The same approach was applied to the remaining mail and banking operation Deutsche Post, and the majority of banking operation was sold off to Deutsche Bank.
The civil servant workforce is diminishing as more and more reach retirement age. But, as we wrote in an earlier post, it still came in handy in the latest strike at Deutsche Post.
Not having the right to strike (in return for privileged treatment), Deutsche Post called on "volunteers" among them to alleviate the effects of the strike.

But splitting up the workforce did not stop there.

Post offices in small towns were closed in large numbers, their civil servant employees transferred to offices in nearby bigger towns to make up for worker turnover there.
Small town post offices were then handed over to private contractors. From the outside, you wouldn't know: the store signs are the same, the uniforms are the same.

But they are not employed by Deutsche Post.

This meant, we could go to the Post Office and hand in mail during the latest strike.

We are not unionized, we are not on strike.

What happens to the mail?

The driver, also a subcontractor in official colors, would take the mail to the nearest sorting facility, where it would be stored until the end of the strike.

Up until this point of the narrative, we have civil servants, regular employees, subcontractors, and temp workers.

While the unionized worker at Deutsche Post proper are well paid, the subcontactors and temps make less, just above the minimum wage for the lowest.

Enter the day laborers. They are similar to the UK's zero hour contract workers with one exception: The day laborers of Deutsche Post do not even have a contract.

Yes, sounds like the Home Depot parking lot, doesn't it?

Except that Germans don't have Home Depot and are short of Mexicans.

According to the service workers' union, a full-time equivalent of about 10 000 workers, out of a grand total of 180 000, is currently filled by day laborers.

Day labor is exactly how the scheme operates. You get a call, you go in, you sign a  contract for that one day, you work, that's it.

Next time they call, you get another one-day (or shift) contract. Despite the scheme being officially limited to replacing workers who are temporarily unable to work, it is not rare that the worker being "replaced" by a day laborer is actually on the job.

Many day laborers do not dare to go against the policies, but when a case goes to court, it can look like one reported in the article. A worker signed about 200 individual contracts in the year 2014 alone. Given that she had been working under this scheme for seven years, this added up to about 1400 contracts.

So, about 30 years ago, you had a well paid job. Today, some have well paid jobs (management salaries are much higher in the privatized entity), others work as day laborers.


If you ask if service is better and/or cheaper, the answer is no. A Postbank account is expensive as f***. To get your mail forwarded, you pay - it used to be free.
To pick up an undelivered package can add up to a day trip to a green field sorting facility.

But, hey, DHL is a worldwide operator, Deutsche Telekom owns a US mobile phone company, and Deutsche Bank, well, you must have heard of their business practices by now.

Shareholders are happy.

Sunday, October 25, 2015

Ad blockers welcome on this ad supported site

Our tiny space on Google's blogspot displays ads, but we love ad blockers. We use one all the time.

Do not look for a contradiction - there is none. To the blogster, an ad blocker is about choice. A couple of dollars a month toward cost of electricity for running the computer is a "nice to have", and we are happy that those users who do not want to see ads have a simple way to block their display.

Unfortunately, the world of ad blocking is not that simple when sites can pay the makers of an ad blocker to let their ads through, or when ad blockers collect and sell data about site visits. Find another ad blocker, use it until its makers do odd things, then repeat.

Recently, some companies have sued the makers of the popular AdBlock Plus in German courts. Germany is a good place if you want to sue people over intellectual property or "over nothing", as the K-Landnews TheEditor calls intangible things, since German law has been notoriously anti-consumer in this area.

German company Axel Springer, publisher of tabloids and mags - not to be confused with the scientific publishing house - has been particularly aggressive in a all things copyright and went after AdBlock maker Eyeo for two things. The first is the pay for play, or whitelisting, where "non intrusive" ads are let through for a share in ad revenue.

The more aggressive part of the lawsuit aims to have adblockers banned altogether. The plaintiffs argue that adblockers are anti-competitive because they nullify their business model. In the best tradition of German media lawsuits, the plaintiffs arguments rest on paper based reasoning with the aim of transferring old business models unchanged into the digital age.

So, in court, the parties argued over digital ads using the paper model. Digital ads, in this framework, are equivalent to flyers that come with a newspaper.

The Adblock folks say, well, our product allows users to basically throw away the flyers without reading them.

Springer et al claim that the "flyers" never reach the customer, hence the correct interpretation would be "delivery of a damaged product".

The dangers of analog thinking are obvious: the adblock folks ignore that flyers are only one way to do print ads, the other being ads embedded on the newpaper pages. The Springer lawyers didn't catch on to this despite the fact that the flagship BILD Zeitung as well as magazines almost exclusively uses embedded ads.

With the lawsuit not going well for Springer, the publisher decided to talk to the techies and to block access to the BILD site if the visiting browser uses an ad blocker.

Which made the blogster extremely happy because it prevents accidental access to the country's most obnoxious "news" site.

Not to be outdone, some users published a method to circumvent the blocker blocking.

Springer returned the favor by threatening anybody who published this information with a copyright infringement lawsuit. Copyright lawyers smiled about that, so we'll see if some court takes Springer's revenge block seriously.

We can talk forever about ads, whether they are evil, how adblockers should or should not behave, but one action on the part of Springer and other German print folks speaks louder than words.

It is the infamous "ancillary copyright", a law by and for the print chumps to squeeze money from search aggregators who list digital news articles with a small snippet of text and link to the publisher's site.

Despite the fact that only small pieces of teaser text are listed and the listings demonstrably drive huge numbers of readers to the websites, the greedtocracy of German publishers wants to have a piece of overall search engine revenues. The news listings don't come with ads, so they don't generate a cent for the search engines.

Who knows, maybe copyright protection will be extended to 200 years or so to make sure BILD boobies and fear mongering are protected for future generations of shareholders.

[Update 10/26/2015] The superior court (Landgericht) in Hamburg, Germany, has granted a preliminary injunction against Eyeo, the maker of AdBlocker Plus. that prohibits the company to distribute "software code" that allows to bypass the blocking feature on the BILD.de web site and to link to any locations that provide such information.
The Internet Law blog asks if this decision really conforms to copyright law and fulfills the criteria needed for a preliminary injunction.
The decision is a great example of German courts almost by reflex invoking copyright violation when a plaintiff files even absurd claims.

Saturday, October 24, 2015

Plenty of discrimination in "Welcome Refugees" Germany

From our Who scratched my rose colored glasses series.

This post began with a simple: how many refugees will 'my' county have to take in? The answer to this was astoundingly easy. Getting solid numbers is often difficult in Germany unless official statistics record them. Refugee-wise, we are in luck. The county has upwards of 100 000 inhabitants, and recent newspaper reports said that the take in for the year will be around 800, less than 1% of the population, 1 in 100.

For a couple of months or so in the summer of 2015, the world media looked at Germany taking in higher than ever numbers of refugees in a somewhat orderly manner.

Reactions were often characterized by admiration, often by bewilderment. There were those who said it will all change if the numbers don't decrease, and they probably feel the sweet sense of confirmation as the cold season is coming and latest opinion polls show a majority of Germans "worry" about the influx.

Well, you have to understand, they are coming in huge numbers, that initial "argument" didn't quite hold water when some pointed out that 1 in 5 people in Lebanon are refugees, the raw number standing at about 1.2 million.

That's more, or pessimistically about the same number, than are coming to the European Union, which has over 500 million residents.

The next argument was Germany simply didn't have the resources. But - darn it - citizens helped so much that the police in Munich had to tell them to stop bringing food, clothes, and other goods.

Trying to focus on people traffickers didn't help when the photo of a dead three year old swept the internet.

With the simple figures in tatters, Hungary did the anti-refugee people a favor, it built a fence and brought its numbers down. A mere few weeks after that, Germany's largest police union called for a fence to Austria.

25 years after the Iron Curtain came down, Germans call for a fence.

The latest approach does seem to work: the "worries" (unspecified) combined with an actual increase in violence against refugees (arson and physical attacks) plus the steady repetition of "the law is the law" and "other countries are not pulling their weight" are finally giving the conservative right the upper hand.

Throughout all of this, the world never really stopped to recall that discrimination of its existing immigrant population has had a long tradition in Germany.

It took decades until the glossy story of how well post WWII Germany treated and integrated its own German refugees finally got an official reality check. These people were not even Muslim but true blue Christians.

Many who fled East Germany were treated just as badly. And in the early 1960s, the Social Democrat (aka "liberal") chief of Germany's biggest asylum seeker processing camp complained that almost 100% of arrivals were criminals.

What he 'forgot' to mention was that crossing the border illegally was a felony, and that it was this act that earned the asylum seekers the label "criminals", not any actual criminal history.

The first generation of "guest workers" in the 1960s/70s was not treated well, and their children and grandchildren face discrimination to this day. This Spiegel article from 2014 reads Discrimination by first name: Nobody wants an Ali on the team. People from Muslim countries have had the worst experiences for the past 50 years, including the arbitrary barrier of a German language test prior to being able to move wife and kids from Turkey.

Discrimination by last name? Of course, and just today someone told us that a family member had changed his last name to something German.

Why, do you think, are the German authorities pleading for housing space for the new refugees in a country that has 1.7 million vacant housing units? Yes, a large number of these units are in the more depressed areas of Eastern Germany, and the big cities have a general shortage.

But this is not the whole story.

A lot of landlords will simply not rent to Muslim/Arab/African foreigners. Sure, show up with a nice white Anglo name, and you'll be fine.

And speaking of Anglo: American citizens moving to Germany with their spouse do not have to pass a language test first.

We checked the rental offerings and the 'seeking apartment' ads in our county for a while and came to the conclusion that the space it there. About one week's worth of offers would more or less cover the 800.

Why is it not happening?

A neighbor told us almost two years ago: Mrs. X has an empty apartment, and her Turkish neighbors asked if their daughter could rent it. X doesn't like Turks, she told them she had no plans to rent the place out in the foreseeable future.

That apartment is still vacant. Two more vacancies have opened in the building, the last one over six months ago.

None are filled to date. **

Many foreigners have made Germany their home, but outside of cities with a very high proportion of second or third generation immigrants, even finding a place to live is often a challenge.

Add to that odd regulations, such as a 50 sqm minimum living space for a foreigner (plus 20 for any additional adult in case of families) and compare this to the standard student housing dorm room: 16 sqm for an individual.

Oh, and about foreigners and crime: rates are not higher, but immigrants get arrested more often than their German counterparts.

Last but not least, there continues to exist some German on German discrimination - your regional accent is enough to make you a second class person in places. And age limits for jobs are still wide spread contrary to need or evidence - a leftover from the days when eugenics was all the rage.

A German-American lawyer with many years of experience in civil law recently laid out discrimination in the US versus Germany and came to an interesting conclusion: in the US, laws are the primary means of protection, while German laws protect you less against discrimination and have gaping holes. But other legal provisions give some added protection, for example, while you may have more difficulty getting housing in Germany, renter protection is still stronger than in the United States.

In the end, it's pretty simple. As we said in the previous post The bias of "really great": a shuttle driver, a country,  don't overly romanticize any country, whether it is Germany or Mongolia, the US or Russia. 

[Update 1/10/2016] Fixed a couple of typos.

** [Update 3/29/2016] The two apartments are now rented out. To Germans. 

Friday, October 23, 2015

Europe goes Harry & Sally on internet surveillance & censorship: I'll have what she's having

Sure, privacy and civil liberties advocates have had a few good news in the U.S., such as California's law requiring warrants for online data, or Apple telling a court the company cannot unlock new iPhones. Law enforcement and intelligence agencies even backed off - for the moment - off clamoring for backdoors in encryption.

But all in all, 2015 has been a great year for surveillance folks across the planet. France got itself a super snooper bill, Australia goes deep into the digital down undies, Canada has its explosive C-51, Germany re-introduced data retention with a widely under reported anti-whistleblowing hook, even little Austria wants its alpine data retention back.

We won't elaborate on the UK, because, as they say don't mention the war on privacy.

But on top of surveillance, there is censorship, and that's where things have been heating up and will likely get a lot worse.

The UK has experimented with some serious protection of its population from what seems to be the greatest threat to the country: pictures of nekid people doing "it". They added blocking of islamist web sites for good measure and, it seems, movie pirate sites and streaming sites. These measures are ever so cute because the famous 13 year old kid can bypass them in a minute.

So, blocking is, as we would like to point out in the strongest condemnation available to a classy UK person, not nice.

The country to watch, though, is Germany.

Yes, good old Germany, which everybody thinks has freedom of speech in its constitution, simply because translators and politicians take "Meinungsfreiheit" (freedom of opinion) to mean freedom of speech. Okay, it is somewhat true because expressing an opinion is sort of freedom of speech.

But this is about the limits of either, and here is a flat out prediction: Germany will push hard for enforceable censorship of social media.

Criticism of hate speech on social media is, of course, justified and necessary.  Smarter minds than ours have talked and written about the problem for many years. The K-Landnews has dabbled in it with posts like the recent A ranking of German tweets that attack people as a***hole. The two biggest Western companies in that space, Twitter and Facebook, have made efforts to get some degree of control over hate speech but are attacked for not doing "enough".

What we have not seen so far is a sustained nation-state attack by a powerful "enough" Western country. Terrorism provided some leverage but not enough. And your Turkeys, Irans, and Chinas don't cut it.

But the Germans are coming, it's gonna get ugly.

The German justice minister had some talks, probably "frank" in diplo-speak. Someone filed a criminal complaint against the German office of Facebook for "facilitating hate speech", and German pillar of righteous journalism Bild Zeitung has launched a campaign to name and shame what they decided are haters of refugees.
German prosecutors have launched investigations of some of the outed folks, but not all.
The "not all" points to the possibility that BILD may well have ruined some lives, but hey, if you want to make omelets ...

What the blogster is trying to say is: the refugess crisis may very well provide the foundation for a sustained attack on social media.

That's because the refugee issue unites the German political mainstream plus whatever is left of their "left".

More importantly, going after "right wing" xenophobic hate on social media is a next to perfect alibi, the best possible means for a motley collection of middle of the road and traditional conservatives to hide their very own role in promoting xenophobic and racist attitudes over decades. Again, the blogster is not the first to point at the historical continuity of xenophobic attitude that reaches well into the German middle and upper class, and has been a staple of papers like Bild Zeitung, as illustrated in the post German political kindergarten: you are the hater, no - you are.

We are not claiming that Twitter and Facebook will become as bland as British mashed potatoes soon, but if the German government has its way, there may soon be room for a more interesting corner of social media in some nook and cranny of the internet.

[Update 2/1/2016]
Austria is making it easier to spy on people with a new law that extends surveillance.
Several states in Eastern Germany, incidentally covering the area of the old GDR plus Berlin, are in the process of establishing a joint surveillance center as a "Competence and Service Center".
Oh, and the UK snooper charter is doing great. France is still living under a state of emergency after the November Paris attacks and shows no signs of ending it.

[Update 6/7/2016] Germany is following suite with two new laws, one regulating the exchange of information regarding terrorism, the other a so-called "reform" of the country's foreign intelligence agency BND.
The view of reasonable experts, including lawyers and Reporters without Borders is easily summarized: everything that has been in a legal gray zone or outright illegal is simply going to be legalized.

The blogster hates to say told you so, but the last paragraph of the 2013 post The Spin Doctor is in still holds true.

Thursday, October 22, 2015

A vinculo matrimonii - German court accepts "mother in law filed for divorce"

From our Passing on a Story department

This happened several years ago in a somewhat out of the way place. I feel a bit bad for the translator in the starring role in this post, so let's state for the record that there was no internet yet.

One day, a coworker showed up with American divorce papers and explained he needed a translation into German. He had already found a court certified translator but wanted to find out if the court order contained anything potentially difficult or problematic.

Helpful me read the few pages and found it utterly standard. No children involved, no wealth to distribute, basically a simple template deal. Telling him so, I handed it back to him.

Several weeks later, he showed up at the office and asked: Would you like to have a look?

The German text seemed unremarkable until the word "Schwiegermutter" caught my eye. Wait, that's mother in law, right? Did the English have a reference to the mother in law, I would certainly have noticed and remembered this.

A quick check, and the plot thickened. The English sentence contained a vinculo matrimonii, (bond of marriage), a legal term for absolute divorce. Back to the German: die Ehe wurde auf Antrag der Schwiegermutter geschieden.
Which is: the marriage was dissolved pursuant to a petition (or motion) of the mother in law.

Crap. Someone had had a bad day, maybe thinking "matron", maybe not thinking at all.

So, this stamp and the certification is all the German authorities need?

Yes, they want proof of divorce so she can remarry.

Well, there you go.

In hindsight, not a wise decision. But later, the coworker mentioned he had attended the marriage, so it ended well.

One more thing:
Although there probably are in-laws who wish they had this possibility, there is no U.S. law allowing to get rid of an unwanted daughter or son in law by asking a court to divorce them.

[Update 10/23] Longer, clearer title.

Disingenuous German conservatives call for "refugee TV"

German politicians love their state broadcasters. State broadcasters' mandate is to provide inclusive news and entertainment, representing all sectors of the population.

Officially called "public broadcasters", these institutions are behemoths with an annual budget more or less as big as that of the American National Security Agency (depending on the Euro-Dollar exchange rate). With the exception of the international broadcaster, all German state broadcasters are run by the federal states, some cover more than one state, but even tiny states in the old West with just over half a million people hang on to their own broadcasting company. Complex inter-state agreements govern the the two nation-wide TV outfits ARD and ZDF. Each and every single "public" broadcaster is firmly in the hands of the governing political parties, with state prime ministers on the boards, with state parliaments setting the mandatory fee every household and company must pay. An "independent" commission determines the financial needs of the broadcasters, but hardly any German knows that the members of the commission are appointed by the state prime ministers by "preferably unanimous vote".

The population German state broadcasters have never represented in their long history is immigrants.

Nowadays, with satellite TV and radio and an easy 50 000 radio stations from around the world on a single website like TuneIn, you can argue that the need to cater to immigrants isn't there any more.

But go back to the 1960s and 70s, when millions of workers from Italy, Turkey, Greece, Spain, and Portugal were called in to fill the needs of German industry.

To the state broadcasters (there were no private ones back then), these workers only existed on the German news, just like the token black US military kids in Frankfurt and throughout the German South.

To listen to the radio in their own languages, these foreign workers had to make do with crackling AM or short wave from their home countries.
TV in their language was not available until satellite and cable. Newspapers, for quite some time, had to be trucked in, too.

German radio and TV was all white, and all German (with an exception for a couple of indigenous non-German tribes in the far north and the far east).

While US TV at the time was also run by white guys, there were offerings on public radio, and there still are today. Even in German.

So, when  the blogster opened the web site of Frankfurter Allgemeine Zeitung this morning and saw "CSU for refugee television", there was a split second of hope. It was only a split second, though, because right next to it was "German integration broadcaster".

Since CSU is the ruling Bavarian conservative party, which sometimes makes Rand Paul look like a socialist, the article was predictable.

Presented by the CSU general secretary, a PhD light (not a fake one, but one that he can not legally use as 'Dr.' in many German states), the call really is for "integration TV".  Offering refugees German language courses on TV is nice, kind of a no-brainer, were it not for the historical legacy of totally ignoring immigrants.

The other part is teaching the German constitution and German culture.

Basically Yodel TV  with "How to drive safely", quipped the K-Landnews TheEditor, This whole integration thing is so much worse than what you go through as an immigrant to the US. German politicians see integration into society as ditching the culture you come from. That's moronic, leave that job to the children of immigrants.

And where does the money for Yodel TV come from?

German state broadcasters are sitting on a pile of frozen cash to the tune of 1.6 billion Euros. That's only half of the surplus they managed to collect when the new fee structure was introduced in 2013. The fee structure had been announced as "revenue neutral", if you need to know.
So, the state governments asked their parliaments to split the difference - give half to the broadcasters while reducing the citizens' fee by a few cents for a year or two, and put the other half into the bank for the next cycle of fees in 2017.

[Update 10/22/2015] Just in time for the post, another article in the same newspaper tells us that the international broadcaster DW signed a cooperation agreement with the domestic ARD broadcasters to get information to refugees. As of now, there is a refugee radio with various private and the Bavarian state broadcaster on air, and private TV broadcaster n-tv started the very first TV broadcast in Arabic on September 25.

This is a good start. It also makes the call by the CSU secretary general appear even more as creative meddling for political gain.



Wednesday, October 21, 2015

The enduring love affair of "Snowden deniers" with "no direct access"

Note: Feel free to call the blogster a "Snowdenista" if it makes you feel better. The blogster would see this as an incorrect label,  but it* is not easily offended.

One of the most beloved and treasured statements those who do not like Mr. Snowden, which those who hate his guts, as well as those who point to the basic legal issues of his actions, heavily rely on after over two years since it first appeared is "direct access" to company servers as part of the PRISM program.

You can find the crucial two words in this early Guardian article. These two words were so important for two reasons
1) they affected some of the world's the biggest internet companies
2) they offered the first practical "point of attack" on the leaks.

The initial leak, on the Verizon metadata collection, was clear cut. There was really nothing in the documents or the articles that could be used deny, obfuscate, or attack the paper or the leaker.

The revelation of Prism added many of the biggest Western software and internet companies to the subject of government surveillance. This obviously caused widespread panic and also added another eight (or nine) household name companies to the list of parties who faced pressure to explain what was going on. The Guardian article of 7 June 2013 was sparse on details, in that the legal narrative was largely absent and because it did not describe any aspect of the technical implementation.

Some valuable clarification was provided in articles by CNET and the New York Times, though attacking the Powerpoint presentation as "suffused with a kind of hype" has nothing to do with the subject as such, illustrating rather the difficulty of reporting on projects shrouded in secrecy. The effort to deflect and minimize the leak included a claim that the Prism software itself was unclassified -  try holding up a classified document while claiming that the wood pulp carrier (the paper) is really unclassified and see how far that gets you.

Speculation and the fight over the conceptual definition quickly focused on "direct access". This slide from 10 June by the Washington Post shows how the author(s) of the Prism slides interpreted "direct":


"Collection directly from the servers..." as opposed to upstream fishing, a simple, very clear but non-technical construct.

At that point in time, you still had a very pissed off government, more than a billion worried consumers, a bunch of big companies in panic, hundreds of thousands of techies who wanted to know the gory details down to the configuration of cable pins and any command line switches, and journalists who wanted to pick over everything and know best.

It is this potent combination of interests that moved the generic understanding of direct access away from the "upstream vs. home of data" NSA context to a very narrow technical meaning which benefited the government interests as well as the companies desperate to alleviate the hit to their image and potential financial losses.

When the Washington Post published further slides and details on 29 June, the deniers had already resolved that they won't accept anything short of "physical" access by the NSA itself as the meaning of direct access. For a more comprehensive view, see the WaPo compilation.

Making "direct access" about what seems to be "arbitrary physical access" (and we include a terminal/ssh or any comparable method under this) helped the affected companies and everybody upset about the leaks, or mad at the journalists and the leaker.

You are welcome to claim there was no "direct access", if you define your understanding as "arbitrary physical access" in order to mask "collection directly from the servers".

However, any value judgment such as "misleading" or "lie" in the discussion, will trigger filing in the "bullshit" folder.

Yes, we do have a bullshit folder.

* The blogster follows the convention set by the K-Landnews TheEditor's policy of gender neutrality.

Monday, October 19, 2015

Date and Time, and the Great Timezone Panic of 2011

Note: Somewhere in this post it says "know your audience", so let's try that: If you don't do software or work in IT, you may find this post of very little use, although "The Great Timezone Panic of 2011" is an entertaining ditty on misunderstood copyright or - depending on your view of the world - attempted abuse.

Notes on Date, Time & Time Zones and the Great Time Zone Panic of 2011 

Processing of date, time and time zone data are fundamental operations across most software products. The importance of datetime and timezone handling depends very much on the purpose of the given product. The algorithms and data used are largely dependent of the programming stack plus additional libraries or external data. Calendar systems organize date and time for "social, religious, commercial, or administrative purposes" (http://en.wikipedia.org/wiki/Calendar).

In this document, calendar systems are treated as "materialized views" of date and time. Only minimal attention is given to the display and data entering considerations for user interface artifacts that represent calendars and calendar-based operations, such as scheduling.

Definitions
Day: 24 hour day (see en.wikipedia.org/wiki/Day)
Time: time of day.
Time zone: region of the earth that keeps the same time (for a map, see this time zone map).  
Legal time zone or Legal Entity time zone: time zone used in trading or time-sensitive business transactions that span more than one time zone.
View locale:  think of this as the text and its layout in a program window, following the rules of a certain locale (or just a language). Available in some of the fancier development frameworks.
Formatting locale: the formatting of certain bits and pieces on the screen in accordance with the rules for a certain locale.
You can use a view locale that is different from a formatting locale and, magically, show, for example, text in English but dates in French. Available in some of the fancier development frameworks.
Don't forget that AM/PM may be returned by a programming language (Java, right) despite the fact that the desired locale does not use am/pm at all.
          

What's in a timezone name
There are a number of ways to "name" a time zone.

    Legal name: in the United States, the legal names are defined in the U.S. Code, Title 15, Chapter 6, Subchapter IX - Standard Time , for example, "The standard time of the first zone shall be known and designated as Atlantic standard time; that of the second zone shall be known and designated as eastern standard time".
    In Canada, "Time Zones and Daylight Saving Time usually have been regulated by provincial and territorial governments. Starting in 2007, clocks following the new North American standard for Daylight Saving Time are to be turned forward by one hour on the second Sunday in March and turned back on the first Sunday of November." National Research Council Canada). NOTE: This is national naming (with some transnational elements).
    Other countries do the same, that is, national laws and sometimes transnational agreements determine the timezone and the official name (for example, German time law). NOTE: This is unique national naming (with some transnational elements).
    Common name: many time zones have common names, often shortened versions of legal names. For example, in the U.S., "Pacific Time" or "Eastern Time". These names are unique for a region but not in terms of actual time (no indication of standard or DST).
    Letters: the Admiralty of the United Kingdom publishes the timezone that uses letters as names, for example, "Z", "A", "B", etc. (Timezone map). NOTE: This is a transnational naming.
    tz database: (or Olson, or zoneinfo database); Wikipedia definition: "Within the zoneinfo database, a time zone is any national or sub-national region where local clocks have all agreed since 1970".
    The tz database is not authoritative and turns out to be the main cause for problematic practices in the software industry. It is neither unique nor standardized.

    Offset based: this is the practice of using the UTC value with an offset, for example, 2008-10-05Z-4:00 NOTE: This is a unique transnational naming.

Recommendation: when referring to a time zone use "name" only for official, legal names. Use "display name" or "id" in all other cases.
Problems with the Olson tz implementation

The tz database is a collection of entries by different people using different naming conventions for almost anything. The main problem we can find with tz based timezone libraries is bad naming.

For example, some database systems and other software allow either a correct zone setting (add or subtract a number of hours) or set the time zone implicitly as a "location within a timezone".

SET TIME_ZONE='-05:00';
SET TIME_ZONE='Europe/London';

The second one is awful: "Europe/London" is not a timezone
"Europe/London" - and all other entries like it - is a geographic location that can be associated with a timezone offset to identify which timezone the city of London belongs to. Without an offset, an id like this cannot be correctly mapped to a timezone "name". Internal use in software is fine, but exposing these to any end user is not a good idea.
The CLDR, Java and .NET

Unicode.org appears to have recognized the implicit naming problems of the tz. The have chosen "zone" with the attribute "type" for IDs of the kind "Africa/Algiers" and "metazone" for actual timezone names and common abbreviations. The CLDR is at this location: http://cldr.unicode.org/.

The CLDR also contains translations for timezone names and identifiers.
Recommendation: use CLDR translations to get translated ids and zone names for your product if you read timezone ids and names from a file.

Java terminology is as follows: TimeZone.getAvailableIDs() returns the list that includes the continent/city values. The method getDisplayName() returns legal names and offset based values.

For a standard timezone, .NET will show a timezone "name" that matches the displayNames value used in Java. Use .StandardName and .DaylightName to get the respective names.
UTC and GMT

Coordinated Universal Time (UTC) is the civil standard time that replaced Greenwich Mean Time (GMT). In everyday usage, GMT continues to be used as the "name".  Just listen to the BBC News once to understand.
Issue: end-user is faced with offset displayed with label "UTC", for example, "UTC+1"
Solution: use only "GMT" in end-user ui, for example, "GMT + 1". Unless, of course, you are coding software for scientific users.

User interface requirements
End-user date and time: display date and time in accordance with the end-user expectations. If the ui is not translated, it should appear in English but date, time and possibly other items should be formatted in accordance with the locale of the user.
    Timezone selection lists: you can use a "main cities" list plus offset (which is what MS Windows does); or you can use "standard names". The least preferable option is to use ids (Olson tz ids, getAvailableIDs) plus an offset.
    Calendar display, selection, entry: support for the default Gregorian calendar is obvious. The display should take into account the "official" first day of the week. ISO 8601 calls for Monday as the first day of the week. Note that (usually) printed calendars in many countries still have different first days, and calls to standard libraries, for example, Java, are not guaranteed to return "Monday". See The week for more information.
    AM/PM: never assume that the existence of an "am"/"pm" value in a standard library means that the datetime format used in a country/region uses the AM/PM format. Java, for example, lets you retrieve "AM/PM strings" but they are just that: strings.
    Date (time) formats: in many regions, there are multiple usable date (time) formats, not just a short, medium, or long. For example, on official U.S. government forms, you may find the date format to be day-month-year.

    Non-gregorian calendars: The website Frequently Asked Questions about Calendars is a great resource for calendar information. The nuts and bolts around Java 6 calendar support are at Supported Calendars. For .NET, see System.Globalization Namespace.

Persistence and transfer requirements
  UTC: store date and time values as UTC values, with ISO 8601 as the preferred format.
    Issue: what about the timezone and daylight saving time?
    Solution: you can use a UTC value (for example, 1998-12-01T12:03Z) and separately store the offset and a timezone name or even a daylight saving flag. Alternatively, you can use the UTC with offset 1953-08-02T18:50:00+04:30 and add a timezone name and a daylight saving flag if needed.

    Duration/intervals: ISO 8601 has a mechanism for this. See, for example, time interval
    Domain-specific standards: do not forget to check for domain-specific requirements around date, time, and time zone information, for example, standard email datetime formats.

    Interoperability: if your application/component receives time zone data from other products or external libraries, be aware that you may need to handle tz ids.

Translation considerations
For date, times, time zones and related text (long day of the week, short day, month name, etc.) the best practice is: never send lists to translation. The only exception is when you plan to use the CLDR values. But these can be extracted and translators never need to work on them. You cannot expect unique translations for geographic locations: what is the "name" of a given Chinese city in English?
Think of time zone ids, "names", "names" of weekdays, etc. only as labels. And then remember that you never base programming logic on string matching operations against labels.
MM/DD/YYYY - pattern considerations

This section provides a slightly different take on patterns than many other practitioners have.

    Claim: For any date/time pattern considerations within (mainly) gregorian systems, we are dealing with "mechanics".
    Reason: Many man-years have been spent on this, and there are really only two stumbling blocks in general patterns. One is that pattern parsing may incorrectly assume that pattern chars like m, d, h, etc. exist only in the pattern. The second is that single quotes do not exist as literals in datetime formatted string. A common manifestation of this is incorrect handling of, say, Portuguese, where we can find that the expanded pattern contains both "d" and a single quote. Tip: If you use regular expressions to populate patterns characters, especially those with the 'd', change the pattern chars to something never found in a date, some odd Unicode chars, then populate and put the "d" back in.

    Claim: Yes, you can display pattern strings to show a user what to enter.
    Reason: You can for example, tell a German user that the required time format is: hh:mm:ss
    This is possible despite the fact that any dictionary you may consult will tell you that "hour" == "Stunde" in German. If you continue to look, you will then find that the scientific or mathematical abbreviation commonly used by German speakers is "h".

Conclusion: it really is more mechanical than you might think, and: know your audience.

Other Calendars
You can have lots of fun with other calendars, such as the Jewish and the Islamic calendar.
If you need to code one of these, good luck.

The Great Timezone Panic of 2011
The “tz” authors/maintainers Olson and Eggert faced a copyright infringement lawsuit by Astrolabe.  There had been rumors in the industry about “the tz going away soon”, but the bosses kept mum. I read the paperwork and promptly sent a nice email to their lawyer but not the kind you might expect. Instead of focusing on “historic data”, science or fair use, I noted that the parts dealing with international time zones drew on numerous publications from around the world, and that a copyright infringement suit against Olson and Eggert might be a good time to look at how the copyright situation in the “ACS International Atlas” held up.  In other words: the ACS compilation was very likely doing exactly what the new owners accused Olson and Eggert of.
The Electronic Frontier Foundation worked on the issue.  And in all fairness, Astrolabe deserves a thank you.

(Published with permission of the original author)

A collection of fun everyday software internationalization issues

The following is a collection of snappy headlines with examples of common software internationalization problems.

The past twenty years in two paragraphs
On the positive side, programming languages, libraries and frameworks have become better at doing internationalization. Translators are better trained and use better tools. I was responsible for some time for some of the latter, including the translation memory tool you know as SDL X. And our friends in England published a short article I wrote entitled “A DIY translation manager”, which described how to emulate the MS Word user interface of TRADOS with a simple MS Access database backend. XML has come along and taken much of the bite out of  code pages and character sets. And Unicode is finally unifying the world.

On the negative side, XML has come along and, together with greater use of scripting and the internet, added to what I call the “layer problem”.  More than ever, user interface strings can and will be used across different software components that do not handle strings in the same way. You may end up with a broken character in a database, you may see a square box or questions marks on a web page or in a command window. You may get insidious runtime errors because of a bad use of single or double quotes in javascript. And, as much as I hate to say this, documentation has gotten worse while it as improved. Automation of documentation for C# and Java, for example, is now largely in the hands of individual developers and that means very different quality within even small components. Last but not least, there is the proliferation of devices, from mobile phones to madical devices large and small, various pads to point of sale terminals and radio frequency identification chips.

While many people continue to argue about the correct definitions of internationalization and localization or expect erudite explanations of character set, encoded character set and font, I personally focus on “transition”. Every single time, a piece of text (a string) is handed off to some other component, there is the potential for a problem (a bug). Once you think in these terms, much of the work becomes easier. The concept that much of internationalization is about transition makes the need for good pseudo-translation pretty obvious. Just as it makes good QA obvious.

This way or that way (bidi)
The good news is that ADF and other packages will take care of bi-directional display for you. The bad news is: challenges remain.
But there is an excellent tutorial by the W3C folks at Creating HTML Pages in Arabic, Hebrew and Other Right-to-left Scripts.

you can quote me on this
It is probably fair to say that the cumulative cost of single and double ASCII quotes over the past 30 years or so is in the order of millions of dollars across the software industry.
From \'escapes\' that do not survive the translation process to a French year 2000 (l'an 2000) that becomes a lan 2000 in the ui, and on to javascript errors that surface when a customer hits a page - ASCII quotes (U + 00xx) continue to surprise.
There is a very simple solution for web pages: use smart quotes (U+20xx). See ASCII and Unicode quotation marks.

when good strings go bad: Mojibake
Instead of me laboriously trying to explain and find examples of character corruption, Wikipedia will do the explaining: Mojibake around the world.

garbled download filenames
A variation on a still common theme. Common for Firefox if you do not use mime-types with base64 encoded filename in the CONTENT-DISPOSITION header. The mime encoded string consists of =??B??= where B stands for base 64. So, it should look more or less like this CONTENT-DISPOSITION: inline; filename==?utf-8?B?44GC44GE44GG44GI44GK44GL44GN44GP44GR44GTLnhscw==?=

for entities' sake
Do not use entity references unless you absolutely have to. Which means, use entity references only to escape markup inside xml, for example: <mystring>This is a &lt;b&gt; bold &lt;/b&gt; statement</mystring>

Why you should never use them to output text to a web page:
The page source is no longer human readable for many languages
They can easily mask a bad "content-type". If you do not set the charset and the server defaults to iso-8859-1, your entities will display correctly but:
Form submission may be bad
Other software that consumes this page may run into errors

to sort or to collate
Displaying sorted lists of text can be done in different ways. If your entries come from a database, you can either rely on whatever collation is set for it, you can show the list in its binary sort, or you can try to sort in accordance with the language of a user.  You can download a simple web application for text sorting right here.

duplicate translations
Issue: files coming back from translation have duplicate translations. In other words, you have two different English strings but they have the same translation.
Solution: The generic advice is to never make your ui dependent on uniqueness of strings.

There are instances where this is correct behavior. An over-simplified example would be something like this: en1=Goto en2=Go to with translation1=Gehe nach and translation2=Gehe nach

There are other instances where the English is artificially "unique", for example when you deal with currencies.

And then there are instances where it is simply a translation error.

The problem is compounded when a data loading utility is used and uniqueness constraints are enforced. The solution for uniqueness constraints is:
You need to write or provide a utility that is file based and that can check a file for uniqueness violations before import. It is critical that all violations in a given file are found in a single run. Many tools, for example, xml parsers, will stop at the first error, and this can lead to numerous, time consuming iterations.

(ir)regular expressions
Issue: Regular expressions sometimes fail with non-ASCII.

Solution: While they may have their use, a slightly more verbose approach to coding may well be better in the long run for shipped products. "Multi-byte" regular expression bugs need particularly serious testing.

string theory and math
In general, you can expect a "char" in any programming language to hold one 16-bit value. Since Unicode supplementary characters need 2 of these, make sure your string math is right.
.NET: A single Char object usually represents a single code point; that is, the numeric value of the Char equals the code point. However, a code point might require more than one encoded element. For example, a Unicode supplementary code point (a surrogate pair) is encoded with two Char objects.
To work with each Unicode character instead of each Char object, use the System.Globalization.StringInfo class.
Java: "char" and CodePoint are the respective equivalents.
JavaScript: see once upon a time (surrogates) at the end of this post

How about some Oracle PL/SQL math:

CREATE OR REPLACE PROCEDURE mgmt$mask_sendMsg (msg IN VARCHAR2) IS
msg1 VARCHAR2(1020);
len INTEGER := length(msg);
i INTEGER := 1;
BEGIN dbms_output.enable (1000000);
LOOP msg1 := SUBSTR (msg, i, 255);
dbms_output.put_line (msg1);
len := len - 255;
i := i + 255;
EXIT WHEN len <= 0; END LOOP;
END mgmt$mask_sendMsg;

/

Issue: Until at least Oracle 11, this procedure does not work properly if the input string contains multi-byte characters.

We get a "string buffer size is too small" error from the call to dbms_output.put_line(). It works if you change the substr length to 100.

Solution: Find the Oracle reference "SQL Functions for Different Length Semantics".

databases
Issue: Text stored in a MS SQL table using "N" datatypes fails to import into a DB2 utf-8 table.
Solution: Here is a rule of thumb for using databases to store text in "char/varchar" columns:

If you only support Oracle and/or DB2: use a Unicode database (set the character set for the whole database to utf-8)

If you support Oracle and MS SQL (and DB2): use N datatypese (including clobs) and "graphic" types for DB2. This will make the RDBMS behavior more consistent.

Since every commercial RDBMS comes with its own set of challenges and documentation, go and check there for details you may never need.

pseudo translation
This involves adding language specific text (something Japanese, French, etc.) to extracted English strings and then testing "Japanese", "French" and the like. One of the most widely known benefits is the detection of hardcoded strings. But, equally important are:

detection of encoding problems (see "when good strings go bad" above)

detection of layout problems

detection of bad programming practices (for example, using an extracted string as a variable name)

Inadequate pseudo translation: never add just ASCII characters to a string. For example, this 'myenstring=enter a number' would be badly "pseudo translated" as something like that:
myenstring=[PS] enter a number
myenstring=$$ enter a number $$

creative placeholders
In general, placeholders should be simple, numeric tokens of the type 0, {1}, '2', and the like. Unfortunately, there are "standards" will a long history (such as the %s, %d from C/C++) as well as various, well-intentioned more recent approaches. Do not get creative, for example: The Accounting Pay Period yyy / zzz for the aaa entry is not open.
If your product has old or proprietary placeholders, be prepared to mitigate bugs. One way to do this would be to split one message into two in order to get around the need to re-order placeholders in a translation.

SBCS, MBCS, DBCS
In a Unicode world, you should use these terms only in a very narrow sense. For example, Microsoft MSDN says: Support for Multibyte Character Sets (MBCS) Multibyte character sets (MBCS) are an alternative to Unicode for supporting character sets, like Japanese and Chinese, that cannot be represented in a single byte. If you are programming for an international market, consider using either Unicode or MBCS, or enabling your program so you can build it for either by changing a switch. The most common MBCS implementation is double-byte character sets (DBCS). Visual C++ in general, and MFC in particular, is fully enabled for DBCS. If you can spend a minute on Wikipedia Multi-byte_character_set, you are on your way to say "Chinese, Japanese, Korean" or "CJK" instead of MBCS when you really mean CJK. Also, please note that modern "MBCS" also contains Western European, Russian, Greek, etc. - just not in the same location that you would expect.

fonts: squares
Issue: Users see squares instead of the desired characters or glyphs.
Solution: Check what fonts the application is calling. If possible, use the "generic" (aka. logical) name "sansSerif" or "serif". You can find a font test tool in the Downloads section of this web site. Browsers are generally smarter than desktop applications when it comes to displaying content.

fonts: question marks
Issue: Users see question marks instead of the desired characters or glyphs.
Solution: Check that encoding conversion is done correctly and encoding is specified at all transition points.

american == english?
The Oracle NLSGDK (at least as of 2012) allows developers to map languages and locales (Oracle traditionally uses different names than Java). The result of the mapping may not always be as expected:

Locale locale = new Locale( "en" );
String oraLang = LocaleMapper.getOraLanguage( locale );
String oraLangFromJavaLang = LocaleMapper.getOraLangFromJavaLang( locale.toString() );
System.out.println("oraLang = " + oraLang); System.out.println("oraLangFromJavaLang = " + oraLangFromJavaLang);
The output is: oraLang = AMERICAN oraLangFromJavaLang = ENGLISH

Outputting xml without an xml parser
We have all done it at some point, especially in the earlier days when parser implementations were often unwieldy and sucked. We built “xml” as strings in memory and wrote them out using simple file output with an OutputStream. The XML never saw a parser or supporting classes (like a DcoumentBuilder).
The problem with this is that this approach works until the stream is no longer just ASCII, at which time everything falls apart.
So, do yourself a favor and tell the scrum masters that they do want controlled input and output. I, for one, will be forever grateful to the folks who wrote the JDOM package because it was more then adequate for many use cases.

Naming your files
Another seemingly trivial aspect which merits enforcement is paying attention to the naming of files as they are created. Unfortunately, IDEs provide dafault names too easily accepted, for example “resource.properties” or “labels.java”.  That is enough for the IDE to keep track of strings and to know where it can find them. But just image how one team felt when they saw that their great new product had all the ui strings and messages in some 30 files that all had the name “labels.properties”.  If you run into such a problem and your project manager or dev manager has other things to do than make coders change the filenames and the calling code, it will be you as the internationalization or globalization people who will suffer for years to come.  You will soon be sick and tired of having to dig through files because a bug is filed against one “labels.properties”, and you will have to find out which one.
Css, a matter of style
For any browser based rendering, use external css stylesheets. They can be easily adapted to internationalization needs. For example, the display font size for most Asian language needs to be slightly larger than for Western languages, usually an increase of 1pt is enough. But since you have them defined externally, it is easy to change that, too.Issue: I don't know how many stylesheets I need, one per locale?Solution: One per language is enough. In a more colloquial way of saying it: Austrians and Swiss will ge happy with the same font size. Depending on your specific ui (how cluttered, how busy), you may very well be able to use a single stylesheet for most or all of your supported languages.

XLIFF resources as replacement for Java .properties and ListResourceBundles
For several years now, Java has a ResourceBundle.Control which provides you with so much flexibility that I sometimes shake my head at the reluctance to adopt it.  The XLIFF resources format, originally intended as an interchange format, has been adopted quite widely and can even be used as a drop-in replacement for Java Properties and ListResourceBundle (LRB).
For the sake of full disclosure: Yes, I am aware that no "real objects", as the javdoc of ListResourceBundle calls them, can be in the LRB if you want to use XLIFF as a replacement. But then, finding “real objects” in resource bundles has been a pet peeve of mine for 20 years and is one of the low points of internationalization architecture. And yes, the much touted ability to catch potential runtime errors through the fact that you have to compile LRBs before use is another pet peeve of mine.
But how do you use an XLIFF or any other xml as a replacement?
Play with it and thank the Java folks for a very useful feature.  There have been two main objections with regard to this class. The first one was that the fallback mechanism did not work or was hard. That is a misconception, fallback works. The second, more justified one is performance and footprint. For very small applications in the mobile or embedded areas, yes, you will want to consider this. But for anything else, especially those resource hogging enterprise suites, I have only one comment: Let us assume, hypothetically, that we have a large application and that loading of a resource file takes an additional few milliseconds. Now, if someone tells that this is an unacceptable drop in performance, my answer will be “please find the true performance issues in the base code before you dismiss the use of ResourceBundle.Control”.

Using an interface to call (text) resources
Standardization of resource strings and ease of use in source code continue to be big issues. Some improvements, such as using a central database and having gatekeepers who must approve new strings, have been more or less successful. One contribution to a solution for big projects is the use of interfaces to declare constants that can then be called easily.
How to do this:
1. Create an Interface and declare strings as public static final, for example, public static final String NO_USER_LOGIN = "NO_USER_LOGIN";
2. If you use LRBs, add an entry like this:
    { BaseConfigMsgID.NO_USER_LOGIN, "No valid login found for user {0}" }, where  BaseConfigMsgID is your Interface.
   If you use a .properties bundle, add your message like this:
    NO_USER_LOGIN="No valid login found for user {0}"  

The code that calls the message is identical and goes like this: bundle.getString(BaseConfigMsgID.NO_USER_LOGIN);

The beauty of this, in my view, is that developers can easily reference the correct message through autocomplete in modern development environments and even more so the fact that you can switch between LRBs and Properties bundles so easily.

Location, location, location
The standard real estate phrase also applies to Java software real estate.  An astounding number of programs insist on packaging resources in the same .jar/.war as the code.  This is partly because of IDE defaults, partly because of inadequate research into lookup and loading.
Yet, there is absolutely no need to do this. On the contrary, if you separate them out, you have already made a huge step to facilitate adding new languages to an existing program.
Java web applications will easily load resources from jars in the lib directory. But, since jars, wars, ears are "virtual file systems", you can really put them anywhere. This simple jsf snippet will work with resources in a jar in the webapp lib directory.  Stick the resources into the lib folder, and then all you need in the ui code is a short snippet, shown here for jsfs:

<f:view  locale="ja">
   <f:loadBundle basename="myapp.mycomponent.msg.IntroMsg" var="msg"/>
      <h1><h:outputText value="#{msg.ABORTED}" /></h1>
</f:view>
It does not get much better or, big development dream, much more elegant.

Plurals and gender issues
Attempts have been made to provide ways to handle more complex formatting operations, for instance, plural forms, ranges of numbers, etc. You should avoid these because of some inherent issues with translation. Stick to the simplest possible way of doing resources with placeholders. Mozilla has examples for using PluralForms, but plurals are not the only aspect of a language. You will find gender questions, questions of case and other choices, such as agreement between different parts of speech.
What is wrong with the following?
  • seconds=second;seconds
  • seconds=sekunda;sekundy;sekund
Issue: You cannot go from the English with its two forms to the Polish with three by translation. Translators will not add or remove items. They translate what is there. Issue: The approach above turns a properties file into a nested file by adding a secondary delimiter. Asian translators can and will frequently replace the ASCII semicolon with an ideographic one (outside of the ASCII range, showing in the translation as \uxxxx).
Solution: Use more than one key=value pair. Never ever chain values together as shown above.

A usage based view of xml
Those of you who had the pleasure of working with SGML markup long before html and xml came around, can skip this section.

While many discussions of xml over the years have focused on issues of “the spec” versus “the implementation”,  I have found it useful to distinguish between two usage scenarios.

Scenario 1 data exchange between applications or no transformation.If xml is used exclusively to transfer data, for example, in SOAP or as an export/import format, few constraints apply to parsing and formatting. For example, you can very well ignore "pretty" settings that produce nice indentation. While I am wary of certain implementations when it comes to usage described in Scenario 2,  you can also safely use standards-compliant but weird implementations like the Oracle XMLPrintDriver class in the v2 parser in the pure data exchange scenario.

Scenario 2: human interaction or transformation.If there is any chance that humans will interact with the xml source, or if some transformation is performed, you should add the niceties and some hints that are not strictly required for parsing or processing xml.  The general guideline for the treatment of XML that is sometimes (or all the time) destined for direct human consumption or further processing is: no gratuitous changes.

Common examples include:
  • Add the encoding statement even for utf-8 content. XML defaults to utf-8 and some purists decry having the declaration with the encoding statement. I have seen so many bugs that could have been avoided or made easier to detect, had the developers added the encoding statement.Do yourself and your fellow humans a favor and always add the encoding statement.
  • No escape from the quotes question. The spec does not really care whether you use single quotes or double quotes for attributes, etc. But what about quotes in text content, for example in embedded html markup? The "spec focus" would say: they do not matter there either, so I can change them in any way I like.
    But if you use xml to store ui resources, you may not know what happens to these strings once they have been loaded into the application. Or worse, your code and ui strings will be consumed by third party components, leaving those developers with the chore of figuring out what you did in your xml. What if quotes in embedded html are now double quotes and break javascript? Leave existing quotes unchanged if you can.
  • "The spec" allows for an embedded greater than sign (>) to be either escaped or not. About 99.99 percent of standard implementations are aware that the > will frequently be paired with a < and treat both the same way. But some implementations do not. For example, the Oracle XLMPrintDriver will not escape the >. Always escape both embedded < and >.
Default display language
It is a simple question, what do you show on a screen if you are asked to display Chinese,  or Spanish, or English? It has to do with the different versions of language and script. An easy way to try and settle this is to look at English: we have come to pretty much accept to see the American version of this language in software.  Since politics has a way of making life hard, I argue with numbers. There are some 1,2 billion users of “Simplified Chinese” versus some 150 million of “Traditional Chinese”. So, in terms of the base language, I will fight to display “Simplified Chinese” if all that matters of a locale is the language part (in this case “zh”). And my argument for Portuguese is the same, “pt” will have Brazilian text.  If you need the version used is Portugal, you use pt-pt.  
This argument will generally win unless:
Someone has a politico-cultural war to fight. I have personally experienced a bad fight over “Chinese” because the internationalization chiefs all came from “Traditional” backgrounds. To this day, it was the dirtiest fight of two letters I have seen.
Sales numbers are held against you. If the sales folks say “we have no customers in mainland China, so we want  Chinese to mean Traditional”, your best hope is that you can convince development to keep the design open for the future.

once upon a time (surrogates)
Once upon a time, the notion of more than 64K of characters, glyphs or whatever you want to call it, seemed frivolous. And then someone decided to combine some unused ones, and surrogates were born. And with them, parsing strings by/into chars became a little bit more complicated.

size matters
Be nice to your translators and tell them they can use abbreviations if your code does not allow text to expand enough. While the latter is preferred, there will be times when it cannot be done. Let them use abbreviations and, on your side, make sure that punctuation marks in your strings do not have any functional meaning in your code.


(Published with permission of the original author) 



The fearful German upper class - incognito in London in 1978

When a brief kerfuffle erupted a few weeks ago about current German defense minister von der Leyen ever so slightly fluffing her official resume by including a stint as an auditing guest student and a term as a volunteer in Stanford, the blogster did some research and explained details in The two resumes of the German Defense Minister (official vs. Wikipedia).

Another intriguing aspect of the story of Ms. von der Leyden shines a light on a troubled period in West German history: the left wing terrorism of the 1970s and 1980s.
Her Wikipedia entry explains that, as a young student in London in 1978, she used the pseudonym Rose Ladson "because she was seen as a potential terrorism target for West German left-wing extremists".
This explanation is from a very flattering article in the Daily Telegraph on the occasion of her becoming Germany's first female minister of defense.

While no known facts support the claim, and the use of "potential" further weakens it, it does illuminate the feelings of the German upper middle and upper classes in the face of the terrorist threat at the time.

The vast majority of victims of the left wing terrorists of the Red Army Faction (RAF) were police officers, US personnel stationed in Germany and other regular citizens, whereas the common "short version" of the rampage focuses exclusively on several high profile victims.

The perception of the danger of left wing or right wing violence in Germany since the days of the RAF, deadly right wing violence has killed far more people, yet never received the same attention nor the same resources to fight it. We collected figures for the past two decades in the post German officials and extremism: always mention right and left together.

The biggest single post WWII terrorist attack in Germany remains the Munich Oktoberfest bombing discussed in this post.

Whether the knife attack this weekend, that left a mayoral candidate in Cologne, Germany, hospitalized with life threatening injuries, by an individual from the right wing fringe will change the perceived threat is anybody's guess.


Sunday, October 18, 2015

Cold extraction apple juice (no cooking)

Two widely known methods to get at the juice of apples have been handed down over the centuries, cooking cut apples and pressing raw shredded apples. But there is a third one made possible by more recent technology: using a standard freezer.

No fancy juicer needed. For small batches, no press is needed. A kitchen fridge freezer compartment works just fine for smaller amounts of fruit.

Freezer extraction of apple juice
1. Wash apples as needed, skin them (or leave skins on), cut and remove core.
2. Shred apples in a standard kitchen veggie cutter. Most machines have three settings, coarse, medium, and fine. "Coarse", or thin slices, is sufficient, and it is fast.
Important: Do not drain the shredded apples. You want them wet, we'll explain below.
3. Fill containers suitable for deep freezing with the shredded apples. Put them into a freezer, and wait for at least a day or so until you feel like continuing.
4. Remove as many containers as you want, let them thaw completely at room temperature.
5. For small batches, use grandma's cotton kitchen towel method to get the juice out. Fill the towel to about one third or half, squeeze. Put the drier pulp away to re-freeze for later use in baked goods like apple bread. Alternatively, make apple vinegar with the pulp.
If you have a press, use that. Don't use a juicer on the thawed apples, you will only get fine pulp.

Done.

You are now ready to freeze the juice, pasteurize and bottle it, make apple jelly, or cider.

Why you want your shredded apples wet
Engineers have spent a lot of effort to produce freezers that don't destroy the cell walls of whatever you freeze. "Flash freezing" accomplishes this, preventing fruit, meat, and berries from getting freezer burn or turning into mush.
However, to get as much juice out as possible, you want the shredded apples to become pretty mushy, so keeping the moisture created by shredding is exactly what we need. This helps to break down the cell walls that lock in the juice.

Traditionally, this is the reason for cooking cut apples and for the use of high-pressure cider/grape presses.

Cold extraction with the freezer method preserves nutrients that get destroyed by cooking. Pressing of raw (not frozen or cooked apples) is so slow that yeast can start to turn the sugars in the juice into cider - which won't happen with the freezer method.

The freezer method works the same way for other fruit, too. It makes little sense for soft berries, but harder ones with less juice, for example, mountain ash berries or sloe berries can benefit.

If the apples come from your own trees or from an orchard of friends or family,you may want to check out this post about removing lichen and moss to help trees remain healthy and productive. Painting a whole tree white is also great fun!

[Update 10/25/2015]
Homemade multi-purpose press
We looked at wine and fruit presses on the web, and found them wanting. You can buy cheap ones to assemble yourself. No wooden parts included is not what the blogster is willing to go for. Decent ones are easily upwards of 200 dollars.

Round is the basic design everywhere. This is not adequate if you want to use a press for other purposes, like making paper. Communion wafers? Sure, but the size of a wine press?

So, we made our own as shown in this picture. Square, with a groove on the bottom plate, four long bolts with win nuts for pressure, and kitchen towels to hold the thawed apples.

The version in this photo is the first try, with a capacity of about 1 gallon. In the meantime, we added diagonal bracers.

The square design, by the way, is also a traditional wine/cider press design, although the centuries old version understandably comes with a center spindle like any modern press.

It works like a song. If you want one, we'll make one to your specifications (as long as they don't violate the physics of pressure distribution). Send an email to the contact mail at the top of the blog, and we'll provide a quote.