I hate the change back to standard time as it gets dark so much earlier and kind of cuts my days short. However, what is even worse than the change is having to deal with daylight savings time as a software developer. Most of the software I deal with lately is synchronization and each device handles daylight savings time differently which results in major headaches. Too bad it isn’t all standardized to make life easy. Oh well, these issues keep me employed.
Monthly Archives: October 2005
The fix to a broken heater
In one room of our house, which was an addition to the main house, we have an electric, in-wall heater. We never really cared about using it as we haven’t had guests in the winter. Well this morning I turned it on to see what would happen as my in-laws are coming for Thanksgiving. The heater turned on for about 30 seconds and then shut off. I fiddled with the knob and it worked for another 30 seconds. So, being the good engineer I am, I shut off the circuit breaker, and disassembled it so that I can get the parts tomorrow. I had the main piece (the thermostat) on the counter (it’s a 30 year old heater, so it is pretty simple) and explained to my wife how it works. See tells me to try moving the thermocouple away from the heater (it was sitting in front of the heating element). I didn’t really think it would make a difference, but said OK, put it back together, moved the thermocouple, turned on the circuit breaker and gave it a whirl. Well, it worked and the room started heating up (slowly, but surely). I’m not sure why I didn’t think of that “fix” as I’m an engineer and knew exactly how the system worked. So simple and my wife proved that it doesn’t take an engineer to solve a problem.
San Diego Union Tribune – Not worth the paper it’s printed on
I’ve lived in a number of cities and had the opportunity to read newspapers daily in some of the cities. The more I read the San Diego Union Tribune, the more I believe it is one of the worst papers I’ve ever read (even worse than USA Today). For starters, they put editorials on the front page; I learned when I was on the high school newspaper that editorials shouldn’t go on the front page. Second, they put stories that are fluff stories on the front page. A few months ago, there was an article about Rejection Hotline on the front page even though nothing was new about it. This morning’s paper (Sunday) had an article about the city attorney. While the article, itself, was OK, it wasn’t breaking news as it followed the city attorney through a typical day and mentioned that it was done in September.
Furthermore, the newspaper has frequent mistakes, such as an article today that said: “…a member of the SDSU homecoming court who road in the parade in a white convertible.” I almost busted out laughing at this mistake. Does anyone proofread there? Granted spell check wouldn’t catch it, but reading it would. The newspaper uses a lot of wire reports and most of the real news isn’t from their own reporters. While this isn’t really a bad thing, I got most of the same information on the news with the same twist the evening before.
I haven’t mentioned that the Republican bias is seen throughout the paper. It is very disturbing to have to wade through the bias and poor writing to get information out of the paper. Last year, they put a grotesque picture on the front page which was completely unnecessary and in poor taste. We almost cancelled out subscription then, but my wife likes the Sunday paper and likes certain sections during the week. At this point, I say that the only reason we keep getting the paper is so that the dog has something to do in the morning as his job is to run outside and retrieve the paper (yes, he actually does it, except for Sunday because the paper is too big).
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.