Stark’s Law

I have a principle that I would love to see become part of the lexicon of Software Development, although I think it applies to all human endeavors (like Murphy’s law).

Stark’s law states:

Any idea, principle, or philosophy can, and probably will be applied in a dogmatic, harmful way.

Glen Stark

I’m still working on the wording. Suggestions welcome.

The fundamental principle at work here is simple: In the end most things boil down to trade-offs. Following specific principles is always a good idea, right up to the point where the trade-offs no longer work. People have a tendency to take useful, positive things and be dogmatic about — try to turn a nuanced discussion into a binary, oversimplified one.

If I get sufficiently motivated, I should make multiple posts of Stark’s law in action.


An important consequence of Stark’s law is one of responsibility. If you want to spread a principle, philosophy or approach to something, you should provide the necessary disclaimers. I.e. you should be able to give an example of how Stark’s law might kick in.

If you are unable to identify how a principle could be applied to harmful extreme, I would suggest you probably don’t understand the nuances and consequences or the principle sufficiently well.

Applying Stark’s Law Recursively

Obviously Stark’s law applies to itself. An obvious way one could take the principle to a ridiculous extreme is to conclude that all philosophies, ideas or principles are garbage.

This outcome is fairly easily mitigate. Consider the nuances of any philosophy & try to identify under what circumstances said philosophy might be useful. Don’t be dismissive.

If anyone can think of other ways to abuse or dogmatize Stark’s law, please let me know!

This is very hard to process

This is all very hard to process.

Looking at my Twitter feed today was a real shock. Given the time difference, I guess these videos are all from yesterday.

In New York there are really ugly looking protests going on. It’s hard to interpret it all. I see people throwing trash in streets, and smashing police barricades. I see police in violent altercations with protesters, but I can’t tell anything about the context. Around 0:25 I clearly see a protester punch a policeman, but I don’t know what happened just prior to that. I am pretty sure I see fires burning in storefronts. If I were living in these neighborhoods I think I would be terrified. 0:57 seems to show a very aggressive policeman assaulting protestors, but the editing makes it unclear how this started. There’s a lot of property damage. I hear gunshots at the end which I assume are police firing rubber bullets.

Someone captured footage of a policeman getting out of police car, in a cordoned off area of Washington DC. He was dressed as a protestor & claimed to be a CNN reporter when questioned. The obvious conclusion is that he is an agent provocateur. The same thing has been happening in New York. This sort of thing deeply, and rightly, undermines trust in institutions. We should remember that mistrust in the police institution is one of the underlying causes of the current unrest.

The presence of plainclothes officers embedded in the crowd make is much more difficult to interpret footage like this. Note at 0:26 how naturally one of plainclothes offices pushes around protesters. The sheer amount of violence the inflict on a supine opponent is appalling. It makes things like this legitimately suspicious.

Here we seem to see police aiming non-lethal rounds directly at obvious news reports. Apparently 7 people were shot at that protest. Here the NYPD slams a protester with a car door. Here’s the Oakland police beating up a black man at a protest. A police precinct in Minneapolis was burned down. There are huge numbers of peaceful protesters. The Oakland police shot what seems to be clearly a peaceful protestor with rubber bullets. Here is another video of police attacking. Apparently a driver refused to transport a busload of arrested protesters. Here a driver seems to deliberately run over protesters. Here is an immense group being allowed to protest in peace. Elsewhere, the National Guard was deployed. I found this image from Kentucky particularly touching.

The police are suffering too. Let’s keep in mind that they too are human beings. When the institution defends itself, it claims abuses are caused by outliers. “A few bad apples” is a popular refrain. If things are to improve, we have to recognize that institutional change is required, meaning the root problems are systematic and institutional. While a few bad apples must certainly do exist, I try to remember the police are full of good men and women struggling to do right in an impossible situation. I suspect may struggle to maintain their humanity inside troubled systems. Here’s more police violence in New York. Remember that policeman pretending to be a CNN reporter? Here’s Omar Jimenez, a real CNN reporter, being arrested by Minneapolis while reporting live. Here is another driver running over a protester. It’s difficult to tell if the drivers were being aggressive, or were panicking. This is absolutely baffling.

I would love to know more about what’s going here. It sounds like a shooting at a Detroit protest. Here’s how people in Adelaid got see the U.S. today. At some point, I just had to quit looking. It doesn’t seem to end.

My son asked me why these things are happening. I think Cornel West did a great job on answering that question, but I have to put some thought on how to explain it to a six year old.

Living with pandemic.

Yesterday was Friday the 13’th 2020. I am an American living in Switzerland. Like most countries, we are currently experiencing a rapid evolution in risk regarding Corona virus. Because of Switzerland’s close proximity and strong connection to Italy, the epicenter of the European outbreak of Covid-19, I believe the state of the pandemic spread in Switzerland, as well as Switzerland’s response to the virus is somewhat further along than that of the U.S., but the situation is evolving so quickly everywhere, this analysis could be wrong or obsolete in a matter of days.

My wife and I both happened to be free from Friday afternoon, so we decided to do some errands while everything was likely to be less crowded. At the thrift store an elderly gentleman (70’s?) asked the cashier why they were wearing gloves, to which the answer was “because of the Corona virus”. The elderly man went on something of a rant about how we are making too big a drama about all of this.

At the grocery store we were surprised to find the parking lot jam-packed during what would normally be office working hours. On the way home we were shocked at the traffic at 16:00 — usually unheard of. Dry and canned goods at the grocery store were also in short supply with several empty shelved — I could find any beluga lentils or brown rice for example. When we got out my wife checked the government news site to see what had happened — Switzerland had announced the closing of its school system through the Easter holiday.

My wife teaches the Swiss equivalent of Junior high school, and will be expected to teach online from home. My son Scott will now have to spend his days at home, and will have to avoid forming groups of children. Normally we send Scott to his grandparents on Monday afternoons. Given that they would be especially vulnerable to Covid-19, we informed them that morning that we be keeping Scotty at home.

Now my wife has a significant increase in her workload as she has never taught online before and there will be growing pains. It’s difficult to know how the work balance will shake out over the next months, but it’s unlikely that her life will get any easier. At the same time we’ll have our son at home constantly, except for occasional play date. We are in the lucky position that I am between jobs until May 4’th, which means I can jump in and take up the childcare slack until then. Things will be significantly more challenging for others.

Then, yesterday evening I started coughing. I have been feeling low energy for the last couple of days which I attributed to overexercising recently but now it was clear that I am fighting off a cold. I’m not concerned that I have Covid-19 at a rational level. Emotional responses are a different matter, but they too are more or less under control. I’m not even that sick. I plan on going mountain biking today, and maybe for a run tomorrow. But as a responsible citizen I will have to ramp up my social isolation significantly. Even without Covid-19 a cold or flu is a tremendous burden to impose on somone right now. The more I inconvenience myself, the less I inconvenience others. The more we all take pains to avoid spreading any illness, the better for society as a whole. We all benefit from not overloading our medical system.

So mostly I’m annoyed. In the last week I was exposed twice unnecessarily and completely avoidably by neighbors and colleagues. Last Saturday the father of one Scott’s friend asked us to join them skiing. I learned on the car ride to the mountain that their one child was at home with a flu, and I found myself sitting next to a coughing driver for over an hour. Two days ago Scott had two friends over and one of them started coughing. I had to take her home and explain to the parent that she shouldn’t be sending he daughter to kindergarten or to people’s houses even is “she only has a cough”.

During the current outbreak there is no such thing as “just a cough”. As the risks of Covid-19 increase, any possible infection has to first be treated with self isolation. If symptoms persist or align heavily with Covid-19 it has to be tested, and serious cases have to be treated. Being dismissive of a cough that is minor for your child might lead to the infection and death of vulnerable citizens as Covid-19 often has mild symptoms in children. Even a common cold or flu outbreak can lead to overloading the health systems capacity for testing for Covid-19.

I now find myself in a situation with two extremes of outcomes: In the best case I self-isolate, I fret unnecessarily about the risk that this is nothing serious, and life goes on as normally as it can under the current circumstances. I’m inconvenienced but that’s the extent of the problems generated. In the worst case, my recent exposures to simple cold & flu cases are not the source of my symptoms, and I am infected with Covid-19. Because of my false confidence I do not take full precautions and still wind up infecting other people, contributing to the overloading of the medical system, and leading indirectly to the death and suffering of vulnerable members of society.

There’s lots of outcomes in between — for example I spread my simple cold or flu to others (like my neighbors likely did to me or others), leading to more noise in the signal, more stress like mine, and maybe more cases where people have false confidence that their Covid-19 infection is just a cold or flu leading to faster spread of the novel virus. So as a responsible citizen I have to take my own infection seriously even if I am confident I don’t have Covid-19.

Now, because of the no-doubt well meaning lack of consideration of my neighbors I am having difficult and stressful conversations with my wife about how much I should self isolate from my family. I normally help with the housework and cooking. The new circumstances will only increase her workload and she will need more support from me, but if either she or Scott get a cough then things get more difficult.

So we have to align on what housework I should still do. We decided that as long as I wash my hands obsessively and follow correct coughing protocol I can clean the kitchen and prepare cooked food. If I want to taste what I’m cooking though I’ll have to use a new utensil each time. I’ll fill the dishwasher, but leave it to my wife to empty it. I’m sleeping in a separate room, but we will share the same room when necessary (for example we both want to use the home-office) as long as we keep it well ventilated and keep over a meter distance. Hugging, kissing, cuddling is out for the time being. As Covid-19 infections rise similar symptoms will require us to take more severe measures imposing even greater inconvenience.

The Covid-19 outbreak requires a greater degree of social responsibility. If your child comes down with a cough, you must isolate your child for the sake of the other children in the neighborhood. In the best case, you are spreading inconvenience and stress. In the worst case you are spreading a potentially fatal disease and contributing to the overload of a medical system which will be strained even if we are all highly responsible. If you are young and healthy Covid-19 is not a big risk for you. Chances are good you are going to get it eventually no matter what you do. But slowing down the spread of the virus, as well slowing or avoiding the spread of less dangerous, more nuisance viruses means de-stressing the medical system, which will save lives. In the end we do this to protect the vulnerable member of our society, including the cantankerous gentleman at the thrift store who was complaining that we were making too much drama out of this.

When the Covid-19 outbreak is a thing of the past, I hope one of the lessons we can learn and build on is a higher social awareness, and increased sense of social responsibility. We live in an age where our most challenging problems — environmental collapse, climate change, pandemics — are global problems and affect us all. If we learn to be more considerate and thoughtful of others as a consequence of the outbreak we can turn a bleak and horrible event into a positive, if painful, learning experience.

How did Jesus’ teachings turn into Catholicism?

Before I start, let me say I have a lot of respect for the modern Catholic church, and the work that pope Francis is doing.  If we look at the Roman Catholic church historically though, I think everyone would have to agree the the churches behavior diverged radically from Jesus’ teachings, and I’m fascinated about how that happened.

So, I was a little high the other day, and readying Robert Wright’s absolutely wonderful book “Why Buddhism Is True”, which is enlightening, witty and clever.  Everyone, really everyone should read it.  Go, buy it and read it now.  It will be a much better use of your time than reading this post.

Wecome back!  Wasn’t that a good read?  As someone who identifies strongly with Buddhism, but doesn’t have much knowledge or cultural investment in Buddhism, I was interested to learn about the existence of various schools of Buddhism.  This led me to think how this wasn’t much different than the existence of various sects of both Judaism and Christianity.  I’m sure the same applies to Islam, but being even more ignorant of Islam than I am about Buddhism, I can’t really pontificate on that.

From there my default mode network took me back to a conversation I once had with a young Swiss person who had made some disparaging remarks about Christianity and compared it negatively against Buddhism, saying something about how Buddhism didn’t lead to mass killings out of religious intolerance, or brainwashing people to follow governments, or some such thing.  Christianity’s violent and intolerant history is certainly troubling, and I sympathized with him on the topic, but I had to point out the (then) recent transgressions committed in the name of Budhism in Myanmar, and previously in Thailand.

Now as I learn the teachings of the Buddha, I’m quite shocked that such things could have occurred in the name of the Buddha, but then I thought about poor Jesus.  How the heck could anyone take the teachings of Jesus and decide yeah, Jesus wants me to go on a crusade, or heck, Jesus wants me to blow up an abortion clinic.   How did a commie hippie, who treated a prostitute as an equal wind up being the basis of a religion that treated women and sex in the way that Catholicism has.

No doubt many Muslims feel the same way about violent Islamic religious sects.

That would be a fascinating book:  the corruption of ideals — how various institutions corrupted the religious ideals on which their existence was founded.  Anyone know of good work on the subject?

What would we be talking about if we weren’t talking about television?

I don’t keep accurate statistics about how much television I watch during the week.  I suppose the figure would shock me, but I like to think it averages about 5 hours a week in the last couple of years.  It’s certainly significantly lower than the American average of 35 hours per week.  I found that figure completely shocking.

When I discuss television with friends and colleagues, I often feel the need to mention my feeling that commodity-media occupies too large territory in our mind space.  I generally refer to television, since television is most obvious culprit.  The television tends to be the most prominent feature of most peoples living rooms.  I haven’t been to the states in a while, but when I lived there it wasn’t unusual to find houses with televisions in the bedrooms, kitchens and bathrooms.  I think my sister has a television in her bedroom.   I fear things have gotten worse in this regard since the advent of flatscreens, but perhaps the existence of tablets and smart phones has killed off that particular symptom.

Swiss tend not to have so many televisions, but tablets and smart phones are ubiquitous and typically one wall of the living room is dedicated to the television.  We don’t have a television, so when I walk by my neighbors and see their ginormous media systems I’m reminded of Fahrenheit 451 (the book, I don’t know the show), or of an altar with the television taking the place of god-statue.

I often find myself thinking about all of the hours I’ve spent on youtube, watching people discuss minutia of Game of Thrones.  I think back to my childhood, listening to people make complex analysis of sports teams based on an encyclopedic knowledge of the history of the sport, the teams and statistics of individual team members.  Imagine that mental energy was being spent on more meaningful topics, like the harm we are doing to our planet, our decreasing chances of survival as a species, economic injustice, social inequality, famine, overpopulation, resource exhaustion, racial intolerance, teacher wages, the health of our local schools, the wellbeing of our children, what to cook for our next meal, the four noble truths of the Buddha… 

It’s not hard to accumulate a list of things that would be better occupiers of our intellectual landscapes, our energy, our time, our lives.   Even if you don’t agree with all the things that come to my mind, I’m sure you have some that come to yours, and no doubt there is some intersect somewhere between our lists.

Imagine if we had as many youtube channels dedicated to discussing those lists, and the content of those lists as we currently have discussing Game of Thrones?  I’m not picking on Game of Thrones here, it’s just that it is my particular sin.

So this post is me taking a little time away from the television to talk about something a little more important than television — the fact that we watch too much television, we talk too much about television, we let the television (streaming media and movies are all television) distract us from interests and activities that would make our lives better.  So let’s be aware of it and strive to do better.

Day 4 of my second extended fast

I’ve been 10-15 kb (22-36 lbs) overweight for well over a decade. I’m vegetarian and eat quite a healthy diet, although I suffer from sugar addiction. I go months at a time where I rigidly control my calories, avoid sugar. I exercise a lot. In that time I ran a marathon, ran an olympic length triathalon (the XTerra in Switzerland), exercised regularly including strength training, yoga, and endurance work. With hard work I could get my weight down to about 88kg, but I always plateaued around there. Inevitably and injury, illness, stress, or a holiday season would come by, and the weight would creep back on, the trousers would get tight, and I’d have to buckle down again. I never let myself get much past 93kg, but I’m pretty sure my wife never knew me with less than 88.

This last summer I started experimenting with with fasting. I started out doing a couple of 22 hour fasts (dinner to dinner), then tried a 48 hour fast, a 4 day fast a few weeks later.

I went down from 93 to 89 pretty quickly with that stuff, and felt pretty good about it, although I did find the longer fasts difficult. I bought a book The Complete Guide to Fasting by Jason Fung, who has a pretty strong internet presence and makes pretty compelling arguments in favor of giving fasting a try.In that book I learned that there are some pretty serious researchers who are pretty convinced that fasting for a week a year dramatically reduces the probability of getting cancer. So I tried a week long fast.

That got me down to around 87 kg, and I’ve maintained that with two or three 22 hour fasts most weeks.

For months after I hit 87 I felt pretty good about my weight. I was using a notch smaller on all my belts, my formerly tight trousers were looser and more comfortable, although I had to retire some of my looser stuff as it got too baggy. When I looked in the mirror I saw the difference to my 93 kg self and felt pretty good about it. When I noticed the weight creep up a little, I just did a 20 hour fast or two, and didn’t overeat too much in the non-fasting time.

The great thing about this approach for me was I could still enjoy food. I could pig out during an evening out or a really good meal without worrying about my weight, since I could just do a day-fast or two to compensate for it. By now going 22 hours without food takes virtuall no will power, and involves no discomfort. I’m saving money and hassle since I now seldom buy or pack a lunch for work – going from breakfast till dinner without eating is peanuts for me.

After carrying ~87kg for a couple of months, it’s now normal for me. When I look in the mirror I see the paunch and the flab, not the reduction. I still don’t fit in those size 34 jeans that have been sitting in my closet for 10 years, and I now that all I have to do is stop eating for a few days to level it down. Christmas is coming, and I’d like to impress my family with my newly slim figure.

So Saturday I told Bettina I’d skip dinner. Suday I told her I’d continue my fast. Monday I rode my bike through the snow with Scotty in the trailer to take him to swimming lessons and I was surprised how energetic and fit I felt. The last time I’d done a longer fast I’d felt a bit schlap, and found myself quickly out of breath. This time I didn’t bike noticeably slower than normal. So when Bettina came home I told her I would just keep on fasting until I got fed up.

I’m being a little less strict about the fast this time around – I’m putting a little almond milk in my tea. I’m taking a multivitamin and mineral supplement every day. Therefore I’m doing a lot more sports. Today I rode in to work – 22 km and 200m climbing, and I feel pretty good so far. Let’s see how I feel coming home. In fact I feel more energetic than normal.

So now I feel comfortable making some observations about fasting:

  • It’s convenient and easy to integrate into my life. The short fasts make life easier – no food preparation, no lunch breaks, no sluggish feeling after work. The longer fasts mean missing family meal time, but with a little planning that can be compensated for. I take advantage of meal time to get chores done that have been lingering.
  • It feels healthy. When I mention the fasting to people I encounter a lot of people (most of them overweight) who think it must be unhealthy or dangerous. I reviewed what’s known on the subject and there doesn’t seem to be any evidence that it’s dangerous or unhealthy for well-nourished individual. What evidence is there does seem to indicat that it’s extremely healthy; not just because being overweight is unhealthy, but because going into a fasting state for lengthier periods of time has serious health benefits like reduced risk of cancer, and reduced risk of alzheimers and dementia. Wow. It also passes the ‘listen to your body test’. While it sometimes is uncomfortable – especially at the beginning of the fast, or when you aren’t used to it – when you later eat you feel great. In my case my skin has improved significantly. I’m now at the point when I feel sluggish or down, my instinct is to try having a fast, as it often seems to help.
  • It’s a form of physical training. Fasting is like doing sports, if you train at it, you get better at it. If you’re like me and not used to going more than 8 hours (at night, sleeping) without eating, it will probably seem really uncomfortable. With repetition it gets easier. My first 24 hour fasts were more difficult than my current fast, which is on its fourth day now.
  • It’s a form of mental training. When you resist your urges to eat for a longer period of time you come to a better understanding of your bodies signals, and change your relationship with your appetitites. You practice controlling your appetite rather than letting your appetites control you, which is an incredibly useful skill in our overmarketed existances as consumers where we are constantly bombarded with messages telling us we need more and more – when in reality what we really need is less.

Well, that’s all I have to say for now. I dont’ really have a goal with my current fast. I’d like to get down to 82 kg at some point in the next 6 months, which would hypothetically be possible if I don’t eat until Christmas vacation, but I’m not going to force the issue. My current plan is to eat again when I get fed up with fasting. Let’s see how it goes.

gnu toolchain update

Nick Clifton sent out a release note a month ago that completely passed me by.  Here’s the bits I found interesting:


GCC 6.2:

  • linux/x86 targes now default to enabling the compressiong of debug sections.  This can be reverted by using the –enable-compressed-debug-sections=no configure option.
  • There’s a –no-pad-sections command, which prevents padding sections, no-doubt helpful for the tiny embedded platform world.


  • GDB and GDBServer are now build witha  c C++ compiler by default.  Don’t know if that impacts end users much, but as a C++ developer I find it interesting.
  • You can now pass a negative repeat count in the ‘x’ command, to examine memory some count backwards from the current address.
  • Apparently there are improvements to the mechanisms provided to front ends.

G++ :

  • new option -fconstexpr-loop-limit=<n>, which sets the maximum number of iterations in a constexpr loop.
  • -fstrong-eval-order forces the evaluation of member acess, array subscripting, and shipt expressions in left-to-right order, and assigments as right-to-left, as adopted for C++17.  Enabled by default when using -std=c++1z.
  • support for _Float<N>

Anti Bernie Sanders Bias in the NYT

One doesn’t have to look far to find anti-Bernie bias in the media, generally in the form of ignoring the fact that he exists. Here’s one I noticed yesterday in the NYT, in an article talking about what a clown Trump is.  At one point they mention “Polling shows that he would enter the general election trailing badly against Hillary Clinton”

That plays well into the establishment message that we have to settle for Clinton because Bernie Sanders would be unelectable, and we need Clinton to make sure that (pick a Republican) doesn’t win.   Never mind that polls show that people prefer Bernie Sanders over Trump by a much wider margin than they prefer Clinton.  Clinton currently leads by 11.2 points, while Sanders leads Trumb by 17.4 point.  In other words the preference of Sanders over Trump exceeds peoples preference of Clinton over Trump by more than 60%.

The NYT doesn’t seem to find that newsworthy.

Powerline, git, Fedora

I recently discovered powerline, thanks to a Fedora news article. Getting powerline running on your Bash terminal is completely trivial and discussed in the article. You just:

Install powerline.

  sudo dnf install powerline

Configure your shell to use the powerline daemon.


Add this to your .bashrc

  if [ -f `which powerline-daemon` ]; then
     powerline-daemon -q
     . /usr/share/powerline/bash/


add this to ~/.config/fish/

set fish_function_path $fish_function_path "/usr/share/powerline/fish"

Configure powerline to display git information

If all you want to do is get the git branch displayed on your powerline, that’s pretty easy, see for example this excellent article. But after I discovered powerline-gitstatus, I just had to have it.

Install the powerline-gitstatus segment:

pip install powerline-gitstatus

Setup a configuration

I’ve put my powerline configuration up on github, so if you like, you can start with my configuration, and play with it from there simply by clone my powerline-configuration repository into your local .config directory. I.e.:

cd ~/.config
git clone powerline

Otherwise you can copy over the default configuration and follow the directions here.

Try out your new configuration

Since this article is focused on customizing our shell prompt, we are dealing with the powerline daemon, which means we must run

powerline-daemon --replace

when we want to see what effect our changes might have – BUT before you do that, I highly recommend running powerline-lint in case you forgot a comma somewhere.