Friday, December 31, 2010
This video is a mix of real information and speculative claptrap. It's pretty good overall. There are some good explanations of exo-planet hunting techniques, and some of the ideas being kicked around as to what kinds of planets one might find. Excellent video.
Via Universe Space And Time.
Thursday, December 30, 2010
When we were in San Francisco a few months ago there was a big, huge, ginormous gas explosion about ten miles from where we were staying. Took out several houses, killed a couple of people. It was big enough to warrant the Governor's attention, or maybe the Lieutenant Governor, I've forgotten. I guess it made an impression on her.
Well, this triggered a dump from the memory banks.
Forty-five years ago, when I was a sophomore in high school, my Dad threw in the towel on his engineering career and bought a farm 40 miles NE of Columbus, Ohio. The farmhouse had an old coal burning furnace. My mom, the sophisticated urban woman that she was, wasn't having any of it. As there was a high pressure gas line running across our property, why can't we just tap into that and get gas heat? So we did.
A trench was dug the 200 yards from the house to the pipeline, then the gas company sent out a couple of guys in a truck to make the connection. I got to watch. They dug down to the pipe, it wasn't very far, which was kind of weird, because they were on a slight rise just to the side of the road. The pipeline route was perpendicular to the road, maybe there was a special go-under-the-road kink in the line there, I don't know.
Anyway, they uncover the big pipe, clean the surface down to bare metal and weld a short stub of pipe onto the main line. Hooked up a pressure gauge, pressurized the stub and checked for leaks. Screw a valve onto the stub. Screw a hand operated drill into the valve. Turn the handle on the drill, drill through the wall of the big pipe. The drill had no gears, just four spoke handles. The bit looked an ordinary quarter inch drill bit. I imagine the wall of that pipe had to be half an inch thick. It took a while.
Now it gets interesting. The way it was supposed to work is you retract the drill and then you close the valve. Something went wrong and the valve wouldn't close, so when they pulled the drill off we got a jet stream of high pressure Natural Gas going 20 feet into the air. This caused everyone to step back, but it didn't catch fire, so after a bit one of the guys returned to the scene and closed the valve. Whew.
After that it was just hook up the pressure regulator, the gas meter and the normal shut off valve. Pretty cool, all in all. Especially since we didn't all die.
Wednesday, December 29, 2010
From Steve. Which reminded me of this:
I think I have posted this video before, but I could not find it.
From Wikipedia we have this:
The torr (symbol: Torr) is a non-SI unit of pressure with the ratio of 760 to 1 standard atmosphere, chosen to be roughly equal to the fluid pressure exerted by a millimeter of mercury, i.e. a pressure of 1 Torr is approximately equal to 1 mmHg. . . . . It was named after Evangelista Torricelli, an Italian physicist and mathematician who discovered the principle of the barometer in 1644.
Tuesday, December 28, 2010
When people believe that hard work will not pay off, when they believe that the game is rigged against them, that's when they are ripe for the message that they are being kept down by some nefarious cabal.
We know how that tends to work out. - E. B. Misfit
Four minutes and six minutes are not very long, but at the time it seemed like for flipping ever.
Of all the problems we have in America, this is the absolute worst.
There are the two big (three lane) tunnels that go under the West Hills and connect Highway 26 to downtown Portland. A few hundred yards down the road in the East bound lanes, the left and right lanes peel off and duck into short tunnels on their way to I-405.
On the other side of town, the exit from I-84 Eastbound goes through a short tunnel on it's way to joining up with I-205 Northbound.
I've been out to the airport a couple of times this month in the evening, after traffic has died down, and I was able to sail through at least some of these tunnels without slowing down. It was pleasant.
So it struck me that one of the reasons that people slow down for these things is the reduced visibility: you cannot see around corners. Never mind that you can see far enough ahead to avoid a collision, the problem is you cannot see as far ahead as you could just a few seconds ago, before you entered this tunnel. The sudden reduction in visibility is what causes people to slow down.
One way to deal with this is to drive in the outside lane (if there is more than one), or the outer most portion of your lane (if there is not). This will let you see a little farther ahead. I would suggest that the road painters move their lane markers (on those roads where there is room), but that would make the lane off-center in tunnel, and that would probably cause more consternation than the curve.
I wanted to include a drawing here, but that would take more time I want to spend right now.
Just to complete the circle: the patent document was digitized by Google, which means it is probably stored on a Google server somewhere. That is somewhere else besides where my copy is stored. I just don't know where.
Monday, December 27, 2010
Now Jack tells me he originated the use of control blocks for PC's. He was working on a 6800 based disk controller back in 1976. As the project progressed they realized they needed to pass more data to the disk controller. The way they had been doing it was to add a new register, which meant adding address decoding hardware, which was a big pain. So Jack says, let's just put all the information in this one block of memory and let the controller pick it up from there, which made everyone happy, which is how disk control blocks for PC's were born.
And Endian-ness? It could make a real mess of things if the DMA controller and the CPU used different methods. You could deal with it in software, but it would require an extra processing step when writing the control block and when reading the status back. Assuming anyone is still using control blocks, and I suspect they are.
While I was looking up stuff about the movie True Grit, I noticed this little blurb about the Henry rifle on the Internet Movie Firearms Data Base page:
Note how the rifle clearly has a twisting barrel instead of a loading gate.A twisting barrel?!? What the heck is a twisting barrel? And no, I don't see any evidence of such. Of course, since I don't know what they are talking about, I might not recognize it anyway. So naturally I had to track this down. So I point and click for a while (days it seemed) and I finally found this explanation from stormgale89 on Yahoo! Answers:
the originals had a lift and turn to the side cover on the magazine tube, pull the follower all the way up to the end of the barrel, lift the sleeve towards the end of the barrel and turn it sideways, this opens the loading gate, now drop your cartridges bullet end up, lift and turn the sleeve to close and allow the follower to fall into the notch, done, ready to action and fire.
only other cheaper "replicas" use the kings gate(found on all new centerfire lever actions), which wasn't invented until 6 years(1866) after the henry 1860 was started, so the uberti is the only authentic replica that I seen.
side note: it was a Henry 1860 that was used in the movie "night of the living dead" they actually show exactly how it's loaded:
(6:10 into the video, skip to it)
also, here's a picture showing the sleeve that needs to be turned:
I had heard about the Henry, but I thought it was just another old gun from another old gun maker who has gone out of business. It is actually a pretty significant weapon. Near as I can tell it was the first commercially successful repeating rifle. This is during the time of the civil war when most soldier still used muzzle loaders.
"I object to violence because when it appears to do good, the good is only temporary; the evil it does is permanent." - Mahatma GandhiNever heard this one before. I've heard the "violence never solves anything line" numerous times (don't know if there is a famous speaker behind it or not). Recently I've been hearing that violence does in fact solve problems, and there are numerous examples to support that case (the Allies defeating the Germans and the Japanese during WW-II, people defending themselves against criminals, etc.).
Lately, I'm thinking violence is just part of human nature. There have been pacificists all through history, though most of the Christian ones (Saints, with a capital S, that is) seemed to have died horrific deaths.
Then we've got feuds, like the Hatfields and McCoys, that go on for years. There were stories coming back from the Balkans (during the recent unpleasantness) about people who still bore ill will for an invasion by the Ottoman empire, something happened 500 years ago.
I'm all for peace, but people being people, it is best to be prepared. You know, just in case someone takes offense at your continued existance.
Sunday, December 26, 2010
The first thing I noticed was the scenery in the old version. It looks like it was shot in Colorado with the Rocky Mountains in the background. However, the story starts out in Fort Smith, which if I recall correctly, is in Arkansas. I let it go, after all this is just a story, and I don't think they ever really specify where they are, and Fort Smith, well, perhaps it's just a fictitious fort made up for this story.
But the new version definitely starts off in Arkansas, and there are no Rocky Mountains anywhere in the background. This also helps explain the number of black characters. Or maybe I'm all wet. When I was younger I loved me some cowboy shows, but there were never any blacks in them, or maybe I just never saw them. Were there any blacks in Colorado in 1875? I found one reference that says there were 46 blacks in Colorado in 1860 out of a total population of 35,000. So not many, so Arkansas makes a little more sense.
Fort Smith, Arkansas, is very near the border with Oklahoma at a point approximately half way between the Northern and Southern extremities of Oklahoma. You can see it on the extreme upper right corner of the map. The Choctaw nation occupied the Southeast corner of Oklahoma, then and now. So that part of the story about the villain running into the Indian territories makes geographical sense. And as Texas, Oklahoma and Arkansas are all adjacent, it make sense that a Texas Ranger could be involved as well.
Then there's the gun: a Colt Dragoon according to Rooster, a Colt Walker according to the Internet Movie Firearms Data Base. It's a honking big black powder revolver. It's a little hard to judge just how big it is. This photo helps.
From the top: Walker, Dragoon, Navy, Police
Another thing I noticed was the extra large loop in the cocking lever on Rooster's rifle. There is a scene that has him cocking the rifle one-handed. He has his hand in the lever and he flips the rifle up and forward, and then back to cock it. Billy Jack did the same stunt with a rifle with a similar loop. I tried this with a lever action Marlin once. It is not for computer geeks. You need a very strong hand to be able to pull off this move. Or maybe there is a trick and it just takes a lot a practice. Or maybe you need that big loop. With a standard lever it's a good way to break your hand.
I'm not going to touch on safe gun handling here, but I do want to mention sound etiquette. There is a scene in the old version that has Mattie in front the muzzle of a rifle while it is being shot. She is off to the side, so she is not in danger from the gun, but the noise from a gun is much, much louder when you are in front of the muzzle. I think there was a similar scene in the new version, but I don't recall the particulars exactly.
There were any number of other interesting little bits, like the rattlesnake bite, the Younger brothers, and the intelligence and determination of the Ranger, but me, I'm going to stop now.
However, we signed up for Netflix, but were unable to watch our selected show (Episode 2 of the first season of Dexter). Further, when we tried watching it via a free web site, it kept stalling. So what's going on? And then it occurs to me that perhaps people bought a zillion of these things for Christmas, and now they are all hooking them up and trying them out and all the servers have gotten jammed up. So I went to check on internet traffic, but I found no anomalies that could explain this behavior. Of course, just because most of the traffic is flowing smoothly doesn't mean that the server farm I am trying to access is not totally jammed up.
And even if I could determine that the problem was with the Netflix servers, I expect they would deny it. I'll try again tomorrow.
"The story of how the computer on my desk got to me is one of the most peculiar tales of the twentieth century, and it demonstrates many tropes often considered merely, literary - peripeteia (a sudden reversal in the plot), hamartia (an error in judgement or a mistake), anagnorisis (unexpected recognition), catharsis (strong feelings) , as well as as significant amounts of tragedy, terror, and pathos, and even some comedy."I've got the feeling I am going to be making good use of Merriam-Websters pronunciation examples.
A quick search on Google turns up Drone pilots have a front-row seat on war, from half a world away (an article in the LA Times from earlier this year).
I am not sure this is such a good idea. I don't have a problem with killing terrorists: there are some people who deserve to die, and people who plant bombs to kill civilians are in that category. I don't have a problem with killing enemy combatants. Sometimes forces beyond our control force competing groups of people into armed combat.
What I have a problem with is remote control killing from half a world away. The drones have to be transported to the combat area. They have to maintained, supplied and armed there. Why would you want to control these machines from so far away when you already have this huge support structure in place?
Okay, maybe it's just a technological exercise, to see if we can do it. And maybe they are planning ahead for the day when can launch drones from the continental US to deal with a problem anywhere in the world.
Or maybe they think that removing the pilots to a distance will lessen the psychological impact, which seems to be becoming a bigger problem these days.
What I don't like is that the pilots are combatants, where ever they are, and so they and their work location are valid military targets.
Maybe that doesn't matter anymore. World War II put an end to discrimination between civilian and military targets. The military is supported by the civilian population, either with or without their consent. The civilian portion of the population provides the military with arms, supplies and soldiers, i.e. everything they need to fight the war, therefor any damage inflicted on the civilian portion of the population is bound to damage their ability to fight the war.
If our country performs an act of violence against anyone outside of our borders, then simply by being citizens of this country, we all become valid military targets.
Friday, December 24, 2010
Nowadays there are no small parts. Some little dohickey fails, like the door latch, and you don't replace just the failed part, you replace the entire subassembly, like the entire door. It's quicker, and easier and doesn't require any specialized knowledge. The subassembly costs more, but the savings in time is substantial and, as we all now know, time is money. Except that only counts if you have a job or money. If you don't have either of those, well, all you have is time, and time savings means nothing if you can't afford the cost of the replacement subassembly.
On the other hand, parts last a lot longer now. I got 95,000 miles out of the brakes on my truck before they had to be redone. Actually, I think I still have the original brakes on the rear, and I'm up to something like 110K miles. Engines used to last 100,000 miles, now they should last 250,000. However, transmissions, which used to be good for the life of the car now seem to be a weak link.
Cars have gotten to be more like consumer electronics, and commercial buildings for that matter. The basic structure, which used to be the biggest, most expensive and important part of the car or building is now a freebee that they give you when you buy all the other stuff that goes into it. That's why cars that look great but have a half a dozen niggling little problems are worthless. To get those little problems fixed would require so much time and/or money that you might as well buy a new one. The question is how much annoyance are you willing to put up with? The car pulls to the right a little when I step on the brakes. The dome light doesn't work. The third preset on the radio doesn't work. It takes two seconds to start now, it used to start instantly, etc. etc.
Cars really are pretty amazing devices. They transport you in comfort through miserable conditions. They can do it quickly, quietly, cheaply and safely. If you are so inclined, they can also provide hours of entertainment.
My biggest complaint about newer cars is that they are lower than the curbs in most parking lots. Used to be that you could pull right up to the curb until your wheels hit and then you would know you were parked. Now, you have to judge your distance, because if you pull all the way forward, the lower front something of the car is going to impact the curb and you are going to hear an ugly sound and feel a jolt. Cars either need to get taller, or parking lot curbs need to get shorter.
Thursday, December 23, 2010
Note the time shown along the bottom edge of the video. Looks to me like it is counting ten-thousandths of a second, i.e. the camera is taking 10,000 frames a second. In part of the video they are tracking the projectile as it is flying along. I wonder how they did that. Was the camera actual tracking the projectile, or did they just use a wide angle view and crop it down so it looks they were tracking it? Our military must have some of the fastest cameras in the world. For another example check out the picture of the howitzer firing.
I am impressed. I am not quite sure just how fast they got the bullet going, but Mach 5 is one of the numbers I read. The Navy's goal is to make a real gun like this that they can install on ships. They are hoping for a range of 200 miles, compare to the 13 mile range they have with their current five inch conventional gun.
The railgun projectile would follow a sub-orbital trajectory. The high velocity at impact would negate any need for an explosive warhead.
I realize the picture angle is a little strange. We are looking down and forward from in back of the left hand rear turn signal fixture. The bulb hanging there is the brake light/taillight. The top of the bumper is visible in the lower right corner.
- Red arrows mark the studs,
- Green arrows their sockets in the bodywork.
- Purple arrows mark the screw holes in the light fixture,
- Purple circle marks the upper screw socket in the bodywork.
Another oddity is that the headlamp bulbs on this car are the fancy new halogen bulbs with their plastic fittings, but these brake light bulbs are from like the 1950's, standard old 1157's.
Wednesday, December 22, 2010
We started with the Pilot episode which is a few years old. The awkward part came when Dexter's foster sister, whose special problem is that she is not very assertive, tries to suggest an idea at an all hands meeting. The way she does it is so weak it's embarrassing. It was so embarrassing I had to get up and leave the room. My wife on the other hand, wasn't fazed in the least. Dangerous daughter tells me she feels the same way as I do. My wife doesn't understand why it bothers me so much. I'm not sure I do either.
This has happened to me on more than one occasion, but this is the first time that I have been able to pin down just what was going on that disturbed me.
Technirati: We don't have a subscription to Showtime, and I'm not sure that would allow you to watch an old episode like this. We watched it on my computer off of some internet site, megareel or sideview or something. Each time I try this it seems I end up on a different one.
Tuesday, December 21, 2010
This game starts out being very easy. It gets a little harder as you work your way through the levels. I didn't have any trouble until I got to level 16 and then I came to a halt. I pointed and clicked and clicked and pointed, but no matter what I did I wasn't able to come up with a solution. I don't know if it is really that difficult, or my brain was just mush. In any case I decided to write a computer program to solve it. The program gave me almost as much trouble as the game. I probably spent 8 to 10 hours working on it over a period of about five days. I finally got it working. It took the program a thousand trial steps to come up with a solution. The solution itself is only about ten steps long, and some of them are superfluous. The program isn't designed to find the best solution, just a solution.
I posted the code on Google Docs.
Update: I wrote up a simple description of the game and my program and posted it on Google Docs as well.
Update 2: The solution generated by my program:
Program to solve minim puzzle.As you can see steps 2 and 4 are superfluous. It is just an artifact of the order the program tries various moves.
0: -2 6 = 9 +2 4 *2 = 9 4
986: -2 9 = 6 +2 4 *2 = 9 4
987: 7 = 6 +2 4 *2 = 9 4
988: 6 = 7 +2 4 *2 = 9 4
991: 6 = 7 6 *2 = 9 4
992: 7 = 6 6 *2 = 9 4
994: 7 = 7 *2 = 9 4
995: 8 *2 = 9 4
999: 8 9 = *2 4
1002: 8 9 = 8
1003: 8 8 = 9
1004: 9 = 9
Dead Ends: 288
Monday, December 20, 2010
EBM, I think the problem is that most liberals are, well, nice people. They know that in a gun-battle between themselves and a vicious sociopath criminal, they would lose -- because they would hesitate before pulling the trigger, while the sociopath criminal would not. That is because liberals have a fundamental respect for human life and a fundamental dislike for doing harm to others that's hard to overcome even in the service of self defense, while sociopaths have no such qualms to overcome.A comment on a post on Just An Earth Bound Misfit, I.
There is also the slight problem that no fundamentally tyrannical government has ever, in the course of modern history, been overcome by armed revolt from within, even when the population *was* well armed. Saddam Hussein's Iraq is a perfect example (google "Iraq gun culture" for an eye opener -- you're not considered to be a man in Iraq unless you have *at least* a fully automatic AK-47, preferably more), all those guns, yet it took outside force to topple Saddam. The problem is that yes, Americans are heavily armed, as were Iraqis... but as Gov. Earl K. Long of Louisiana pointed out in 1959 when state legislators were urging him to defy a Federal desegregation order, "we're talking about the U.S. government here, they got the goddamned ATOMIC BOMB!" I.e., the State has significant weaponry such as tanks, bombers, poison gas, artillery, etc., that it can take out any organized resistance, and unorganized resistance has not been capable of being sustained without outside support (see: Ukrainian Partisan Army after WW2, which was utterly destroyed by Stalin).
In other words, a) liberals by and large think they would be the killed, not the killer, if they ever got into a gun battle with vicious criminals, and b) they don't in general think guns are useful for taking on a tyrannical government. Thus c) guns would not be useful for them.
Of course, going from (c) (the notion that guns in private ownership aren't useful for the stated purposes of defense) to the notion that guns should be banned is a jump in logic that makes no sense, since vicious criminals will have guns whether they're banned or not. But logic isn't exactly a subject that Americans excel at, by and large... thus why some Americans *still* continue to insist that Saddam (a Stalinist atheist who killed Muslim religious leaders) and Osama bin Laden (a rabid Muslim religious leader) were in cahoots, even though the most basic logic says that's utter nonsense...
- Badtux the Well-armed Penguin
Sunday, December 19, 2010
Anyway, when dealing with microcontrollers, you spend a lot of time writing code that interfaces directly with the hardware, often in terms of registers. Registers are a set of eight bits, where each bit has some distinct purpose. To fulfill that purpose, you need to be able to turn those bits on and off, without disturbing any of the other bits in the register. Typically this is done by reading the eight bits from the register, performing a logical AND or OR operation with a mask, and then writing the eight bit value back into the register.
A mask is just a set of eight bits, each set a certain way, so that when you perform the logical operation, the bit you intend to change is indeed changed. For instance, suppose you want to turn on bit zero of Register_A. You would make a mask that was all zeros except for one one. In binary it would look like 00000001. In decimal it would just be 1.
You would read Register_A, OR that value with your mask, and then write it back out to the register. For instance:
mask = 1;You can make a mask for each of the eight bits in a byte, like this:
temp = REGISTER_A;
temp = temp OR mask;
REGISTER_A = temp;
- Bit 0 00000001
- Bit 1 00000010
- Bit 2 00000100
- Bit 3 00001000
- Bit 4 00010000
- Bit 5 00100000
- Bit 6 01000000
- Bit 7 10000000
- Bit 0 1
- Bit 1 2
- Bit 2 4
- Bit 3 8
- Bit 4 16
- Bit 5 32
- Bit 6 64
- Bit 7 128
- Bit 0 1
- Bit 1 2
- Bit 2 4
- Bit 3 8
- Bit 4 0x10
- Bit 5 0x20
- Bit 6 0x40
- Bit 7 0x80
A technique I ran across a few years ago when I first started working with the AVR is using the left shift operation to define these masks. For instance:
#define bit_0_mask (1 << 0)
#define bit_1_mask (1 << 1)
#define bit_2_mask (1 << 2)
#define bit_3_mask (1 << 3)
#define bit_4_mask (1 << 4)
#define bit_5_mask (1 << 5)
#define bit_6_mask (1 << 6)
#define bit_7_mask (1 << 7)
This has the advantage of taking equivalent numerical values out the equation completely. It shows that you explicitly mean the bit in that position. Whatever numerical value it may have is irrelevant.
Now we come to gcc. One of things software people often try to do is to write their programs so they will run on any machine. One of the tricks they will use is to define something two different ways, and then use the something when they write their program. Now when you want to run the program on one machine, you use one definition of something. When you want to run on another machine, you use the other something.
Linux comes from the Unix school of programming, and Unix has been around since the age of dinosaurs, i.e. the big mainframes. Machines were so widely varied back then, and time was so expensive, that programmers developed a set of definitions that boggles the mind. That tradition continues, and today you cannot pick up a piece of Linux source code that is not absolutely riddled with conditional compilation controls.
But this time they went too far. Using the left shift operator was not good enough. They had to make a macro out of it. They called it _BV, which in the land of microcontrollers usually means Battery Voltage. Not in this case, and they won't tell you what the definition is. I'm sure the definition is in an include file somewhere, but I couldn't find it. I deduced what it must be from context. A rational definition would probably look something like this:
#define _BV(p) (1 << p) I imagine the gcc definition probably runs four pages and covers every machine ever made, including some that no longer exist any more. Okay, you Linux weenies. This is too much. Bit masks for use with hardware are MACHINE DEPENDENT. They will never work with another machine. EVER. So you don't need a friggin' macro for this, especially since you aren't going to tell anyone what it is.
I originally wrote this two weeks ago, but then I fell in a hole and forgot about it. I just polished it up and posted it.
Drunken cowboy plays detective, gets mixed up with a drunken writer and his family. Seems a couple of them made some money writing books, so they can afford this nonsense of hiring a private detective for days on end. There are some good bits to it, and some action, but there is a lot of drinking and a lot of stupidity, and the way it ends doesn't really make any sense at all, except it sort of does, given all the other crazy s**t that's been happening. Good enough.
I put up not one, but two other posts about this device. Turns out that the guy who made the Lego version also made a Lego version of Babbage's machine.
Meanwhile Jo Marchant (who wrote the book Decoding The Heavens) tells us that maybe the design is not Greek, but Babylonian, and may be centuries older than we thought.
In any case, I have to download some programs from the net, and while I am poking around looking for this stuff, I stumble on the story of the AVR, which is kind of interesting. It was designed by a couple of guys in Trondheim, Norway, which is like spitting distance from the Arctic circle (200 miles). There aren't too many places that far North: Fairbanks (Alaska), Iceland, and Archangel, Russia, are the ones I recognized on my globe. By American standards it is a nothing little town, only 170,000 people, but they do have a University.
Here is a video clip in which they promise to explain just what AVR stands for. Well, they do, and they don't. It's kind of clever the way they get out of it.
I don't know what kind of device that was, it may have just been a cell phone. Marc tells me there is one device where he work that squawks every time he uses his cell phone near it. Can a cell phone jam a video camera? Interesting question.
Saturday, December 18, 2010
This one was a programming job. Short, simple programs, but programming none the less. It was pretty straight-forward until I got to level ten ("Do you feel your mind getting numb yet?"), and then I came to a halt. At first glance it doesn't look any harder than any of the other problems, but when I tried to program it in a straight forward manner I ran out of space. There is only room for twelve instructions in the main program. However, there are two functions you can use, each of which has room for eight instructions.
Well, if there isn't enough room in the main program, perhaps we can just chain all three segments together. I did this by making the last step in the main program a call to the first function and the last step in the first function a call to the second function. This gave me 26 (11+7+8) steps, but it still wasn't enough.
Okay then. Can I find a sequence of steps that I can use in more than one place? I could, but they weren't long enough, or used often enough to help. So I stewed. And scribbled. And went away, and came back, and went away again. And then I finally came up with a solution.
The trick is that (in some cases) if the robot tries to execute an instruction, but for some reason can't, nothing happens. If you run into a step, you need a jump instruction to get up on the step. But if you have a walk instruction, the block is in your way, the robot can't walk, and he just stays there and goes on to the next instruction. However, a jump instruction will take you off of a block, even if it's seven stories tall, so you have to be careful.
Another trick is that the robot won't go off of the playing field. You can have him walk to the edge of the field and keep walking, but he will just stay in the same spot.
The solution I came up with is a function that consisted of three steps alternating with three jumps and with a turn at the end. I called this function like six times. It is a horrible example of how to write a program, as half of the instructions were wasted. On the other hand, you can't argue with success and it did succeed.
I was going to just put a link to the picture of my solution, but I can't get either Picasa or Google Docs to cooperate, so I've embedded it here. Hope it doesn't spoil anybody's fun.
Don’t fear the Army that goes into battle with the Ride of the Valkyries playing. Fear the army that plays Surfin’ Bird.Apocalypse Now used Ride of the Valkyries in one of their helicopter attack scenes.
From The Bleat (James Lileks) via Dustbury.
I really liked this one, even though it was very short. It has a dark, grim, atmosphere. It has a hero on a mission. It is Science-Fictiony, and it is realistic, unlike something like Mario. It was very simple, well, it was simple once I looked at the walkthrough to get me through the first step.
The coolest part was the train, which got me to wondering why I should like it so much. Pictures of trains and, to a lesser extent, ships and airplanes, seem to evoke the idea of safe, comfortable travel.
When I was little I had a Little Golden Book called Scuppers, The Sailor Dog, which was about a dog who went exploring on his own sailboat. In the cabin he had everything he needed, and a place for everything. I had completely forgotten about it until a few years ago (ten?) my mother got me a new copy, and once again the memory gates fall open. Wow!
So enclosed vehicles of any kind are pretty cool. The world is shut out, there is a wall between you and whatever evil is out there lurking in the dark. You are in a protective cocoon. If you prepared well, you have everything you need for an extended stay, including food, water, a change of clothes, whatever. And if your vehicle has portholes, it must be extra sturdy, because ships are made of iron and they have portholes. Houses are made of sticks, and we all know how flimsy houses-made-of-sticks are (remember The Three Little Pigs?), and houses have square windows, not portholes.
So I really liked Scuppers and Little Wheel's train.
As we crested the hill I could see that the traffic in front of me was slowing down, so I let off the gas, but instead of the immediate cessation of power and the start of engine braking, there was a delay of maybe half a second while the stupid computer evaluated my request and decided to act on it. Drive by wire, you know. It wasn't a problem though, we had plenty of room to slow down.
Now we are on a freeway interchange a hundred feet in the air and I make a wrong turn and as I crest another hill the road ends and we are launched into the air. I wonder if I am dreaming, but I am not waking up. Now while we are plummeted towards the ground I am thinking I really eff-ed up this time, we are surely going to die, unless some real fluke happens like in the movies where we get caught by a guy wire or something. Then I wake up.
I have never driven a Lexus, I don't think I have even ridden in one. There was nothing about the car in the dream that identified it as a Lexus, it was just one of those things you already know when you get there. I did read something this week about how Lexus had made 400 changes to their car in order to improve the ride quality. I don't think I've ever particularly noticed ride quality. Maybe if it jolted me, or was really bouncy. I do notice if a vehicle is particularly quiet or noisy.
There was no guard rail or even a curb at the edge of the road where we went off. That should have been a clue, but that assumes that there is logic at work here, and that would be wrong.
I think I might have some kind of bug. I slept eleven hours last night. I wonder if there is any connection. For a second there I really thought I was a goner.
Tuesday, December 14, 2010
Monday, December 13, 2010
I was thinking about buying a Logitech Revue, which uses Google TV, but I am losing faith in Google.
This is all the more agravating because I know these are programming problems, and I am a programmer, and I am having to deal with these crappy problems.
Sunday, December 12, 2010
This is an old style English murder mystery. What makes it old style? Well, it was set in the period immediately after WWII, in London. Other than that I don't quite know. Perhaps it was because it was more of psychological a character study than an action packed drama.
This book started out very slow for me. It is primarily about two unhappily married women, in London, immediately after WWII. Neither of them are appealing characters, both are self centered. I read a couple of chapters and then I put it down for a couple of weeks. I just picked it up again a few days ago and coincidentally it became more interesting. One of the women becomes slightly more sympathetic because she starts asserting herself instead of just letting things happen. Things become more intense and more screwball right up to the very end.
The story ends just as the whole thing is about to unravel. I would really like to read the story of the subsequent trial, if someone were to write it.
There were a couple of little bits of Britain embedded in the story. One was this:
Antonia was already striding indomitably towards the nearest ruined houses, which were - or had been - semi-detached, the sort that aspiring middle class people owned. Probably they had once been alloted numbers that the owners had replaced with names like Mon Repos. (P. 192)You can just do that? Replace your house number with a name? Even if you could, why would you? I can understand big estates having names, the place becomes widely known and the name becomes shorthand for the the address, which is an insufficent description of the place, and the description required to fully explain it. But why would people name ordinary houses? Are they pretending to be rich? Do they have that much attachment to their house? I think I am missing something here.
My daughter Kathryn had a job babysitting the kids next door this afternoon. Lexi (the ten year old girl) wanted to play Monopoly. None of the boys could be bothered with anything so tedious, and two handed Monopoly is not much fun, so Kathryn asked me to participate.
We sat down at one. Lexi threw in the towel after a couple of hours. I lasted one more hour before Kathryn cleaned me out. If there were three adults playing seriously the game could easily have lasted twice as long. I finally folded when Kathryn had 60% of the board and I landed on one her properties that rented for $1400. I had less than $500 cash. If I had mortgaged everything I might have been able to pay the rent. That was the end.
I must say that Lexi played pretty well. Of course, I am pretty far removed from knowing what the capabilities a ten year old should possess. She had all the mechanics down pat, but her trading acumen was not quite up to snuff. She virtually gave away a couple of her properties to my rapacious daughter who took advantage of her quite shamelessly. I was shocked, I tell you, shocked to my very core! Cutting in front of me like that without even a by-your-leave. That's how you win in Monopoly, go for the throat and don't let tradition or respect cause you to waver in your course. Riches are what we are after, and the devil take the hindmost!
Playing this game I was reminded of all the annoying little details that bother me, like little plastic houses that won't stay still, money that is too slick and too small to count easily, Chance & Community Chest cards that slide all over. I was thinking that it wouldn't take too much to make the game a little easier to handle, but then a computer could handle a lot of the mechanics much more easily. Problem is that the whole point of a board game is to be sitting at a table, across from your opponents. It is the social interaction that makes the game interesting, not the game itself. An electronic tablet the size of the game board that everyone could sit around might be a good idea. A computer screen as big as a typical game board would be expensive, and I don't know if the viewing angle would work for people sitting around a table. And then there all the hazards at a typical gaming table: food, drinks, people pounding on the board. Would it survive? It would basically be like a Kindle. One piece of electronic equipment to replace the paper item, and then a selection of software for all the games you want to play.
Good for entertainment purposes only, not for gambling, though I am probably wrong about that.
Another update: It occured to me that part of the social nature of the game is the business of dealing with the stupid little pieces that slide all over the board. What percentage of Monopoly games include someone cursing the little plastic houses?
Which reminded me of one final I took at UT in a computer science class about operating systems. The test looked really simple, one page, maybe a dozen questions, but you really had to know the material in order to answer them. Even being a whiz kid I found it difficult. What was interesting though was the last question on the test: What do you think your grade in this class should be? I thought that the test was fair evaluation of what we had covered in the class, so I answered that my grade for the class should be whatever I got on this exam. I was certain that I had answered enough questions correctly to at least rate a C, which wouldn't be great but it would be adequate. If I did better than that, well, that would be a bonus. I don't remember what I actually got. I wonder if I could look it up?
Thinking about this test reminded me of the instructor, James Peterson, I think. He was one of the best instructors I had. In comparison, Kathryn hated her biology instructor. After she blew the first midterm (which was discarded from consideration when grades were calculated), she retained one of the TA's as an tutor. A couple of hours a week with the tutor were enough help that she was able to absorb enough of the material and get a decent grade for the class. Money well spent, I say.
UT had a system for evaluating instructors. If you wanted to bother you could find out what kind of rating previous students had given an instructor. Of course, if you opted not to take a class because of the instructor, that meant screwing around with your schedule and possibly having to wait another term to take a class, which might mean having to hang around school for another term and delaying graduation.
I was on a self imposed time and money budget, and I wanted to get done in the least amount of time possible, so I ignored these ratings. As a result, I got stuck with a couple of really miserable instructors. One guy, Andrew Sherman, I believe, taught number crunching, i.e. how to write computer programs to perform extensive mathematical computations. If would have been a fascinating subject if his delivery was not so sleep inducing. I remember making an effort to pay attention in one of his classes, and the material was really interesting, but his manner negated that value.
Then there was the French teacher who was a very mother hen type, which was just fine for the young women who were good at languages who were taking her class. But they were ten years my junior in age and ten years superior in language ability. Gawd, I hated that class, but I managed to sit through it for two whole terms and complete my language requirement.
Wednesday, December 8, 2010
Finally got around to closing the vents to the crawl space under the house today. I found this guy in one of the openings. He is definitely in hibernation mode. After I pushed him off onto the ground he waved one of his arms briefly. I covered him with leaves.
Picasa is giving me trouble today. The picture is supposed to be rotated 90 degrees clockwise, but somewhere between Picasa and Blogger the signals got crossed up and this is what we got. I tried it twice with the same results. I think I am going to go complain to the authorities. I am sure this is a violation of Newtonian rights!
Dustbury put up a post about this car, which tripped the latch on my memory gates, and all this fell out.
Forty years ago, which is longer than most people have been alive, Carol Shelby was the god-king of all red-blooded teenage boys, including me. I didn't really have any idea who he was, all I knew was his name was attached to some of the coolest cars on the planet including the A/C Cobra. The A/C Cobra was created by stuffing a cast iron Ford V-8 into a light weight British sports car. Before Carol got his hands on it, no one had ever heard of it. I mean we knew about British sports cars like MG's, Austin Healy's and Triumph's, but nobody had ever heard of A/C. This might have something to do with the fact that the A/C had an aluminum body which most likely put it's price in the stratosphere, something like a Porsche, which we had also heard of, but never dreamed of being able to afford.
The aluminum body was probably the factor that caused Carol to select the A/C for his Cobra project. Lighter weight you know, and being successful in racing, he had some money he could spend.
I did know one guy at this time who had an A/C Bristol, the original version of the car. It had the most bizarre engine my teenage mind had ever encountered. It was a straight six, which was normal enough, but it had this bizarre arrangement of rocker arms and pushrods that made the head look like it had dual overhead cams.
A friend of mine was doing some work on this car, and one night after completing some arduous repair we took it out for a spin. The interior had been stripped, including removing the driveshaft tunnel, so the driveshaft was running right through the middle of the passenger compartment, totally exposed. We set the seats in the car (we didn't even bother to bolt them in) and took off, the driveshaft spinning merrily away, just inches from our ignorant butts. For some reason I was driving, and we didn't just go around the block, we went across town. We went around one corner so fast that my seat started to tip over. I managed to hang on to the steering wheel and avoid falling over completely. Actually, that's all I remember about that drive, except that we must have made it home intact. Otherwise I am sure I would have other, legal, memories of the incident.
Enough of that, what about this new car? After watching some of the videos about this car, there are a couple of things I noticed.
- The engine uses pushrods, not overhead cams. Nobody builds pushrod engines for high performance cars anymore, do they?
- They have quite a few black boxes to hold all their electronics, enough that they are taking up a noticeable amount of space.
- The gas cap is beyond silly. Very cool on some planets, I suppose, but silly. I mean, you need a remote control to open the gas cap? These guys have fallen off the end of the dock.
- They have gone considerable trouble to make this car jewelry-like. I suppose when you are going for the big bucks, that's understandable.
- 200 MPH in a roadster? Maybe with a removable hardtop, and compared to modern cars, that windshield looks like a wall.
Monday, December 6, 2010
So I picked up Richard Feynman's QED and started reading it. I haven't gotten very far. Maybe a little into the second chapter, and somewhere he just mentions, offhand you know, on the way to explaining something else, that the photons bounce off. Hmm. Not very satisfactory.
Then I came up with another question. How big is a photon? Well, it's kind of a nebulous thing, and it's a little hard to measure. Well, sure, but there must be some upper bound, and maybe a lower bound. I mean they do these experiments where they send one photon at a time towards some target. If you were to block the photon's path with a wall, it wouldn't reach the target. If you remove the wall, it will hit the target. How about if you put a hole in the wall? How big would it have to be to never impede the photon? Could you have hole so small that a photon could not go through, and still call it a hole?
My latest question is what happens to the energy when two photons cancel each other out? There is "the famous two slit experiment" where light either reinforces itself, or cancels itself out. How about we set up two laser beams, and manage to superimpose them on each other, and then adjust their positions so that the two light beams are exactly out of phase. They should then cancel each other out. But where does all the energy go?
I may have to go back to school, or least go back to the beginning of the book.
Thursday, December 2, 2010
View Larger Map
Via Peter Harris and Stu.
Once upon a time Marc bought a brand new lawn mower. A little more than a year later it wouldn't start. He noticed the carburetor was drooling, so, as the warranty had run out, he decided he would attempt to fix it himself. He takes the carburetor off the mower, disassembles it and blows out all the little holes and passages with compressed air. So far, so good. Just to make extra sure, he gives a sharp blast of air to the fuel inlet, because it goes to the float valve, and that was the part that was actually malfunctioning. He gives it this big blast of air and the seat for the float valve pops out and flies into never-never land. This part is made of plastic and is about 3/16" in diameter, and just about as long. It was pressed into the housing.
At this point Marc figures he is toast. May as well just throw the lawn mover away, he'll never be able to find that part, and buying a new carburetor will probably cost as much as a new mower. So he sulks.
A day later he decides that maybe it is worth looking on the internet to see if he can find this part. He digs through a couple of web sites and, lo and behold! There it is! This outfit has all the parts you need for this mower, down to the decals. He doesn't even need to buy a whole carburetor, they will gladly sell him the one part he needs. $9 for the part and $6 for shipping for a grand total of $15! He is saved!
The ecstasy is short lived however, because his parsimonious-ness kicks in: $15 for that tiny bit of plastic? They must be out of their minds! So he goes and roots around on Ebay. And finds the same part for 39 cents, including shipping. So he orders it. It arrives a few days later taped to the back of a postcard. Un-frakking-believable.
Yesterday they busted a guy in California for having a house full of explosives. Not quite sure what he was going to do with them, no mention of any plans. Maybe he just liked having them around, kind of like Grandma and her doilies. Of course, doilies don't blow up, at least none that I have ever seen. This news comes to us via the UK and The Hyacinth Grrrl.
Once again I am thinking that we are victims of our own success. We have so much money, power and material wealth, we are the undisputed kings of the world. We have no competitors, so we spend our energies squabbling amongst ourselves, and that is the most interesting thing going on right now, or at least it sells the most newspapers and TV advertising minutes.
Wednesday, December 1, 2010
General Napier put down several insurgencies in India during his reign as Commander-in-Chief in India, and once said of his philosophy about how to do so effectively:
- The best way to quiet a country is a good thrashing, followed by great kindness afterwards. Even the wildest chaps are thus tamed.
which may help explain why he felt rebellions should be suppressed with such brutality.
He also once said that:
"the human mind is never better disposed to gratitude and attachment than when softened by fear."
Come here instantly. Come here at once and make your submission, or I will in a week tear you from the midst of your village and hang you.
He also mused that:
"so perverse is mankind that every nationality prefers to be misgoverned by its own people than to be well ruled by another"
Diligent daughter put together a web page for her psych class this week. It's nominally about cultural sensitivity when dealing with people traumatized by the LRA's reign of terror. To that end she included some background information about the LRA. I was surprised.
I talked to her about it and she warned me that some of the information might be a little dated, so I ran a search and found that the LRA is in the news again today, though not in any mainstream American media. Well, no surprise there. They're all wrapped up in the North Korea debacle or some celebrities latest run in with the law. Useless twits.
The US passed the Lord's Resistance Army Disarmament and Northern Uganda Recovery Act of 2009 (Public Law 111-172) in May 2010. Obama had something to say about strategy last week.