Thursday, September 8, 2016

Is Cancer a feature or a bug?

I think we've got cancer all wrong.  It's not a bug, it's a feature.  Death is a basic requirement of evolution.  The current generation must make room for the next.  Without generational turnover, the population grows exponentially until resources are depleted and the species dies out.  This requirement has existed since the dawn of time, and different mechanisms exist to enforce the requirement of death.

One mechanism to ensure mortality involve telomeres (the aglets that hold DNA strands together) which shorten with each cell division.  My supposition is that the various forms of cancer are inherent in our DNA.  At different times during our evolutionary history, different groups of people (or earlier mammalian ancestors) developed different cancers which gave the group or family (but not the individual) an evolutionary advantage.  How could this be true?  Imagine two equivalent tribes.  One tribe develops, say, lung cancer that occurs in 25% of the (elder) population.  Over time, that tribe's age will skew younger, and fewer of the tribe's resources will be devoted to supporting the aging members of the tribe.  A younger tribe may have a competitive advantage over the tribe that did not develop cancer.

The common understanding is that cancer is caused by chance mutations that cause cells to turn off their natural inclination to die, and instead, divide willy nilly.  However, if this is so, then how is it that tumors manage to grow their own blood supplies, or trick the immune system into ignoring them?  Cancer is such a complex phenomenon that it seems more likely to be a feature designed by evolution than one that occurs purely from chance mutations.  Perhaps it lies lurking, requiring some chance mutation (or damage to DNA via telomere shortening) to activate it.  It exists because it serves (or once served) an evolutionary purpose: to cull the herd.

In a pre-literate culture, the elderly have a great deal of knowledge.  If all die young, information and wisdom critical to the survival of the group may be lost.  So a disease that is probabilistic, that only removes a percentage of the elder population, is preferable to one that wipes out everyone over a certain age.

Note that there are certain animals, such as elephants, bowhead whales, and the naked mole rat that do not get cancer (or get it far less frequently than humans).  In the case of elephants and whales, perhaps there is value to the knowledge held by older members of the group, and that knowledge trumps the advantage of death.




Wednesday, August 26, 2015

Using websockets with wicket 7 and embedded jetty (9.2.X)

I had a hell of a time getting the new wicket websockets functionality to work with embedded jetty.
The information I found on the interwebs left tantalizing clues, but one piece of vital information was missing.  For those landing here, I'll cut to the chase:


WebAppContext webapp = new WebAppContext();
webapp.setServer(server);
webapp.setContextPath("/");
webapp.setWar("src/main/webapp");
server.setHandler(webapp);

ServerContainer wscontainer = WebSocketServerContainerInitializer.
    configureContext(webapp);
wscontainer.addEndpoint(
    new org.apache.wicket.protocol.ws.javax.WicketServerEndpointConfig() );


Adding the endpoint was the missing piece of the puzzle.

Monday, April 13, 2015

Using HTML5 date type with Wicket

Just a quick note to document the following gotcha using HTML5's date input type with Apache Wicket.

In HTML5, you can have an input field that browsers can render with a date picker:

<input type="date" wicket:id="startDate" />

add(new DateTextField("startDate", dateModel, "yyyy-MM-dd"));


The important thing to note is the date pattern "yyyy-MM-dd".  The date is rendered (at least in my locale) as MM/dd/yyyy, but the browser returns the date string as yyyy-MM-dd, and if you don't tell Wicket that, it won't be able to parse the return value as a string, and you'll get an error.

Wednesday, March 4, 2015

Obamacare on Trial

The arguments being made at the Supreme Court over the precise meaning of the ACA's wording remind me of so many arguments made by 5 year old children.  "When I said we could have ice cream tomorrow, I DID NOT MEAN EXACTLY AT MIDNIGHT".  The meaning of the law was clear at the time; no reasonable person would construe it to mean that subsidies applied only to state run exchanges, and not to the federal ones.  To argue otherwise is simple sophistry.   If the Supreme Court accepts these arguments, then they will have sunk to a new low.


Wednesday, February 25, 2015

Why Obama should support the Keystone XL pipeline

Keystone XL is a horrible project in many respects, and it has become of outsized importance to both sides of the political spectrum.  As much as I hate the environmental consequences of tar sands oil, I think that Obama should support the pipeline with certain conditions.  Much like buying carbon offsets, Keystone XL should be passed if and only if it is accompanied by other legislation that more than makes up for its environmental costs.  These could take the form of stricter limits on coal, higher fuel efficiency standards for cars and planes, carbon taxes, infrastructure spending on greener cities, etc.  If the Republicans really want Keystone, then they need to support something that will more than make up for its effects.  While passing Keystone would be a heavy symbolic loss for the left and gain for the right, if it were offset by even more impactful environmental legislation... well I'd be ok with that.  Lose the battle to win the war.

Sunday, February 22, 2015

What I want from a Smart Watch

I want a smart watch that can act as a key.  That is, I approach a locked door and the door unlocks.  I sit in my car, and push "start".  I surf the web (on my computer), and my passwords are automatically entered (because my computer is talking to my watch).

I want a smart watch that can be biometrically locked and unlocked.  Unlocked via finger print reader, retina scan, or via a sub-dural RFID or NFC chip.

I want a smart watch that is geo-location aware, and can serve up appropriate bar codes, like when I'm at the YMCA entrance counter.

Of course, I want to be able to buy things with it too.

I want a smart watch that can double as a bluetooth headset.  When I receive a call, I can pull off my watch.  The band snaps straight.  One end of the band has a speaker, the other a mic.  Or maybe it just has a speaker phone.

The primary input mechanism for this watch is speech.

In addition to a camera, the watch should have a little LED flash light.  I use my phone's all the time, and it would be great to use the watch instead.

A pico projector would be nice, but that might be asking for too much.

Wireless charging, of course.

Waterproof.

Bluetooth music streaming.

Thursday, November 13, 2014

On anger and arguments

When I start to feel angry at my wife and I see an argument brewing, I often stop to ask myself "what is the cost of the argument, and is it worth the cost?"  Generally, when I look at it this way, I discover it's not.  So often, the underlying issue is something trivial, and the damage done by the argument can be enormous, especially if it escalates.

Sometimes I try to think of some way of addressing an issue without turning it into an argument.  For example, the other day I noticed that my wife had not cleaned the pans she had used to cook her breakfast, leaving them for me to deal with (again).  I thought about confronting her directly, but whenever that happens, she immediately twists it to be about something she had done for me, making me into an ungrateful dick.  So instead, I took a sideways tack.  As I was cleaning the kitchen I looked over at the pans and said "didn't I just clean those yesterday?"  Somehow, that got the point across without it becoming an argument.