71 Days Until Next Sunrise, 16,500 Prophylactics to the Rescue

From the “[scientist are people too][1]” department:

> One of the last shipments to a U.S. research base in Antarctica before the onset of winter darkness was a year’s supply of condoms… [that] would be made available, free of charge, to staff throughout the year to avoid the potential embarrassment of having to buy them.

I imagine it’s _still_ going to be uncomfortable the day after.

[1]:http://www.msnbc.msn.com/id/25054286/?GT1=43001

Apple's iPhone 3G Not So Cheap Afterall, AT&T Gets The Skins

Today saw the announcement of the new 3G [iPhone][1] from [Apple][2]. It looks very promissing and the price cut to $199 USD sounds like a really good price point to get more people to jump on the iPhone bandwagon. Afterall, this thing is [twice as fast][3], but [half the cost][4].

[1]: http://www.apple.com/iphone/ “The new Apple iPhone 3G”
[2]: http://www.apple.com/
[3]: http://www.apple.com/iphone/features/wireless.html
[4]: http://www.apple.com/iphone/gallery/ads/hallway/

What was not mentioned in Job’s keynote was [AT&T's iPhone _3G_ plan pricing][5]. And, why should they; AT&T and Apple have severed their revenue sharing deal they had with the initial iPhone release one year ago. However, don’t let the $200 discount on a new iPhone fool you. Let’s do some math…

The old iPhone plans started at $59.99/mo. If you signed a two year contract you would pay roughly $1,440 over the life of the contract. The new plans, according to the press release, start at $39.99 voice plan PLUS $30 per month for unlimited data. Now you’re looking at $1,680 over the live of the contract. That’s $240 _more_ (per contract) than the previous iPhone plans. Still feel like you’re getting a good deal? You just spent $240 to save $200. No word on family plan pricing or if they have family plans for the iPhone.

[5]:http://www.att.com/gen/press-room?pid=4800&cdvn=news&newsarticleid=25791

Will I get one? Probably. :\

**Update**: Looks like there’s [no special treatment for new iPhone users][6] and the standard plans and rates apply. It makes it a little easier to swallow a family plan at $59.99/mo for two lines of service but I have yet to find out if the family plan is available for the iPhone 3G. Interesting thing I found looking for [answers][7] to the question [_What plans are available for the iPhone?_][8] I Suppose they should update this if it’s not true.

**Update #2**: I just spoke with a Karen George in AT&T customer service and from what she told me the iPhone plan is the same, just going up in price $10/mo (this kind of contradicts the press release though). She also confirmed that the family plans _are_ available for the new iPhone. I asked if the new iPhone plans will still include the 200 text messages and she said yes. I also asked if the MEdia(TM) Max Unlimited data plan (which, at $35/mo includes unlimited data and texts, seems to be a better deal) would be available for the iPhone and she said yes. I’m a little skeptical about what some random customer service rep says at this point, so take it with a grain of salt. Especially when she tells me they (customer service?) are not being told ANYthing about the details of the new iPhone and/or plans.

[6]:http://gizmodo.com/5014764/iphone-3g-pricing-and-activation-details-30-unlimited-data-activated-in-store-only
[7]:http://www.wireless.att.com/answer-center/main.jsp
[8]:http://www.wireless.att.com/answer-center/main.jsp?t=solutionTab&ft=searchTab&ps=solutionPanels&locale=en_US&_dyncharset=UTF-8&solutionId=60986&isSrch=Yes

**NB**: If you’re wondering about the ‘AT&T Gets the Skins’ bit of the title, I’m referring to the [San Bromista Cat Ranch][7].

[7]: http://www.porcinefund.com/catranch/catranchx.htm

Amazon is Down

It appears that [Amazon][1] is having some issues. Their site has been down for well over an hour now. I can’t imagine how much money this kind of downtime has on a company as large as Amazon. Maybe in the millions by now.

[1]:http://www.amazon.com

![Amazon is down](/wp-content/uploads/2008/06/amazon-is-down.png)

This screen shot was grabbed at approximately 12:10PM PST on 06 June 2008. About 30 minutes ago I was simply getting a “HTTP/1.1 Service Unavailable.”

**Update**: I did manage to get the home page at about 12:22PM PST, but after clicking a link, I get the same “We’re Sorry!” page.

[Techcrunch][2] has a post on it as well with a note from Amazon PR (if you can call it a note).

[2]:http://www.techcrunch.com/2006/08/21/amazon-is-down/trackback/

**Update #2**: [Cnet][3] speculates Amazon could potentially have missed out on close to $1.4M USD in the 90 or so minutes they were offline.

[3]:http://news.cnet.com/8301-10784_3-9962010-7.html

> Based on last quarter’s revenue of $4.13 billion globally, a full-scale global outage would cost Amazon more than $31,000 per minute on average. For North America, it would be more than $16,000 per minute. (To be fair, those figures don’t include revenue from other sources such as search or contextual advertisements or Amazon Web Services.)

I feel bad for the poor schmucks who had to sweat this one out.

MPAA Accuses University Laser Printer of Piracy, Printer Goes on Toner Binge

Is it really that surprising that M.P.A.A, R.I.A.A and others use flawed methods to determine who violates Copyright laws? These are some of the same companies that want to charge you more for a song purchased over a wireless network versus from a computer. Why? Just because. Assholes.

> The researchers rigged the software agents to implicate three laserjet printers, which were then accused in takedown letters by the M.P.A.A. of downloading copies of “Iron Man” and the latest Indiana Jones film.

[The Inexact Science Behind DMCA Takedown Notices - Bits][1]

[1]:http://bits.blogs.nytimes.com/2008/06/05/the-inexact-science-behind-dmca-takedown-notices/

How-not-to: Normalize Your Data

**Disclaimer**: *I am not a database architect nor a certified database programmer. I might not be database guru, but I have been working with SQL Server long enough to know what works and what doesn’t.*

I’m not a database programmer per say, but I’m expected to be one at work (even though I’m a code jockey). I don’t mind it most of the time, but there are times when it becomes really frustrating. Especially when you come across some schema that is poorly implemented. Normalization is a double edged sword. On one side, normalization is good for data integrity. On the other, it becomes a pain in the arse to get at your data. There are ways around the later (Views, de-normalized tables), but, a pain in the arse it still is. The one thing that *really* bugs me is normalization done wrong. We use Microsoft SQL server at work, but this should apply to any relational database.

Recently, at my day job, I’ve been working on a particular project which involved consuming data from a third party for use in a .NET web service. We were already consuming data from this vendor but they recently changed the schema (and data) and are deprecating the old format. The new feed is basically a complete dump of their data **and** schema. Not *all* of their data, just data we subscribe to (about 1M records total). Instead of modifying our import process to accommodate the current (old) schema (which would have been a huge effort on our part), we just created a new import process and modified the web service.

After working with this new schema for a couple weeks, I have come to the conclusion that, well, it’s crap. First and foremost, it’s not normalized properly. If you have an column in a table that looks like it should be a foreign key, then by all means, make it so. For example, say I have a table called Widgets with several columns. One of those columns is called WidgetTypeId and another called WidgetTypeDisplayName. There’s a prime candidate for another table. I don’t care if you only have two WidgetTypes, it belongs in its own table. Here’s why: When selecting records out of the table and filtering on WidgetTypeDisplayName, it gets really expensive. Sure, you could add an index on that column, but it still would be slower compared to joining on a WidgetType table. If I had ten million widgets and only 100 widget types, I’m only filtering 100 records vs. ten million.

What about filtering on the WidgetTypeId column? **BZZZZZ**. Where did you get that ID? Did you select it from the same table? Guess what, same difference. Maybe you hard-coded it in the query. That’s not smart either, especially if you have multiple environments that could possibly be out of sync (i.e. WidgetTypeId 4 in development might not be associated to the same thing in production). Put it in it’s own table.

I ran into this several times with this new schema at work and it was a complete pain. For one thing, in development, the queries were always relatively quick to return. In production, however, not the same. This database sat on the same server as another production database so there was more load on it. Enough to make the queries perform poorly. On the order of 10 to 40 seconds to return data in some cases. That’s not good. My solution: create a single de-normalized table (for some reason, we don’t use views) of commonly used data points. The result was millisecond returns and simple queries. Furthermore, instead of filtering/joining on tables with half a million records, it now filters on less than 20 thousand, *properly indexed* records.