2010-03-12

The meter is here at last

After "only" 18 months from the time Comcast officially instituted the 250GB/month bandwidth cap on residential internet service, I received an email this morning announcing the roll-out of their bandwidth meter to Colorado. So now, I can finally get an official reading of what Comcast thinks my usage per month is (versus what my own measurement says).

In addition to showing you your current month's use, it shows a graph of your previous three months; so I was able to compare my own measurement with the graph. Although the number they show for the current month is just about even with what I'm measuring so far, there's actually quite a difference between the numbers they show per month for the last three than what I came up with:


I'm not sure if I should breathe more easily that they're measuring less than I am. What is the source of this mismatch? Will there be a month when they measure higher than I do, and will that measurement be high enough to cut me off?

Incidentally, I thought it was with no small bit of irony that the email announcing the bandwidth meter came on the same day as an email announcing their "Secure Backup & Share" offering. 2GB of online storage comes free with the internet service, but for $10/month (or $100/year), you can increase that storage to 200GB. Of course, if you attempt to use that 200GB of storage within a single month (e.g., you upload 200GB, your hard drive crashes, and you go to download that 200GB again), you'll exceed your bandwidth cap and get your internet service disconnected.…

2010-03-07

February Bandwidth

In58.53 GB
Out5.08 GB
Total63.61 GB

This should make for an interesting month. What makes February so special is that it's the last month that we had cable TV. We're becoming more used to the idea of streaming Netflix movies whenever we want, and the $60/month for mostly-unwatched TV just wasn't worth it.

I almost regretted cancelling the cable bill when I realized the Duke/UNC game was on ESPN over the weekend (a mere two days after losing cable, of course), but I quickly got over that when I found the game broadcast on ESPN's website.

The question remains, of course, will the complete removal of cable and the complete dependence of the internet (and prepurchased DVDs) for video entertainment have an impact on bandwidth? We'll find out just how big of an impact in next month's exciting episode!

2010-02-24

Cutting the Cord

The price of our cable TV service has increased steadily over the years. Right now, we pay close to $60 a month for "Expanded Basic", which is the lowest option that gives us Disney and Nickelodeon. It's just plain old "analog" cable, which I prefer for a few major reasons: first, there's no extra equipment, I can take a "cable-ready" TV to any room in the house, plug a coax cable between it and the wall, and get all the channels I need; second, there's no extra cost for that extra equipment; third, the service is just plain cheaper. Comcast did let us try out digital cable for three months with no obligation once (with no change in price during our trial even), and although the digital box was neat, especially being able to pause and rewind live TV, it just wasn't going to be worth how little we'd use it.

With more and more content available over the internet, and the fact that our kids seem to consistently opt for watching a DVD over the TV, the need for a pipeline of predetermined, commercial-laden programming just isn't there. We can take that $60/month and put it to much more useful purposes. That's two or three new DVDs a month (even more if they're the $5 discs with old cartoons that my boys have enjoyed lately); or a new release video game; or half way to a nice universal remote that runs the TV, DVD player, and the Xbox; or simply $60 that we just don't have to spend.

Besides watching DVDs, we also have Netflix (whose basic sub-$10 service, with one-at-a-time disc by mail and unlimited internet streaming, is more than sufficient for our viewing habits). When I hear a rumor of a TV episode I absolutely have to see (such as South Park's "Dancing with Smurfs"), it's on the internet in one form or another. Anything else, we just don't care about. We've never seen Heroes, never rescheduled our week around Lost, never lamented missing an episode of American Idol. And I don't feel bad about it at all.

The only thing we might miss is the toddler shows — no Mickey Mouse Clubhouse, Handy Manny, Dora the Explorer, Little Einsteins, or Backyardigans to throw on for the 3-year-old. But then, his attention span never lasted a whole show, anyway, so it's hardly a big loss.

The Comcast service rep that I talked to didn't give me a hard time at all when I called to cancel the TV service. He did say there were less expensive TV options, but I told him that I'd rather just completely cancel it, and he didn't give me any more push back. In fact, the process was a lot more smooth than I was expecting. (Thank you, Comcast, for having a friendly and helpful representative on the other end of the line. He suggested an option, then accepted my decision without complaint.) In about a week, we will have officially cut the cord on cable TV.

The next step will be shaving a few bucks off the phone bill by moving from Comcast's $45/month VOIP offering to something a little more affordable as well. Ooma looks pretty appealing, although I do wonder about their business plan (can they really survive on "no monthly fees ever"?). Vonage is a possibility as well.

2010-02-23

Welcome to George Orwell High School

There's a story breaking about a boy in the Lower Merion School District of Ardmore, PA who was busted for "improper behavior". What is making this story so exceptional (and frightening) is how, apparently, this behavior was discovered. In this school district, students are issued Macintosh laptops, which, as one might expect, are installed with various lockdowns and security software in place. However, it seems, part of this "security software" includes the ability for the school to remotely activate the laptops' built-in webcam; and the student's "improper behavior" was caught on this camera in his own home.

The school has come out and said the camera is only activated in situations when the laptop is considered "stolen", except they have not indicated that this was one of those situations. This seems clearly a case of a school violating students' privacy and grossly overreaching their bounds by policing kids in their own homes. It already has the interest of the FBI, who are investigating the school, which has already backed off on their supposedly-benign security policy.

The more that comes out on the story, the worse the school sounds, too. It seems that the "inappropriate behavior" that was "caught" by the webcam was the student eating candy. At home. Busted because the candy "looks like" drugs when viewed over a shot over a surreptitiously-controlled webcam.

The software itself, which is analyzed in this Stryde Hax blog post plus a link to a hands-on with an actual Lower Marion laptop on the Save Ardmore Coalition blog, is pretty scary. Besides its constant "phoning home" with location and pictures, there's apparently a lot of insecurities in the way it runs (rather ironic for a supposed "security" program).

I can only say that any equipment that my children are issued by our schools (which aren't giving laptops away yet), I will be analyzing closely. Not only will I be monitoring my network, but cameras and microphones will be covered with an adequate supply of electrical tape.

2010-02-02

January Bandwidth

In56.50 GB
Out6.46 GB
Total62.97 GB

Here we are, in Month 16 of capped internet usage (incidentally, Comcast's alleged bandwidth monitor is still absent from my account page). January, apparently, was a heavier use month, although off the top of my head, I'm not sure why. Aside from what looks like a couple of big movie days (although one on a Thursday is unusual — did I download something that day?), the overall usage seems to have increased a bit.

It could have something to do with my getting a new Zune media player and subscribing to several audio and video podcasts. The added bandwidth might be enough to cause an uptick in general activity.

It's interesting that I can't seem to identify a single definite cause, though, and yet data consumption has definitely increased. It could be evidence that, as we become more dependent on the internet generally, usage will just keep going up without even realizing it, and what seems like a reasonable cap today may be restricting tomorrow. Or it could be that there's a perfectly reasonable explanation that my geezerly brain just can't recall. Or it could be just a fluke. We'll see.…

2010-01-02

Total Bandwidth for 2009


In
396.21 GB
Out
67.38 GB
Total
463.57 GB

I thought it'd be fun to get a yearly total for bandwidth, since I had the numbers available. The total is less than two months' worth of data allowed by Comcast's 250GB/month cap. It looks like all the HD video streaming in November definitely had a noticeable effect, though.

2010-01-01

Bandwidth for December


In
34.09 GB
Out
5.93 GB
Total
40.02 GB

Numbers dropped way down this month, in no small part due to the lack of streaming a lot of HD movies on Netflix. In fact, one of the TV series I was watching had some episodes not available for streaming, and so I used my one-disc-at-a-time DVD plan to get the actual disc from Netflix.

The end-of-year spike comes from something new. I have been getting a "Zune newsletter" in my email, either as a result of playing with the Zune software a while back or the change of the Xbox 360 music and video marketplace to use the Zune marketplace. In this newsletter, they mention the occasional free song or TV show episode to download, and I decided I'd go ahead and check it out.

So, I installed the Zune software (which, while I've derided as a media player, is needed for marketplace browsing) and downloaded a few shows, like the Mythbusters holiday episode and a cartoon or two.

I also checked out their podcast section, and I found not only the two podcasts from GeezerGamers.com (one of which I actually co-host) and a couple other gaming-related podcasts, but a handful of audio and video podcasts from my church! So I subscribed to a bunch of feeds, which downloaded a few extra bytes. I just hope I can find time to listen to them in addition to the audiobooks I get from my Audible.com subscription.

31 flavors of Windows

I bought my wife an upgrade to Windows 7 for Christmas. There was a deal on the upgrade package to Windows 7 Professional when I placed the order for the laptop she was getting me. Now, according to what I've seen on the intertubes, and even according to the instructions that came with the upgrade, if you're upgrading from Windows XP, you have to do what amounts to a new installation, wiping out your existing XP software and creating a new Windows 7 system. However, if you're upgrading from Vista, you can do a simple in-place upgrade. Just click "Ok" a few times, and soon you'll have a working Windows 7 system, with all programs and software installed.

Imagine our surprise, then, when the installation process moved forward a couple screens and then informed us that you cannot do an in-place upgrade from Vista Home Premium to Windows 7 Professional.

Why do they confuse the whole issue? As far as I can tell, there are no real differences between the OS versions, just later versions have some additional features. Theoretically, they could sell just one OS and the extra features as separate products. But then I guess they'd have to put their other features (like BitLocker, one of the features in Ultimate lacking in the "lesser" versions) out on the market to compete with other similar products (like the free and arugably superior TrueCrypt), instead of trying to hook people in by bundling it with the OS. (Isn't this the same behavior that landed them in court in the 1900s over Internet Explorer? Maybe it's not an issue now because it's only "bundled" if you pay extra for the extra software.)

Choking on this particular upgrade path doesn't even make sense to me. Isn't Professional supposed to be a superset of Home Premium? Why couldn't the upgrade disc add features that weren't there before?

But choke it did, and now my wife is in the process of collecting the installation files and a list of all software she will need to reinstall, because Windows does not work as advertised or documented; Windows 7 will not upgrade in-place over Vista, if it is "uncomfortable" with the mix of flavors.

2009-12-03

Indoor plumbing is not a new thing

Sometimes, I'm in the bathroom at work for more than a fleeting moment (I'll spare you the details of why), long enough to hear a few people (presumably co-workers, and tenants and guests of other offices on our floor) come in to do their business. It never ceases to amaze me how often I'll hear someone come in, relieve himself, and leave — without either washing his hands or so much as flushing.

I wonder what goes through their minds that causes them to not flush. Are they so proud of what they've accomplished, that they want to leave their creation for the next person to appreciate? Do they think they are just so important or in just so much of a hurry that the half-second it takes to push the little flusher handle is too much of a burden? And worse, is this how they behave at home, too? Are their home toilets full of their bodies' waste processes? Do they only flush once a day, or weekly, or at all?

And what of the lack of the washing of the hands? I had hoped that with the whole "swine flu" hype (which I think is probably way overblown anyway), people might be a little more conscious of wanting to stay healthy and keeping clean; and yet, here are people throwing cleanliness to the wind. This is even more annoying, considering that their lack of hand-washing is going to spread germs around, starting with the same door handle I'm going to be using soon to exit the bathroom myself, after I've already gone through the trouble of washing my own hands.

Seriously. Flush toilet, wash hands. These are not new concepts. These are not hard things to do.

2009-12-01

Bandwidth for November


In75.58 GB
Out5.70 GB
Total81.27 GB

This was a big month. Netflix had the Star Trek Original Series Season 1 collection available for streaming in HD. At the start of the month, they said it would only be available until around the 24th, so I tried to make sure I watched all of it by then. (It was only after I managed to finish the series that they removed the deadline, of course.) So, November shows the effect of watching twenty-nine 50-minute episodes of streaming high-definition video (in addition to a handful of standard-def videos and movies here and there).

Managed to hit about a third of the cap.

2009-11-07

Bandwidth for October


Received:41.31 GB
Sent:5.87 GB
Total:47.18 GB

The first weekend was another General Conference broadcast from our church. We're making more use of Netflix as well. Sundays, since I don't play video games, I usually spend the night catching a couple episodes of old TV shows or movies. The kids like watching episodes of Mythbusters, too; and sometimes my wife will put on a Thomas the Tank Engine movie during the day for the toddler.

Most of it so far has been standard-definition video, though. As it happens, the first season of the original Star Trek is on Netflix streaming in HD video, but I noticed it is not going to be available after a date in late November. (Why the limited time, I wonder?) So I've been trying to watch as much as I can while it's available. We'll see what effect close to 20 hours of HD video has on bandwidth next month, and how close that comes to the ever-looming cap. Stay tuned!

2009-10-05

Little of interest

Interest rates are at an all-time low. According to the little dancing ads that surround my Hotmail account, they are so low that President Obama is begging me to refinance my home mortgage. (He's also begging me to get an education loan to go back to school, and to lose weight by OBEYING ONE RULE.)

I actually find this annoying. I've already refinanced my home, so it's about as low as it's going to get for a fixed-rate mortgage. My vehicles are paid off (one, I paid cash for; the other was financed at 0% and was paid off last year). I am currently not in a position where I am borrowing money, but trying to save it. In addition to money withheld from my paycheck for my IRA, I have money automatically transferred each paycheck to savings accounts for myself (short- and long-term), and one for each of my kids.

Each of those savings accounts earn less than 1%.

I do have a brokerage account, but I try not to do too much with it, because any time I fiddle with it, I end up losing more money.

It is extremely frustrating when I'm trying to be financially responsible and saving money, yet the interest rates are so low, it's not worth saving any money. I might as well line my mattress with the cash.

Except, here's the funny part. As I'm going through my mail, I notice letters from my credit card providers, saying that they are raising my interest rates. These rates, that are allegedly tied to the federal prime interest rate, are already over 20%, and they're the only interest rates going up.

I suppose it's a good thing that I don't carry a balance and therefore don't pay interest (except for those rare occasions when they don't let me pay my bill and penalize me for "my" failure).

Maybe what I need to do is start my own credit card. Then I can earn interest that's actually worth something.

2009-10-04

Bandwidth for September


Received: 44.60 GB
Transmitted: 6.16 GB
Total: 50.76 GB

Not quite as high as August, but September puts on a decent show. The spike on the 27th — the second-highest day on record so far — comes from keeping two kids with fevers home from church and trying to keep them entertained.

Still, a back-of-the-napkin calculation shows that I'd still be (barely) under my bandwidth cap for the month if that day was every day for a month.

2009-09-25

Rocky Mountain Bank - Our Mistake = No Gmail For You

This is just beyond ridiculous and insulting.

Wyoming-based Rocky Mountain Bank made a big error, sending a list of highly personal information (including names, social security numbers, and loan information) to the wrong Gmail account. A rather big whoops, but there it is.

When they discovered their mistake, they sent another message to that account to ask the owner not to view the previous message. Probably not the most correct course of action — could they trust the person to be honest, even if they said they deleted it without reading it? It would've been wiser to consider the information already compromised, and to take steps to protect the compromised accounts and their owners' identities (e.g., one of my lenders paid for credit monitoring for me for a time when they had a security breach).

When they didn't get a reply from the Gmail account owner, they asked Google for the owner's personal information (presumably so they find another way to contact them). Google did the right thing and refused to turn over personal information about one of their customers without a court order.

The bank then filed for that court order to not only disclose the Gmail account holder's information, but to have that user's Gmail account shut downand the court granted it.

This is disgusting on a number of levels.

First of all, it would be as if, if they mailed the wrong document to your house, they got the court to order the USPS to come and destroy your mailbox.

Secondly, it's not unlikely the user in question never saw the email. I get emails allegedly from banks all the time that I never do business with — they're phishing scams looking for me to enter my password. I delete them without a second thought. If I got a random email from some "Rocky Mountain Bank", I'd delete that, too. Assuming these emails even made it past Gmail's spam filters, it's not outside of possibility the account owner deleted them himself.

Third, to deactivate the user's entire email account because of their screw-up goes way beyond their bounds. I use my Gmail for a lot, including business-related correspondence (not to mention it's my credentials other services, including this blog). What right does some third party have to shut off my business activities because they sent me something by mistake and that I probably never even looked at?

They made a mistake. Fine. It happens. Heck, I remember when I used to get emails detailing AOL's plans to expand dialup service in South America (it was entertaining, but not particularly useful — the emails I mean, although the same could be said about AOL). But suing to shut down an innocent person's email for their mistake is, at best, bullying and heavy-handed, and, at worst, a violation of Constitutional rights. Shame on you, Rocky Mountain Bank. If I ever have the opportunity to do business with you, it will only to be to tell you "No way."

I hope this Gmail account is owned by someone who does use it and has a brain, because I really want to see a counter-suit filed on this.

2009-09-16

Our home away from home

My wife is back at Children's Hospital, this time with the baby (and toddler in tow; I'll be picking him up later). Although he was fine when we brought him home, he had been spitting up more and more, to the point where he was forcefully spewing not long after every feeding. We had planned on waiting to take our little "fountain of youth" to the doctor at his regularly-scheduled appointment tomorrow, but it had gotten bad enough that we decided to go ahead and make a call today.

My wife can't remember the exact name of the condition, but after a quick google, it looks like pyloric stenosis. They have him hooked up to an IV already, and they are scheduling him for surgery sometime tomorrow. According to the doctors, this is a very safe (and non-emergency) surgery. If he gets a morning appointment, he could even come home as early as tomorrow night.

Although I'd rather not have to go back to the hospital, at least it should be a pretty short and uneventful stay; and after this, my wife may not have to bring several changes of clothes (for the baby and for herself) everywhere she goes.

2009-09-15

Can only see black and white

There's been a lot of hubbub made about Representative Joe Wilson's outburst the other day. The short version is, during a speech Obama was giving to the House about healthcare, the Republican representative from South Carolina shouted out "You lie!"

This has, of course, brought all kinds of reactions from all sides. The most moderate have been that it was simply disrespectful and uncalled for, and that it violated a rule about Congressional behavior meant to keep things civil.

Some (on the Right) excuse his behavior, saying he was just voicing what a lot of people were thinking, and wishing more people would speak out.

Some (on the Left) call his outburst completely disruptive, calling out the "sour faces" and "rolling eyes" of other Republicans in attendance for not agreeing 100% with the president (either forgetting, forgiving, or applauding the same lack of respect Congressional Dems gave our previous president, — a very famous eye-rolling from one Hillary Rodham Clinton "from" New York comes to mind).

But then there are those who have to add fuel to the fire. Apparently, they see a more sinister reason for Representative Wilson's outburst. It's not because he disagrees with the legislation, or that he is frustrated with the process. No, the only possible reason he would shout that to President Barack Hussein Obama is because of the color of the man's skin. Period.

Hope n' Change blog

I am completely baffled as to where the racism is in the words "You lie." Liberals are more than happy to add words to his outburst to make it racist. (Hey, that looks like fun; can I try? What Obama meant to say before he was interrupted was, "And you honkeys are going to pay for it and like it!" Wow, that was easy.)

Democratic Representative David Scott asks (according to The Washington Post), "Would he have done that if the president were white?" In my daily commute, I pass cars that still haven't removed their "BUSH LIES" bumper stickers. Are they racist? That same Washington Post article mentions concerns about the depictions of Obama as Hitler. Was it racist to see "BusHitler" in online forums for eight years?

I guess it wasn't altogether unexpected. I've seen warnings for a long time that any dissent against the president could be labeled as racism.

Seems to me, though, that the so-called "elephant in the room" isn't the unsaid racism that people are inserting into other people's speech and actions, but the fact that people actually disagree with what the president and his Democratic congress are trying to push through, and are frustrated and want to be heard.

But I suppose talking about that is much more difficult than just saying "racist" and dismissing dissent.

2009-09-14

How I brought down Duke campus ethernet

This is a fun story I like to recall from time to time. This story is absolutely true.

Between my sophomore and junior years at Duke, they wired the entire campus for ethernet. (That's right, before then, it was all dial-up, baby. 14.4 blazing kilobits per second.) Every dorm room on campus was installed with its own personal 10Mbps CAT-5 jack, along with an individual coaxial cable outlet (now they could sell cable to each student directly, instead of just to the common rooms from which students would splice and run their own coax to their dorms for free — not that I would know anything about that, of course…). Duke was entering the digital age.

In a marvel of civil engineering, they managed to install this new jack in the most inaccessible location of every dorm room. So amazing was their work, that in my junior year room, which couldn't have been more than 20' wide, it required more than fifty feet of cable to go from the jack, around the edge of the room, to the desk on the opposite wall. The exact length of cable isn't that important, so long as it's noted that the maximum length of cable sold at the campus computer store was, in fact, 50'.

Now, in the mid-1990s, you didn't have a wide selection of networking equipment available at every local computer store. "Home networking" didn't even exist — it still took some work to get Windows 3.1 to even talk on a network. Today, you'd probably just go to Best Buy or even Wal-Mart and pick up a CAT-5 coupler for 50¢ and join two shorter cables. Back then, though, that wasn't feasible.

So, I bought a copy of Computer Shopper and found a deal on network cable, buying 100' at something a student could afford. When it arrived, however, I found I made a slight miscalculation — I bought bulk cable that did not, in fact, include any ends. I therefore bought the shortest, cheapest network cable available at the campus computer store (who could possibly have use for a three foot cable anyway?) and snipped off the ends with about a half foot of wire. I then proceeded to strip each of the eight individual wires from either end of my 100' cable (cut down to whatever length I actually needed for my room, probably something closer to 60'), twist them with the wires from my purchased cable ends, and wrap each connection with electrical tape. A quick test with a hallmate's multimeter confirmed that I wired each connection correctly, such that each contact passed straight through from one end to the other with no crosstalk to other lines. Everything seemed good.

I plugged in my cable and attempted to configure my network card. Unfortunately, every attempt I made seemed to get me nowhere. After about an hour of fiddling with settings, I decided to give up and head downstairs for a break.

On my way down, I heard a friend cussing up a blue streak, so I popped my head in to see what was going on.

"I'm trying to get my project done, but the @$%!?! network is down!"

"Really? How long has it been out?" I asked.

"About an hour now."

That's… quite a coincidence, I thought. Just to satisfy my own curiosity, I headed upstairs, where I left my network cable plugged in.

I pulled the cable out of the wall, and I heard from downstairs, "AAHHHH! FINALLY!"

I thought about this for a moment, then I plugged my network cable back in.

Came the cry from downstairs, "OH, F$*#! NOT AGAIN!"

I pulled the cable out.

"Geez, THANK you."

I pondered this for a few moments, debating the philosophical ramifications of great power and great responsibility. I then spent the next few minutes doing my best Homer Simpson impersonation, plugging and unplugging the cable as I chanted, "Net go up, net go down. Net go up, net go down." I then left the cable unplugged before my friend burst a blood vessel.

A short time later that evening, I began to wonder how widespread this effect was. I decided to call a friend of mine who happened to work at the campus computing help desk. The conversation went something like this:

Me: Hey, have you guys been having any problems with the network tonight?

Her (sounding very suspicious): Why?

Me: Because I think I can bring the network down.

Her: That was you?!

I told her about my cable and how my plugging it in seemed to be tied to my dormmate's inability to use the network. She exhorted me not to plug the cable in again, and said she'd call me back.

Later, I got a call from someone in the networking department.

"Not that I believe this is possible, but could you plug your network cable in for me?" he said.

"Sure." *click*

"Huh. And could you unplug it for me?"

"Yep." *click*

"You know, if I couldn't hear the click of the cable going in and out, I wouldn't believe it."

He then asked me about the cable, why I made it, etc. I told him that I just needed a longer cable to get around my room. He also asked me not to plug in the cable again and promised to be in touch.

I didn't plug the cable in again. I didn't want to bring down the network, honestly. I wanted to be able to use the network. The facts were, this cable didn't let me use the network, and it only prevented anyone else from using it. My goal was not satisfied. I had no problem not plugging it in again.

The next day, a couple people from the networking department came by and offered to trade me a pre-made retail 100' network cable for my homebrew cable of death. I was happy to do so.

I got a call within a day or two. Apparently, they tested my cable, and as far as they could tell, it was fine — it was wired correctly, nothing funny was going on with it. Near as they could figure, there must've been just enough resistance in my ghetto twist-and-tape connections to put just enough extra stress on their network to push it over a breaking point.

This theory proved to be true a couple months later, when I was called again from the networking department and asked if I had made another cable. It wasn't me this time; enough people had connected to the network that the tipping point had been hit again. Unfortunately for them, this time it wasn't a single extra-resistive cable, but the mass of normal cables that did it.

But I have to wonder if that cable isn't lying around in the Duke network lab somewhere, perhaps with a sign that says "evil network cable of death, do not use", as some kind of reminder about the importance of network infrastructure. Or if it's not so labeled, and if it might actually get used again.

2009-09-09

A nullable DataGridView CalendarColumn

A while back, I managed to fix a couple bugs with the sample DataGridView CalendarColumn control that made it much more usable. Today, I came across one more issue. It's pretty well known that the DateTimePicker, despite having support for a checkbox that lets you turn a date on or off, does not directly support "null" as a valid value. There are a bunch of ways to get around this, but what I came across was a need to support this inside of a DataGridView.

I started with the task of making the CalendarColumn configurable in such a way as to be able to turn the checkbox on or off at will (well, at least, at the moment of construction). That part's easy; I added a new constructor to CalendarColumn to take an "isNullable" flag:

public CalendarColumn() : base(new CalendarCell()) { }
public CalendarColumn(bool isNullable) : base(new CalendarCell(bool isNullable)) { }

Then, I added a class-level variable to my CalendarCell class, and initialized it in the constructor:

public class CalendarCell {
    private bool isNullable = false;

    public CalendarCell() : base() { 
        this.Style.Format = "d"; 
    }

    public CalendarCell(bool isNullable) : this() {
        this.isNullable = isNullable;
    }
[...]

The next modification comes in InitializeEditingControl. Immediately after getting the reference to CalendarEditingControl ctl is set:

    ctl.ShowCheckBox = this.isNullable;
    if (this.Value != null && this.Value != DBNull.Value) {
        if (this.Value is DateTime) {
            ctl.Value = (DateTime)this.Value;
        } else {
            DateTime dtVal;
            if (DateTime.TryParse(Convert.ToString(this.Value), out dtVal)) ctl.Value = dtVal;
        }
        if (this.isNullable) ctl.Checked = true;
    } else if (this.isNullable) {
        ctl.Checked = false;
    }

(Note that I added a little checking around the value setting area, because I'm paranoid like that.)

Next, DefaultNewRowValue:

public override object DefaultNewRowValue { get { if (this.isNullable) return null; else return DateTime.Now; } }

Here's what I found out you don't change. The ValueType property always returns typeof(DateTime). If you change this to typeof(DateTime?), what ends up happening is, if you bind to a DataTable, it attempts to insert an actual null into the table. Because (for reasons I have yet to believe necessary) null and DBNull are two completely separate and incompatible things, this fails. Apparently, by leaving the value type as non-nullable, a null value will get translated appropriately in the binding.

We're not quite done yet. In the CalendarEditingControl class, the EditingControlFormattedValue property needs to be updated:

public object EditingControlFormattedValue {
    get {
        if (this.ShowCheckBox && !this.Checked) {
            return String.Empty;
        } else {
            if (this.Format == DateTimePickerFormat.Custom) {
                return this.Value.ToString();
            } else {
                return this.Value.ToShortDateString();
            }
        }
    }
    set {
        string newValue = value as string;
        if (!String.IsNullOrEmpty(newValue)) {
            this.Value = DateTime.Parse(newValue);
        } else if (this.ShowCheckBox) {
            this.Checked = false;
        }
    }
}

And presto, a checkable, nullable DateTimePicker column that works in a DataGridView bound to a DataTable.

2009-09-06

Bandwidth for August

Totals are 55.07GB in, 6.50GB out, total 61.57GB.

This month, numbers went way up, thanks to biting the bullet and activating my Netflix subscription and streaming movies to my Xbox 360. On the 1st, we watched about four hours of video (one feature-length movie, a shorter cartoon movie, and a kid's video), and on the 2nd, we watched close to eight hours (four movies and two TV episodes), all standard-definition. I don't recall all of what we watched on the 8th, but it resulted in even more bandwidth used.

Just taking the numbers for the highest usage day, it does show an interesting point. If I were to stream eight hours plus of standard-def video every day (resulting in 6.25GB of use, including random web surfing and other internet activity that day) for the entire month (31 days max), that still leaves me with 56GB before I hit the 250GB cap. Up to this point, my highest usage month was under 38GB, and the average was 26.85GB.

2009-08-29

ServiceMagic.com, or SpamMagic?

This summer, we had a problem with water in the basement. With our son in the hospital, it didn't exactly take a high priority, but eventually we had to get it taken care of, as it was bringing in a lot of sediment and mildew (and mold is one of my biggest allergy-triggers). I realized, though, that for a problem like this, where I had what appeared to be water seeping into the basement from an unknown source (was it coming in from underground, a broken pipe, or a leaky vent to the outside?), I had no idea who to call. That's when someone directed me to the web site, ServiceMagic.com. "Get Matched to Top-Rated Service Professionals", their site proclaims.

So, I created an account and described my problem. I thought this would be a good opportunity to use my brand new Google Voice phone number, too (720-23-YAKKO :D ), as I wouldn't have to provide my cell or home telephone number, just in case. As you will see, this turned out to be quite a blessing.

I got a call from a company to come out and take a look. Unfortunately (or fortunately), they had one time available that week that didn't work for me, and the next available time was several weeks away. I went ahead and scheduled that other time. I then called my insurance agent, and from them I got a list of contractors they used. (I also checked to see if my homeowner's policy would cover this water damage, which, alas, it didn't.) I called one of their "preferred contractors", and they were able to schedule a time in the much more immediate future.

In the meantime, I got another call from the contractor that ServiceMagic referred to me, asking again if I wanted the time that wouldn't work for me. (Note that these calls were going to my Google Voice number, so they would leave a message and I would call them back.) The contact number was very different, leading me to believe that I first was contacted by a scheduling service before and the local contractor later. Whether the scheduler was a part of ServiceMagic, the contractor, or some third-party go-between, I'm not sure. But in any case, I again verified my appointment for several weeks out.

The contractor I contacted through my insurance agent came out and diagnosed the problem as a leaky drainage pan with the air conditioner. We then scheduled an appointment with the HVAC company to come out and fix that (and reconsidered an annual maintenance contract with them), and the leak was taken care of. (It actually cost us twice as much more for the contractor to diagnose the problem, than it did for the HVAC guys to fix it.) Problem solved, I then called the other contractor — the one referred to me by ServiceMagic — and canceled my appointment.

The contractor has since contacted me a couple more times (once by phone and once in a letter), and ServiceMagic once (e-mail), about that appointment directly. Basically, the nature of the messages have been "if you reconsider, we can still help you". Nothing outrageous, and nothing to get too upset about.

What has been extremely annoying have been the completely unsolicited calls I've received, totally unrelated to this project. I had three calls attempting to schedule a time to install carbon monoxide detectors in my basement (one claiming it was required to meet compliance for rental properties — my home is not a rental; and anyway, I already have a CO alarm in my basement), and one was a plumber that was, as his message said, "calling to verify our appointment in a half an hour" (I of course had made no such appointment).

Again, fortunately, this is all going to my Google Voice phone number, so I'm not bothered at work or at home by these phone calls for random services I did not order or do not want. However, it still bothers me that ServiceMagic.com seems to be giving out my personal information to contractors that have nothing to do with me, without my authorization (I did actually click an OK before the first contractor called me). So far, I only have to listen to and ignore their messages; heaven help them if someone comes to my doorstep claiming they have an appointment.

And how do I know this is coming from ServiceMagic? Well, not only are these contractor-type phone calls that came in after I requested some kind of home service, but they are coming to a phone number that I had never before used or published. Could Google Voice (or, its former name, "Grand Central") have obtained this phone number from a pool of "recycled" numbers from someone who just happened to be a rental property owner who hired a plumber this month? Maybe, but that's an awfully large coincidence. Could my information have leaked out not from ServiceMagic, but from the contractor they worked with or some third party in between (such as the "scheduling agent" who first contacted me, whom I am not certain about)? Again, possibly; but that would reveal a potential danger in the whole process of obtaining a contractor through ServiceMagic.com anyway.

I have since changed my personal information on my ServiceMagic.com account to something more or less random. I most certainly will not be using them again, and I would encourage everyone else to avoid them as well.