Friday, September 27, 2019

Never good at lisp

Back in the day when I was learning lisp, I would have a hard time understanding constructs that were just too nested.  I would see things like:

something(somethingelse(trythis(internalpart(updateothers(runstuff)))))

I can see a similar thing happening sometimes with Python where it's easy to keep wrapping object calls together and you end up with hard to decipher code:

something(parameter).object(otherthing(innerpart).state(optionalrewind))

There are some people who talk in similar ways at work and use parenthetical sub clauses before getting to the actual point and I have a hard time following what the actual point is:
We need to figure out, and not necessarily now, but at some point in the near future perhaps when we can get a consensus or when the time is right but not just because we want to be opportunistic agnostic, what, or perhaps even first why or maybe the rationale behind this and related activities that you and according to at least a couple of other people although this is just third party because I haven't heard directly from them but I have been able to glean by reading between the lines of interactions, our next steps should be.

Parsing that out, the real meat of the sentence is (in bold):
We need to figure out, and not necessarily now, but at some point in the near future perhaps when we can get a consensus or when the time is right but not just because we want to be opportunistic agnostic, what, or perhaps even first why or maybe the rationale behind this and related activities that you and according to at least a couple of other people although this is just third party because I haven't heard directly from them but I have been able to glean by reading between the lines of interactions, our next steps should be.

I think as a consumer or target of the conversation I would like to hear the bold part first and can then get the rest of the sentence after.  Or perhaps the rest of the sentence is background and I should get that first.  But I have a heck of a time trying to keep the idea in my head when it's at the beginning, middle, and end, of a bunch of parenthetical remarks.

My point of this whole post (irony, I'm only getting to it now), is that I have a heck of a time reading and understanding news headlines that seem to string together everything into one sentence

[something...] according to police reports via court order leaked by the assistant to the then deputy director who had been allegedly deposed by the now acting associate vice president under executive approval as reported to news personnel by an anonymous tip said the ex chief after hearing reports of this on Thursday from his staff.

What is there some sort of rationing on periods and capital letters that we could not break this up in to digestible sentences?

Saturday, September 14, 2019

Well done!

I'm starting to look a bit more into neural networks.  More to come on that later, but in the deeper parts there are matrices and various calculations.  I noticed that the creators of the numpy package did a really great job in making sure that things are displayed in a nice way that makes it easier to see what is going off.  For example, if we create a matrix with:

(python) x=np.array([[1,2,3],[4,5,6],[7,8,9],[10,11,12],[13,14,15]])

when you go to print it out you see:

(python) x
array([[ 1,  2,  3],
       [ 4,  5,  6],
       [ 7,  8,  9],
       [10, 11, 12],
       [13, 14, 15]])

What is really great here is that as the numbers increase in length, the output is shifted so all the columns line up.  Yes, this isn't rocket science genius, but it goes a long way to making things readable and understandable.  In the "computer" world often we just print things out and leave it up to the person to mentally align and figure things out.  I find that people who often do that sort of messy output are people I have to remind that the computer actually works for us, not the other way around.  If we take 10 minutes to make the computer do a bit more work (ex. line up the columns) then it has made things (in this case comprehension) easier for us.  Let the tool do the work for you!

Friday, September 6, 2019

Jumping to conclusions, part 1

Just started reading American Overdose, the Opioid Tragedy in Three Acts.  I'm on the first page, Introduction: An Epidemic Foretold.  It starts out:
Karen Jennings had once been a manager at McDonalds.  Walking home a little the worse for drink, she fell into a creek and broke her back.  The doctor prescribed painkillers to ease her through the pain of recovery.
and then goes on to talk about the spiral of addiction.

So, leaping to conclusions here, it's almost like that second sentence, "the little worse for drink", which is perhaps just glossed over as accidental, could actual be contributing to the condition, namely that Ms. Jennings might have other issues contributing to addiction.

We will see how the book progresses, but I've always wondered why some individuals can apparently safely take opioids and not spiral into addiction.  What percentage of the patients is that, do 50% not become addicted?  75%, 90%?

Another article I have read in the past was related to a study of rats where in a controlled environment rats could self medicate by pressing a button to receive something (cocaine, opioids?) and they rapidly became addicted.  However, the article continued, the rats were in a cage with nothing but the button.  Other rats in a similar experiment were in a cage with rich rat entertainment, wheels, things to play with, etc.  They found those rats occasionally pressed the button to medicate, but not to the level of addiction that the isolated rats did.  The premise of the article was that addiction isn't fully the chemical itself but also the environment.  They drew parallels with the Vietnam war where there was a lot of drug use when in Vietnam due to needing to mentally escape the horrific situation, however when those soldiers returned back to the US, the drug use mostly dried up since they were back in a normal environment.

In Ms. Jenning's case when she was walking home "the little worse for drink" (kudos for not driving BTW) I have to wonder if she was also not in a bad place to start with that also "fed" into the addiction.

Anyway, good read so far, on page 1.  We will see where the book goes.

[Edit *2019-05-14*]
Became curious about why some people become addicted to alcohol and not others.  Google was challenging because a lot of the answers were about dangers of addiction and how to detect, why it is bad, etc.  But I was looking for scientific reasons...

Found this - https://www.healthline.com/health-news/lateral-habenula-responsible-for-alcholism-040814#3

which incidentally had this gem:

“Whether one is going to use drugs or not is a choice based on what the alternative reinforcers are,” he said. “If you have nothing else to do and life is not very pleasant, if you are a social creature—for example, a rat, and you are solo-housed in a boring environment as rats are generally housed for experiments, in that setting it is very easy to get animals to self-administer drugs. If one has them in an enriched environment in which they can socialize, have sex, groom, all those things that rats like to do, then it’s much more difficult to get them to self-administer drugs. It’s much more difficult to induce something that looks like an animal model of addiction.”It’s a fair bet that if humans were forced to live in the same conditions as the rats in Taha’s experiment—alone, in a tiny cage, with nothing to do—and given unlimited access to drugs, they might pass the time by using drugs, too.
They note that genetics may be involved namely that the inability of the lateral habenula region to respond to negative outcomes (painful stimulus for example) prevents us from avoiding those actions in the future.  In rat simulations they artificially damaged the lateral habenula in some rats and noticed that they did not avoid actions which later had negative outcomes.

Alcohol use is interesting as 'small' use has small euphoric effects and a small (non-existent?) negative effect, so continued/occasional use (which we note as not being an alcoholic) is not an issue.  If occasional 'large' use has a large negative effect but this negative effect does not cause us to avoid these large use activities in the future then this pattern could be repeated (also necessitating larger use due to tolerances increasing) then this is what we are calling alcoholism.

It's quite interesting that even in this "modern age"(!!!) we cannot have these conversations without dragging in stigma or perceptions of mental weakness.  "Why isn't he trying harder, he's just giving up too easy, he is too weak" type observations.

Go and read the healthline article, it's really good.

On the American Overdose book thread, unfortunately it's just a continuation of stories of addiction, how lives were ruined, how bad corporations took advantage of the situation to make lots of money.  There are occasional glimpses of questions as to why only certain regions were being hit by this (which may play into the conditions paragraph as noted by the Healthline article).  But otherwise it's just a "this is terrible and unacceptable" type book.  As with people with similar attitudes (serial complainers) I often find this tiresome.  Slightly less worse are people who try to do something about it but unfortunately have not taken the time to really understand the issue and so solutions are just random and amount almost to a cargo cult type response.