commit on the first member resolves the hang. Interestingly one can do a ‘select * from x’ without any trouble, since we allow concurrent read and update, but one gets the pre-commit values of the rows in the table.

For code that is regularly subjected to invasive strip searches by the performance police it is not uncommon for the developers who own that code to try to avoid some of the use of mutual exclusion methods. One pattern that is routinely re-invented is taking a peek at something when the mutex is not held, then acquiring the mutex “for real” based on the state of the something. Example:

This code will often not work. One hidden requirement is that myVariable must be volatile. If that’s not the case, then the compiler can use the value that was first read. If there is no “peek” of the variable outside of the lock hold scope, then things work out because the mutex acquision has unknown side effects and the compiler won’t read from that memory until after the function call is executed. Note that if you implement your own mutual exclusion code (which can be done inline) you’ll need something to force code ordering as well as dealing with the multiprocess or multithread mutual exclusion mechanism itself.

I saw an example of volatile required that is similar to this usual one, but pretty much completely inverted. Here’s what the code looked like, and is executed in a context where the mutex that protects the write accesses to myVariable has not yet been locked:

The lesson, as usual, was that there’s a big maintenance cost to attempting to avoid normal mutual exclusion mechanisms. This bit of mutex avoidance code had been carefully thought through, but once tried in production, it yielded this nice hidden platform specific, compiler optimization level specific run time bug. It was a suprising side effect that took the developers who owned the code a long time to track down.

This particular fragment of performance critical code was fixed by adding a volatile attribute to the myVariable declaration. Doing so means that the compiler is not free to re-load the variable if it has been read into a local and used only from there. It is curious that the compiler would choose to do so at all. There was no obvious reason, like a stack spill around a function call, for the compiler to make this code generation choice, but without the volatile it was permitted to do so.

/tmp filling up on Unix is a pain in the butt. When it happens everybody is effected, and it can destabilize the machine. On many of our work machines home is configured much bigger, than /tmp, so it’s generally advisable to not use /tmp itself. I’ll always include something like the following in my .profile (or .bash_profile)

export TMPDIR=$HOME/tmp

(where I’ve run mkdir -p $HOME/tmp when creating my .profile initially). Many people don’t know that /tmp can be avoided, but most system commands (and many scripts that are written politely) will respect the $TMPDIR. It’s also easier to clean up your stuff since you don’t have to search /tmp/ for your stuff. When some of the $HOME’s are split onto different filesystems then systematic use of $TMPDIR can make it harder for one hog to bog down everybody.

I’d like to see the ramdisk /tmp/ used by default on Linux (we are using SLES11 for which this doesn’t appear to be a default), like it is on Solaris. Then every reboot things start off clean.

Motivation.

In [1] he writes

The Pauli matrices I had seen, but not the matrices, nor the notation. Strangerep in physicsforums points out that the is a Kronecker matrix product, a special kind of tensor product [2]. Let’s do the exersize of reverse engineering the matrices as suggested.

I have found some of the obvious stuff in my reading of \citep{desai2009quantum}. Prof.\ Vatche Deyirmenjian who teaches our PHY356 course has pointed out still more (and pointed out where I’d identified the wrong source for some typos).

Chapter 4.

\begin{itemize}
\item Page 81. Equation (4.52). Should be in the exponent.
\item Page 82. Equation (4.65). Prof.\ Deyirmenjian: a is missing before the integral. Note that without this (4.67) appears incorrect (off by a factor of , but the error is really just in (4.65).
\item Page 82. Equation (4.67). Prof.\ Deyirmenjian: the negative sign should appear inside the large square brackets.

\item Page 83. Equation (4.74). A normalized wave function isn’t required for the discussion, but if that was intended, a factor is missing.
\item Page 83-84. Prof.\ Deyirmenjian: In (4.67) and (4.77), the derivative should be evaluated at .
\item Page 86. Equation (4.99). Extra brace in the exponent.
\item Page 87. Equation (4.106). Extra brace in the exponent.
\item Page 89. Equation (4.124-4.130). Prof.\ Deyirmenjian: is not a solution to (4.122). This should be and (4.126) should be . This fixes the apparent error in sign in equations 4.129 and 4.130 which are correct as is.
\item Page 92. Equation (4.158). Prof.\ Deyirmenjian: should read .
\item Page 93. Equation (4.169). conjugation missing for . is missing prime on the index.
\item Page 95. Second line of text. Language choice? “We now implement”. perhaps utilize would be better?
\item Page 95. Text before (4.193). is in bold.
\item Page 96. Text before (4.196). is in bold.
\item Page 97. (4.205). is in bold.
\item Page 97. (4.207-209). , and s aren’t in bold like
\item Page 101. (4.245). The right side should read
\item Page 101. (4.239-240). The approach here is unclear. FIXME: incorporate lecture notes from class that did this using braket notation.
\item Page 102. (4.248-249). Commas missing to separate , and in the kets.
\end{itemize}

Chapter 6.

\begin{itemize}
\item Page 120. in bold. not in bold.
\item Page 123. (6.26). factor missing on RHS.
\item Page 124. Text before (6.37). You say canonical momenta , but call these mechanical momenta on prev page.
\item Page 125. (6.41). Some s are in bold.
\item Page 126. (6.49). There’s no mention that is constant, leaving it unclear how the gauge condition and how the curl of reproduces . This would also help clarify how you are able to write .
\item Page 128. (6.65). should be .
\item Page 129. (6.75). should be .
\item Page 130. (6.80). integral looks like it should be . ie: Clarify bounds, and add a factor of in the denominator which is required for the cancellation of (6.82).
\item Page 131. (6.81,6.86). Factors of s should be with each of the s.
\item Page 131. Problem 1. bold missing on .
\end{itemize}

Chapter 10.

\begin{itemize}
\item Page 189. (10.22). It would be nice to have a reference to the appendix (ie: 10.100) for the chapter so that this identity isn’t pulled out of a magic hat.
\item Page 192. (10.44, 10.45). should be
\item Page 193. (10.51). Application (slowly, step by step explicitly) of 10.100 to expand the in the braket gives

This is the same as (10.51) with the exception of a real scalar constant multiplying the wave function. Because of this I think that (10.51) should be a proportionality statement, and not an equality as in

(ie: building this additional factor into the wave function normalization instead).
\item Page 196. (text after 10.76). Looks like reference to Chapter 9, should be Chapter 9 problem 5.

Chapter 26.

Chapter 31.

\begin{itemize}
\item Page 562. (31.56). is given for a mixed tensor representation. This is . The other mixed representation transforms as .
\end{itemize}

Chapter 32.

\begin{itemize}
\item Page 575. minor: written instead of
\item Page 576. minor: instead of
\item Page 577. (32.23). accidentally includes the divergence.
\item Page 579. (32.35). Sign missing in exponential. Should be not .
\item Page 579. is the energy of the particle, not . There’s also an missing in the expression for . That is .
\item Page 580. (32.40). The factor of presumed constant ought to be incorporated into if this is to be consistent with the (32.45) that follows.
\item Page 583. (32.70). sign error. negate integral.
\item Page 584. (32.74). sign error in the both the square root and subsequent approximation, which should be . (I’ve added approximately equal for the second part since that wasn’t specified which I found confusing).
\item Page 584. (32.75-76). there are multiple sign errors in these equations which should be

Note that an attempt to confirm (32.76) yields

So we need approximations twice for the “equality”.

\item Page 584. (before 32.78). minor: bold script used for on second like of the change of variables.
\item Page 585. (32.82, 32.83). minor: instead of .
\item Page 585. (32.82, 32.83). wrong normalization? wouldn’t we want .
\item Page 585. (32.84). notation switch? index whereas used above? What are the definitions of ? that allow the integral to be converted to a sum?
\item Page 586. (32.88). minor: instead of
\item Page 586. (32.88). I calculate a negated from (32.88). Guessing that (32.88), and (32.93 on pg 587) where intended to be negated like done earlier (for example in (32.57)).
\item Page 587. (32.93). minor: instead of
\item Page 588-589. (32.104-105). This substitution doesn’t appear to work?

There’s an extra term here that doesn’t show up in (32.105) with this transformation. Can that be argued away somehow?

Chapter 33.

Chapter 35.

\begin{itemize}
\item Page 635. (35.46). minor: Bold on gamma.
\item Page 636. (35.50). minor: Bold on gamma.
\item Page 636-638. (35.51-35.58). minor: incomplete notation switch. This chapter uses instead of , but many formulas on these pages continue to use the notation from chapter 33, even mixing the two in some places.
\item Page 643. (35.107). should be . There are also some missing positional indicators in (35.105) and (35.106).
\item Page 643. (35.114). should be .
\item Page 645. (35.134). Wrong sign on . It should be .
\end{itemize}

Chapter 36.

\begin{itemize}
\item Page 648. (36.16-17). s should be omitted for consistency.
\item Page 648. (36.16-17). It appears that the should be .
\end{itemize}

I’d had a couple comments on that post by an individual that turned out to be the key to getting the contract cancelled (a contract renewal that I didn’t know I had, and had never received a copy of, nor any confirmation of renewal). That individual says he is now being threatened with legal action by this company, and has asked for his posts to be removed. Since I was aided by what he had to say, and the links that had been provided, I think that these comments are worthy of being retained, so I’m now re-posting them anonymously for all to see. They are now deleted from the comments in my original blog post.

You didnt have to pay them if you moved to a new location where the company doesn’t service or you moved to a location where you are NOT responsible for paying your utility (your name is not on the utility bills).

They don’t tell you this and send you straight to collection because it’s easy $450. Same thing happened with my relative, they sold their home, they moved to a small apartment. They no longer responsible for their utility, their landlord was. They paid $600 to Universal Energy (now Just Energy) for cancellation. That’s why the company is doing this, easy money with uninformed customers.

I would send a complaint letter to the local government regulator, tell them your story. If you don’t complaint, no one would know, the government regulator can’t keep track of the trend if no one complaint and no one will know what kind of company Just Energy really is.

Read more about how to cancel Just Energy, and you don’t have to pay a cent. Also here is a list of local government energy regulators to file your complaint, please file your complaint so your friends, family and neighbors do not have to waste time with this garbage.

My response to this was:

Thanks for the tips (I can’t take advantage of the non-proximity tip since I still live close to my old house and continue to be serviced by Enbridge gas).

I will definitely send a complaint letter to the Ontario Energy Board. I’ve informed just energy that I intend to do so.

Imagine an honest version of the Just Energy door to door salesman:

”
– Sign up with us, and you’ll never receive any information letting you know if you are actually saving money, or even breaking even.
– Should you move, despite your old gas bill being paid in full, and the account closed, we will then send collection agencies after you for exorbitant contract breaking fees.
– We won’t attempt to supply you with any information saying that there is a contractual obligation to continue using our company as a distributor. We prefer to send collection agencies first.
– Our company is inept. Should you have a contract dispute, we will take a month and a half to mail you a copy of the contract so that you can verify that there was in fact a legally binding agreement.
– We also cannot email documents in less than two weeks, and have to be called repeatedly to attempt to get us to do so. We will also initially deny that we can even email documentation. We will loose requests to surface mail it, so you’ll have to call us many times, and spend hours on the phone with us.
– Should you separate with your spouse, we will add to your grief. We don’t know anything about compassion, and at a time when you already have enough stress, we consider it our job to add to it. Instead of cancelling a contract associated with a pre-marital home we require one of the former spousal partners to assume contract associated with a house that neither party even lives in anymore.
– Should you actually insist on terminating the distribution agreement, we will then let you know that a variable rate agreement is possible. Of course we prefer to price gouge at inflated fixed rates, so this will not be advertised or made known, except as a last resort to keep collecting money from you.
“

He also wrote:

I was browsing your homepage and all I can see are calculations and equations. Then all of sudden there is a single post on top about Just Energy. You really hate these guys and I can’t blame you, there are many good reasons to hate Just Energy.

Yup, if they start to be upfront with homeowners, they won’t be where they are today, $2 billion cooperation. They understand not a lot of folks know about regulation on gas and electricity and that is what they are taking advantage of. Misinformed people and you’re absolutely right, Just Energy doesn’t care about their customers.

Just last year they changed their name to Just Energy, before that it was Ontario Energy Savings, Alberta Energy Savings and down the states it was US Energy Savings.

Ontario Energy Board? Ontario Energy Savings? Which one is a private company and which one is a real government body? Even the name is a scam, and who approved this? Hmmm…

Their former names imply some kind of government affiliation and the name Energy Savings imply savings, but that’s not true.

The only time Just Energy will contact you is through the (misleading) door-to-door sale about “energy savings” and then the follow up call to reaffirm over the phone after 10 days. After that you won’t ever hear from them again. No thank you package for joining, no mail telling you any information and when you move go talk to their collection. Gee I wonder why people hate them.

Just look at their own website, I think its Justenergy.com and you won’t find any information about the rates and different prices comparing their rates vs the local utility. After all, gas and electricity are their main products. The company argues it is so hard for them because gas and electricity prices change every day. That’s true but why are there other providers selling the exact same thing with their rates on their websit?

Oh I can go on and on …

To which I said

Changing names quickly is another form of misdirection. The company probably builds up negative feedback and routinely changes names to help minimize the damage.

I wouldn’t say that I hate them, but I do hate having been dumb enough to have been exploited by them. Having had that happen, I’ll not hesitate to make my story available. Perhaps I can help at least one other person avoid the same thing.

As you pointed out my single rogue post on this company along with the rest of my math and physics and computer programming obscurity will likely go unnoticed.

My off the cuff remark about the company changing names periodically is speculation. I don’t know if this has actually happened.

The undeclared US war on Yemen started with the pretense of liberating the country from a tyrannical dictator. Deja-vu
anybody? Sounds like Iraq all over again.

My immediate question upon hearing this, is wondering who has been financing this dictator and supplying weapons to his armies and police forces. Given the geography I’m sure oil revenue is part of it, but I’d not be the least surprised if US provided weapons and weapons training had also been involved, nor would I be surprised if US money was also tossed into the pot.

It also seems to me that the military-industrial-political complex of the US appears to always drive at least one overt active war with at least one country at any given time. What was the longest interval in the last 60 years that the US was not actively running some sort of war campaign?

With congressional pressure to end the Yemen bombings that have gone on longer than the 60 day maximum time interval allowed by US law without an explicit declaration of war (and congressional financing thereof) we now hear that the CIA will continue the mantle of Yemen bombings under the guise of Al-Queda and counter terrorist efforts. This seems to me a direct confirmation that the initial bombing in Yemen under the guise of eliminating a dictator, was nothing more than an excuse. With the Afgan and Iraq wars both unsuccessful and unpopular (unless military spending is the metric for success), Yemen’s leadership provided a good excuse for another war. However, since it is an undeclared war, it looks like it now has to go covert to be maintained.

It amazes me how the political and media puppets of the military industry can convince enough people that violent action against believed terrorists has any benefit. It certainly has benefit to weapons manufacturers and other war profiteers, since this violent action creates both the both the US terrorism and the stereotypical terrorism that they require to continue their business.

EDIT: foot in mouth
I need a serious geography lesson. I can’t keep the US wars straight in my mind, and appear to have gotten Yemen mixed up with Libya. Yemen sounds like it’s just a covert war right now, whereas Libya is the one that is being waged without congressional approval. To add to the confusion is the talk that Syria is the next US war.

Motivation.

I was having algebraic trouble verifying orthonormality relationships for spinor solutions to the Dirac free particle equation, and initially started preparing these notes to post a question to physicsforums. However, in the process of doing so, I spotted my error. A side effect of making these notes is that I got a nice summary of some of the relationships, and it was a good starting point for some personal notes expanding on the content of these chapters.

Context for the original question.

In Desai’s QM book [1], the non-covariant form of the free particle equation is developed as

where each block in the matrix above is two by two. Recall that

\begin{subequations}

\end{subequations}

so

For spin up and spin down states, the positive energy solutions are found to be

and the negative energy states associated with are found to be

The z-axis spin up state and spin down state are also used to find one specific set of states for the positive energy solutions

\begin{subequations}

\end{subequations}

and negative energy solutions
\begin{subequations}

\end{subequations}

(the book uses for both the negative energy states, but I’ve used here for the negative states for consistency with the covariant equation solutions).

Later a complete set of states are identified as solutions to the covariant Dirac equations , , where as follows

\begin{subequations}

\end{subequations}

Note very carefully the sign change above. This is important, since without that we do not have a zero inner product between all and states. Spelled out explicitly, these states for the z-axis spin up case are

\begin{subequations}

\end{subequations}

In order to construct a covariant current conservation relationship a quantity, the Dirac adjoint, was defined as

where

This Dirac adjoint can be used to form an inner product of the form

It’s claimed in the text that we have , , and . Let’s verify all these relationships.

Some checks.

Verify the non-covariant solutions.

A non-relativistic approximation argument was used to determine the solutions 2.6a, but we can verify that these hold generally by substitution. For example, for the positive energy z-axis spin up state we have

Here the relationship between the free particle’s energy and momentum has been used, so we have a zero as desired, and no non-relativistic approximations are required. We can show this generally too, without requiring the specifics of the z-axis spin up or down solutions. This is actually even easier. For the positive energy solutions 2.4 we have

where the identity has been used. For the negative energy solutions 2.5 we have

Is there something special about the z-axis orientation?

Why was the z-axis spin orientation picked? It doesn’t seem to me that there would be any reason for this. For y-axis spin, recall that our eigenstates are

Our positive energy states should therefore be

It is straightforward to verify that these are solutions. We find for example that

as expected. What’s the general solution? For

we find

with eigenstates
\begin{subequations}

\end{subequations}

Should we wish to consider an arbitrarily oriented spin, expressing in spherical coordinates also makes sense

and we find (with and for and respectively)

\begin{subequations}

\end{subequations}

Substitution back into 2.4, and 2.5 is then easy. Expressing these with the angles expressed as sums and differences is strongly suggested. With , and this gives

\begin{subequations}

\end{subequations}

This is probably about as tidy as things can be made for the general case.

Expanding the current equation.

With

We can expand the current for a general spin up or spin down state with respect to either the positive energy or negative energy solutions.

Those (normalized) solutions are respectively

For the th component of the positive energy solution current we have

Similarly for a negative energy solution we have

We can expand the inner term of both easily

so that we have for the positive and negative energy solutions currents of

This finds the velocity dependence noted in section 33.4, but does not require taking any specific spin orientation, nor any specific momentum direction.

Unpacking the covariant equation.

Pre-multiplication of the covariant Dirac equation by should provide a space-time split of the Dirac equation. Let’s verify this

but

This recovers 2.1 as expected.

Two by two form for the covariant equations.

If we put the covariant Dirac equations in two by two matrix form we get

and

This form makes it easy to verify that our solutions are

and

It’s curious to consider these part of a basis for a single equation. I suppose that all together they are actually eigenstates of the equation

or

which have the form of the Klein-Gordan equation.

Orthonormality.

Orthonormality for the vectors is easy to show, and we can do so without requiring any specific spin orientation

It’s also easy for vectors

For the cross terms we have

Resolution of identity.

It’s claimed that an identity representation is

This makes some sense, but we can see systematically why we have this negative sign. Suppose that we have a basis for which we have (rather than the strict orthonormality condition ). Consider the calculation of the Fourier coefficients of a state

We have

For , so that the coefficient is

The coordinate representation of this state vector with respect to this basis is thus