vttoth

I am a software developer and author of computer books. I also work on some problems in theoretical physics. For more information, please visit my personal Web site at http://www.vttoth.com/.

Mar 152017
 

Chemistry is weird. Even in inorganic chemistry, there are some really strange compounds. There is, for instance, phosphotungstic acid: \({\rm H}_3{\rm P}{\rm W}_{12}{\rm O}_{40}\). Never heard of it until today.

And then there is this one (if it exists at all):

Somebody posted this on Google+. They wanted to know what its properties are. And now, so do I. There are a few tungsten compounds listed in online databases, but this is not one of them. Does it even exist? I don’t know. For some reason, I expect it to have properties not unlike those of tungsten carbide, but I could be completely off the mark.

 Posted by at 11:40 pm
Mar 072017
 

There is a piece of North American technology that was responsible, among other things, for the “most successful failure” in the history of America’s space program, the successful return of Apollo 13 after a major explosion on board.

A few weeks ago, when chatting with a family member from Hungary who happens to be a proud, freshly minted engineer, I learned, much to my astonishment, that this technology is still not commonly used (if available at all) in Europe.

And today, much to my delight, I found out why: Perhaps it’s because it is still manufactured domestically, in my case right here in Canada.

Here is what I am talking about:

Yes, the mundane duct tape. Proudly made in Canada, as the label on the inside informs me.

It is my understanding that duct tape was included in the emergency repair kit of every American spacecraft launched to date. On Apollo 13, it was with the help of duct tape that they were able to adopt CO2 filters, extending the time they were able to spend in the lunar vehicle, which was used as a lifeboat during the long trip around the Moon.

I am beginning to wonder if this technology should be placed on strategic export control lists. Who knows what duct tape can do in the wrong hands! Imagine Kim Jong Un with a roll of duct tape… or Vladimir Putin. Or Iran’s Revolutionary Guard. The world would be a lot less safe if every despot had free access to copious amounts of duct tape.

Oh well, enough ranting. I need to do something useful, like some vacuuming. Recently, the wand of my vacuum broke. Rather than ordering a costly replacement at a price higher than an old vacuum cleaner is worth, I fixed it and so far, the wand is working like new. As to what I fixed it with, you guessed it… it was duct tape. Works wonders.

 Posted by at 5:18 pm
Mar 062017
 

I just caught this on CNN. A statistic that shows that most Americans believe ISIS is the gravest threat to their country:

And this shows why populism wins votes. Because in actuality… first of all, there are only two countries on this list that represent an existential threat to the United States, Russia and China, and China only marginally so.

North Korea is a threat mainly because it is unpredictable, but even if they develop a nuclear tipped ICBM, the country remains a distant third on the list of real threats.

As to Iran and ISIS… they are no threat to the United States at all. ISIS has no capability other than inspiring some “lone wolf” attackers. Iran has no desire to engage in direct conflict with the US, nor do they have any serious capability to harm the United States; they may be “state sponsors of terrorism”, but their actual threat contribution is below the noise floor.

So I think in terms of the real threat they represent, the order should be more like Russia, China, North Korea, ISIS, Iran. That is, almost completely the other way around.

But when the commander-in-chief and his cabinet are blabbering about how they must protect America by shutting the doors on refugees, too many listen.

 Posted by at 7:54 pm
Feb 262017
 

In many ways, this is the most disturbing story I read in recent… days? Months? Maybe years?

The title is (relatively speaking, in this day and age) innocuous enough (if perhaps a little sensationalist): “Revealed: how US billionaire helped to back Brexit“. Yeah, sure. Billionaires are evil SOBs, we knew that already, and now a bit of investigative journalism dug up another reason why we should hate them. Big deal… you could be forgiven if you moved on to read something else, maybe the bit about Trump snubbing the White House Correspondence Dinner or Fox News using a phony “Swedish defense advisor” to curry favor with the President.

But if you choose to read this article, it reveals something else. It reveals how the Leave campaign in the Brexit vote received assistance provided by artificial intelligence software to build profiles of up to a million voters and create highly targeted campaigns on social media.

Back when the nightmare of the machines taking over was first discovered in the science fiction literature, it was usually envisioned as a clean break: First the humans are in charge, but then comes Judgment Day and the machines take over.

Reality is a lot messier, for both humans and machines. There is no clean break. The ever increasing power of the machines is harnessed by ever more reckless humans, manipulating humanity in unexpected ways. Machines manipulating elections or referenda at the bidding of sinister humans… in many ways, that is the worst of possible worlds.

It makes you feel helpless, for one: You realize that nothing you can do on social media, nothing you can say in your blog will amount to one iota, as the machines have an infinitely greater capacity to analyze data and assess outcomes.

And it also makes you fearful. AI (for now) has no compassion or conscience. It will lie or make up “fake news” without remorse. It will (for now) do its masters’ bidding, even if those masters are sociopaths.

So no, folks, don’t delude yourselves. Judgment Day may already be here. It’s just coming one little data point, one neural network, one deep learning algorithm at a time.

 Posted by at 9:03 am
Feb 112017
 

For the second time in a row, I am seeing a report on CTV about the protests against the Trudeau government’s decision to scrap electoral reform. Their coverage suggests that these are significant protests, representing widespread anger among Canadians.

They aren’t. Let me be generous: Although CTV’s cameraman did his darnedest best to make the crowd appear bigger than it really was, there were maybe a couple of dozen people, tops, behind this young gentleman leading the protest.

Mr. Rae told his followers, by the way, that “Mr. Trudeau does not get to decide what is and what isn’t an issue for Canadians.” Forgive me Mr. Rae, but you are wrong. Mr. Trudeau, the duly elected prime minister of Canada with a majority government, does get to decide what is and isn’t an issue for Canadians. In turn, we Canadians do get to decide whether or not we wish to keep Mr. Trudeau and his government after the next elections.

Meanwhile, I am actually happy that Mr. Trudeau listened not to loud-mouthed protesters but to the facts and was willing to spend some of his political capital to make the right decision. While first-past-the-post has its shortcomings, it is not inherently worse than other electoral systems, and it is absolutely better than any system that involves, e.g., party lists, legislators that do not represent a specific constituency. And messing with the electoral system could very well have established a precedent that, in the long run, might lead to American-style gerrymandering.

But I still don’t understand what CTV’s game is, pretending that these protests are more significant than they really are. I am, in fact, questioning the journalistic integrity behind the decision to give these minuscule protests disproportionate coverage.

 Posted by at 6:17 pm
Feb 022017
 

“After a second notices he ran it on db1 instead of db2″… This sentence (somewhat shortened, to make a fitting title) describes the beginning of a colossally effed up night at GitLab.com.

In response to a spike in system load, which resulted in lag on a replication server, the operator thought that maybe restarting the replication server with a clean slate is a good idea. So he decided to wipe the replication server’s data directory.

Unfortunately, he entered the command in the wrong window.

I feel his pain. I did make similar mistakes before, albeit on a much smaller scale, and the memories still hurt me, years later.

I have to commend GitLab for their exceptional openness about this incident, offering us all a valuable lesson. I note that others also responded positively, offering sympathy, assistance, and useful advice.

I read their post-mortem with great interest. In reaction, I already implemented something that I should have done years ago: changing the background color of some of the xterm windows that I regularly open to my Linux servers, to distinguish them visually. (“Create issue to change terminal PS1 format/colours to make it clear whether you’re using production or staging”).

Of course similar incidents and near misses also changed my habits over the years. I rarely delete anything these days without making a backup first. I always pause before hitting Enter on a command that is not (easily) reversible. I have multiple backups, and tested procedures for recovery.

Even so… as Forrest Gump says, shit happens. And every little bit helps, especially when we can learn from the valuable lessons of others without having to go through their pain.

 Posted by at 10:13 am
Jan 312017
 

Here are two contributions from personal experience to the ever growing list of Internet pictures that go with the “You had one job…” meme.

First, a nice loaf of our favorite nine-gain bread, from a neighborhood Portuguese bakery:

Yes, you are seeing it right: It’s sliced lengthwise. Needless to say, the hapless employee who offered this stunning demonstration of human intelligence did not remain on the job much longer. (Regardless of how it was sliced, the bread was yummy.)

Next, one of my favorite deserts, an Austrian delicacy, a Mozartkugel (Mozart ball):

What’s wrong with it, you ask? Well… the portrait of Mozart is not supposed to be on the bottom of the piece, you know; it usually goes on top!

I know, I know, there have been much bigger fails on the Interwebs. Still, I found these funny.

 Posted by at 9:05 pm
Jan 312017
 

A short while ago, I turned on a computer. Like several of my other computers, this one is also configured to display a weather widget on the desktop. Here is what it showed:

If only it were true! Alas, the reason for this overly optimistic weather report had to do with the fact that the computer in question has last been turned on more than four months ago, back in September. In reality, this is what our weather is like right now:

And even that is a significant improvement over the −21°C that greeted me early in the morning.

Yup, this is Canada.

 Posted by at 8:52 pm
Jan 302017
 

It appears that we are entering the era of flawed democracies.

Our country, Canada, remains firmly in the category of full democracy. But that is no longer true south of the border. In an annual survey by The Economist, the United States slid down the list (and this is based on data from 2016, before Trump’s inauguration). It is now one of the leading flawed democracies, with a democracy score virtually identical to that of Japan.

And even as the number of full and flawed democracies, put together, remains roughly the same (80 in 2008, 75 in 2016 if I counted correctly), the number of full democracies is rapidly shrinking. There were 28 full democracies on the list back in 2008; by 2016, this number shrank to 19, a more than 30% decrease in just eight years.

Meanwhile, the examples of India and Mongolia demonstrate that democracy is not just a privilege for the rich. These countries are decidedly third world economies with GDP per capita roughly one tenth that of Canada or the US, yet they manage to maintain democracies no more flawed than the regimes on the eastern fringes of the European Union, such as Hungary or Romania.

 Posted by at 10:20 am
Jan 292017
 

I promised myself not to blog about politics for a while, but events being what they are, I cannot keep my damn mouth shut or my damn fingers not typing.

These two screen captures speak for themselves.

First, the number of Americans killed by terrorists from the seven Muslim-majority countries that are on Mr. President, Generalissimo, smartest-man-in-the-world Donald J. Trump’s traveler ban:

Next, the number of Americans killed by terrorists from three Muslim-majority countries that are not on the Generalissimo’s oh-so-perfect list to protect Americans:

The difference? As many pointed out, these three countries that are not on Trump’s list have one thing in common: business ties with the Trump empire.

Dear Trump supporters, tell me again how your beloved Tweety Orangeface, heading the bestest and least corruptest American government ever, is draining the swamp and protecting Americans?

 Posted by at 10:17 am
Jan 202017
 

Enough blogging about politics. It’s time to think about physics. Been a while since I last did that.

A Facebook post by Sabine Hossenfelder made me look at this recent paper by Josset et al. Indeed, the post inspired me to create a meme:

The paper in question contemplates the possibility that “dark energy”, i.e., the mysterious factor that leads to the observed accelerating expansion of the cosmos, is in fact due to a violation of energy conservation.

Sounds kooky, right? Except that the violation that the authors consider is a very specific one.

Take Einstein’s field equation,

$$R_{\mu\nu}-\tfrac{1}{2}Rg_{\mu\nu}+\Lambda g_{\mu\nu}=8\pi GT_{\mu\nu},$$

and subtract from it a quarter of its trace times the metric. The trace of the left-hand side is \(-R+4\Lambda\), the right-hand side is \(8\pi GT\), so we get

$$R_{\mu\nu}-\tfrac{1}{4}Rg_{\mu\nu}=8\pi G(T_{\mu\nu}-\tfrac{1}{4}Tg_{\mu\nu}).$$

Same equation? Not quite. For starters, the cosmological constant \(\Lambda\) is gone. Furthermore, this equation is manifestly trace-free: its trace is \(0=0\). This theory, which was incidentally considered already almost a century ago by Einstein, is called trace-free or unimodular gravity. It is called unimodular gravity because it can be derived from the Einstein-Hilbert Lagrangian by imposing the constraint \(\sqrt{-g}=1\), i.e., that the volume element is constant and not subject to variation.

Unimodular gravity has some interesting properties. Most notably, it no longer implies the conservation law \(\nabla_\mu T^{\mu\nu}=0\).

On the other hand, \(\nabla_\mu(R^{\mu\nu}-\tfrac{1}{2}Rg^{\mu\nu})=0\) still holds, thus the gradient of the new field equation yields

$$\nabla_\mu(\tfrac{1}{4}Rg^{\mu\nu})=8\pi G\nabla_\mu(T^{\mu\nu}-\tfrac{1}{4}Tg^{\mu\nu}).$$

So what happens if \(T_{\mu\nu}\) is conserved? Then we get

$$\nabla_\mu(\tfrac{1}{4}Rg^{\mu\nu})=-8\pi G\nabla_\mu(\tfrac{1}{4}Tg^{\mu\nu}),$$

which implies the existence of the conserved quantity \(\hat{\Lambda}=\tfrac{1}{4}(R+8\pi GT)\).

Using this quantity to eliminate \(T\) from the unimodular field equation, we obtain

$$R_{\mu\nu}-\tfrac{1}{2}Rg_{\mu\nu}+\hat{\Lambda} g_{\mu\nu}=8\pi GT_{\mu\nu}.$$

This is Einstein’s original field equation, but now \(\hat{\Lambda}\) is no longer a cosmological constant; it is now an integration constant that arises from a conservation law.

The vacuum solutions of unimodular gravity are the same as those of general relativity. But what about matter solutions? It appears that if we separately impose the conservation law \(\nabla_\mu T^{\mu\nu}\), we pretty much get back general relativity. What we gain is a different origin, or explanation, of the cosmological constant.

On the other hand, if we do not impose the conservation law for matter, things get interesting. In this case, we end up with an effective cosmological term that’s no longer constant. And it is this term that is the subject of the paper by Josset et al.

That being said, a term that is time-varying in the case of a homogeneous and isotropic universe surely acquires a dependence on spatial coordinates in a nonhomogeneous environment. In particular, the nonconservation of \(T_{\mu\nu}\) should lead to testable deviations in certain Parameterized Post-Newtonian (PPN) parameters. There are some reasonably stringent limits on these parameters (notably, the parameters \(\alpha_3\) and \(\zeta_i\) in the notation used by Clifford Will in the 1993 revision of his book, Theory and experiment in gravitational physics) and I wonder if Josset et al. might already be in violation of these limits.

 Posted by at 9:43 pm
Jan 202017
 

It is well known that the despicable Biff Tannen character from the Back to the Future movies was based on a certain real-life despicable mogul by the name of Donald J. Trump. In particular, the “rich Biff” of 1985, having established a casino and real estate empire after receiving a sports almanac from the future back in 1955, was modeled after everyone’s favorite Trump.

In light of this and today’s historic events, it is only appropriate to imagine how the real-life Biff, I mean Trump, would have fared in one of the movies’ iconic scenes:

I hate manure…

Yes, I know it is more than a little crass to share this tweet. Even so, it is far less distasteful than the many racist caricatures that followed Obama’s inauguration and frankly, it makes it a lot easier to deal with this historic day.

 Posted by at 4:24 pm
Jan 142017
 

So here is another thing I don’t expect to see from Donald Trump: Publishing an article in the highly respected multidisciplinary journal Science.

His predecessor, the still sitting Barack Obama did just that: his article about “The irreversible momentum of clean energy” was published yesterday, January 13, 2017. In it, he makes the case that economic growth does not depend on energy-related emissions, and that combating climate change does not require accepting lower growth or a reduced standard of living.

 Posted by at 9:33 pm
Jan 142017
 

I just saw this US Defense Department video about a swarm of high speed drones released at altitude by an F/A-18. The drones communicated with each other, self-organized, and went on to execute predetermined tasks autonomously.

In case anyone is wondering why I worry about the future of AI, this is a perfect demonstration.

Meanwhile, the Defense Department is also continuing its trials of the Sea Hunter, a 132-ft, 145-ton unmanned, autonomous vessel designed to hunt submarines.

Don’t worry, the brave new world is coming…

 Posted by at 9:22 pm
Jan 102017
 

I just finished listening to Obama’s farewell address.

Now why do I have the feeling that this may be the very last time in my life that I’ll be hearing an American President preach goodness and decency instead of contempt and hate? Uplifting thoughts instead of fear and loathing?

Meanwhile, there appears to be a multitude of clowns on the Interwebs who think repealing Obamacare is okay, because they are insured through the Affordable Care Act:

What can I say? Enjoy your improved healthcare starting next month, folks. Glad I live in pinko commie Canada where we have had decent (albeit far from perfect) medicare for half a century. Of course once Trump, along with his BFF Putin, manage to blow up the world, none of this will matter anymore.

 Posted by at 10:05 pm
Jan 082017
 

Here is a quote from one of my favorite novels, Jack London’s Smoke Bellew:

“The world’s gone smash. There’s nothin’ regular an’ uniform no more. The multiplication table’s gone loco. Two is eight, nine is eleven, and two-times-two is eight hundred an’ forty-six—an’—an’ a half. Anything is everything, an’ nothing’s all, an’ twice all is cold-cream, milk-shakes, an’ calico horses.”

Why this particular quote? Because I was reading about Trump’s infamous medical report, prepared by a Harold N. Bornstein, MD, from the great city of New York. The doctor is real, but the medical report is… weird (reproduced below.) Apparently, Mr. Trump tests positive for everything.

But what is even weirder is the doctor himself and his Web site. Once a respectable site advertising a family practice, today it redirects to a site that sells an annoying teddy bear.

I kid you not. A site that sells “The Original Annoying Happy Birthday Teddy, the bear that never stops singing ‘Happy Birthday to you…'”.

So perhaps that explains why I think that anything is everything, an’ nothing’s all, an’ twice all is cold-cream, milk-shakes, an’ calico horses.

Or maybe I got high on something without realizing it.

I mean… is there anything about America’s esteemed President-Elect that is not a boldfaced lie?

 Posted by at 1:14 am
Jan 042017
 

The Emperor has no clothes.

Sycophants praise his choices. The lush fabric. The elegant, fashionable tailoring. The beautiful stitching.

Yet the Emperor has no clothes.

Unfortunately, even his critics no longer acknowledge this fact. They criticize his clothes. They question his taste in garments. They reject the gaudy colors. They ridicule the bad workmanship.

But none have the courage to tell the world the truth: This Emperor is naked.

And thus it came that the lessons of history are once again forgotten, and all its mistakes are yet again set to be repeated.

 Posted by at 1:34 pm