Tuesday, October 16, 2007

INSERT COIN

PLEASE READ THIS BEFORE USING THE PROGRAM (or if you are not amused)


Can this silliness be used for good? Perhaps...


It is amazing how unaware some people can be. This little perl program allows you to set the "Ready Message" on HP printers to whatever you'd like. (if you want to run it under Windows, and don't know how, read this.) I wrote it after coming across the command in an HPPJL (HP Printer Job Language) reference manual I was reading for some reason that I now forget. Thanks to the flexibility and power of perl, it was a no-brainer to play with the new information. (Maybe you should consider learning perl?)



I want my ready back!


Well, of course I couldn't ignore such an opportunity, and it turns out to be a lot of fun. You can think up your own funny, confusing or scary messages. My personal favorite is "INSERT COIN" which fits perfectly on the small LCDs. You can even sit in sight of the printer and change the message while watching the reaction of your victim (or reading about it). Don't be surprised, though, if a large fraction don't even notice. I was quite surprised myself but, it appears, some people don't look at what is in front of them.

I wrote a more elaborate version that takes advantage of the HP 4200's larger, four-line display. It sends the current weather conditions which I grab from NOAA using the perl Geo::METAR module. It updates every 10 minutes. Amazingly, while many people noticed the report on the printer display, no one questioned it!

People are endlessly surprising. Isn't it great?

NOTE: There have been many requests for help with this. Non-networked printers, running the script, etc. While I cannot guarantee anything, you might find help on FreeNode's #perl IRC channel, here. In about three days this post has garnered more than 105,000 unique visitors. If a few of you can lurk there and help out it would be great. Apparently many of us share a sense of humor. Maybe there is an "INSERT COIN" community. Who knows?

A Philosophical Comment


The anonymous comment below, accusing me of considering myself "king of the hacker elite" made me re-read this post. I originally thought he was responding to a comment I made, not the post itself. After thinking about it I realized he might not have read any of the comments at all. That being the case, let me be very clear about something: while I definitely enjoy being extremely extroverted in my attention, and noticing all sorts of details and peculiarities in the world around me, I do not believe that such a tendency is exclusively meritorious or inherently superior. I work with many people who do not share this cognitive style but are intelligent, insightful people who have taught me a lot. Please don't take the observations above as belittling people who don't share my natural fascination with the things in the world. That would be much different than my intention.

Labels: , , ,

Wednesday, July 18, 2007

It's not Titanium, it's Better!

A few months ago I decided I needed a higher capacity USB flash drive. I was very happy with my Sandisk Cruzer Micro (mine was the previous generation), but it was puny (512MB, never mind my first hard drive was 20!), and I didn't like the loose cap that covers the connector. I had seen the new Sandisk Cruzer Micro and liked the idea of 4GB and the retractable connector—no cap to lose!

I ordered one and started carrying it in my pocket just like its predecessor. Pretty quickly I realized it wasn't going hold up. Unlike the old Micro, which was metal and covered with a thick clear vinyl-like plastic, this one seemed, well, cheap. The truth is, when I ordered the plastic one I really wanted the titanium one but I really didn't feel I could justify the added cost. (The street prices on these things are a lot less than the list price on Sandisk's site.)

When I found the cheaper one wasn't likely to hold up well, I had a reason to get the cool titanium one. So I did.


After a few months in my pocket with other items, the unfazed Cruzer Titanium

When I received it, I was pleased but a little confused. It didn't look like titanium. When I turned it over I saw a little logo that said "LIQUIDMETAL". Wow! This thing was liquidmetal. Unbelievably cool, much cooler than titanium. Liquidmetal, you see, is a unique material. It is a metallic glass. An amorphous metal. An amazing alloy. Take a look at the Liquidmetal website or Wikipedia for more information. So, I got something much cooler than expected, very high capacity and impressively fast, too.

[Yaakov]

Labels: , ,

Sunday, June 04, 2006

The Frugal Hacker

Harvesting Cells for Economy


What do you do when your favorite little flashlight wants oddball AAAA sized cells that are going to empty your wallet faster than you'd like? There's always buying "wholesale"...

The flashlight I carry with me everywhere to aid my old eyes uses some very unusual, and very expensive, AAAA cells. (Yes, that's four A's). At about $4.00 USD for a set of three to fill the flashlight finding a better way to get power to the LED was certainly on the agenda. Fortunately there is a way to get a substantial discount, if you're willing to do a little work.

Technically, a "battery" is a set of cells—usually connected in a series, which raises the voltage. Each cell has a characteristic voltage, based on its chemistry. The common alkaline primary cell with its zinc and manganese construction, produces 1.5V when fully charged. (As a contrast, a Nickel Cadmium secondary ("rechargeable") cell produces 1.2V and a Lithium Ion secondary cell produces 3.8V)

So, the common cells—AAA, AA, C, D—differ not in voltage but in total current capacity; picture them as different sized "tanks" of voltage producing chemicals. However, the alkaline 9V battery is a real battery. It is composed of cells that are 1.5V alkaline cells and stuffed into that little square can. Back in my childhood tearing open a "transistor battery" (so-called because it was designed for the new transistor radios which needed the 9V potential in a small package) yielded a set of six flat little carbon cells. If you are old enough, I know you have seen these.

Today, the much more difficult (the cans are made a lot better) equivalent act yields six very thin cylindrical alkaline cells. By this time you have guessed, these are AAAA cells. At under $2.00 USD each for the 9V "host", we just got a 50% discount. However, in addition to the labor of opening the can (watch for sharp metal!), a little effort is needed to use the batteries in the flashlight.

The cells in the 9V battery are missing the caps that the individual AAAA cells sport on top and bottom. One forms the "nipple" a the positive end, the other the dimple at the negative end. The flashlight's battery compartment length is designed for additional length of these so if you just drop the liberated 9V cells in there, no light will result.

There are a few tricks that will make these cheap alternatives operational. First, beware of appearances. The naked cells are confusingly reversed in appearance with a "nipple" on the negative side! This is a result of the internal geometry of the cell. If your flashlight isn't working double check this first.

My favorite way to make these cells work takes advantage of the fact the cells were wired in a series circuit inside the can. The manufacturer spotwelds a small metal strap between cells as the electrical connect. By preserving two of these straps, and carefully folding over the cells so that they will fit in the flashlight, we have not only added to the overall length but improved the electrical connection. These straps will probably not add enough length, though, so a bit more "padding" will probably be required.

I use a small aluminum foil ball, about 3 mm or so, dropped into the flashlight. When the cap is screwed down tight, the ball is crushed flat and becomes a contact. The flashlight's contact on that end is one lead of the LED, it is the positive side. Note that this means you will be putting the flat side of the cell stack down the tube. A bit of playing around will get you results, this isn't rocket science, be creative!

An alternative method I previously used, and have abandoned in favor of the easier method above, was to put a blob of solder on the post extending from the negative side of the cell. This works, but be careful not to overheat the cells in process. I have some sympathy for those who find this method aesthetically pleasing.

Labels: ,