Preston L. Bannister { random memes }

2007.01.25

Wikipedia gets it wrong (badly)

Filed under: Web — Preston @ 10:41 pm

With Wikipedia the hope is that folk with bits of knowledge will contribute to common pool. With enough eyeballs any bad additions should get cleaned up or filtered out. The end goal is to have the highest quality material on each subject.

Only the end result matters.

Folk at Microsoft felt that the Wikipedia article on OOXML was less than accurate. They could have edited article directly. They could have hired some anonymous shill to edit the article in their favor. Instead they asked a very knowledgeable outsider, who in turn was completely honest:

An interesting offer: get paid to contribute to Wikipedia
“So I was a little surprised to receive email a couple of days ago from Microsoft saying they wanted to contract someone independent but friendly (me) for a couple of days to provide more balance on Wikipedia concerning ODF/OOXML. I am hardly the poster boy of Microsoft partisanship! Apparently they are frustrated at the amount of spin from some ODF stakeholders on Wikipedia and blogs.”

In terms of the end result, this is the best possible outcome for the community. Rick is one of the best folks for the job, and anything Rick writes will be subject to community review. I do not see a problem here.

The alternative is much less honest. Parties with an economic interest could employ anonymous shills to tilt articles in their favor. By excluding reviewed contributions by an outside expert, Wikipedia is rewarding less ethical behavior. This is not a good outcome for the community.

2007.01.22

How to boost the birth rate

Filed under: Politics — Preston @ 9:17 pm

Matchmaking Ads to Boost Birth Rate in Japan
Alarmed by a falling birth rate and rapidly ageing population, Japanese policymakers are thinking about allowing TV ads for matchmaking agencies in the hope that an increase in couples will result in more kids. Japan’s population shrank in the year to October for the first time since 1945, heightening worries about economic decline due to a smaller workforce supporting a growing number of pensioners.

“One cause of the falling birth rate is later marriages or no marriage at all, so we see promoting marriage as one good way of dealing with this problem.”

According to a poll released last week by the Cabinet Office, only 48 percent of respondents said Japan was an easy place to raise children, compared to Sweden at 98 percent and the United States with 78 percent. No specific reasons were given but the cost of child raising, a lack of child care facilities, and attitudes that make it hard for women to return to work after taking time off to raise children, are frequently cited to explain the falling birth rate.

Cash incentives aren’t enough to lift fertility
The German Bundestag currently is considering reforms designed to make it economically easier for women to bear children. Under the proposed measures, backed by Chancellor Angela Merkel, the government would pay women 67 percent of their salaries, with a ceiling of 18,000 euros, or about $23,000, for a 12-month parental leave. Men are eligible for a two-month stipend, for a total of 14 months per couple.

Boosting birth rates is easy if you solve the underlying problem. The underlying problem is young people who feel they cannot afford to have children. One-time payments are not going to solve the problem. Reducing costs and offering some measure of security will make all the difference.

Where can a couple in their mid-20’s afford to:

  1. Buy a house in a safe neighborhood near decent schools.
  2. Afford health care and all other family-related expenses, with only one parent working.
  3. Be reasonably confident of a steady income.
  4. Raise two or more children without fear of the additional expense of each child.

Somewhere in the last few decades, the need for both parents to work – just to get by – became the norm. This makes it harder to raise a family. If both parents want to work, to get ahead financially (or simply to get older children through college), this should be a choice, not a necessity. I would bet that if you measured birth rates within the United States, you would find lower rates where costs were higher.

Young people do not have any control over these factors.

First impressions – Visual Studio 2005

Filed under: Software — Preston @ 8:46 pm

Up to the present, I have been using Visual C++ 6.0 for a collection C++ source code that dates back to 1998. There is really no pressing need to update to a new version of Visual Studio, though I do have a company license for the current version. Still, there might come a time where compatibility with other projects, or newer versions of Windows, might become an issue – so there is some (weak) motivation to update.

A couple years ago I had a bit of spare time, and tried loading the C++ workspace into Visual Studio 2003. Got hundreds of warning messages – all of which I had time to look at, turned out to be meaningless (as in fixing would offer no benefit). Generally speaking I tend to be a bit pedantic, and always use the compiler’s highest practical warning levels – “Level 3″ with “Warnings as errors” in VC6, and “-Wall” when compiled with g++ (the code is portable). The code is littered with ASSERT() calls, pounded by unit tests before each release, and has lots of mileage in customer use. So on seeing so many compiler warnings … I was a bit skeptical.

By a bit pedantic – years ago working on Unix, I would regularly run my code through the Greenhills C compiler at the highest warning level (the production compiler), the GNU C compiler with “-Wall”, and lint … and not find anything amiss. I have some reason to suspect the compiler warnings coming from VS might be bogus.

I gave up on VS2003, as I did not have time to wade through all the false positives, and could not justify requiring the remainder of our workgroup to do the same.

To take another run at things, created a virgin Windows 2000 VM (using VMware), loaded VS2005, and installed all updates. At first, nothing would compile – lots of D9028 and C1902 errors. Turns out I had sized the VM to meet the recommended minimum requirements for VS2005, and that will not work. After upping the VM to 512MB, the D9028 and C1902 errors went away. Looks like Microsoft needs to update their minimum requirements. :)

Next up is a deprecation warning for using fopen() – seems that Microsoft thinks the function is unsafe, since it returns a null. Turns out Microsoft has chosen to “deprecate” a whole bunch of standard portable functions, for which they recommend non-portable Microsoft-specific replacements. Right.

In this case they suggest you use the non-standard fopen_s(). Right.

FILE* f = fopen();
if (!f) {
    // handle failed open
}

This is unsafe, how? If the programmer is not checking return values, you are screwed with either fopen() or fopen_s(). In fact, the notion that you can turn C/C++ into a “safe” language is dubious. I have seen a lot of quite horrible C/C++ code, and small tweaks just are not going to solve the problem.

Waded through and eliminated the compile errors – mostly by disabling warning 4996 and altering scope of for-loop variables. Still failing the regression tests. Something to look at later.

Clearly Visual Studio 2005 is an improvement over Visual C++ 6. If I had not spent considerable time with Eclipse, I might be impressed. At least so far, there is nothing compelling. I am tempted to stick with VC6. :)

“Net Neutrality” put simply

Filed under: Politics, Web — Preston @ 8:00 pm

After reading some excessively convoluted arguments both for and against “net neutrality”, I realized there is a simple analogy, with – oddly enough – Ted Stevens for inspiration.

The internet carries bits between consumers (you and me) and services (Google, Yahoo, MySpace, etc.). When traveling across the internet, bits are bits. To the big internet carriers (like AT&T) the bits all look the same – that is unless the carriers spend extra money and add extra equipment (and slow down traffic) to examine the bits as they go flying past.

Bits on the internet are paid for on both ends – the services pay the carriers to put bits on the Internet, and consumers pay to get bits off the internet. Since services ultimately derive all their income from consumers (directly or indirectly), we could simplify this to say that consumers pay for the bits they get off the internet. Part we pay directly in fees to our internet provider, and part we indirectly through service subscriptions, and in the cost of goods we buy (those advertised through services).

Think of the big internet carriers like bunch of water companies. In our analogy imagine that the water comes from some inexhaustible supply, and the water companies just own the pipes. One day the water company guys get a little grumpy, because a lot more water is running through their pipes, but they are not making more money. They notice that consumers are taking a lot of baths, and the soap companies are making a lot of money. To boost their revenue they decide to end “water neutrality”. The water company guys want to install equipment to monitor how you are using your water, and what brand of soap you use. Their plan is to blackmail the soap companies. If your soap company does not pay up, then when you go to take a bath, all you get is a trickle. If the soap company does pay up, you end up paying more for your soap.

In our imaginary scenario, the water company guys are betting that you won’t blame them for higher soap prices. In the real world, the carriers are hoping consumers won’t notice when they get fewer or slower services.

The odd part of all this is that in fact there are plenty of pipes. In the 1990’s, the big carriers went a bit nuts and laid a lot of fiber – so there is far more capacity than is used. The carriers spent a lot of money, but because there is excess capacity, the prices for bandwidth are dropping radically.

For consumers this is a great deal, as with falling prices on bandwidth, the services offered on the internet just keep getting faster and better. The carriers are a bit less excited.

The other joker is that most of the big carriers are also telephone companies. The telephone companies get a lot of income off a service (phone calls) that costs a lot less than they charge. There are a bunch of smaller companies that sell telephone service across the Internet, at much lower prices. If you were a telephone company guy, you would really want to block off the cheaper service … before it kills your cash cow.

When asked about this, the answer from the carrier guys boils down to: “Who me? I would never do anything like that!” … while at the same time seeking new laws so that they can.

“Net Neutrality” is simply telling the carriers to stick to the business of moving bits, and to stay out of the blackmail business. To the consumer “net neutrality” means more and better services on the Internet for the same price.

… and that’s pretty much it.

2007.01.21

Not the intended effect?

Filed under: Politics — Preston @ 2:45 pm

Cato-at-liberty » Worse Than Hillary?
For more than 15 years now, Hillary has been the incarnation of Big Government. She votes with taxpayers only 9 percent of the time, according to the National Taxpayers Union. She calls herself a “government junkie.” She says, “There is no such thing as other people’s children” and calls for ”a consensus of values and a common vision” for 300 million people. She was best known in her White House years for heading a team of 500 bureaucrats organized into 15 committees and 34 working groups to recreate in 100 days one-seventh of the American economy. After health care, she told the New York Times, her next project would be “redefining who we are as human beings in the post-modern age.” Or, as the Times put it, “She wants to make things right.”

Wow. While less than enthusiastic about the “Big Government” part, I did not know that Hillary Clinton was so effective. From the above, it seems she can really get things done.

On the flip side, what are our choices as voters? In this decade, the Republicans in power have acted as wild fans of “Big Government” and poorly run expensive foreign adventures. Given the record increases in government spending (and debit) under Republican leadership, clearly the Republicans are not the party of “small government”. So … our choice is “Big Government” Republicans or “Big Government” Democrats?

Can we have another choice, please?

2007.01.16

Near an inflection point – solid state disk

Filed under: General — Preston @ 5:25 pm

Solid state disk is one of those technologies that never seemed to quite arrive. Smaller in storage and (much) more expensive than hard disks, solid state storage has never proved practical outside niche applications. This may be about to change. After spotting an 8GB flash card under $100, we may be near the point where solid state memory can displace hard drives for a substantial number of mainstream applications.

Labnotes » Solid State Disk Changes The Game
When SSD go mainstream, they’ll change the way we use computers. You trade local storage – 32GB is not a lot of space for a modern operating system, music collection and the occasional ripped DVD – for the ability to live in the cloud: to always have access to more information that any one computer can store.

No information on pricing (likely $300-400, still a bit high). 32GB is a little small for anyone storing video, photos, or large MP3 collections – but more than adequate for lots of folks. In fact, the 30GB disk on my laptop – while too small to store my MP3 collection – has otherwise never been anywhere near full.

There is a bit of a snowball effect coming up. Given multi-gigabyte USB flash drives and fast wireless networks, there is less need for CD/DVD readers. Solid state memory can displace hard drives for many folk. In the thin & light notebook category, there are bound to be offerings that drop out the DVD and hard drives – with the end result of longer battery life in a much thinner, lighter and quieter package. Taken together, this is going to be compelling for quite a few folk.

2007.01.13

2007 and ending needless repetition

Filed under: Software — Preston @ 2:31 pm

The year now is 2007. Time for a bit of a reasoned rant.

Every time I start up Windows, Eclipse, Firefox, or an applet JVM (and wait) – I am struck by the same absurdity. In each case we are repeating the same exact computation as the last startup. The result of the computation is almost always exactly the same. Yet even with a CPU capable of processing BILLIONS of instructions per second … I still have to wait for the computer.

This is absurd. This is insane. Yet the same sort of ridiculous repetition happens millions (or billions?) of times every day.

Let me put this into context.

Back in the 1970’s, folks working with Lisp started seeing painfully long startup times. “Big” Lisp (at the time) might require an entire megabyte of memory (then huge), and the time to load all the bits and pieces into memory was a pain. Someone (I do not know who) realized that repeating the same computation every time at startup was silly. Instead a single “image” of the end result could be saved to disk, and later reloaded in a fraction of the time. The Smalltalk folk came to a similar conclusion around the same time.

Save a result as a single image, and later reload need take only a fraction of the time.

A bit later I worked on low-level code driving hardware for an ancient ancestor of IDE. What struck me then was the speed with which the entire contents of memory could be reloaded – when seeks were minimized. At a 5:1 interleave (best possible on that hardware) you could read or write 87KB/second. The entire current running application could be thrown out of memory (and alter read) in under two seconds – far less than the usual startup time.

Hard disks are wicked fast – then and now – when you don’t send the head skipping around the disk.

Skip forward to the present – nearly 30 years later – and people still spend time waiting for computers. This is wrong.

Using the SysInternals Process Explorer, I see that Firefox startup takes about 7 seconds elapsed, performs 4266 reads and 125 writes. Do not know which of the various memory numbers to use, but my guess is the 25.9MB of “private data” most accurately reflects the equivalent size needed if read from a single image. The Firefox EXE and DLLs total about 15MB, so I’d peg the “actual data read size” at somewhere between the two numbers: 15-26MB (a very rough estimate). On the hand, the stored form of a process is likely more compact than the in-memory form. Using 25MB as the equivalent single-image size should be a conservative over-estimate. Loading Eclipse nets about 30 seconds elapsed and a 100MB estimate.

Looks like current generation hard disks take about 13ms to start reading (average seek + latency), then manage 30-60MB/s when reading. If loaded as a single image, that puts the startup time for Firefox at roughly 0.5 to 1 second, and Eclipse at 1.5 to 3 seconds.

Firefox takes 7 seconds to start, and should take 1 second (or less).
Eclipse take 30 seconds to start, and should take 3 seconds (or less).

But wait! There is more … (er, less)

Unix variants have this thing called fork(). Calling fork creates a new process that is an exact copy of the parent. This is brilliantly simple idea, dating back to the 1970’s. In the late 1980’s the hardware got smart enough to support something called “Copy On Write” (or COW). Before COW forking a 100MB Lisp application meant you ended up with 2 processes needing 200MB of physical memory (quite a problem then!). With COW the two processes used the same physical memory for all pages unchanged since the fork. This both saved memory (a lot!), it also reduced the CPU cost of starting the new process.

Skip forward to the present. On boot, load the Mother Of All VMs (JVM, CLR, or whatever). With a whole universe of classes pre-loaded the entire image might come to … 50MB? Figure an image load time of about 1 second, plus maybe another second to fiddle with the hardware. The typical Unix boot process invokes a simple script interpreter (/bin/sh or the like), loads dozens or hundreds of scripts, and invokes hundreds of small executables. Embed a decent script interpreter in MOAV (say Javascript) and you can get by with fewer scripts and vastly fewer invoked executables. If starting an application means a fork, and slurping in any extra bits needed – then you could expect sub-second startups as routine.

Quite different from how we do things now – but I would bet there is more than one way we could get there – a bit at a time,

Asymmetric warfare and how to boil a frog

Filed under: Politics — Preston @ 2:26 pm

My son just called up. His cell phone died. The phone is only a few months old.

Seems like more and more gadgets are dying prematurely these days. Of course, this could just be a side effect of the fact that we own more electronic gadgets. This could also be an effect of price competition, and the market seeking the lowest level of quality that consumers will accept.

There is another possible explanation. Assume you were in the role of a rising economic and military power – like China. If you were hoping to one day achieve military dominance, somehow you need to undercut the superiority of the US military. A direct attack is likely to be very expensive, so you need to find something less obvious.

The superiority of the US military is largely based on technology originally developed during the Cold War. Without the threat of imminent destruction, the rate of US innovation is bound to drop. Certainly you want to avoid any appearance as a direct threat. At the same time, military technology is largely dependent on electronics. If you can undercut prices, then you can kill off manufacturing in the US. You only need to do this for a few critical components – no need to capture the entire market (which might arose suspicion).

For example, capacitors are simple relatively low-tech components that are used in practically every electronic device. Not a lot of innovation going on with capacitors, so it is quite natural that the manufacturing would shift to where costs were lowest. If you can insure that your costs are lowest, you can slowly reduce the lifespan of the component, so that any electronic device is bound to fail within a few years. You might be able to manufacture components with a longer lifespan at the same cost – but you make sure that components offered for export have a short lifespan.

The consumer market is not going to care overmuch, as consumer devices tend to have a short lifespan in any case. Slowly increasing failure rates mean the US military spends an increasing amount of time and money for maintenance, and has less money for improvements. Higher failure rates mean lower readiness and a weaker military. If for any reason replacements became scarce (due to some sort of conflict – economic or military) then in the space of a few years the US military could become radically less effective.

Never ascribe to malice – in this case what could be simply explained by market forces. So I am not a big believer in the above. Still, it is a possibility.

A simple strategy should suffice to nullify an “attack” like the above, and return a long-term benefit to the country as a whole. Simply insure that a sufficient pool of expertise exists so that we can resume domestic manufacturing when needed. In the short term this means a steady supply of high reliability components (with the side benefit of lower maintainence costs and higher readiness for our military). In the long term the disparity between domestic and foreign manufacturing costs will diminish, and the country gains an economic benefit. Modest long-term investments in improved manufacturing techniques both insure that our domestic expertise does not die of old age, and is likely to bring closer the day when domestic manufacturing is again competitive.

Next Page