So we\’re complaining about our economy…

OK, so this is a bit late coming, and I haven’t really been able to think this through as well as I should, so I hope some other people will think through it with me. The problem: Our trade deficit is up.

The solution is to devalue the dollar. Supposedly.Americans crave cheap, foreign-made products. Multinational corporations crave cheaply made products from third-world countries that they can mark up astronomically because of the brand recognition and achieve monstrous profits that they can report to their shareholders every quarter.

To that end, the United States has encouraged outsourcing and granted most-favored nation trading status to totalitarian regimes such as China who are willing to create favorable conditions for this way of doing business.

And now the United States is complaining about continually breaking its own records for trade deficits.

The current administration is responding by devaluing the dollar. That’s a classic idea. By devaluing your currency, you make your own goods less expensive abroad and you make foreign goods more expensive inside your own borders.

But I see at least two problems with that policy. The ruthless Chinese tie the value of their currency to the U.S. Dollar. So devaluing the dollar does absolutely nothing to help our trade deficit with China. Chinese goods continue to cost the same amount of money here, and the price of U.S. goods in China remains the same.

The price of a BMW or Mercedes automobile goes up, but the people who are willing to spend $60,000 on a car are probably also willing to spend $65,000. It only increases the monthly payment by about $80. It might make the price of a Cadillac look a little bit better, but there are plenty of people who believe the BMW is the better car and will pay the extra money. Meanwhile, Europeans will continue to not buy U.S. cars, because Europeans just aren’t very fond of them.

The second problem is that the United States just doesn’t produce all that much anymore. Consumer electronics are almost exclusively made in China, with the main exception being some high-end consumer electronics still produced in South Korea or Taiwan. Toys are almost exclusively made in China. Some large items such as appliances are made here because they are too expensive to ship overseas, but that cuts both ways.

Buying American helps. But we didn’t do that 20 years ago when we still made stuff here. Now it just might be too late.

Part of me also thinks that we need to quit complaining. Look at these plans for a bungalow house from 1912. This house cost $900 to build–assuming one paid someone else to do it. You provided the land. Adjusted for inflation, that would be about $17,000 today. Our grandparents were raised in houses like this. By comparison, my house is a mansion.

Today, without blinking, we’ll pay that much for a car.

Just two or three miles away from me, houses fitting the modern idea of a proper size for raising a family are being built. They’re about twice the size of mine and they sell for about $400,000. Houses like those from 1912, no longer suitable for storing our lawnmowers, are claimed under eminent domain and razed to make room for big-box stores to sell more foreign-made goods. I’m not sure what becomes of the people who by their own choice were still living in them.

Republicans like to blame high taxes for what they call the decline of the traditional American family, where only one parent had to work. Democrats ask what was so great about that, and blame the modern struggle to make ends meet on low wages or discrimination.

But if we lived within our means, we’d be able to afford to buy U.S.-made goods from stores owned by our neighbors, who are far less likely to abuse eminent domain and deprive people of their property rights.

This is a mess of our own making. The government may have encouraged it somewhat, but the government didn’t make it and the government can’t fix it. That job belongs to us.

Assuming it isn’t too late, that is.

Troubleshooting Packagefortheweb packages

Under some circumstances when installing an app from a Packagefortheweb archive, such as Sun’s JRE, I get a goofy error message like “Cannot run 16-bit Windows Program” or a message about a failure to find a path with long filenames in it.

It’s a bit of a pain but you can fix it.The trick is to extract the file rather than run it. I found PowerArchiver can do it. Winzip may also be able to. I wish I had a command-line utility to do it but I don’t.

Extract it to a short directory name, then move it to the root drive. Then run your setup.exe. That should be the end of your problems. Clean up afterward to eliminate directory clutter.

Making a Marx run like a Marx again

After a couple of marathon days at work, I unwound on Martin Luther King Jr. Day by refurbishing an old Marx Canadian Pacific-style tinplate locomotive.

At first, its problem wasn’t obvious.The usual prescription for a misbehaving Marx is to remove the motor from the locomotive frame, douse it in contact cleaner (I got some zero-residue contact cleaner from Advance Auto Parts for $1.99, which is the best price I’ve seen) to remove or at least soften the decades’ worth of grime and no-longer-effective aged lubricants, then conservatively re-lube, applying some sewing machine-type oil to the axles and bearings, and some light grease to the gears.

I did that, and the thing still would only run about three feet at best. It smoked better than most modern Lionel locomotives do, but the problem is, this particular train doesn’t have a smoke generator. Ahem. I get worried when a non-smoking locomotive smokes better than my smokers.

Since this CP came from a store, I took it back whence it came–to Marty’s Model Railroads in Affton. Lionel (the co-owner, not the train company) flipped it over, took one look at the wheels, and pointed. "That’s either steel wool or cat hair." Sure enough, there was lots of hair wound around the axles next to the gear-bearing wheels. Marty took a look at it and decided the wheels were too tight, so he broke out his wheel puller and pulled the wheels out a fraction of an inch from the frame. The locomotive mostly came to life. The e-unit still buzzed, so he grabbed a can of special lubricated contact cleaner and blasted a couple of squirts of that into the e-unit. He warned me to make sure I let it evaporate, otherwise I’d see a really big spark and maybe some smoke. Then he oiled the axles for good measure. It ran. Not like a Marx usually runs, but it could make it around the track under its own power for several minutes at a time.

The locomotive was still running hot though, so I attacked the hair wrapped around the axles with a #11 Xacto blade. I can’t really describe the process other than cut, pull, repeat. Work the blade until it feels like you’ve cut something, then see if you can use the side of the blade to pull it out. Lots of old hair came out. When I couldn’t get any more, I ran it on the track for a few minutes, first in forward, then in reverse. That would usually loosen things up enough that I could yank more hair out or at least cut some more.

After about half an hour of this, the locomotive was to the point where it could run on its own power for 10-15 minutes and only be warm to the touch afterward. That was a huge improvement; earlier it could only manage a couple of laps before the motor would be too hot to comfortably touch.

I ran it for about 20 minutes. At some point the locomotive suddenly sped up and didn’t slow back down. Some piece of debris had worked itself loose from the running, and suddenly it was running like a Marx again. The cheaper (or older) Marx locomotives were geared really high, and they basically only had three speeds: off, fast, and so fast it’ll fly off the track (and not pick up any speed from gravity while falling).

Most people who had Marx trains set the track up on the floor temporarily, ran the trains, then took the track back apart and boxed it back up. That’s why it’s so common to see 50-year-old Marx sets still in their original boxes. But setting the trains up on the carpet meant all sorts of stuff could find its way up from the carpet into the gears and wind its way around the axles. Some of my more experienced Marx buddies tell me almost every locomotive they buy has this problem.

So, if you’ve got an old train from your attic or basement and you’ve set it up and it just won’t budge, flip it over and take a good look at its axles under a strong light. What you find might be what’s keeping your train from running.

Seen on Slashdot: PC cases made of Lego

Yes, it’s the kid in me, but these Lego PCs are really cool.

I especially like the one on the bottom, where he made his own cube-shaped mini-PC out of what appears to be a standard microATX board.His idea of putting the power supply under the motherboard is a novel one. I’d try to give the motherboard a little more cooling than what it gets just from the CPU fan, but it’s a great idea and the result looks good.

I still have mine from when I was a kid. And yes, that has me thinking.

These would be easiest to build with motherboards that have video, network, and sound integrated, so you wouldn’t have to think about PCI slots, but he obviously did several with PCI cards, including a Pentium II-based machine.

I like the idea for a small system that only has a hard drive and single CD/DVD-ROM drive. It would be small because it’s totally custom, and would be a good conversation piece, aside from being functional. No one would have one just like it.

How to connect a Commodore 64 to a television

How to connect a Commodore 64 to a television

It is less than obvious how to connect a Commodore 64 to a television, especially a modern television, and it’s even more difficult if your C-64 didn’t come with the cables or the manual.

There are, as it turns out, several ways to do it. The C-64 and 128 have an RCA jack on the back that matches the RCA jacks on most televisions, whether LCD or CRT. Confusingly, this isn’t the key. If you just plug a cable from the RCA jack into the RCA input on a TV, you won’t get a display.

Read more

Recover your Windows CD key

Do you know your Windows CD key off the top of your head? Didn’t think so. Do you know where it’s written down?

Don’t panic if the answer to that question is also no.There’s a utility called Winkeyfinder that can recover the key for you. Download and run it and print out your key while you’re thinking about it.

When in St. Louis, don’t miss the City Museum

So, not wanting to celebrate the Anheuser-Busch-mandated holiday of New Year’s Eve but not wanting to sit around at home on a Friday night either, a good idea came up: Go to the City Museum.

It claims to be unlike any other museum you’ve ever seen. While that may be debatable, it does have something for everyone.It’s a very hands-on museum designed for exploration. The first level is almost like a catacombs, with secret passages and the like. Wear comfortable tennis shoes. You’ll need them.

The other two levels are a bit more museum-like but still hands-on. Each level has a large slide that goes down to the lobby. Yes, adults can fit in the slides too. I know because I went down each of them about three times.

You’ll find a level of art and artifacts and various activities. Included is a very large, elaborate, and critically acclaimed HO-scale model railroad that was built by St. Louisan Pete Fordyce in the 1950s. Fordyce was a frequent contributor to Model Railroader magazine and the layout is reasonably famous, as far as model railroads go. Anyone who ever built a plastic model kit as a child will be impressed with it; a model railroader could probably stand there for hours studying the techniques.

The top floor has a very large exhibit dedicated to architecture. The artifacts include doors, windows, cornices, and even entire storefronts. Most artifacts have signs telling where they came from and why the building was demolished–sadly, usually for something stupid and generic like a chain store or a gas station. There are exhibits about the histories of door hinges and doorknobs. How can hinges and knobs be interesting? They weren’t always the boring, bland mass-produced affairs you see at Home Depot today.

Outside, there are lots of things for kids (big and small) to climb on. I didn’t climb much; as much as I would have liked to climb up to that airplane and go inside it, climbing up three stories on semi-open girders to get there is more than my nerves can take. Judging from the number of people climbing on it, I’m in the minority and that’s a good thing.

I absolutely recommend it. At night when the admission is only $5, not only is it cheaper than going to the movies, but you’ll get some exercise and if you’re not careful you just might learn something. During the day it’s far less expensive than going to an amusement park.

Incoming link: http://trainboard.com/grapevine/showthread.php?t=56703

XTrkCad model railroad track software is going open source

XTrkCad, one of the many model railroad track planning programs–and the only one I know that has both Windows and Linux versions–is going open source. This also means the program is now free.

You can’t download the source code yet but you can download binaries, enter a registration code, and play with it. I’ve been doing just that.One thing I noticed right away when I started trying to use it to plan a layout using Lionel and Marx O27-profile sectional track–which it doesn’t support directly, so I had to enter the track, confusingly, using the “custom turnout” tools–is that the model railroad and toy trains people measure track differently.

A Marx or Lionel O27 curve isn’t an O27 curve in XTrkCad. It’s a curve of radius 12.5 and angle of 45 degrees.

Here are some measurements. Keep in mind this is what they’re supposed to be. Manufacturing tolerances and the effects of age sometimes cause these measurements to be off. Some of my vintage track is off by 1/8 inch or more.

O-2712.5″
O-3415.75″
O-4220.25″
O-5426.375″
O-7235.25″

I happen to know that O27 and O34 tubular track use a 45-degree angle, and that Lionel and K-Line O42 tubular use a 30-degree angle. Unfortunately I don’t have a piece of K-Line O54 or O72 sectional tubular track to measure.

Since O42 track is supposed to be 12 sections per circle, and 180/12=15, I believe to calculate the angle measurement of O54 and O72 you can divide 180 by the number of O54 or O72 track sections in a full circle, then multiply that result by 2. The math works for the O27, O34, and O42 track sections I have, but since I don’t own any K-Line O54 or O72 track I can’t be certain.

Also, confusingly, traditional O gauge switches are straight turnouts in XTrkCad, even though one leg of them is curved. Here are the parameters I got by measuring a Lionel 1121. The measurements are close enough to represent Marx or Sakai O27 switches:

Diverging length: 8.5
Diverging angle: 45
Diverging offset: 3.75
Overall length: 8.75

And here’s what I measure on a Marx O34 switch.

Diverging length: 11.375
Diverging angle: 45
Diverging offset: 4.5
Overall length: 11.188

I believe the diverging angle would be 30 degrees on a Lionel or K-Line O42 switch, but since my vintage Marx and American Flyer locomotives won’t make it through modern O42 switches, I don’t have any of those to measure.

I’ve already used the software to draw a layout using Marx O34 track that will allow two-train operation with room on sidings for three additional trains. It’s much easier than setting up track on the floor and measuring it to see if it will fit on the table. And you can do your layout and then print an inventory to compare what you have with what you need. Not having enough track to mock up a layout isn’t a problem anymore.

On the computer some of the things I want to do don’t quite fit; if the track measurements are slightly off, the solution is to cut a section of track to move things a bit, or, if they’re off by less than a quarter inch or so, force it. O27 track has a lot of give, and, like I said, manufacturing tolerances and the effects of time can cause real-world track to not match the published standards.

Making fill patterns in Gimp

I find myself making fill patterns in Gimp every so often and always having to look up the trick.

Here’s how to use Gimp to make tileable fill patterns, which you can either use inside Gimp, inside other programs, or as web backgrounds.

First, to make an image that will tile smoothly when repeated, start with a source image. This can be a drawing or a photograph.

Be careful about copyrights. If you drew or photographed the image yourself, you’re fine. Or if the image is from 1924 or earlier, you’re fine. If the person who created the image puts it in the public domain, licenses it under terms that permit distribution and modification, or otherwise gives you permission, you’re fine. Under any other circumstances, you may not be so fine. For personal use, nobody’s going to beat down your door, but putting the image on the ‘Net doesn’t exactly constitute personal use, if you know what I mean.

Got that? Got a picture? Good. Open it in Gimp. Actually you’ll probably want to open it twice. You’ll see why shortly.

Crop one of the copies of the image down into something that resembles the pattern you want to make. A lot of patterns aren’t much more than 256×256 pixels and you may be able to accomplish what you want in less than that. If it’s photorealism you seek, you may need to go a bit larger.

If the image isn’t straight or square, crop it slightly oversize (select the region with the mouse, then go to Image, Crop image) then use the perspective tool (Tools, Transform Tools, Perspective; or hit shift-p) and/or the rotate tool (Tools, Transform Tools, Rotate; or hit shift-r) to get the image straight and square. Then crop it.

Now, the magic. To make the image tile smoothly, use the offset command and smooth it out. Go to Layer, Transform, Offset (or hit shift-ctrl-o). Punch the button that says x/2 y/2 and hit OK. Your image will now be a tangled mess, in all likelihood. Smooth in the gaps. If you’re tiling bricks or something similar, you may want to go back to the original, uncropped image and copy and paste bits and pieces from it back into the image to cover up the gaps.

Keep in mind that when you cut/copy and paste, you can also select a region and use the paste into command, also from the edit menu.

You may also find it helpful to blur some gaps. Select the region you want to blur, then go to Filters, Blur. You might also find the Tileable Blur under the same menu helpful. Sometimes I’ve gotten good effects by repeatedly sharpening and blurring a region. It introduces just enough noise to bring it close enough that I can finish retouching by hand. You’ll find sharpen under the Filters, Enhance menu.

Once the image looks smooth, hit shift-ctrl-o to offset it again. You may find you’ve introduced new problems. Fix those, and offset again. Repeat the process until the problems disappear.

I find myself zooming way in and out a lot during this process. It’s often easier to select a precise spot you want to fix when you’re zoomed in.

And that’s the secret to making fill patterns in Gimp. Armed with an image, a copy of Gimp, this knowledge, and some determination and patience, you now have everything you need to make spectacular tileable patterns.