Intel's Ronler Acres Plant

Silicon Forest

Monday, March 30, 2009

Greed & Mother's


Last week the kids were home on spring break. I made a trip to the grocery store to pick up few things and my oldest son asked me to pick up some cookies, Mother's Iced Oatmeal cookies, to be specific. Sure, I can do that. Except when I got to the store there were no Mother's cookies. None. Oh, well, here's another brand. Maybe they just changed vendors, or made a new marketing alliance, or something. Who knows how decisions like this are made?

But then my son sends me a link to story that tells what happened to Mother's Cookies. A story of greed and stupidity that just boggles the imagination. Mother's was a going concern, but then it was sold, and sold again. It changed four times since 1991, was relocated to different parts of the continent and it finally went bankrupt. Someone is trying to pick up the pieces, and they may be able to resurrect the company.

I don't know what actually happened, but I smell a whole pack of greedy, lying rats.

Celebrity

I have taken to watching our local basketball team on television with my wife. I am generally opposed to professional sports, mostly because of the blatant commercialism, but my wife really enjoys the games, and during basketball season this is an easy way to spend some time with her. At least it's easy now. I think I need to be at least somewhat relaxed in order to sit and watch a basketball game, so maybe I have absorbed some basketball zen, because not only can I sit and watch a game, I actually enjoy it.

Does it have anything to do with our team (The Portland Trailblazers) having a good season? I don't know, but I have seen some amazing shots. One player will pass to another, and the second player, while in the air, will catch the pass, and then either shoot a basket or pass to another player. That's a pretty good trick. There are two Spanish guys who used to play together, Rodriguez and Fernandez, and I have seen them do this a couple of times. The other night another player, Aldridge, was involved in an airborne exchange. I am even learning the names of the players. Kind of scary.

It's also interesting to watch the big guys, Oden and Przybilla, lumber around. They are tall, but not that much taller than the other players, at least mathematically. According to my rough calculations, they may mass a much as 50% more than a "normal" size player. That could definitely put a crimp in your acceleration, which is what quickness really is. Then too, they don't need to be as quick when they have such an enormous reach.

OK, enough about basketball. This is about celebrity, and professional sports stars along with some actors are celebrities. I think that comparison was what led me to relaxing my view about professional sports. I like watching movies, and some actors make a fortune from their movies. They may be good actors or bad actors, I really have no idea.

For most celebrities I think luck plays a major role. Certainly there is talent, and hard work, and the ability to play well with others, but there are lots of talented, hard working people out there.

When we watch the Olympics, we have top athletes competing and their scores may be within hundredths of a second or point from the winners, but they are declared to be second place. In cases like that I suspect that if the event were held on a different day, their positions might just be reversed. So being a "winner" can be kind of arbitrary, kind of like luck.

Mass media like Television and films can only support so many celebrities. Somebody has to be the audience that is willing to buy tickets, or advertisers are willing to pay for.

And culture-wise, we don't want too many celebrities. The whole point of having a celebrity is having something to talk about with people whom you may very well not have anything else in common.

Morning Jumble

I was a little foggy this morning. I did most of the Jumble puzzle on the comics page, but there was one word I just could not unscramble. The best I could come up with was BE-HALF, and I did not recognize it as a word. At 7:25AM my younger son shows up, which must be a new world record for him, and asks me to fix him some scrambled eggs. Shoot, if he is willing to get up early, I am happy to fix him some eggs. But I need to get in the shower, I have places to go, so it's going to be microwave eggs. I get out the bowl and the eggs and I crack one into the bowl. Now I have to carry the broken, drippy shell over to the sink. I should be doing this operation next to the sink. So I move my stuff. Next egg I crack, I dump the egg in the sink and just before I drop the shell in the bowl I realize what I have done. D'oh! Finish the eggs, splash in a dollop of milk, whip with a fork, put it in the microwave with a paper plate lid. Don't want spattered egg all over the inside of the microwave. How long? You have to boil an egg for five minutes to make it hard boiled, and I've got three eggs here, let's set the timer for five minutes and go see what Google has to say on the matter. I log onto my wife's laptop and it tells me I have two programs running. As usual, Windows XP takes forever and a day to let me in. Now, how can I have two programs running? I haven't even been using this computer! Oh, some automatic update program has run into the firewall and crashed. Stupid computers. At this point I hear a soft pop from the direction of the microwave and I realize that perhaps five minutes was a bit much, so I go check. Mmmm, yes, I think maybe the eggs are done. 3 and a half minutes. Turn them over to John for consumption and go pull the dictionary to check my Jumble answer, just in case, you know, BE-HALF really is a word. Scanning the page, it is not looking good, but wait! There it is! It is a word. When you do something for someone else, you are doing it on their behalf! Cool. Off to the shower.

Futon Repair


We bought a futon/couch for our oldest son when he moved into a duplex at the beginning of last school year (2007). Sometime this year one of the sides supporting the main pivot split. He had been supporting the pivot on a pile of old books, but it wasn't a real good solution. Saturday I took him back to Eugene and helped him repair the couch. We took the side loose from the rest of the couch, drilled a bunch of holes, applied some glue, and put it back together using six 2 inch screws. We scabbed on a small piece of one by four using a dozen or so drywall screws and then reattached the arm to the rest of the couch.


There were two bolts holding the pivot mechanism to the arm. The holes were counterbored more than halfway through the board, and relatively close to the bottom edge of the board. On top of that the wood was pretty feeble. Light and dry, kind of like cedar, but not, and with a flaw running right through the center. Flaw was not visible from the outside, but it showed up along most of the length of the split. Well, what do you expect for $200?

That big black thing in the forground in the second picture is the side arm of the couch, upside down. You can see the split edge along the top and the two bolt holes for attaching the pivot.

I took a small bag of tools, my cordless drill and several boxes of screws and nails. No telling what I was going to need. Forgot to bring glue, but Hiron's, the world's most amazing store, had some.

The scabbed on piece of wood would have looked better if we had made it the same length as the arm, but this was a piece I had and it didn't have to be cut. It would have looked better it we had painted it, too, but it will do for now. Don't know how long this couch is going to last. The front rail developed a small split when were putting it back together.

Update January 2017 replaced missing pictures.

Friday, March 27, 2009

Common Language

Steve Sailor writes that biligual education may be dead, or at least dying, and that is a good thing:
"That means that America may have dodged a bullet, a long-term threat to our national unity, because nothing divides a country more than multiple languages. In contrast, a shared language enables shared sentiments."
I don't know if that's true. We seem to find plenty of stuff to disagree about. On the other hand we can at least argue about it because all of us, okay, most of us, speak the same language.

This makes me wonder about India. India has about a gazillion different languages. However, thanks to the British, they do have one common language: English. I know a couple of people from India. They were from different parts of India and both knew two or three languages, but the only language they had in common was English.

Every time I think about this it reminds me of the Cardassians and Bajore on Star Trek: Deep Space Nine. The Cardassians brought administrative skills to Bajore and conquered the gentle artistic people (my impression) who eventually managed to kick them out. Of course, both the Bajorans and the Cardassians spoke (will speak?) English, or we would not have had a TV show.

The Crack Model Applied to Mapping Software

I went to an OS GIS (Open Source Geographical Information Systems) meeting this week at Open Sourcery. This is a group of people that work with digital mapping systems. Most of them were from either various Government agencies or PSU (Portland State University). There are some well established proprietary software products on the market, and there are some open source tools available as well.

Maps get used for so many purposes with so many different data bases that you almost need a unique solution for any particular application.

There is one mapping software company that is offering a free two year license to any Oregon agency. Obviously the plan is to get as many agencies as possible hooked on their software so when the two years are up they will come crawling back, begging for their next fix and willing to pay whatever the vendor wants. This is not necessarily a bad thing. The vendor is going to have to deliver a useful product, there is competition out there and one of the competitors is offering free software, i.e. open source.

The real question is whether the program will do what the agencies are trying to do, or is it everything so specialized that doing a custom build is the only way to get what you want?

Thursday, March 26, 2009

Nvidia Twinview & Linux


I finally got around to installing the Nvidia driver that supports two screens. This is the proprietary Nvidia driver, not the open source driver. It wasn't too much trouble and it seems to work pretty well. Downloading and installing the driver went very smoothly. The hiccups came with the configuration.

Update: Chewearn's blog was very helpful.

My hardware:
  • ViewSonic VA902b LCD flatpanel display, 1280 x 1024 resolution.
  • Princeton VF912 19" CRT with resolution out the ying-yang (data sheet).
  • Nvidia 7600 GT dual head video card.
nvidia-settings is the configuration program. I did not find it in any of the system menus after I installed the driver, but the instructions I found on the web named it. Later on, I wanted to run it again and I couldn't remember the name nvidia-configure? nvidia-configuration? I had to go look it up again. I still don't know where it is, but it is in the search path somewhere, so I can invoke it from a terminal window.

Both of my screens are roughly the same size, so I wanted to set the resolution to be the same on both. The first resolution drop down box in nivdia-settings has a list of maybe a dozen settings, but it does not have 1280 x 1024. It has several that are smaller, and one that is bigger. Bugger. Some fooling around and I click on the resolution box for the other screen and it has got a list of a about a gazillion settings. Whoa! And one of them IS for 1280 by 1024. Okay, so we will switch the cables on the ports on the card. But now the LCD screen complains the signal is NOT IN RANGE. Bah. Now what? 1280 by 1024 IS the correct resolution. Is there something else we can change? The second part of the resolution line contains the vertical refresh frequency. I end up setting it to 75Hz and that seems to work.

The instructions I found warn not to Save to X Configuration File, it will bugger your system. It means running nvidia-settings after each re-boot, but at least it works. The instructions were written a few months ago, and things change, so I thought I would try it and see if it works. Especially after I rebooted and then ran nvidia-settings again. I click on apply and everything disappears. I have to quick-lean-down-and-swap-the-cables-before-the-five-second-time-limit-expires-and-everything-reverts-to-the-way-it-was. It takes three or four tries before I manage. Okay, we certainly don't want to have to deal with this every time we reboot so let's see if writing to the config file works or not.


The first time doesn't, but that really isn't surprising, I was not master-of-my-universe (sudo, or super user do). Invoking the program with the sudo prefix (sudo nvidia-settings) fixed that, and rebooting worked fine. So far. This is what the setup looks like in the dark. Aren't all the LED's pretty?

I have encountered some minor bugs, but basically things are working okay. The main reason I wanted this was for working with Eclipse (a software development tool) it wants to put up all these panes, and there just isn't enough room on one screen. The way Twinview works here is kind of interesting. If you click on the maximize button, the program window will fill one screen. So how do you get it to fill two screens? Do I have go back and make a major configuration change? No, simply unmaximize the window, and then stretch to fill both screens. Kind of backwards, but it works.

As far as bugs I have noticed two things:
  1. Title bars on windows sometimes disappear. Somethings they just go white, sometimes they vanish completely and the window title is appears in some kind mutated kaleidoscope font. When they go white, the window control buttons still work. The tool tips still pop up when you are over them.
  2. I was running Firefox yesterday and I opened a bunch of windows and the screen I was working on started fading to gray. I would click something and it would come back, but then it would go to gray immediately. Things went downhill from there.
One thing I have noticed that is kind of cute, is that when you close a window instead of just disappearing, it does this vanishing act, kind of like what you see on Mac's. Makes me realize I have not come anywhere close to making full use of this video card.

Update November 2016 replaced missing pictures.

Costco & American Express


Bart Simpson
I went to Costco with my wife yesterday afternoon. It was moderately busy and there were plenty of people giving out free samples of various foods. What was different was the carnival barker spiel coming from these sample dispensers. In the past you didn't hear much from them, maybe a low key sentence or two extolling the virtues of the foodstuffs they were handing out, but this time they were speaking up and telling one and all about the glories of their particular goop. There was even a minor battle going on between two of these hucksters who happened to be on either side of the main aisle. Kind of amusing.

The other thing was that we got a rebate check from our AMEX (American Express)/Costco card. Our bill was somewhat less than the amount of the check, and surprise of surprises, they gave us the difference in cash! I was shocked.

This AMEX card promises rebates of 1, 2 or 3% depending on where you use it. I am opposed to such schemes in principal, but I like having one card I can use for most of the times I need one. The system isn't perfect: I still have to carry a VISA card for the places that won't take AMEX.

I compared gas prices at a couple of gas stations near the North Plains exit on Highway 26. The Chevron (with Techron) station on the North side of the freeway was charging $2.28 for Plus grade gasoline, and the AM/PM "Quickie Mart" on the South side (which does not take credit cards) was charging $2.08. That's a difference of 10%. So buying gas at the easy swipe gas pump is costing me at extra $100 a year (10 gallons a week times 50 weeks times 20 cents). AMEX probably gets about $60, $30 of which they refund to me, and Chevron keeps the other $40, which they use to keep their station, and their image, nice and spiffy, which includes putting all those cute little cartoon car ads on TV.

Update January 2017 replaced missing image.

Terror


Something that crops up occasionally at my gang's Thursday lunches is the way people use computers. I have this theory that people subconsciously learn to do things a certain way because that way works, and because over methods they tried either didn't work, or did something bad, like crash the computer. So the procedure they use to do something may be overly complex, or seem wrong headed, but it works and it gets the computer to do what they want, so they use it. To someone else, it may appear that there is a quicker, simpler way to get the job done, but the person doing the work doesn't know that and is not interested in investing the time to try and find another technique that may not work.

One the of mainstays of reports on terrorism in the paper is that people are afraid. It occurred to me the other day that this is most probably hogwash. I am not afraid of a terrorist attack, and I suspect very few other Americans are either. So where do they get this "people are afraid" business? All I can think is that some reporter stuck a microphone in someone's face shortly after a nearby bombing and asked the person if they were afraid, and the person seeing their chance for their 15 seconds of fame stepped into the role being offered by the reporter and agreed, that "oh, yes, I am terribly afraid".

So I have these two thoughts stored away somewhere in my brain and they must have collided because I came up with a new thought. While I am not consciously afraid of a terrorist attack, subconsciously I might be. Has my behavior been subconsciously influenced by the news of terrorist attacks in the United States? And if so, how would I know?

On the other hand, there are some things I do that could be attributed to fear, but could also be attributed to personal preference. Things like avoiding big crowds like one would encounter at sporting events or shopping malls. That is all I can think of right now. If I come up with any more, I will try to remember to add them to this list.

Monday, March 23, 2009

Drug Prices, Part II


Darling daughter is planning on a three month sojourn to Africa next fall, so Mom was arranging for the necessary shots. There's one for Yellow fever for $120, and one for Typhoid for $75, and then there's malaria. For malaria there is no one time shot. You take a pill ever day. The pill of choice is Malarone at $8 a pop. Three months in Africa, plus 3 days before you leave and a week after you return, and we're talking a hundred days, easy. That makes $800 worth of pills. Yowzer!

So I go Googling and what to my wondering eyes should appear but our old friend Doxycycline, which is more on the order of a $1 a pill. The only problem with Doxycycline appears to be "increased sun sensitivity", which is probably not a good idea for a fair skinned person going to Africa.

Update January 2017 replaced missing image.

Sunday, March 22, 2009

Current College Thinking

From my daughter on the way home from UW:
"A" students teach "B" students to work for "C" students.

Drum Line

Originally posted a week ago, but I just came across a picture I took. Click the pic for the really big version.



My wife and I went over to the local high school (Glencoe) last night for a demonstration performance by the drum line. A son of a friend was performing.

This is a competitive team, much like the dance team, and like the dance team, the competitions are long, crowded and a bit of drive. So these teams put on a demonstration so the parents and friends and can see what they are up to without having to sacrifice an entire Saturday.

Last night they had demonstrations by the drum line, a trio of middle school flag dancers, and the high school color guard.

There were about 20 people on the drum line team, about half on the drum line itself, the others in a supporting band. They are wearing face paint and the floor is covered with a camouflage pattern sheet. There were 4 girls with wild, wild hair (cave-women hair?) on the xylophones. It was quite a show.

The color guard team was all girls, very similar to the dance team, but smaller, about the same number of people as the drum line. They worked with (prop) guns, swords and flags, kind of like cheerleaders. Tossing twirling guns in the air and catching them in unison. Some dancing and quite a bit of flag waving.

The whole thing was over in half an hour. Much better than the 12 hour expeditions to the dance competitions.

Update January 2017 replaced missing picture.

Oil Exploration & The Vietnam War

Conspiracy theories 'R' us. The other day at Thursday lunch, Don told us a good, nay, a great one. Dennis, slacker that he is, hasn't uploaded the recording yet, so I guess it falls to me to tell the tale.

It's a story about the Vietnam War and why it ended when it did. Oil companies were looking for oil under the continental shelf off the coast of South Vietnam. They couldn't go in and do regular seismic exploring because, well, there was a war going on. But they could use the seismic waves generated by the bombing to map the structure of the ground underneath the continental shelf, and they did. When they had completed their mapping, they had no further need of any more seismic wave generators, so the bombing was called off. Shortly thereafter the war ended.

Like any good conspiracy theory there is just enough truth in it to make you wonder if this could possibly be what really happened. It might make you wonder for a minute anyway. People were definitely looking for oil, although it is only recently that they seem to be making any real progress in producing oil.

Celebrity Tragedy

Liam Neeson's wife died yesterday. I read she had bumped her head in skiing accident. I saw that in the paper Thursday and I thought, boy, another celebrity gets a bump on the head and they get flown out to an fancy hospital. Probably staged it just for the publicity. And then yesterday I hear from my daughter that she died. Geez. I like Liam, and I am sorry this happened to him. I don't really know him, of course. I mean, I don't even know what his wife's name is, er, was. I've seen him in a few movies, and I have always liked the characters he played. I really liked him in "Rob Roy". So if he is anything like the characters he played, he's a good person, someone I could like, if I actually knew him. Meanwhile I'm sorry about his wife. If you see Liam, would you tell him one of his fans said that?

Economics of Ship Engines

For a long time I was puzzled as to why ships were scrapped. These gigantic steel structures, some of them barely 20 years old, sent to the breakers yard to be reduced to so much scrap metal. How can that make any sense? But then I got the idea that we have gotten very good at building structures, it's all the equipment and finish work that goes into a project (after the basic structure is complete) that costs all the money. For instance: framing a house looks like the biggest part of building a house, but it is actually one of cheapest line items in the building contract. So I figured somehow the same principle must apply to ships.

Recently I was watching a TV show about the Liberty ships used in WWII. One item stood out in that story: if a ship managed a single successful crossing, it had paid for itself in the worth of the material delivered. Nowadays everything gets shipped in containers, shiploads of containers. We have problems with empty containers piling up in the US at our West Coast ports. Containers are so commonplace, we don't really think too much about what goes into them, but you can easily pack a hundred thousand dollars worth of merchandise in a container (figure 2,000 cubic feet times $100 per cubic foot).

A while back I came across some pictures on the web of "the worlds largest engine", a mammoth diesel engine used for powering cargo ships. I recently came across this set of pictures again. There was a brief description accompanying the pictures and there was one line in there that caught my eye. Something to the effect that the cost of the engine was as much, or more, than the cost of the rest of the ship. Aha! Now a little light goes on in my brain.

They run these ships until the engines wear out, and then they scrap them. If you are charged with delivering tens of millions of dollars of merchandise, you do want to be delayed because of engine problems. You buy a new boat with a new engine. You do not try to save money by using a rebuilt engine, you cannot afford an engine failure, and you don't want your boat tied up in a repair yard for weeks while the engine is overhauled. That boat is money, and having it sit costs you. So you scrap it, and buy a new one and stay in business. If someone else wants to fool with old, worn out equipment, they are welcome to do so.

One of the claims made for this monster engine is that it is much more efficient than a typical automobile engine. Just for grins I looked around a bit and found a GE turbine engine could be used for ship propulsion as well. I did up a little spreadsheet to compare the cost of operation for various engines based on their "thermal efficiency". I made some estimates as to how much power your ship would require, how many hours a year that ship's engine would operate, and the price of fuel. Ships want to be underway. Minimizing turn around time in port is of utmost importance. I estimated a week in port for every week in transit. If you have an efficient operation in port, it may be less than that. As for fuel: ships run on crude oil. I imagine it is cheaper than gasoline, if you are buying in bulk, I imagine you get a discount, and there are no highway taxes, so I figured a dollar a gallon. It may be more. I also figured you are going to have a big ship and you are going to need 50,000 horsepower to get it across the ocean. Your ship might get by with half that.




So you multiply or divide by factors of two as it suits you, but it does not really matter. Based on my estimates, you will note that the difference in the cost of fuel for these size power plants amounts to tens of millions of dollars a year, which is a heck of a lot of money, even if you divide it by 2, 4 or even 8.

Here's the pictures. The first six are "the world's largest". The last two are a different engine.

DU-Sulzer 12RT A96C
I got to thinking about these pictures, and I realized they don't really tell much of the story at all. The real story would be about how they make that engine. Can you imagine what would go into casting the bottom crankcase? How much molten steel they would need? Just constructing the mold would be major undertaking. A tour of the plant where this engine is made, now that would be worth seeing!

Update January 2017 replaced missing images, removed dead links.

Friday, March 20, 2009

Greetings From Tokyo

My brother went to Tokyo and all I got was this lousy email:
10:30 PM here. Got here about a day ago. Took train and subway into town and got checked into hotel without any major problems. Initial impressions: agent-type people quite polite and helpful. Country seems to have a lot of bureaucracy. Quite a bit of overstaffing in public works-type jobs -- maintenance, cleaners, landscapers, maybe to keep people employed? Much less efficient than, say, Hong Kong, in my opinion. Not nearly as cosmopolitan as I imagined -- foreigners seem to be viewed with real curiosity. And where the heck is all the trash and grafitti, and why aren't all the public facilities vandalized, and how can they just leave things lying around like this without them getting ripped off or destroyed?

Okay, he did send another one:
Quality of life, fulfillment, happiness are relative. Some people can't live without a big lawn, which would be difficult to find here. I have seen some fringe elements -- street people, homeless people, but even these seem disciplined and polite. Hope to do more research. Intensive and extensive socialization from the cradle seems to be the rule here, I imagine that's what maintains the orderly society.

Lots of partying into the wee hours. No boom boxes, however.

Thursday, March 19, 2009

Computers Are Evil

I finally got around to cleaning my office Sunday. It's been nine years since we got the basement finished and I moved in and I don't think it has been thoroughly cleaned since then.

I wanted to move my Linux box over by my desk, so I could share a monitor with my Windows box. Doing that was going to require crawling around under tables and fiddling with cables, and that means I was going to run into dust bunnies. Lots of big, hairy dust bunnies. So I bit the bullet, took all the small stuff out of the room, vacuumed, swept and mopped. Dust bunnies vanquished. Then I put things back together and all was well.


I had Windows and Linux sharing my flat screen monitor, keyboard and mouse through a KVM (Keyboard, Video & Mouse) switch. I had a second monitor that I could connect to the second video port on my Linux box. Both systems were running.

There were a couple of minor problems to take care of, but nothing serious. The USB (Universal Serial Bus) printer cable was not quite long enough to run along the wall, it cut diagonally across the corner of the room. The corner isn't a walkway, so I could have left it, but stuff gets put in there, and I didn't want something snagging on it, so I wanted a slightly longer cable.


I have an external hard disk that has a very short USB cable. It was so short it prompted me to keep the drive sitting on top of the computer. This led to one accident. I don't want another, so I decided to keep the drive on top of my desk. The cable is just barely long enough to reach if I put the drive in the just the right spot. Once again all I need is a slightly longer cable.


The video card in the Linux box has two DVI (Digital Video Interface) sockets. I have been using one socket with a DVI to VGA adaptor. We used to have a bunch of these lying around, but about a year ago my son got rid of all his excess computer stuff, and now I am lucky to have the one.

So a trip to the local computer shop is in order. The DVI and VGA adaptor and the six foot USB cable for the external disk drive are no problem, but no USB cables longer than ten feet. They have extensions, but if you are going longer than ten feet, then you may need to use a booster. A simple six foot USB extension cable is $2.50, the extension cable with the booster is $15. Criminently, do I really need a booster for this? I gamble and take the $2 extension.

Back home the printer works fine with the short extension without the booster. However, the external disk drive does not want to cooperate. I fiddle with it for a bit and keep getting messages on the Windows system that it cannot identify the device. I finally realize there is something wrong with the power connector, it does not want to plug in all the way. It is one of these stupid DIN plugs that used to be used for mice and keyboards. Close inspection reveals that two of the pins have gotten bent. How the devil did that happen?

I try straightening them out with my pocket knife and I see sparks, and then I realize (a little late) that this is a power cable and it is live. Fortunately it is only low voltage DC, so I am still around to right this tale of woe. Turn off the power, straighten the pins, which requires light and my eyeglasses (where in tarnation are they?), but I get it done, plug it in and all is well.

Now for the video. Plug in the adaptor and the CRT into the second port on the Linux box. Search the web for some info on setting up Linux to use a dual port card. Find some relatively current instructions. Download and activate a new Nvidia driver. Reboot the system. Nothing. Nada. The BIOS doesn't even flash on. Well, that KVM switch could be causing problems. Switch the CRT to the other port. Oh look, the plug is half way pulled out. Better tighten the screws on the adaptor. The thing is in the corner of the room, down near the floor, back to the wall, with a bunch of other cables all snaking around, and I have to get a small straight bladed screw driver into the screw slot, at an angle, and tighten the screw. By careful concentration I manage without cursing more than a time or six.

So now we can switch the CRT to the other port. No help. Dead as a doornail. Joy of all joys. More fun to come.

As an aside I have 12 seperate devices requiring electrical power on my desk:
  1. Desk lamp
  2. LCD Monitor
  3. CRT Monitor
  4. Dell Computer
  5. Linux Computer
  6. Speakers for computer #1
  7. Speakers for computer #2
  8. Cordless telephone
  9. External disk drive
  10. Printer
  11. Network hub
  12. Floor lamp
Okay, technically the floor lamp isn't on my desk, but I had to stretch the cord because all the close outlets were taken up with computer stuff. All this stuff required five wall warts (little black power transformers that plug into the wall) and two power strips.

Update: both displays are working, but the resolution isn't up to snuff, and there's some other stuff that doesn't work quite right. Chewearn's blog gave me some clues.

Monday, March 16, 2009

Preikestolen, Norway


Stolen from Marty North & Greenfield Park. Funny, I don't remember going to Norway. I swear the guy in the blue jacket sitting on the edge looks like me.

More π

So I was thinking about that program for calculating the value of π that I posted yesterday, and I realized that the algorithm was quite capable of calculating the value of pi to an indefinite number of digits. The code would take some work, quit a bit of work actually, but feasible. The algorithm calculates a new value of x with every iteration. This new value of x starts 4 bits to the right of the place of the last value of x. So you could keep adding these new values of x to this string of bits for however long you wanted to. Eventually you would get tired or bored, or run out of disk space, but you could go quite a while.

The problem you would run into is that each value of x would be an infinitely repeating pattern, so you would have to keep replicating this pattern as you went, and with each iteration, the pattern would get longer. It might be necessary, or even easier to keep a separate pattern for each new value of x. Then when you get a new value of x, you add the appropriate section of each pattern to it and append that value to your infinitely extending value of pi.

There is going to be some point where the addition of the new x is not going to propagate any farther towards the binary point. Then you can say you know the value of pi to that point and can safely store it away.

Recognizing how many bits go into each pattern is going to be another trick. I imagine someone has already figured out how to do that.

Sunday, March 15, 2009

π, again

Yesterday was pi day and Stu put up a post with a formula for calculating the value of pi, so naturally I had to try it out. This one promised to be a little better than the traditional one. I had written a program to implement that algorithm a while back, and while it worked, it was very slow to close in on the value of pi, requiring hundreds of iterations.

This formula closes in on pi in only 8 iterations. Well, it gets as close as it can. It is limited by the format of double precision floating point numbers.


/* Simple program to calculate the value of pi.
Original formula:

/ 4 2 1 1 \
16^-K * ( ------ - ------ - ------ - ------ )
\ 8K + 1 8K + 4 8K + 5 8K + 6 /

The caret (^) indicates raising to a power: 16^K means 16 to the power of K.
Multiplying by 16^-K is the same as dividing by 16^K

A double precision floating point number has 64 bits (8 bytes).
1 bit for the sign
11 bits for the exponent
52 bits for the mantissa

Three decimal digits require approximately 10 bits. 2^9 = 1 << 10 ~= 1024
We were able to get 13 decimal digits, which works out to about 43 bits.
The double angle brackets (<<) indicate a bitwise shift,
in this case to the left.
*/

#include <stdio.h>
#include <math.h>

int main(void)
{
int k;
int n;
double pi;
double x;

pi = 0;
for (k=0; k<8; k++)
{
n = 8 * k;
x = ( 4.0/(n + 1)
- 2.0/(n + 4)
- 1.0/(n + 5)
- 1.0/(n + 6))
/ (1 << (4 * k)); // 16^K
pi += x;
printf("%16.12f ", x);
printf("%16.12f\r\n", pi);
}
return 0;
}


Results:
x pi
3.133333333333 3.133333333333
0.008089133089 3.141422466422
0.000164923924 3.141587390347
0.000005067221 3.141592457567
0.000000187893 3.141592645460
0.000000007768 3.141592653228
0.000000000345 3.141592653573
0.000000000016 3.141592653589

Saturday, March 14, 2009

Sweetness

My normal breakfast is a cup of decaf tea (don't want to wake up too fast) and a bowl of generic Cheerios. If I really wanted to save money, I would be eating oatmeal, but that requires measuring and that's too much work first thing in the morning. So I eat cold cereal, and it's usually Cheerios because we keep a supply on hand. But sometimes a box of sweetened cereal shows up and I will have that instead, even though I know I'm paying like two bucks for like a penny's worth of sugar.

So here's the big idea: spray on sugar, or maybe sweetened milk. You can put regular sugar on your cereal, but most of it sinks to the bottom of the bowl, so you don't really get the full effect of the sugar while you are eating. Of course you can compensate by sucking down the dregs from the bottom of the bowl, but that's not really the effect we're looking for. Sweetened milk on plain cereal would give you same effect as sugared cereal for potentially a lot less money. Why isn't there any sweetened milk for sale at the market?

There may not be sweetened milk, but there is chocolate milk. Mmmm. I think I have just found a solution to my problem.

Amtrak

First Tamara puts up a post about Amtrak, and then Dustbury puts up one of his own, and since trains are near and dear to my heart, I better put one up too. Looks like the government is going to shell out about as much as Amtrak gets from ticket sales to keep it going another year, $1.5 billion each for a total of $3 billion.

My kids use it to get back and forth to school. More often than not the the Portland to Eugene run is supplanted by a bus, but a bus much superior to those run by Greyhound. For short runs like this (one or two hundred miles) the train is an acceptable means of travel. Much longer than that and the price of tickets and the time required begin to make travel by air, miserable as it is, attractive.

More Trolls


Patent Trolls this time. The Patent Prospector pontificates on human nature:

No system is perfect; after all, we're filthy earth monkeys with abstract thinking capacities, but the moral fiber of rattlesnakes.

And then he smears the name of one of America's most famous heroes:

The world's most prolific patent troll was Thomas Edison, who never made products, but snagged 1,093 patents, and whose cantankerousness befits his title of "King of the Patent Trolls". For example, at a time when America's electrical system was in the process of being decided, Edison invented the electric chair to discredit alternating current as dangerous. AC electricity was being promoted by rival George Westinghouse, while Edison was pushing DC. Westinghouse won that battle, and thanks to that, America's prisons have had the ready facility to fry prisoners in Edison's hot seat.

Mix patents, contentious patent holders, lawyers and money, and things are just naturally going to get ugly. Note that nobody ever fights about patents for things that aren't making someone a lot of money.

Bi-Level Comments


So here's an idea for those people who are always cooking up new widgets for the internet: bi-level comments. One level for children and trolls (is there a difference?) and another level for people who actually have something to say.

Dustbury noticed that some blogs have "gone invitation only". I have noticed that some blogs require registration. We coincidentally agree that barriers like that are too much to bother with.

Some blogs get a great number of comments on a regular basis. Sometimes they are intelligent, or at least pertinent. Sometimes they are written by trolls, and some appear to be written by 12 year old kids who think fart jokes are the epitome of humor. Okay, so maybe fart jokes are the epitome of humor. The problem is that they are not pertinent to the idea under discussion. They are a waste of time and space and someone should do something about it. There ought to be a law!

Some blogs seems to suffer excessively from trolls. Out of 70 odd comments on one recent posting, I found only a handful that could even be considered to be related to the video. The rest were just so much garbage.

Moderating comments is one solution, but for a busy person who is getting a large number of comments it can be a time suck they cannot afford. Requiring registration is one way to cut down on trolls. If a troll registers, you can cut them off at the knees.

Blogger has a feature that allows you to identify yourself using one of several on-line id systems, or to post a comment anonymously, and it doesn't require anything. There is a default setting, so if you don't care about attribution, you can just post the comment.

I do not know whether it will enable you to establish a selective barrier. I don't get enough comments to bother.

Rocketboom: Nilo's Story

I enjoy watching Rocketboom. I admit that a big part of the attraction is Joanne Colan. She is attractive, intelligent, witty and quick. Boy is she quick. She can condense the state of the world and how to fix it into a 30 second monologue.

I come across Nilo's Story. It's a poignant story of a woman working for a news agency in Afghanistan who was attacked one day by a man with a razor blade who cut her arms and then a day later she was stabbed by a woman. She survived the attacks.



I follow several blogs on the internet. A couple of them are written by women (Tamara & Roberta) that one might describe as gun nuts. They own guns, they go shooting (at approved target ranges), they are ardent supporters of the 2nd Amendment (the right to keep and bear arms shall not be infringed).

So. I am thinking Nilo is someone who should be carrying a gun. Of course there might be some obstacles to that. It might be illegal, or she might not be able to afford one. On the other hand this is Afghanistan, which is supposedly overrun with guns. Surely she could find one somewhere.

But there might be another reason she was not carrying a gun. She might not be a gun person. I suspect some people, just by their very nature, are not suited to guns. The mind set needed to use a gun effectively is closely allied to that of a predator. You need to be alert to the appearance of a threat/target, you need to be able to react quickly to that appearance, and should it become necessary, you need to be able to act with violence.

Growing up in a protected environment is going to cripple those abilities, and in many societies, providing a protected environment for women is one of the foremost priorities. It's a priority for men, because they want their children to survive, so they attempt to provide protection for them. The women get the protection as well as long as they are providing children. Kind of a harsh way of looking at the human society, but human society is pretty harsh.

Nilo may have been very brave, or, in hindsight, very foolish. She is stepping out in a very primitive society. She is making a target of herself. Where was her protection? Where is her father? Dead, more than likely. So why was she not taking steps to protect herself?

If may be Kabul is like any other big city. People don't just go around slashing strangers for no reason. Except, they do. This kind of thing happens all over the world, even in America. Perhaps especially in America. The odds of it happening on any particular day are tiny, but if it does happen, the results can be devastating.

I hope Joanne is carrying a gun.

Friday, March 13, 2009

Cigarette Litter

There was an article in the The Oregonian (our local paper) the other day about last year's one day effort to clean up the world's beaches. What was interesting was how prominently cigarette butts figured in the story. While they don't make up much of the mass (probably about 0.1%) they are the most numerous kind of litter the pickers found.

So this idea popped into my head: what we need is a personal cigarette butt receptacle, a butt collector. Something a smoker would carry with them just like the pack of smokes and a lighter, that would give them a place to stash the butt when they were done with it.

Well, if it's such a good idea, someone else has probably already thought of it. A little web search turned up an anti-cigarette-litter site, which had a link to a company that sells personal ashtrays, but that wasn't quite the ticket. A little more looking turns up a bunch of public service type videos complaining about people throwing out their cigarette butts. Well, that's very nice, but it doesn't really help.

What we need is some good examples. We need some videos of people disposing of their cigarette butts properly. If we are really serious about this, we need to make it easy for people to dispose of their cigarette butts. Give them an empty receptacle every time they buy a new pack, and let them drop off their old one. Give them a nickel for each butt they turn in. That might work. Pay them a dollar off their next pack of smokes for each full receptacle they turn in.

In terms of the state of human affairs in the world today, this is pretty small potatoes, but it is one problem we might be able to do something about.

Odd Words

You let in one, and pretty soon there's another, and before you know it you're overrun with odd words. Yesterday's Jumble used "jocund" (jovial), and this morning Dustbury uses "anent" (alongside).

Thursday, March 12, 2009

Hoo Boy.


NY Times 1999 Fannie Mae Eases Credit To Aid Mortgage Lending
I heard this once before, but because it happened during Clinton's term as President I didn't want to believe it. But now I see it again, and this time it's a little more convincing. Click the image to embiggen (I love that word). Via Marty North & Greenfield Park.

Update January 2017 replaced missing image, added link to orginal story.

The Antikythera Mechanism

I remember hearing about this a few years ago. At the time there was a bunch of hype, but not much real information about the mechanism, at least not that I found in the fifteen minutes I devoted to the task. The existence of the original upsets our established view of ancient history. I don't think historians have quite come to grips with it yet.

Via Neatorama.

Zombies!



What is the attraction? Possibly because the very concept of a Zombie gives your mind license to range freely. Wandering around in the (virtual) woods this morning I stumbled over "Zombies are the New Vampires" which led to "I Was a Regency Zombie", which contained this wonderful bit:
In fact, “Pride and Prejudice” may already be a zombie novel, contends Brad Pasanek, a specialist in 18th-century literature at the University of Virginia.
“The characters other than the protagonist are so often surrounded by people who aren’t fully human, like machines that keep repeating the same things over and over again,” Professor Pasanek said. “All those characters shuffling in and out of scenes, always frustrating the protagonists. It’s a crowded but eerie landscape. What’s wrong with those people? They don’t dance well but move in jerky fits. Oh, they are headed this way!”
"Zombies are the New Vampires" finished up with a video of "The Zombies" playing "She's Not There". A quick look on the net turned up this one, which is one of my favorite tunes. The video is .... I'm not sure what it is. And who are those two guys in sport coats? And why do we care?

via Dystel & Goderich Literary Management.

Update January 2017 replaced missing picture, replaced dead links.

Wednesday, March 11, 2009

Substance & Pinch

Choffy
Substance & Pinch sponsored a Show & Tell event last week at Substance World Headquarters. When I got to the door, there was a fellow bringing in a coffee maker and fixings, and I thought cool, there's going to be coffee. They had already promised beer, but beer doesn't hold much attraction for me these days.

It's basically happy hour and I talk to several people about various kinds of programming and the tools (i.e. more computer programs) used to write even more programs. Mostly they are talking about writing code for various web sites, which seems to be a booming business, at least in this room.

I've been checking on the coffee as I am getting thirsty, and it's kind of slow coming, but eventually it's ready so I pour myself a cup, and boy do I get a surprise. It was made in a coffee maker. Whatever it is came in bags like coffee comes in. It looks black like coffee, but it is not coffee. It's chocolate! Delicious! Jason told us all about it. It's his baby, it's new, and he calls it Choffy.

There were five other presentations:
  • a little tool a programmer developed for applying sequential numbers to images, like 00 to 99 on the image of a football jersey.
  • a multi-man-year project developing an elaborate web site to show the current state of salmon populations.
  • an iPhone application that would allow you to mail postcards of images you took with the camera in your iPhone.
  • a framework for developing web sites that laid down some fundamentals so that it would be easy to customize for different cultures and/or languages. (I hope I'm not getting this mixed up with some other presentation I saw.)
  • a web site a couple of guys set up as a lark to promote and sell bacon. It only took them a few weeks, and they have stumbled into a whole world of net deprived custom bacon makers.
I had more fun here than I've had in a long time. Did the pretty girls have anything to do with it? Nah, that couldn't be the case.

Update January 2017 replaced missing picture, removed dead link.

DorkBot PDX


Winch hanging from ceiling
I went to the DorkBotPDX meeting last week at the Lucky Labrador brew pub on Quimby in downtown Portland. I talked to a few people. A couple of guys were working on controls for RC (Radio Control) cars. One gal had a walking, talking miniature skeleton. Another guy had a wire mesh head with eyeballs.

One of the guys with an RC car was working on using GPS to have the car navigate a path. GPS precision is at least partially dependent on how many satellites you can see. Right now he is planning on some field tests. The trick right now will be how fast he can get updates from the GPS unit. Once you know where you are and where you want to go it should not be too difficult to figure out how to get there.

I worked with a OEM GPS unit a few years ago. It could take a long time for it to figure out where it is the first time you turn it on, like hours. Once it has done that the first time, it does not take too long, depending on how many satellites it can see, whether the power has been turned off, and whether it has been moved very far from it's original location.

The other RC guy had modified a wireless game controller to control the car. Actually the controller was unmodified. He had modified the receiver that plugs into the game console. He had removed the connector and wired it directly to a controller board in the car. He is also looking at GPS.


OPTAScope
He had an OPTAScope which used to sold by Parallax. It is a small device about the size of a cordless phone. It has three or four test leads that can be connected to the target board and a USB connector for connecting to a PC. A special program displays the signals on the PC's screen. It looked like a really handy and cheap way to get an oscilloscope. There are other USB/PC oscilloscopes out there but they cost a bit more.


Parallax software oscilloscope
I got the impression that the gal with the dancing pirate was using him along with some other characters in a movie/video she was working on. I didn't quite get the whole story, it was pretty loud in there. The pirate was mounted on a square base that held the electronics. There was one motor in his head that moved his jaw and another in the base that made the body move. The whole thing was run by a 6502 microcontroller and had a short audio recording that it played. The 6502 has been around forever.

The guy with wire mesh head was looking for pneumatic cylinders to provide some motion control. Used to be able to get stuff like that from Boeing surplus in Seattle, but they've shut down. Well, the brick and mortar store is closed, but they now have an internet sales site.

Arduino, Parallax and Winbond were names I heard from several people. Windbond makes a line of self contained audio record and playback chips, no other IC's required. Makes it simple to add a bit of sound to your electronic project.

Arduino and Parallax make circuit boards with microcontrollers for hobbyists.

The picture at the top? That's a five ton crane hanging from the roof of the pub. The building must have had some industrial application in a previous life. Sad that such a fine piece of machinery ends its' days as a decoration. I suppose that's better than being hauled off for scrap. And who knows? Someday it may find a use again.

Update November 2016 replaced missing pictures, added captions.

Windows is Wonderful, Part 9488

A computer virus got into my system. I noticed my system had been acting a little funny, then this Sunday my wife complained about hers, so I started looking. I've been running Zone Alarm Firewall for quite a while (months? years?) and hadn't had any real problems. So I run "Spybot Search & Destroy" and Lavasoft's Ad-Aware on both our systems, but they turn up nothing significant. Well, maybe it's time to load some new anti-virus software. I had been running AVG until they came out with version 8 and it started crashing Firefox. I looked at the scan history and it hadn't found anything for months, so I just removed it.

Well, burned once, twice shy. So I started looking around for a different anti-virus package, and I came across something called Kaspersky, from Russia. Well, this could be good, or this could be really, really bad. I look for info and what I find seems to indicate that it might be worthwhile, so I give it a try. It won't install. Claims AVR and ZoneAlarm are in the way and need to be removed before I can proceed. Well, this isn't good. ZoneAlarm is my friend, and AVG is NOT installed. I removed it last time I had trouble. Still, it might be worth a shot. So I remove ZoneAlarm, but the AVG is still marked as installed. I am not going to spend any time trying to figure out why AVG is still marked like that. I try to install Kaspersky again, but still no go.

I don't like not having a firewall running, so I try to reinstall ZoneAlarm. Go to their website and they claim you need SP2 (Windows XP Service Pack 2). Well, no problem there. I have it, against my better judgement. So I go to the download page and now they tell me I need SP3. Sorry, bud, that is not going to happen, not without a real good reason, and just you wanting it doesn't qualify.

I must have a copy of the old ZoneAlarm installation file around here somewhere. I remember I made a security CD some time ago with a bunch of these programs on it. Where is it? Gone, Daddy, Gone.



So I poke around and I find that Windows now offers their own firewall. Part of SP2 I suppose. Well, we'll just turn that on. Now we have some sort of firewall at least.

Back to the Kaspersky installation problem. Maybe if I reinstall AVG and the re-remove it, that problem will go away. Well, shoot, if I have to reinstall AVG again, I may as well try it out. Maybe they have fixed their problems. So I do, and I scan my computer. It takes 4+ hours and finds two virii, and they are off in some internet cache, not likely to cause any trouble, not like an EXE file in the Windows directory.

So that was Sunday. My system has been acting a little weird since then. It takes forever for Firefox to load (tens of seconds, I tell you, tens!), but once it loads, everything seems fine.

Until today, and then everything goes blooey. I had to pull the plug and reboot to get control. And then there's a warning, it wants me to run chkdsk. So I do that, and now things are back to normal, or at least how they were before it all went blooey.

I look at the AVG scan logs and there is nothing: it hasn't been scanning the disk. Oh, right, I changed the power settings (under screen saver, of all places) and now the system hibernates when you ignore it. Which means you have to push the power button to wake it up. Seems to work okay, but AVG can't reach out from the disk and push the power button, so we have a conflict of interest here.

This Windows stuff is starting to get annoying.

Of course, today I go to the ZoneAlarm page to verify the link I put in this post, and there is no mention of SP2 or SP3. Bah.

Update August 2009: Gnarls Barkley video on Google went away. A little looking turned up another copy on wat.tv, but their embed didn't work: it opened a window to their site to play the video. A little more searching turned up a copy on myspace.com, and their embed code did work.

Update September 2015, replaced missing video.

Resolution

Last week I went to three events/meetings in downtown Portland. It about wiped me out. So far this week I haven't been anywhere. Open Sourcery is hosting a lunch today but I haven't been able to muster the energy to get going. For these kind of things I like to take the train, it's cheaper than buying gasoline, and it's less stressful, but it takes so long that it turns a quick outing into a frigging expedition.

What's going to happen to the breakfast table when all the newspapers fold up and go away? Are we going to have a large flat screen monitor in front of everyone's place at the table? Admittedly there are seldom more than two people at the table for breakfast, but that's just my house.

This morning in the local paper there was story by Noelle Crombie. Accompanying the story there were a couple of pictures that looked sort of the same, it you were standing 20 feet away. One is Leonardo daVinci, the other is part of a drawing he made. Some wackos are trying to say that Leonardo purposely arranged his drawing so that a portion of it formed a self portrait. Okay, sure, if that's what you want to believe, go for it. Any closer than about ten feet and the drawing doesn't even look a picture of a person. Any more than 20 feet away and it becomes just a fuzzy spot. In between they appear to be similar aspects of a man's face, but they aren't really identifiable. The pictures as printed in the paper are about 1.8 inches tall by 1.5 inches wide.


On my screen they are about 2.2 inches tall and 1.85 inches wide. Each image is about 196 pixels tall by 168 pixels wide. That works out to roughly 100 pixels per inch for either the print or screen versions. There might be more detail in the actual printed version, but it is really hard to say. I would have guessed that the newspaper was being printed at 300 dots per inch, but maybe not.

One more detail: in the pdf version of the front page, the letters in the name of the article's author appear to be of mixed heights. On the printed page they are all the same height. This pdf link will probably go away in about a week. If you want to see it after that, let me know. I kept a copy of the file. I couldn't find the story in their online version, maybe it will show up there later.

Update January 2017 replaced missing picture, removed dead link.

Tuesday, March 10, 2009

Watcha doin'?


Update January 2017 replaced missing picture.

Paper Route


I know this Chuck Norris thing is getting kind of old, but this one just hit my funny bone. From Dutty the nutball.

Update January 2017 replaced missing image, removed dead link.

Metal & Money

I still get a monthly newsletter from Metal-Pages. They are mostly announcements for upcoming conferences, usually in far off places like Hong Kong or Moscow. Today's newsletter announces "Metals for the Aerospace Industry 2009" and it is being held in Seattle. Seattle is still home to Boeing, never mind their headquarters having moved to Chicago.

Shoot, I could drive. I will not be going because not only would I have to get there, I would also have to buy a ticket, and that is not going to happen. It was interesting to see the price in three different currencies. I was glad to see that the US still makes the cut.

GBP 649.00 / USD 899.00 / EUR 719.00

Interesting that only Western currencies are included. No Asian currencies, and no Rubles.

I got hooked up with these guys when I was looking at Rhenium.

Monday, March 9, 2009

Uncle Bob

Pilot Jim is talking about air conditioning on an airplane.
Oh, and air conditioning isn't about blowing cold air on a hot August afternoon. You see (you can take a nap now) we tap air for pressurization off the engines. We tap it after the turbines but before the combustion chamber. Big deal you say. Well, physics being what it is and gas laws being the way they are, we're tapping air that's either 350-ish (degrees F) or close to 800 F. That's just from compressing the air from ambient. There's not fire going on yet. Well, even with losses in the system, we'd be pouring 130-150 F air into the cabin if we didn't run it through a heat exchange systems first. Thus we condition the air. See, Bob's your uncle.
I thought he was your uncle.

I thought it was funny.

Portland Is Just A Little Schizoid



There is a fairly noisy peace contingent in this neck of the woods, but there are also a lot of people who are in the fight, witness this fine T-shirt design.

Vision Strikewear of Portland is printing and selling the shirts.

$5 from each shirt goes to a good cause. Found on Afghanistan Shrugged, via Crucis' Court, via assorted gun nuts.

The motto on the back of the shirt reads "Oderint dum Metuant" which is an old Roman phrase meaning "Let them hate as long as they fear".

Update January 2017 replaced missing images, fixed or removed dead links.



Let's Pick on Saudi Arabia

Sent to my congress persons today:

There is something fundamentally wrong with our relationship with Saudi Arabia. I would prefer that we stop dealing with them completely, no oil, no money, no weapons, no diplomatic ties. Until they start behaving like civilized people and not a bunch of barbarians. Or least until they shut down all those Wahhabi schools, and all those who follow that line of teaching are dead.

I realize this is not going to happen as long as we are dependent on their oil. So we need to free ourselves from this dependence. Compressed Natural Gas might be the way to go.

13 minute video showcasing the safety tests performed on vehicular CNG (Compressed Natural Gas) storage cylinders.

Minor Feats of Skill

Can you stand on one foot and put a sock on your other foot? Can you do it without support? Without hopping around like a mad whooping crane? Without moving the foot you are standing on?

Can you fill a glass of water and then pour it in the sink so that it washes the sides of sink all around in one continuous motion?

Can you pick up a spoon from a plate without making a sound? Everytime I try the spoon jumps a tiny bit when I first touch it, but before I have gotten a hold of it, and it makes a tiny tink.

I have come close on these, but no cigar. Yet.

Sunday, March 8, 2009

Surya Bonaly

I was thinking about those stunts in Reebok Fantasy NFL videos. The stunts look real, but are they? Then I remembered Surya Bonaly, the black French Olympic figure skater, did a backflip at the Olympics. It caused quite a stir with the crowd and with the announcers. The first 45 seconds of this video are damaged, but after that it clears up.

My wife and I had been watching the figure skating competitions for a while, and we had never seen anyone do a backflip on the ice, so when we saw this we were amazed. Later on there was demonstration program where skaters should show off for the crowd, no judging involved, and one of the male competitors did a backflip. I thought it was Brian Boitano, but he wasn't even there, so I don't know who it was. Anyway, this made me think that any skater competing at this level is probably capable of such a move. You don't see backflips in competition because they are against the rules. I think the deal with Surya was that she had fallen once and figured she had already lost the competition, so she did it for the crowd, and for the in-your-face effect to the judges. Who knows?

My point is there are layers of talent behind what we see in public performances. Professional entertainers (which includes professional athletes) can spend inordinate amounts of time perfecting their craft, which is what makes me think those Reebok fantasy videos could possibly be real. Then again, the videos were made by a company called Blue Room. Blue Room? Would that name have anything to do with Blue Screen? Maybe it is all just a fantasy.

Saturday, March 7, 2009

Pentaminx

Some people can follow through on hare-brained ideas.

This is a one off (so far). You can read all about it here. Via Syaffolee.

Colossus

Colossus
Update: Stu pointed out that I had made a couple of errors in this post. I have attempted to correct them. I hope he's happy with the result.

Colossus has been restored! Colossus, in case you forgot, was the granddaddy of all electronic computing machinery. It was installed in Bletchley Park (where did they get that awful name?) during WWII and was used to decrypt code used by the German staff. It was like the 2nd generation of machinery developed for this purpose. The first generation was used for decrypting messages Germany was sending to their U-boats. I found the link on Andy's Retro Computers. Here is the picture of the eclectic mansion that stands in for what was really going on,

Bletchley Park
which was this:

Map of Bletchley Park
Update: the aerial photo I had here has disappeared from the web. Looking for a replacement I found this map.

Here is a Google map. At this scale you can see all the buildings involved in the wartime project. The placemark is centered on the lawn in front of the mansion. If you zoom in you can tell it's the mansion because of the blue-green color of the roof at one end. The housing development along the left hand side is not part of the park.


View Larger Map
This whole thing is about 45 miles NW of London. There was a movie "Enigma", parts of which were set in Bletchley Park.

Update September 2016 replaced missing pictures, except for the aerial view.

The Curse Of UNIX

Regular Expressions are the work of the devil, nevermind what some Perl apologists say:
WARNING: This article contains more punctuation that many non-programmers like. That's because regexps and finite automata are concise ways of expressing powerful concepts. They are not for the faint of heart. Don't blame Perl if you don't like regular expressions. And don't blame Thompson or anyone else. If you don't like them, don't use them. But don't despise those of us who do.
Perl is it's own language, and unlike other human languages cannot be translated into anything mere humans can read. I suspect it originated with aliens who are trying to subvert our civilization to prepare for their conquest of our planet:
How can I convert my perl scripts directly to C or compile them into binary form?

The short answer is: ``No, you can't compile perl into C. Period.''

However, having said that, it is believed that it would be possible to write a perl to C translator, although it is a PhD thesis waiting to happen. Anyone need a good challenging thesis?

According to some people (alien lackeys, no doubt), Perl is a programming language. Perhaps if you are born and bred to it, you might think so. If you didn't grow up in the UNIX (or Linux) environment, you (and me) are more likely to describe it as gibberish.

So why am I making a fuss about this anyway? Perhaps I like beating me head against a wall. Or maybe I have an NSA complex and think I can crack anything, however inscrutable it appears.

I went to a PLUG meeting the other night down at PSU. Later on I was looking on their web site for a forum where I could post a message. I did not find a forum, but I did find something called IRC, which is what elite programmers used to communicate before there was the internet. You need a special program to use this communications channel. So I downloaded it and took a look at what we've got, and half the program is writen in Perl. So I set about trying to understand what one small file does. It took me a while, but I finally was able to translate it to C. I don't know that it is 100% accurate, there are still a bunch of environmental issues to consider, but I think I captured the essence. So, yes, you could earn yourself a doctorate if you could come up with a program that would translate this stuff to English or C or any other reasonable language.

Here is the Perl program findsyntax.pl:

#!/usr/bin/perl -w

while(<>) {
if(m!/\*.SYNTAX\:! || $tt) {
s/^\s+/ /;
if (/^ [A-Z]+/) {
print "\n";
s/^ //;
}
if (m!\*/!) {
$tt=0;
} else {
$tt=1;
chomp;
}
print;
}
}

And here is my translation to C:

void chomp(char* p1)
{
// Remove all trailing end-of-line characters from a string.

char* p2;

p2 = &p1[strlen(p1) - 1];
while ((p2 > p1) && (*p2=='\n'))
*p2-- = 0;
}

#define isblank(cx) ((cx==' ') || (cx=='\t'))

void findsyntax(void) // uses global variables s & tt
{
while (strlen(s))
{
if (strstr(s, "/*.SYNTAX:") || tt)
{
if (isspace(*s)) // Condense leading white space
{ // to one space.
while (isblank(*s++));
s--; // Point to last blank
s[0] = ' '; // Ensure that it is a space
if (isupper(*s[1]) // Is first non-blank character
{ // a letter?
putEOL();
s++; // move past space to letter
}
tt = !strstr(s, "/*");
if (tt)
chomp(s);
}
printf(s);
}
}
}

I suppose my translation is not much more intelligable, at least to the non-programmer.