-
(Not) leading by example
Today my wife and I were driving home from dinner and had just gotten on I-5 south to get to 163 North when she saw a San Diego County Sheriff's Deputy driving with a cell phone to his ear. Yes, this is illegal in the state of California! If he had been seen by a highway patrol officer, he should have been given a ticket (the city of San Diego has a 30 day grace period, but he was on the freeway). However, it is completely unlikely that he would have been pulled over. What is this behavior teaching others? Are law enforcement officers exempt from the laws? I'd hope not, but sometimes they act like they are. While on the topic, yesterday I saw a San Diego Police motorcycle officer make a right turn on red without even stopping. Now if I had done that, I would have been pulled over, but this officer (who didn't have his lights and sirens on) decided to break the law. Could I or should I file a complaint about either of these incidents? I have the identification number of the Sheriff's car, so I could file a complaint, but it would take too much of an effort to do so. (If someone from the Sheriff's department wants to contact me, I'd be more than happy to supply the information about this.
-
Finding bugs automatically
A colleague pointed me at a tool called LLVM/Clang static analyzer which is supposed to find bugs in code automatically. I was skeptical at first as how could it do it? Well, after running it on a few projects, I quickly became a believer! While it finds some stuff that isn't technically bugs, it did catch a number of memory leaks that I'm actually ashamed to have found in my code. Some of my old crufty code had leaks in it and a few places where I misunderstood memory allocation caused me to revisit them (turns out that most of the sample code I've found dealing with NSManagedObject subclasses also has memory leaks). I'm going to make sure to run this on all my projects; I need to put a better front end on it so I don't always have to type in the command and remember the syntax.
It took me awhile to get it to say that some of my projects were "bug free"; it uses function names as indicators as what should retain memory and what should not. There was a function GetSomeValue which returned a CFStringRef that had to be released by the caller. CF convention says that the caller does not have to release an object if the function name has get in it. I had to switch the name of the function to CopySomeValue as CF convention says that the caller must release an object that has copy or create in it.
-
Cycle of fuel costs
The price of oil took a nice nose dive today. The news says that this is in part to expected higher inflation which is attributed to higher fuel costs thus lowering demand. If the price of fuel decreases because of this, will people use more fuel and therefore drive the price of oil up again? While I hope not, thinking about that kind of cycle makes my head spin.
-
More AT&T Fun
So now that my voicemail is turned off on AT&T, I decided to look at call forwarding to forward my calls when I don't answer the phone. In AT&T's online phone manager, it clearly says that it will forward calls when I don't answer the phone (see picture below).
Unfortunately this isn't true; it immediately forwards the calls and only rings my number after the other number has picked up (I tried forwarding to my JConnect number) which makes call forwarding useless to me. I could get the call forwarding on busy service, but that's another $5 per month. It looks like I'm going back to Costco to look at new phones or just find a cheap answering machine. Did I make a mistake switching from MCI? I sure hope not.