A quick non-programming related comment… anyone who’s been blessed with children in the past 10 years surely knows about the Baby Einstein empire. Long story short, they claimed that watching TV could actually help your baby learn. Of course this is not true, and when studies came out proving that it actually hindered childrens’ language skills, Disney got pressured into offering refunds for all Baby Einstein DVDs.

The controversy remains at a simmer, because the original creator of Baby Einstein is trying to redeem his name by challenging the study. It’s a mildly interesting story, but here’s the take-home point:

In fact, I would argue that the Baby Einstein culture has been harmful, contributing to (while feeding off of) the over-parenting that has marked the most recent generation. It can be argued that parents should worry less about trying to force the intellectual development of their very young children, and just relax and give them more quality time and attention.

Turn off the TV and play with your kids! It’s good for them, and gives you an excuse to be childish on a daily basis.

After getting an account, you can log in at http://sql.azure.com.

They provide a very basic web interface lets you set up the firewalls or create new databases, but that’s about it. To do anything interesting you have to connect via code or the management studio.

The most recent version of MS SQL Server Management Studio (2008 R2) supports connecting to Azure. It’s possible to get earlier versions to connect, but 2008 R2 also ships with an Import/Export wizard that is supposed to support migrating data to Azure, but I have had little success with that. The open source Azure Migration Wizard has been far more reliable at moving data and informing you of any issues you’ll have migrating to the cloud.

When you connect via management studio the standard “object browser” does not work, but you can connect via a new query window:

Then specify the connection parameters, and under “options” select the database you want to connect to:

The first time you’ll attempt to connect chances are you’ll get an access denied error. SQL Azure’s firewall defaults to blocking all incoming traffic, so before you connect you have to open access to your current IP address, or the range of IP’s for your location. This is easy enough to do from your account at http://sql.azure.com. If you still cannot connect check your local firewall and ensure that the TCP 1433 is not blocked for outgoing connections (this is the port used by Azure).

Once connected you have a standard query window in Management Studio, and you can perform virtually any T-SQL function. With a few restrictions, Azure is a standard SQL server database, and very simple to work with.

AWS recently announced a new service: Spot Instances.

Today we launched a new option for acquiring Amazon EC2 Compute resources: Spot Instances. Using this option, customers bid any price they like on unused Amazon EC2 capacity and run those instances for as long their bid exceeds the current “Spot Price.” Spot Instances are ideal for tasks that can be flexible as to when they start and stop. This gives our customers an exciting new approach to IT cost management.

The central concept in this new option is that of the Spot Price, which we determine based on current supply and demand and will fluctuate periodically. If the maximum price a customer has bid exceeds the current Spot Price then their instances will be run, priced at the current Spot Price. If the Spot Price rises above the customer’s bid, their instances will be terminated and restarted (if the customer wants it restarted at all) when the Spot Price falls below the customer’s bid. This gives customers exact control over the maximum cost they are incurring for their workloads, and often will provide them with substantial savings. It is important to note that customers will pay only the existing Spot Price; the maximum price just specifies how much a customer is willing to pay for capacity as the Spot Price changes.

Interestingly, this isn’t a technological innovation but is a major business innovation. The instances they are offering are the same instances offered in the tried and true AWS EC2 system. However, now they can offer these instances at a (presumed) lower price with the caveat that you may lose your instance if the market price for that compute power goes above what you are willing to pay for it.

What strikes me about this is the amazing efficiency of the system. Amazon could (in theory) rent out 100% of their aalable computing power through the EC2/spot instance system. If Amazon needs the computer power back, such as during the Christmas shopping season, they can raise the spot price and reclaim many of the resources. If a third party needs more compute power than is available, they increase their bid and drive up the price.

It should be interesting to see applications built around this model. Protein folding is the obvios example, but I can also see this as very useful for graphics rendering or even mundane tasks such as sending out newsletters.

If you haven’t already heard, Yahoo finally gave in to Microsoft’s advances, and Bing will be the new search provider on Yahoo peroperties:

In a deal that presages its departure from a market it helped pioneer, Yahoo will scrap its own efforts to best Google in search and instead rely on Microsoft’s recently debuted Bing search engine. Ads placed next to those search results would be served up not by Yahoo’s ad platform, dubbed Panama, but by a Microsoft technology called AdCenter. Yahoo CEO Carol Bartz “is essentially giving up on search,” says Danny Sullivan, editor of Search Engine Land.

According to Danny’s twitter feed, even though this is “only” a 10 year deal, Yahoo won’t be maintaining its current search engine at all during that time, so it is in effect dead. Once the deaql expires Yahoo won’t be able to “go back” to a Yahoo search algorithm.

How does this affect you? If you run a web site take the tiem today to look at your referer stats. Where are your visitors coming from? Chances are most are from Google, but you may have a sizable chuck of traffic coming from Yahoo search. Do you have any traffic coming from Bing? How is your SEO for Yahoo search vs. Bing? Once all the regulatory red tape is complete Yahoo search is effectively gone, and all of those Yahoo users will be using Bing search instead.

The weather’s too good here for a more in-depth blog post, so today I just have a a few of the better links I’ve run across recently:

If you do any serious work in PHP, you need to familiarize yourself with a framework if you haven’t developed one yourself. This article on Discussing PHP Frameworks is a fair introduction to the major frameworks – no in-depth commentary as to which is best, but a good starting point if you’re not familiar with them already.

Never underestimate the power of fonts in your web design, particularly when choosing a logo.And speaking of fonts, if you’re sick of the nine “web safe” fonts we’ve been stuck with for ages, you may want to experiment with the TypeSelect project from MIT.

If you’re hiring a designer, you are using a contract, right? If not, no more excuses.

A free online drag and drop flash editor?! Try out http://www.wix.com/

One of the more troublesome projects I’ve been working in is adding signature capture + MSR to a desktop application. One of the hardware pieces we added support for is the Ingenico 6770. The good news is that with the economic downturn you can get them for a steal on eBay. But your customers may be loathe to spend what these cost new…

Regardless, here are my initial observations:

  • While you may be able to get this working in straight .NET code with the Microsoft PointOfService libraries – it isn’t worth it. Your customers will need to install the driver software from Ingenico to get the device working at all, and that software installs some ActiveX objects that expose far more reliable and powerful API methods.
  • Yes, you heard me correctly – ActiveX controls. Ingenico seriously needs to work on improving their API.
  • Ingenico also does not supply any of their SDKs directly on their web site. You will need to contact the company via phone or email and ask for a link to the SDK’s. Once you do so be sure to get both the SDK for the product you are working on, along with the “Signature SDK.” They do not come in one package or location.
  • Once you get the SDKs and add them to your project most parts are fairly simple. The only major problem I had was with extracting the signature from the library into a string I could save to the database, so it could be read back and displayed to the user later. It turns out that while the regular SDK documents never mentioned it, the signature SDK did mention that you must set BinaryConversion to OPOS_BC_NIBBLE in order to get this working.
  • SDK did not say what the value for OPOS_BC_NIBBLE is…. I’ll tell you it’s 1.

Microsoft has finally announced the pricing model for Windows Azure (Confirming Commercial Availability and Announcing Business Model). Azure has generated a lot of buzz among Windows or .NET developers but one of the major unknown factors was pricing. While it’s easy to develop a test case against the Azure “beta” now, you’d be mad to base any major business changes without knowing the price yet. While there are several other unknowns to grapple with (SLA, availability, reliability…) at least this question has been answered. In short:

Upon commercial availability we will offer Windows Azure through a consumption-based pricing model, allowing partners and customers to pay only for the services that they consume.

Windows Azure:

  • Compute @ $0.12 / hour
  • Storage @ $0.15 / GB stored
  • Storage Transactions @ $0.01 / 10K
SQL Azure:

  • Web Edition – Up to 1 GB relational database @ $9.99
  • Business Edition – Up to 10 GB relational database @ $99.99
.NET Services:

  • Messages @ $0.15/100K message operations , including Service Bus messages and Access Control tokens

Bandwidth across all three services will be charged at $0.10 in / $0.15 out / GB

Microsoft’s major competitors in the “Cloud” marketplace are Amazon S3 and the Google App Engine.

Microsoft’s major advantage over The Google App Engine is the relative ease by which you can integrate a traditional desktop integration with an app or database hosted online. The Google App Engine is an online-only service, and you are limited only to programming in Java and Python. The pricing for the Google App Engine includes a free quota, but beyond that you must pay:

Resource Unit Unit cost
Outgoing Bandwidth gigabytes $0.12
Incoming Bandwidth gigabytes $0.10
CPU Time CPU hours $0.10
Stored Data gigabytes per month $0.15
Recipients Emailed recipients $0.0001

Amazon S3 is the major established player in this market. Amazon started offering S3 about three years ago, and many very successful businesses (Twitter, for one) use S3 to host files, images, or increase performance. For simple file storage, they cannot be beat. However, it is not an application or relational database service. It is a very cheap and efficient means to store files. Their pricing model is as follows:

* $0.150 per GB – first 50 TB / month of storage used
* $0.140 per GB – next 50 TB / month of storage used
* $0.130 per GB – next 400 TB /month of storage used
* $0.120 per GB – storage used / month over 500 TB

Data Transfer
* $0.100 per GB – all data transfer in

* $0.170 per GB – first 10 TB / month data transfer out
* $0.130 per GB – next 40 TB / month data transfer out
* $0.110 per GB – next 100 TB / month data transfer out
* $0.100 per GB – data transfer out / month over 150 TB

* $0.01 per 1,000 PUT, COPY, POST, or LIST requests
* $0.01 per 10,000 GET and all other requests*

The choice of service largely depends on the business needs of your application (pricing is very similar), but it’s good to see the competition from three major players in this space.

The Google calendar API is at its root very powerful, but you have not worked with XML/HTTP, cookies or authentication in the past learning the raw API can be  daunting. Fortunately Google provides a free .NET library, so you can interact with a user’s Google Calendar using intuitive .NET classes and methods.

To get started, download the .NET client API from here:


Add references to the Google libraries in your project, and use or import these in your code

using Google.GData.Client;
using Google.GData.Calendar;
using Google.GData.Extensions;

The library provides a “Service” class to handle connecting to and authenticating with Google:

Service service = new Service("cl", "companyName-appName-1");
service.setUserCredentials("useremail@userdomain.com", "userpassword");

You then execute a query on the service. The query will return a list of AtomEntry objects, which are handy wrappers for standard RSS Atom entries. For example, this returns a list of all items in the user’s calendar:

FeedQuery query = new FeedQuery();
query.Uri = new 
AtomFeed calFeed = service.Query(query);
foreach (AtomEntry entry in calFeed.Entries)

There are similar methods for adding, updating, or deleting calendar items. For example:

AtomPerson author = new AtomPerson(AtomPersonType.Author);
author.Email = "useremail@userdomain.com";
entry.Title.Text = "Lunch at Bully's";
entry.Content.Content = "Eat lunch with Fred";
When eventTimes = new When();
eventTimes.StartTime = DateTime.Parse("7/13/2009 12:00:00 PM");
eventTimes.EndTime = DateTime.Parse("7/13/2009 1:00:00 PM");
Uri postUri = new Uri("http://www.google.com/calendar/feeds/useremail@userdomain.com/private/full");
// Send the request and receive the response:
AtomEntry insertedEntry = service.Insert(postUri, entry);

Google provides extensive documentation and sample code, in a dazzling variety of languages. Even Objective-C for you Mac developers.

As with any scenario where the data can be updated from multiple locations, your application will have to implement synchonization logic. The items you upload one day could be deleted from the web or from the user’s iPhone before your next sync. But fortunately the sometimes daunting task of communicating with the remote service is trivial in this case.

  1. People like graphs. A graph or a chart can show exactly the same data as a table, but in a far more efficient and human-friendly manner. HTML is great at displaying tabled but not at charts, but now we have a very simple jQuery plugin that will generate charts and graphs directly from HTML tables. Just install the jQuery visualize plugin and call a table’s .visialize() method, and viola – instant charts. Yes, it’s really that easy. Put it on one of your sites today, tell your boss it took hours, and take a long lunch instead.
  2. Need to do a screen capture of a web page, but away from your regular computer? With Aviary’s Talon, you can do a screen capture of any web page directly from a web browser. I can see using this is you need to do screen captures from a portable device like an iPhone or netbook PC, or if you want to do a screen capture for a different screen resolution.
  3. Ruby on Rails developers should really check out LESS – an “extension” to CSS that adds what CSS should have such as variables.
  4. Anemone is a free, multi-threaded Ruby web spider framework from Chris Kite, which greatly simplifies your web spiders. For example:
require 'anemone'

Anemone.crawl("http://www.example.com/") do |anemone|
  anemone.on_every_page do |page|
    puts page.url

If you are tasked with integrating credit card “swiping” into a .NET application – I strongly suggest starting with the Magnetic Swipe Readers (MSR) from MagTek. While your mileage may vary, this is the one product I have been able to integrate with my application easily, and without any additional libraries or cumbersome third party libraries. That is, provided you remember two things:

  1. Purchase a HID (Human Interface Compliant) version of the MSR – NOT a keyboard emulation product. And
  2. Download the excellent HIDLibrary from Mike Obrian, which provides all the code you’ll need for inetgrating the reader into your .NET application.

There are no third party libraries or software needed. Windows should recognize the reader as a HID device when it is plugged in, and the HIDLibrary code should be able to interface with your reader. There are even samples and classes specific to MagTek MSRs on the library download page.

You will need to do a little research into the data format for credit card track data – data comes in a long binary array that must be converted toa  string, then parsed to separate the tracks and account number data. Here is a document describing the data format for credit card tracks to get you started.

May 2016
« Jan    



Get every new post delivered to your Inbox.