Intel's Ronler Acres Plant

Silicon Forest
If the type is too small, Ctrl+ is your friend

Monday, January 9, 2017

LSD, Part 2

Alice and the Caterpiggle
“Taking LSD was a profound experience, one of the most important things in my life. LSD shows you that there’s another side to the coin, and you can’t remember it when it wears off, but you know it. It reinforced my sense of what was important — creating great things instead of making money, putting things back into the stream of history and of human consciousness as much as I could.” ― Steve Jobs
When I got out of high school, all I wanted to do was make money. I heard these stories about self-made millionaires who started with nothing but an 8th grade education, and I thought I could do that, too. Took me eight years to figure out that I wasn't going to get rich on my own.

I think part of the problem was that my dad threw over his engineering career to become an apple farmer, and that was a frigging financial disaster. Permanently soured me on farming and being broke, so money became my focus.

On the other hand, I suspect that one of the reasons my dad bought the orchard was because he wanted us to understand what was real and what was bullshit. That lesson may have had some impact.

The reason I didn't get rich was because I wasn't that concerned about money. Oh, I wanted money when I didn't have any, but when I had enough for my immediate needs, any number of things became more interesting. Basically I was a gear head with no business sense, as opposed to a people person who could sense a money making opportunity and had the drive to pursue it.

The Beautiful sequence

Red Bull Rampage, Virgin, Utah, 2012
Rider: Brandon Semenuk, Photographer: Christian Pondella
Quite spectacular. The only connection between this photograph and my post is the title.
I've come to realize that solving programming puzzles is, for me, akin to solving crossword puzzles for people like Jack, i.e. people who like doing crossword puzzles. It's mental exercise, but I'm not sure there is any value in it. Actually, there is no value in it: the puzzle has already been solved. It does separate those who can muster the logic and reason needed to solve it and those who don't give a fig. I'm not sure that distinction has any value either.

Anyway, I picked up a puzzle yesterday and started looking at it. Here is a description of the problem.
We define the beautiful value of an integer sequence as the product of the value of its smallest element and its length. You are given an integer sequence containing Nelements, and you should find out one of its continuous subsequences, such that it has the largest beautiful value among all the continuous subsequences.
Please solve this problem with an O(N) algorithm.
So the simple way to solve this is to read all the numbers into an array, then pick a number and scan up and down the array until you find a value that is smaller. Now you know the range (a continuous subsequence) and when you multiply that by the number, you get the beautiful value for that number. Repeat this for all the numbers in the array and eventually you will have the biggest beautiful value.

The problem comes with the last line of the description:
Please solve this problem with an O(N) algorithm.
What this means is you can use as many steps you want to find the beautiful value for a number, but it has to be a fixed number of steps. It can't depend on how many numbers are in the array. For instance, if it takes you 100 steps to find the bv for a number, then it won't take more than 100 x N steps to find the largest one. The simple solution I set out above is going to take more like N squared steps, which is definitely not an O(N) class algorithm.

This morning I am climbing stairs as I try to do every day in order to get some exercise. Normally this can be a bit of a chore. The first few minutes go by easy enough, but once I get past the ten minute mark I am looking for the end. Today, though, I was thinking about this problem while I was climbing and when the timer went off it caught me unaware. I was so surprised that at first I suspected I had entered the wrong amount of time, like two minutes instead of twenty, but that wasn't the case.

Nothing like getting wrapped up in a problem to make time become meaningless. This might be why it is so difficult to determine how long it is going to take to write a computer program. You ask a programmer how long it will take to do something, and you get some answer, but then he/she goes off and starts working on it and if they get absorbed in a problem it may be months or even years before they come up for air.

Update Saturday, January 14, 2017. Took me a couple of days to figure out that I need to use a binary search algorithm to determine the range for each number, and then a couple more days to realize that the index into the sorted array is not the same as the original index, and then an hour or so more of fiddling around to get it straight in my head when to use the sorted indices and when to use the original indices. The binary search means the algorithm is an O(log N), but since we also need to process all of the elements, and the whole list needs to be sorted, I'm going to call it O(N x log N). I think this might be as good as you can get.

Let's Go To CES

PHOTO ILLUSTRATION BY ELIZABETH BROCKWAY/THE DAILY BEAST
The Daily Beast has a fine story this morning:
I Dropped Acid and Saw Into the Future: My Surreal First Time At CES
Maybe the Consumer Electronics Show in Vegas was a bad place to take LSD for the first time.
by Erin Gloria Ryan
Via Detroit Steve

Update April 2017. Made a copy of the story here, just in case.

Sunday, January 8, 2017

No Second Chance

Alice Lambert (Alexandra Lamy) & Richard Millot (Pascal Elbé) in
No Second Chance on Netflix
What we have here is an insane crime drama with an extra dollop of emotional jerking. There are six episodes in the series and we watched them all in two nights. The characters are good enough that we wanted to find out what happened, and the plot is twisted enough that there is no plausible explanation for any of it, but I have to admit they came up with a pretty good resolution to the story.

To give an example of the insanity, one character gets shot through the heart, and not only do they survive, but a week later they are out and about, running around town with no more than a large band-aid to cover the wound.

And then there are all the bits that get repeated so often they begin to get annoying, like someone's cell phone ringing just when a crucial clue is about to be revealed, or the cell phone battery dies, or the bad guy sneaks up and clobbers someone who should have been aware of their surroundings. And poor Richard. He is constantly getting struck, kicked, beaten or otherwise clobbered.

Dumb, but entertaining.

Thursday, January 5, 2017

GINKGOA - Dolorès


GINKGOA - Dolorès

More Electro Swing, this time en Francais. Interesting pronunciation of Dolorès.

Confidence, Part 2


24 Most Insanely Satisfying Ship Launching Ever Recorded

The splash teaser is totally bogus, pay no attention. I excerpted this one clip from from the 24 in this video because of the water. Note how they have stopped the cars on the road to keep them from getting washed away by the tidal way that will appear when the ship is launched. Then note how close the water comes to the cars at the far end and the people on the near end. Cutting it a little close, aren't you guys?

Update March 2019 replaced missing video.
Update September 2024 replaced missing video.