Cocoa printing – On the surface it is easy

I had to add printing to an application I’m working on so that users can print out web pages for the built in web browser. Turns out that this only took about 20 minutes to implement. Cocoa is nice that way, but then today I needed to change the title of the printout (used in Preview, in the Job list for the printer and the default name when saving) as the name it picked up was the window name which didn’t make a lot of sense. So, after much searching and realizing that I’d need to subclass some need WebKit object which was unfeasible, I took a look at categories. For the most part, I understand categories, but in this case, I added a category to NSView called printJobTitle, shoved in what I wanted if it was a WebHTMLView class, otherwise use the window’s title and amazingly this worked. I’m not exactly sure how as I’ve found at least one other category for NSView that also has printJobTitle in it. I won’t look a gift horse in the mouth; it works.

Note to Apple, please let me specify a print job title in the NSPrintInfo and override what is taken from the NSView. I’m sure I’m not the only person who has had to do this.

Backup scheme

I think that I finally have my backup scheme worked out. My server meltdown had me re-think the strategy. However, my meltdown, while time consuming to get everything working again, really only cost me one day’s worth of data that I was able to restore from another machine. My backups sort of worked, except for the monolithic “dump” archive that I created. This archive got corrupted and caused the restore to fail. Luckily I had created tar/gzipped backups and had the files.

So my new backup strategy is quite involved. First off, I have 2 drives doing RAID 1 which will protect against hard drive failure (I hope). Next, I have a third drive in my server that every hour does an rsync of the main drive. Next, I every night, a nightly rsync is done of the main drive to the third drive. Next, I have a TrayDock that I do an rsync to every few days. Then I take the dock to my safe deposit box. I have a second tray for it and rotate those backups. I also do nightly tar/gzipped backups of important stuff to the third drive which then get copied to the TrayDocks. Lastly, I periodically copy the tar/gzipped archives to a TrayDock attached to my PowerBook (I have 2 trays for my PowerBook).

I think that I should be covered in terms of backups. While there is still the potential for downtime, I’ll sleep better knowing that I can restore any one file or files without having to rely on a massive dump file still working. Yes, I may be paranoid, but my livelihood depends on data on my server.

DJs on Sirius

I’m not sure why Sirius needs DJs to annoy us. The song title and artist is already displayed on the screen, we certainly don’t need to hear someone spout it off. Some of the DJs are tolerable, but one in particular, Madison, is extremely annoying. I sent Sirius some email about it and haven’t heard back (now that is surprising, isn’t it). My wife got very fed up with this DJ and also contacted Sirius. However, her message to Sirius was just too funny:You suck! If I wanted to hear a DJ talk, I’d listen to my local radio station. Shut up and play music!! I really don’t care what you did with your cousbin over the weekend. PLAY MORE MUSIC!!! LESS TALK!!!

Fake sale?

Yesterday I went to purchase a new office chair. I was looking at the Herman Miller Aeron chair, but the salesman at The Healthy Back store pointed me to another chair (same price) that was more adjustable and had a more comfortable seat. Since it was their special “pop the balloon” sale, I got to pop a balloon to see what discount I got. I got 15% off which amounted to $130 or so off…not bad. However, when I went home and happened to check their website, I found that the chair I just bought was even cheaper than I paid. They matched the price and refunded the difference. However, the 15% off turned out to be a joke, at least for what I bought.

Audio project complete

I finally managed to finish patching and painting the holes created when the wires were pulled. Another project complete and now I can spend my time doing something else, maybe play video games for awhile.

dspam

dspam is a great product for catching spam, but as I’ve complained about in the past, setting it up is a nightmare. I went to install the latest version today and wanted to install it “correctly” and have the web user interface operate how it was designed. I spent awhile futzing around, but ended up using my hacked up CGI to get the web interface working. Uggh.

Sound isolation

As part of our rearrangement of our TV room, my server has become part of our entertainment center. Unfortunately the server melt down caused me to switch to a server that is significantly louder. So, I went on a mission of deadening the sound. First task was to get acoustic foam. Guitar Center had some (what a weird store to visit). I cut the foam and placed it in my cabinet. It didn’t do much because there is a big hole in the back of the cabinet for ventilation. So, I had to devise a ventilation system. I bought some 3″ PVC pipes from Home Depot and attached them to the server such that they act as intake and exhaust from the server. This would allow me to completely encase the server in the foam and stick the pipes out the back of the cabinet. So far so good; I put everything together this morning and it was still noisy. I picked up a quieter fan from Fry’s (I hate that place, but where do I find a case fan). While the server isn’t 100% quiet (I looked at water cooling systems, but water in my computer scares me), it’s acceptable especially with music or the TV on.

United States Postal Service

In some ways, the USPS amazes me…mail gets delivered to my house almost everyday without me having to pay to receive it. However, at times, the inability to do the simple task of delivering my mail annoys me. A few weeks ago I noticed that our normal carrier wasn’t delivering the mail and mail was coming at odd times (like 5:30 pm) when it normally comes around noon everyday (I can hear the letter carrier put the mail in the mailbox that’s next to our front door). Then I noticed the replacement carrier not wearing a uniform and then was confused about where the mailbox was on a neighbor’s house. This neighbor’s house has the same layout as ours and the front door/mailbox are in the same spot. Not rocket science to find it. We also started getting mail for someone else that was in a different zipcode about 10 miles away; same street address, different street. On Tuesday, I had it with this mess as we got mail for both our neighbors (one on the same street, one on a different street) and called to file a complaint. Yesterday, we got a note in our mailbox from our normal carrier; she was on vacation for a few weeks and apologized for the mess that was created. She said that the replacement carrier is the worst she has seen in her 16 years with the USPS. I’m glad that the regular carrier is back and maybe mail delivery will be back to normal.

This isn’t my first run in with the USPS. When I lived in Oregon, I moved once and kept getting mail forwarded to me that wasn’t mine. After a bunch of calls, I found out that the way the coding for forwarding worked was based on some combination of part of the street address and zipcode; someone else’s forwarding got confused with mine. I finally stopped my forwarding order to fix that problem. Next, I didn’t have any furniture in the front of my house and after about 8 months of getting mail without problems, the post office stopped delivering mail completely. The letter carrier thought the house was vacant. I got it started again, but then it stopped again for the same reason. I got tired of that. Luckily I finally moved and didn’t have to deal with that again.

How hard can it be to sort mail and deliver it? Must be harder than I think.

Universal Remote Control

We now have 5 remote controls to control the TiVo, TV, Squeezebox, AM/FM Tuner, and Sirius. That’s a lot of junk to deal with, so I decided to try out a universal remote. The Logitech Harmony 520 got decent reviews and seemed to be one of the least expensive programmable universal remotes. After a few tries, I finally found it at Wal-Mart. At first, setting it up seemed like an immense chore with the devices mode, activities, etc. It’s nice that it recognized all my devices, but it is extremely confusing to setup. After playing with it for awhile, I think I am finally getting the hang of it and setting it up the way I want. The fact that you can configure the buttons differently in “Device” mode” vs. “Activities” mode had me really confused. In most cases, I want them the same. In addition, the automatic activities it sets up aren’t exactly what I want and there doesn’t seem to be a way to really customize them, so I have to setup a generic activity and start there. However, doing this, I have to reset all the buttons I already configured. I think after some more configuring, I’ll start to like it. The real question will be if my wife accepts it.

RAM

So I went back to The Chip Merchant to exchange my RAM. The guy said that it was unlikely that both RAM modules were bad and went off to talk to his tech.He came back and said that my report of bad RAM wasn’t the first and there appears to be an issue with the combination of RAM, motherboard, and processor they sold me, so they gave me a different type of RAM and told me that the DDR 400 could only operate at 333, but the BIOS’s setting of Auto should detect it. I popped the RAM in, set the BIOS to a RAM frequency of 333 and will cross my fingers. It only took me a few days of futzing around to come to the same conclusion.