I can’t stomach the facebook feeds of my Israeli friends

August 5, 2014 Incoherent ramblings , , , , , , ,

As a child I was indoctrinated as a Scientologist (which I essentially gave up for Science), and don’t have any traditional religious affiliations to color my view on the world.  In particular, I do not have a Christian bias, I do not have a Jewish bias, and do not have a Muslim bias.  I have friends in all these groups.

I do have biases though.  I admit to, largely due to my father’s influence, having an anarchist and anti-government bias.  I think that he arrived at this position as a reaction to having been ejected from his homeland after the Russian and German governments alternately burning, pillaging, and raped their way through Estonia.  I do not consider the Israeli-Palestinian conflict to be a religious conflict, but one imposed by decisions that have been made by governments.  Governments imposed a social structure on a geography that should never have been there in the first place.  The Israeli situation is one that is supported by governments.  For example, it seems clear to me that the US government does not want to stop this conflict.  If they did, then they could stop arming one side, providing three billion dollars a year of “military aid” to the Israeli government.  You cannot give people that many weapons, and expect them to act peacefully.  Even calling this “aid” is disgusting to me.  This is corporate welfare for US arms dealers, funding them at the expense of the US taxpayer … but that is a different rant.

I have a number of friends from IBM that have migrated to Israel for reasons (presumably religious, but perhaps social) that I don’t think I will ever understand.  Now that they are there, I don’t expect any of them to be able to look at the situation objectively.  Now that the Israeli government is so thoroughly attacking the Palestinian people, I no longer see baby pictures on their social media feeds, but all the typical propaganda of a country that is attacking another, so desperately attempting to provide themselves with justification of the actions that are being taken by their government.  It is painful to see this kind of bias, especially from people that I know to be incredibly intelligent.  While I haven’t “unfriended” any of these people, I admit to having systematically unfollowed them on facebook, one after another as they push views that are so one sided they were painful to observe.  I found this deliberate unfollowing emotionally painful to do, but less painful than seeing them blindly towing their government’s party line and less painful then observing their refusal to see any of the historical context that generated this situation in the first place.

I don’t know how I would behave if I were living in Israel.  How would I behave when the bomb sirens start screaming?  How would I behave when I was fearing for the lives of my kids?  I don’t know that I would be able to look at things objectively.  I’d like to believe that I could, but could I fight the social pressures that support what seems like an irrational worldview from the outside?  Perhaps I am deluding myself.

As an outsider, I find it easy to accept the description of the militarized wall around the Palestinian people in Gaza as the boundary of an open air prison.  Periodic attack of these people with population pressure and bulldozers, sophisticated bombs, tanks and heavily armed soldiers is not consistent with what can easily be described as self defense.

I think it is counterproductive to label your enemies terrorists.  All warfare should be labelled terrorism.  What is known as terrorism is a created phenomena, and does not happen without it being a reaction to other events.  Hamas may be shooting their homemade rockets into Israel now, but this is an action that is in response to decades of oppression, enforced isolation, and a reaction to have been forced out of their homes and other violence.  As an outsider the Israeli government appears to be supporting systematic ethnic cleaning.  It is hard to see it any other way.

I’d like to understand the reasons that my now-Israeli friends had for going there in the first place.  How does it make any sense to impose even more population pressure on a situation that was already dire?  How can you, in the name of a religion, support a such a militaristic government?  If you were locked in Gaza with no hope, very little access to food and water and basic requirements for survival, if you had seen your friends pushed out of their homes with bulldozers and armed soldiers time and time again, if you saw your hospitals and universities and your power plants bombed, if you saw your kids with portions brains blown out by the fire of overzealous young soldiers armed to the teeth, how would you respond?  Would you try to oppose the incursion?  Would you also react with violence?

I think that only Israel can stop this conflict.  They are the ones in the position of power with all the options at their disposal.  If the Israeli people could be brave enough to put down their arms, to stop accepting military aid, to tear down the wall, stop the embargoes, stop the active propaganda warfare that fuels the conflict, and most importantly, to look objectively at the actions they have made that created this situation, then there could be peace.  Reacting with aggressive military force can only make the situation worse.

Just Energy settlement with Ontario Energy Board

August 3, 2014 Incoherent ramblings , , , , ,

 

If you happen to have been unfortunate enough to have natural gas billing with ‘Just Energy’ then you may know about what I would describe as their extortion like cancellation policies.  I’ve written of this in my old blog

https://peeterjoot.wordpress.com/2010/12/23/just-energy-canada-nasty-business-practices/

https://peeterjoot.wordpress.com/2011/01/04/just-energy-contract-complaints-going-nowhere/

https://peeterjoot.wordpress.com/2010/12/30/1693/

https://peeterjoot.wordpress.com/2011/04/29/just-energy-cancellation-finally/

The short story is that they wanted to charge me about $450 because I had moved without renewing a policy with them that I did not know I had in my name.  I had been fairly certain that I was paying more with them than I would have with the gas company distribution service, and had thought I had let the service expire.  They renewed it without my knowledge and sent no papers to confirm the renewal.

Their first method of contact for the fees they expected was through a legal like notice from a collections agency, which I felt to be a scare tactic.

I’ve detailed lots more about that unfortunate transaction, including how I got them to back off by both registering a complaint with the the provincial regulatory agency (Ontario Energy Board) and by contacting Toronto press providing details about this.  They actually contacted the Ontario Energy Board, and blatantly lied to them with a statement that they had settled with me, so that my complaint would be dropped.

Shortly after my cancellation interaction with them, new Ontario Energy Board regulations went into place to help protect new customers.  Existing customers weren’t protected, and had to go through the complaint and appeals process as I did.  It appears that the story did not end with the 2011 regulations, and I got the following “settlement” letter from Just Energy not that long ago.  Check out this rather pathetic attempt at spin:

just energy letter

This PR person tries to make it appear that their massive discharge fees weren’t policy, but were just an unfortunate mistake.  Unbelievable!

It seems like the Ontario Energy Board subsequently proceeded with a class action suit against them, since I recently got an unexpected check in the mail, via the gas company, with an account number that must have been the account from my previous house.

The purpose of this blog post is to inform anybody else that had gas distribution via Just Energy prior to 2011 that such a settlement has been reached.  If you have moved and perhaps no longer have a mailing address that allows you to receive correspondence from them (or the gas company they charged through), then you may have not only a rebate waiting for you, but can perhaps also get your cancellation fees refunded entirely (if you paid it, as I expect many people that were threatened by the legal letter would have).

Review: Bodum Insulated Plastic Travel French Press Coffee and Tea Mug

July 29, 2014 Incoherent ramblings , , ,

 

This product is basically complete crap.  It appears to be made of non-heat resistant plastic, and will crack.

photo 1

In the picture above, the cup is empty, but because of the cracks, coffee cream and sugar has crept into the interior, and is now a very suspicious looking soup of some sort of possibly virulent bacterial soup that can probably leak back out into my coffee if I was to continue using it.

I have had two of these Bodum traveller coffee presses.  The first I bought and it cracked first along the seam above the threads, so that the inside separated from the outside.  I crazy glued it back together, but it then proceeded to get spiderweb like cracks along the base, like so:

photo 2

The second such mug I had was bought for me, since my other one had died.  I’d not have bought a replacement myself, and would recommend to anybody else to stay away from this product entirely.  This second cup never separated at the top, but also cracked along the base and up the sides like the original.

Note that Hudson’s Bay, where both of these products were purchased, no longer carries Bodum products.  Perhaps that was due to poor reviews?

Some Unix command line one liners

July 24, 2014 perl and general scripting hackery , , , , , , , , , ,

Here’s a couple one-liner shell commands collected over the last couple months when it occurred to me to record them.  Each of these I thought were somewhat notable at the time I did so.

Nested “backquotes”

I often have to run commands where it is convenient to have the parameters of the commands in a file.  A simple example is to edit all the files in a list of files, say:

vim `cat c`
# or:
vim $(cat c)

A useful variation of this is to do the same using the output of a command that also takes its input from a file. Here’s one to edit all the “ancestor” files in the version control system, assuming a command vcsancestor that produces such filenames

vim `vcsancestor $(cat c)`
# or
vim $(vcsancestor $(cat c))

Observe how two different methods of embedding shell commands can be combined into one command. In the past I often used for loops for something like this, say:

for i in `cat c` ; do vcsancestor $i ; done > f
vim `cat f`

(because backquotes can’t be nested). It only recently occurred to me that this isn’t a limitation if $() style subshells are used.

Batching commands with xargs

When working in a version control system, it’s often useful to do a batch checkout of all the files that have compilation errors.  Suppose that you made changes that produced the following compilation error output:

$ cat compile.errors
"satauth.C", line 978.30: 1540-0274 (S) The name lookup for "sqlorest" did not find a declaration.
"scrutil.C", line 142.52: 1540-0274 (S) The name lookup for "SQLNLS_SAME_STRING" did not find a declaration.
"testdrv.C", line 1146.16: 1540-0274 (S) The name lookup for "SQLO_OK" did not find a declaration.
"testdrv.C", line 183.15: 1540-0274 (S) The name lookup for "SQLO_OK" did not find a declaration.

Here’s a one liner to checkout all the files in this list of compilation errors (this is AIX xlC error output):

cut -f2 -d'"' x | sort -u | xargs cleartool checkout -nc

The cut command selects just the (first) double-quote delimited text, then dups are removed with sort -u, and finally xargs is used to run a command on each of the files in the resulting output

Looking for a subset of information delimited by markers on separate lines

grep works nicely for matching patterns that are constrained to a single line.  If you are using gnu-grep you can use the -A and -B options to find stuff after and before the pattern of interest.  As an example, in our stacktrace files (a post mortem crash dump format), we have output that includes:

<pre>

<StackTrace>
—–FUNC-ADDR—- ——FUNCTION + OFFSET——
0x00002AAAC74EF263 ossDumpStackTraceInternal(unsigned long, OSSTrapFile&, int, siginfo*, void*, unsigned long, unsigned long) + 0x06e3
0x00002AAAC74EFE89 ossDumpStackTraceV98 + 0x007f
0x00002AAAC74E5C5F OSSTrapFile::dumpEx(unsigned long, int, siginfo*, void*, unsigned long) + 0x04db
0x00002AAABA6EB313 sqlo_trce + 0x0a6f
0x00002AAABA9C52B5 sqloDumpDiagInfoHandler + 0x047b
0x00002AAAAABD5E00 address: 0x00002AAAAABD5E00 ; dladdress: 0x00002AAAAABC8000 ; offset in lib: 0x000000000000DE00 ;
0x00002AAAAABD30A5 pthread_kill + 0x0035
0x00002AAAB5D828DF ossPthreadKill(unsigned long, unsigned int) + 0x0053
0x00002AAABA9C6CA1 sqloDumpEDU + 0x0091
0x00002AAABED7A853 sqlzerdm + 0x149b
0x00002AAAB5D7D745 sqle_remap_errors(int, sqlca*, sqeAgent*) + 0x01c9
0x00002AAAB5DE8717 sqeApplication::AppStopUsing(sqeAgent*, unsigned char, sqlca*) + 0x10b1
0x00002AAAB5D46FF5 address: 0x00002AAAB5D46FF5 ; dladdress: 0x00002AAAAACE1000 ; offset in lib: 0x000000000B065FF5 ;
0x00002AAAB5D4073F address: 0x00002AAAB5D4073F ; dladdress: 0x00002AAAAACE1000 ; offset in lib: 0x000000000B05F73F ;
0x00002AAAB5D44F35 sqleIndCoordProcessRequest(sqeAgent*) + 0x3959
0x00002AAAB5DA8E55 sqeAgent::RunEDU() + 0x061b
0x00002AAABEDAC2C7 sqzEDUObj::EDUDriver() + 0x035d
0x00002AAABEDABBD7 sqlzRunEDU(char*, unsigned int) + 0x0053
0x00002AAABA9BFC62 sqloEDUEntry + 0x1460
0x00002AAAAABCE2A3 address: 0x00002AAAAABCE2A3 ; dladdress: 0x00002AAAAABC8000 ; offset in lib: 0x00000000000062A3 ;
0x00002AAAC7F376DD __clone + 0x006d
</StackTrace>

</pre>

Here’s a one-liner to grab just the portions of these files within the delimiters (with some other filtering that isn’t of terrible interest to describe)

for i in *stack* ; do grep -A40 ‘<StackTrace’ $i | grep -v ‘(/’ | grep -B40 ‘/StackTrace’ | c++filt ; done | less

Unix to Windows path separator switching

Suppose we have some unix filenames

</pre>
$ head -5 f
/vbs/bin/AEDefines.pm
/vbs/bin/AEMacro.pm
/vbs/bin/bld_shared_lib_Darwin
/vbs/bin/chglibpaths
/vbs/bin/chglibpaths_Darwin

and want the Windows paths for the same

</pre>
$ head -5 f | tr / '\\'
bin\AEDefines.pm
bin\AEMacro.pm
bin\bld_shared_lib_Darwin
bin\chglibpaths
bin\chglibpaths_Darwin
<pre>

The tr command above looks a bit like ascii barf, and will translate forward slashes to backward slashes (perhaps for input that’s a list of files).

I didn’t understand the requirement to both single quote the backslash as well as escaping it, but Darin explained it for me:

Quotes allow the backslashes to go through the shell to tr.  And tr has its own backslash escape mechanism (so you can do things like transform \n into \r or something – where you’d then specify ‘\n’ or just \\n and ‘\r’ or \\r).

Vim: replace search results with contents from a file

Probably related to merging conflicting changes, I wanted to completely replace the implementation of a particular function:

void foo() {
 ...
}

This was an easy way one liner method to do that replacement, deleting the implementation of foo, and replacing it with the one that was found in the file ‘foo’

:,/^}/ !cat foo

file:line: delimited output for a single file

The grep -n command is very handy for producing file:line:content delimited output.  In particular, you can iterate over such output with vim -q.  When you want to do this for a single file, grep -n doesn’t include the filename, defeating a subsequent vim -q (since vim then doesn’t know what file to open).  Here’s an example

$ cat my_file_to_search
blah patternOfInterest hi
foo goo
patternOfInterest bye
blah patternOfInterest hi
blah patternOfInterest hi
foo goo
patternOfInterest bye
foo goo
patternOfInterest bye

$ grep -n patternOfInterest my_file_to_search | tee v
1:blah patternOfInterest hi
3:patternOfInterest bye
4:blah patternOfInterest hi
5:blah patternOfInterest hi
7:patternOfInterest bye
9:patternOfInterest bye

To get vim -q’able output, just include a second non-existent dummy file in the search

grep -n patternOfInterest my_file_to_search a_file_that_doesnt_exist | tee v
vim -q v

I usually use a very-short filename for the “does not exist file”, say, .u (which presumes I also don’t create little hidden files .u in my day-to-day work).

Some initial thoughts on a read of William Blum’s “Rogue State”

July 22, 2014 Incoherent ramblings , , , , , , , , , , , ,

I have started reading the disgusting book “Rogue State, A Guide to the World’s Only Superpower” by William Blum.  It is disgusting not because it is poorly written, but because of the US government, CIA, and military atrocities it details.

It is also a discouraging book, and hard to stomach, and downright depressing.  It is, however, encyclopedic, thorough, and contains extensive references.  If you ever wanted a detailed list of US atrocities to counter arguments that governments, military, and intelligence agencies serve us positively, this book has everything on the shopping list.

There is a huge disparity between popular and media perception of the USA and what is presented in this book.  This disparity brings to mind the paradigm shift discussion of Kuhn’s “Structure of scientific revolutions”.  The perception of the USA (or its NATO and economic puppets like Canada) as freedom loving “democracy” is so indoctrinated into us that to accept the reality that exactly the opposite is true requires a complete paradigm shift.  It is too painful to realize that we have to totally discard our current world view, and be willing to accept the pain and discomfort associated with the mental revolution required to see the actual state of the world.  Kuhn also points out that such a revolution isn’t going to happen until people have a ready made alternative to the current paradigm.  The history of warfare and evil in our world is so pervasive, that I don’t think we have a ready made model of peaceful interaction available for this switch, and are therefore willing to overlook the errors of the current model.  I think that this book details enough of those errors that it puts the current world view on shaky ground.
I find this author to be is an extremely effective communicator.  A sample of his style can be found in this 2002 speech.

The speech above also contains a quote from the intro in “Rogue State” that I found particularly striking:

“If I were the president, I could stop terrorist attacks against the United States in a few days. Permanently. I would first apologize — very publicly and very sincerely — to all the widows and orphans, the tortured and impoverished, and all the many millions of other victims of American imperialism. Then I would announce that America’s global interventions have come to an end and inform Israel that it is no longer the 51st state of the union but -– oddly enough -– a foreign country. I would then reduce the military budget by at least 90% and use the savings to pay reparations to our victims and repair the damage from our bombings. There would be enough money. Do you know what one year’s military budget is equal to? One year. It’s equal to more than $20,000 per hour for every hour since Jesus Christ was born.

That’s what I’d do on my first three days in the White House. On the fourth day, I’d be assassinated.”