Tuesday, November 22, 2011

How to remove yourself from the FingerHut catalog mailing list

FingerHut does not make it easy to tell them you don't want to receive their catalog in your mailbox. I got routed in circles when calling their customer service number. So I called their sales number and found out the trick. Call their customer service number at 1-800-208-2500. Do NOT answer any prompts. They will repeat a few times and then move to the next prompt. This will go on for a while. Do NOT be tempted to answer any of these prompts no matter how repetitive. Eventually, you will get routed to a live person. Make sure you have the catalog in front of you so you can give them the "customer" info (I've never been purchased anything from them) on the back cover. Then in 8-10 weeks you should be free.

Monday, November 21, 2011

New web site

I created a web site for my piano teacher. I tried to recreate the visual elements of a piano score cover into a web site. Check it out.


Friday, May 20, 2011

Please see "Apocalyptic Events" in the employee handbook...

Dear University employees,

Given the media coverage of the predicted "Doomsday" event on Saturday, May 21st, we believe now is a good time to review the relevant HR policies surrounding the apocalypse and the resulting issues that may impact employees. We all must do our part to ensure business continuity!

For those who ARE raptured:

While salvation is never 100% certain, please notify your manager in advance if you believe you are likely to be raptured. You manager may assign you to a non-saved colleague for cross training to ensure a smooth transition of duties.

For those who are raptured, life insurance benefits will NOT be paid out to any beneficiaries who are not raptured or "left behind". The University's group life insurance policy clearly states that benefits are only payable upon the death of an employee. Since you will have achieved ever-lasting life, your policy would become null and void at the moment of rapture.

We ask that you be considerate of your non-saved colleagues and remove any food items from the common lunch area. To assist with this, we are organizing a "Fridge Cleanup" day on Friday to coincide with the possible apocalypse. The difficulties facing your non-saved colleagues will be significant enough dealing with post-rapture issues without the additional burden of sorting out unlabeled food containers.

Finally, we ask those who believe they will be raptured to refrain from using negative terms to describe those who may not be raptured. While the term "heathen" may be factually correct, it may lead to a drop in workplace morale. Instead, we encourage the righteous to use the more neutral term "non-saved" as demonstrated in this memo.

For those who ARE not raptured:

The heathen employees who are left behind will be expected to report to work on Monday as scheduled. Lateness will not be tolerated since (1) traffic should be lighter due to fewer commuters, and (2) SEPTA is predicting no rapture-related loss of staffing.

More than ever, it will be vital that remaining employees maintain a professional workplace environment. As such, the workplace dress code policy will continue to be strictly enforced. It may be a post-apocalyptic world outside the office, but it does not have to look like it inside the workplace.

Also, HR will be conducting a series of workshops to help remaining employees cope with the challenges of maintaining a healthy work/life balance in a post-apocalyptic world. We encourage employees to attend (with prior approval from your supervisor).

"Looting 101" -- The basics of gathering the basic necessities of life!

"Intro to Hoarding" -- All this stuff! Where do I put it?
(Prerequisite: Looting 101)

"Oops, Wrong Religion" -- Come to terms with being left behind and not one of the righteous through role-playing and improv games.

Finally, office supplies, desk chairs, telephones and computers of raptured employees belong to the University and should only be used for University related business. These items should be inventoried and reallocated as needed. Personal items of raptured employees, however, are fair game and may be ransacked at will. Please keep this mind in case you decide to use sick leave or a personal day following the rapture event.

Monday, August 17, 2009

Air France stinks, sucks AND blows!

Last year around this time, I lost a lot of money and had a vacation ruined. The Air France gate agent out of Philadelphia neglected to check my partner's travel documents properly -- so we were turned away in Paris instead of connecting to our flight to Spain. Our vacation may have still been ruined had the gate agent done her job, but I wouldn't have lost nearly as much money.

(It seems Air France has a history of failing to properly screen passengers. This article tells how they let someone board their plane even though his passport was expired and he was listed on the "no fly" list.)

After trying to deal with Air France and being treated like dirt and (unsuccessfully) attempting amateur legal action in small claims court, I learned a few things. Air France's culpability was never the issue. They freely admitted their agent's error. What was very surprising is that Air France is protected from any consumer liability from certain types of negligence by their status as a "common carrier." The rules which say for what they are accountable and for what the consumer is out of luck are spelled out here:
Oh wait, that is the invalid link they sent me in my flight confirmation email. Instead, to find their terms, you have to go to:
Click on "Legal Notices" at the bottom of the page, then click on "General Conditions of Carriage" in the side bar. Page four has the limitations on liability. Most people find out about these limits on liability too late -- after they have had luggage lost or damaged by the airline.

So, yes, I'm bitter. And in the spirit of seeking out other like-minded bitter folks, I tried going to airfrancesucks.com since domain names like that are a common pattern for complaint sites. I was surprised to find that airfrancesucks.com is parked at a domain name registrar in France. I dug a little deeper and found that Air France had fought for and won the domain name from an individual who used it to point to a consumer complaint site where individuals criticized Air France. Nothing like dealing with customer service issues with censorship.

I thought it was hilarious that Air France was the owner of the airfrancesucks.com domain. I tried another combination of unpleasant words and immediately found that airfranceblows.com was another domain owned by Air France. I went through the full listing of their registered domains and also found that Air France is also worried about their aroma. Yes, they also own airfrancestinks.com.

Wednesday, November 12, 2008

Retrieving XML, HTML and JSON with JQuery

I've been using JQuery in a project and recently discovered that code that worked fine under Firefox3 was failing under Firefox2 and IE6. The issue turned out to be my misunderstanding of how to properly retrieve data from an ajax call.

My code expected a proper XML object. I was using the jquery $.load() method mostly for its simplicity. Under FF2 and IE6, instead of getting an XML object, I was getting text which jquery was parsing as xml. The docs claim you'll get inconsistent results in this situation and they were absolutely right.

To resolve this, I used the $.post() method instead where the data type of the expected results can be specified. I wrote this small javascript class to retrieve xml, html and json data:

function Fetch() {
this.result = null;
this.Xml = function(params) {
this.post(params, 'xml');
this.Html = function(params) {
this.post(params, 'html');
this.Json = function(params) {
this.post(params, 'json');
this.post = function (params, dataType) {
var result = null;
var response = $.post("service.php",
function(data) {
result = data;
this.result = result;

So, Fetch.Xml() returns an actual XML object rather than inconsistently parsed text. FF2 and IE6 now work fine.

Monday, August 25, 2008

A rainy morning in Paris...

Joseph and I boarded our flight Thursday evening ready for a break. The trip that seemed like ages away when we planned it was here. I had considered following the latest fad to fight jet lag: pre-flight fasting. But some digging revealed that the study being quoted everywhere was actually done on mice, and the results had never been shown to occur in humans. Air France provided a very edible meal with some very drinkable wine. So mice be damned. I ate.

We passed the time watching a variety of movies and frequently switching back to the "Geo" channel where the plane's current position on a map and vital flying statistics were displayed. Of course I tried to sleep, but that is usually an elusive goal for me on a plane. The passenger behind us snored away, showing off his effortless command of attaining the unconscious state.

"Morning" arrived much to soon. The excitement of arriving helped slightly to fool the body into overlooking the fact that it is really two-thirty in the morning. Outside, the Paris morning was gray and rainy. We were in the very back of the plane so our liberation from coach would take a while. Another passenger was a bit less patient and was trying to work his way through the crowded aisle to move to the front of the plane. He was challenged by an older man who called him an asshole. I thought I was about witness some air rage as the two faced off. Luckily, angry looks were enough to dissipate the excess testosterone.

The rain drizzled down as we walked down the covered steps off the plane. We dashed across the tarmac over to one of the buses waiting to take us into the airport. We navigated Charles de Gaulle looking for the exit so we could transfer to Orly to catch our connecting flight to Sevilla.

We found passport control and got in line. It moved quickly and soon I got my stamp and passed through. I waited for Joseph. The officer seemed to be explaining something to him and pointing back from where we came. I joined in at that point and it seemed there was some visa issue about changing airports since Joseph has a Colombian passport. I wasn't clear on all the details, but the upshot was that we need to talk to Air France about a temporary transit visa. We had plenty of time to make our flight at Orly, so this seemed like a minor annoyance.

We went back towards the gates to the Air France desk. We needed to pass through security again, but since we didn't have a boarding pass, we weren't really allowed to go back in. We explained the situation to the officials and waited while an Air France agent was dispatched.

The agent arrived and we explained the situation again. He looked a little worried and asked how long it was until our next flight. He took our passports and disappeared. We still had plenty of time so I was still upbeat. I hadn't realized it yet, but we were in limbo at this point. We were in the stateless land between the airport security checkpoint and passport control. The lack of any windows and the institutional gray should have tipped me off.

Our travel documents were being whisked around the airport while we waited in limbo. Some feelings of doubt started to creep in but this silliness would soon be forgotten after our vacation started in earnest. After twenty minutes or so -- time had ceased to have any meaning -- the agent returned. His discussion with the passport officer did not yield good news. Joseph did not have the proper visa to be traveling in Europe and we would have to return to Philadelphia. Denial immediately set in. This absolutely could not be true. Joseph had checked numerous times with the Spanish consulate in New York and Washington DC and had received the same answer each time: his Colombian passport and his American green card were all he needed. Whoever provided this answer though, must have been on crack since it was simply not true.

The agent was patient while we nurtured our denial. Frantic phone calls to family in the U.S. got us embassy phone numbers in Paris. We spoke with officials who confirmed the visa problems and had no help they could offer. As the inevitable was forcing itself upon us, the agent expressed his surprise that we were even allowed on the plane without the proper documentation. Pardon? Excuse me? We had been given misinformation from the consulate AND the gate agent in Philadelphia had slipped up and allowed us through!

The inevitable crept in on us. Joseph urged me to continue on our trip while he returned home, but I couldn't imagine the trip without him. Defeated but still a little incredulous, we acquiesced and the agent booked our seats on the return flight home. Waiting at the gate forced the reality to sink in a bit more.

The rain continued to fall outside, and the gray light and the exhaustion mixed to create a starkness and clarity to the scene around us. A woman waiting for the same flight sat at the gate with a cough that made tuberculosis sufferers sound like timid throat clearers. We kept a safe distance until boarding time. We were first in line, but by some strange coincidence, Joseph was randomly selected for the "additional" security check. I waited while his bag was opened and he was wanded with a metal detector.

We took our seats on the plane and began to settle in for our long flight back. My heart filled suddenly with panic and then dread as I saw the coughing woman and her companion approach and take the seats immediately behind us. A completely different sensation hit me like a brick wall when she raised her arms to lift her bags into the overhead compartment. Now I had two reasons to fear taking a breath.

An involuntary prayer escaped me while passengers trickled into the plane. I asked the flight attendant if the flight was very full. She cheerfully told me it wasn't and changing seats would not be a problem. At least this all wasn't some form of godly punishment. We moved forward several rows until I imagined we were out of reach of coughing woman's contagion.

The flight back was uneventful. I had a few short naps but no real rest. The "Geo" channel which previously was full of excitement and promise now felt like personal mockery as the plane icon crept slowly back to Philadelphia. We made a few loops on the screen just outside New Jersey before air traffic cleared us for landing.

We were back on the ground again on our usual side of the Atlantic much sooner than we had originally had planned. I filled out the customs card and wrote in France for countries visited. I was mentally preparing for the officer's question, "how long were you in France?" The answer of "four hours" seemed a bit flippant without further explanation.

Questions asked and answered, we were now legally back inside the U.S. at about four-thirty in the afternoon. Twenty-four hours earlier, we had just arrived at the Philadelphia airport to leave for our trip. Now we were back where we had started. One vacation goal was certainly attained. This would definitely be one unforgettable trip.

Monday, March 17, 2008

Converting PDF to bitmaps

I've been trying to use ImageMagick's "convert" utility to convert a PDF image into constituent bitmap images -- for OCR and other purposes. If I just run:
convert file.pdf file.tiff
I end up with a really large mostly blank page with a very small bitmap in the lower left corner. That tiny bitmap is also very blocky when the size is blown up. So here is how to fix this problem:

The Difficulty Way
  1. Use the -density option to specify the DPI of the resulting bitmap. This will get rid of the blockiness, but will also make the entire image very large -- including the large blank areas.
  2. Use the -crop option to crop out the tiny portion of the image that we actually want. We'll need to do a little math to get the exact numbers. The origin for the page is the top left corner. Positive number shift right and down. So we need to compute the Y offset to get just the bottom of the page. I haven't seen a way to reorient the coordinate system of the page to make this easier.
In my example, the original image was 2900x3800. You can use ImageMagick's "identify" utility to find out what the native image sizes are within the pdf. When I used convert -density 300 without any cropping the resulting image size was 12083x15833. I just want the lower 3800 pixels so I have to offset by 15833-3800 or 11933 pixels. So the conversion command is:
convert -density 300 -crop 2900x3800+0+11933 file.pdf target.tif
Well, I tried this and doesn't work exactly but is close. It seems that the conversion is using some scaling factor that I can't find. Fortunately, there is a better way.

The Easy Way

Use the -density option along with the -page option to specify page size. This crops the page correctly if you use a page size (e.g., letter, A4, etc.) whose aspect ratio matches your page. In these case, the final conversion command is:
convert -density 300 -page letter file.pdf target.tif
We can also use the "-compress lzw" option to compress the file when we are using TIFF for our bitmap format.