390 karma · joined July 28, 2014
void dwim(unsigned count) {
struct Something _buffer[10];
struct Something* buffer;
if (count < sizeof(_buffer) / sizeof(_buffer[0]))
buffer = _buffer;
else {
buffer = (struct Something*) malloc(count * sizeof(struct Something));
}
doSomething(buffer, count);
if (buffer != _buffer)
free(buffer);
}
It used to be really common to write that without considering if it was a necessary optimization or not - nowadays I would just malloc up front.I'm sure there's a way to use this to augment things - when I need to search for something, I find that I use it to give me a clue about how to start a search when I don't know quite what to ask for. But it's so very obvious that the results are just probabilistic goo.
Let me tell you - there is NOTHING like driving Highway 9 up to Skyline through Saratoga after chemotherapy. The manual transmission maybe mattered less than the convertible aspect (fresh air is what kept my nausea away) but the physical connection to the mechanism made me feel alive.
The car basically fell apart within a few years - but I don't regret the $8k it cost me.
I was initially given Dexedrine (dextroamphetamine) and it was so good and I wrote the most beautiful code and my focus was pure and I needed more and more and I lined the pills up at night and did I mention beautiful code, on on sentences and becoming insufferable?
Anyway, I switched to a different stimulant (vyvanse) which had a more measured effect and did not lead to that kind of addictive over the top behavior.
Apropos of the original post - I find that during a procrastination spell, I’m still “working” in the back of my mind even though it might look like I’m doing legos at work. At some point my brain hits what I think of as an “activation level” and I suddenly “flip” my attention and focus to the job at hand. It feels like what happens when you’re kindling a fire, and you get a little bit of flame in some dry stuff, and then you “pop” that flame (attention) into the larger pile of fuel.
My oncologist was great (ucsf medical center) - but the surgeon refused to address my liver mets - they were too large and distributed.
My wife found out about a specialist at Sloan-Kettering in Manhattan that uses something called a Hepatic Arterial Infusion Pump - a hockypuck that delivers 50x a chemo dose directly to the liver. That was implanted in my abdomen and I flew between SF and New York to get it refilled every 4 weeks for six months. Their surgeon then resected 75% of my liver. (Skipping a few steps here. I had another met that they couldn’t get surgically and they got it with 10 rounds of radiation.)
My company was very supportive and our health insurance picked up most of the cost - over US $2million (so far?)
I was hospitalized several times after the surgeries for post operative infections - in a way they seemed far more difficult for the doctors to address than the cancer itself.
Oh, while the Cetaximab shrank the tumors, the skin rash it caused was absolutely wretched - my cuticles would bleed and had to wear finger cots and gloves to protect them. And my eyelashes grew about 3x their normal length.