Fixed my power supply

“It is a poor craftsman who blames his tools.”

Let’s get this one out of the way. I’m not a craftsman, so there.

The power supply on my laptop gave out while I was in Taiwan. I quickly found the problem was located in the wire going between the power supply and the laptop. The internal sheath had broken so the wires made a short-circuit. I tried repairing it while I was living at Dharma Drum but that proved quite difficult due to the lack of proper tools. The only soldering iron available on the mountain was of terrible quality. It was barely getting hot enough to melt the solder. Moreover, there was no new solder available on the mountain. I eventually was able to reuse the old solder already on the board (gaaah!) and made some sort of temporary repair. I considered going into Taipei to get parts to finish the job properly but I gave up on that idea. It turns out that during my last few days at Dharma Drum my temporary repair gave out and I had to keep the wires in place with a piece of plastic tape. (Eeek!)

I came back home two days ago.  Yesterday, I bought heat shrink tubing.  This morning I gathered my tools and was able to finish the job in about 10 minutes.  It was a real pleasure to work with good tools.  No doubt someone adept at soldering would laugh at my work but… well… the power supply now works and I’m not pretending to be a craftsman.

I’m quite pleased with myself.  When I bought the laptop, I did not get an extended warranty.  I took the one year warranty and made the bet that if something were to happen I would probably be able to fix it myself.  It looks like I’m going to win that bet. (I’ll only win if the laptop is still working fine after 3 years of ownership.)

The Internet has proved indispensable in this process.  First, I found this guide on how to fix a power supply cord.  Sri1ram’s comment about using a blade to crack the glue holding the case together was very useful.  Second, I found Keith’s blog post on refitting a strain relief.  Before I found this post, I thought I’d get a new strain relief or I’d finish the job without the strain relief.   The problem was that I was unable to rethread the cable through the strain relief.  Keith had the same problem and solved it by drilling through the strain relief.  I got my wife’s Dremel out and did the same: it worked nicely.

  • Share/Bookmark

Coders without shame

I’ve been running into a good deal of bad computer code lately.  Here’s an example from an actual tutorial.  I’ve renamed the variable to protect the shameless:

if (count == 0) return false;
return true;

Why not this:

return (count != 0);

There are some god-forsaken languages in which returning the evaluation of a boolean expression is not valid (e.g. the creeping horror which goes by the name Open Office Basic).  C and C++ are not among these.   Yet, I’ve been running across a good dozen cases where the coders did not realize that.

In case someone would like to object: I know it is possible to just return count and let the compiler do an implicit conversion to bool but an explicit test makes the code clearer.  The additional “if … then” does not.

  • Share/Bookmark

OOHanzi 0.7 released

OOHanzi 0.7 has been released.

As usual please refer to the documentation to know how to use it.

I have not been able to work on getting OOHanzi to work on OS X so I presume it still does not work.

List of changes:

* Updated packaging dependencies for Ubuntu 9.04.

* Performance improvements in “Mark Words Present In…”.

* Added support for variant readings when using “Mark Words Present In…/DDB”.

  • Share/Bookmark

The seductive power of assault

This ad just boggles the mind:

an ad for cigarette showing a guy blowing smoke into a woman's face

I like to look at old ads for fun. A good deal of our culturally based assumptions do not stand the test of time and so look ridiculous seen from the vantage point of a later age. I’ve seen the ad above many times on sites dedicated to old ads. Today, I ran across it again on vintage ads.

Now, the utter stupidity of this ad is nothing short of mind blowing. Blowing smoke in a woman’s face will win her over??? Really?!? But hey, what if she’s “playing” hard to get, eh? What then? Are there more advanced methods of “seduction”? Like spitting in her mouth? Or peeing on her?

  • Share/Bookmark

FDA-approved maggots

Here’s a new expression to use for edification and fun: FDA-approved maggots.

Charlie: Hey Bob, you don’t look so good. You’ve got pus running down your leg.

Bob: My leg has been rotting ever since I got bitten by that rabid koala.

Charlie: Did you try using maggots? They’ll eat the dead flesh right out!

Bob: Yes, I’ve tried them but they don’t seem to work.

Charlie: Where did you get them from?

Bob: From a steak in the garbage dump.

Charlie: Oh! That’s your problem. You should use only FDA-approved maggots.

Announcer: FDA-approved maggots: ask your witch-doctor about them.

[Disclaimer: Side effects include vomiting, dizziness and losing limbs. Do not use maggots together with cat breath, bat wings or newt eyes. Do not use maggots if you are a pregnant woman or a zombie. Maggots should only be used under the supervision of a licensed necromancer.]

  • Share/Bookmark

An experiment

Readers will notice that I’ve added Google ads to my site.   I’ve tried to make them as unobtrusive as possible.  This is an experiment I’m running to experience for myself what the fuss is all about.

  • Share/Bookmark

The Amazing Bernanke predicts!!!

The Amazing Bernanke: recession could end in ’09

Yesterday, during a séance, the Amazing Bernanke predicted that the recession will “probably” end this year… but “maybe not”. Bernanke explained that “if” the government turns out to be successful at saving the banking system, then “perhaps” the recession will end this year. He added that “maybe” the foreign investors will stop being afraid of investing in America and that there is actually “more than a snowball’s chance in hell” that CEOs will stop flushing taxpayer money down the toilet.

Bernanke also predicted that by the end of the year we “might” be able to end all wars, “if” everybody agrees to play nice, and that we “may” find a way to instantaneously travel to the other end of the universe, “if” an extraterrestrial race finds us and gives us their technology. He also said he will “probably” grow tentacles within ten minutes, “if” he spontaneously mutates.

Bernanke then offered to contact the spirits of the departed for members of the audience.

(Inspired by this story.)

  • Share/Bookmark

Hit the gym today: pleasant surprise

For about 4 months and a half, I have not been doing any kind of serious physical exercise. As usually happens during these periods of inactivity, I assume that when I return to an exercise regimen of some sort, I’ll have to start from scratch. I assume that everything gained during my last intense period of exercise will have evaporated during my period of inactivity. Actually, it seems to me that my past experiences with weight training proved this expectation to be true. In fact, this expectation turns out not to be the case.
Continue reading

  • Share/Bookmark