iOS Development with .NET

Three years ago I blogged about the “iPhone bringing the Internet to your pocket”.  And now we have the iPad, the target device for most innovation in tablet apps.

If, like me, you’re keen to build iOS apps but are primarily a Microsoft developer and are daunted by the learning curve of a whole new platform, then MonoTouch might be for you: http://monotouch.net/

MonoTouch is a bridge between .NET and the native iOS API called CocoaTouch.  It exposes the CocoaTouch as a .NET library so you can write code in C# instead of Objective-C. This gives you access to all the native CocoaTouch GUI widgets and a whole bunch of regular .NET libraries.


This is really neat!  Have a look at the Hello World tutorial to get a better feel of MonoTouch: http://monotouch.net/Tutorials/MonoDevelop_HelloWorld

Tips & Tools

Dealing with “Server Not Found” Errors and Flaky DNS Servers

I get a lot of random “Server Not Found” errors while browsing from my home connection:


In Chrome, the error is:

The server at http://www.google.com can’t be found, because the DNS lookup failed. DNS is the network service that translates a website’s name to its Internet address. This error is most often caused by having no connection to the Internet or a misconfigured network. It can also be caused by an unresponsive DNS server or a firewall preventing Google Chrome from accessing the network.

After a lot of frustration and some digging around I discovered that this was caused by my ISP’s flaky DNS servers.

It turns out that our friend Google has a free service called Google Public DNS that I can use in place of my ISP’s flaky servers:


There are actually more legitimate uses for Google Public DNS:


Now ever so often my ISP will terminate my session and I have to log in via a web interface, which doesn’t come up properly if I’m using Google’s public DNS servers.  So then I have to switch my ISP’s DNS servers:


All this switching can be quite a pain, but it can be automated. There is a command line tool called netsh.exe that can be used to modify the network configuration.

So I created two batch files, one for switching to Google’s DNS servers…

netsh interface ip set dns "Wireless Network Connection 6" static primary
netsh interface ip add dns "Wireless Network Connection 6"

…and one for switching back to my ISPs DNS servers…

netsh interface ip set dns "Wireless Network Connection 6" source=dhcp
Note that you would need to change “Wireless Network Connection 6” in the commands above to whatever your connection is called.


Hope you find this useful!
Trends & Strategy

Mobile Strategy: Why You Shouldn’t Ignore Windows Phone

In case you missed it, Microsoft and Nokia announced a strategic mobile partnership in February a few days after Nokia CEO Elop’s scathing memo to employees.

Some key points to note:

  • Nokia will adopt Windows Phone as its primary smartphone strategy, innovating on top of the platform in areas such as imaging, where Nokia is a market leader.
  • Nokia will help drive and define the future of Windows Phone. Nokia will contribute its expertise on hardware design, language support, and help bring Windows Phone to a larger range of price points, market segments and geographies.
  • Nokia’s extensive operator billing agreements will make it easier for consumers to purchase Nokia Windows Phone services in countries where credit-card use is low.

And even though Android phones topped the list of new devices sold in Q4 2011, Symbian is a close second:


(source: http://en.wikipedia.org/wiki/Smartphone)

The fact is that the Windows Phone Metro UI offers a very slick user experience.  And in light of the Nokia/Microsoft partnership, I expect Windows Phone share to rise significantly as Symbian/Nokia users move to Windows Phone, especially in the mid-range and low-end markets.

Want to get a head start in developing applications for Windows Phone? My company Infragistics recently announced a Community Technology Preview of data visualization controls for Windows Phone.  These let you create powerful mobile dashboards using maps, high performance charts, gauges, sliders and even barcodes, that integrate beautifully with the Windows Phone Metro UI design language.

You can get the samples and download the CTP for free from here: http://www.infragistics.com/innovations/windows-phone.aspx#WindowsPhone7


We will also be releasing mobile controls for iOS and Android soon so watch this space!

Trends & Strategy

Business Technology Trend: QR Codes for Simple and Effective Augmented Reality

QR codes are a simple but brilliant technology. They are a pictorial representation of data (like a traditional barcode) but can contain (or encode) a richer array of data  – a URL, text, SMS, email address, phone number or even a business card. And they are popping up everywhere. For example…

You can install Firefox for mobile by scanning a QR code on the page for Mozilla’s showcase application for Firefox mobile (Spark):


You use a freely available QR code reader application that uses the phone’s camera to take a picture of the QR code and then take appropriate action, in this case install the Firefox app on your phone.

The Google Groups on the web lets you go to the mobile Groups application by scanning a QR code:


If you are a BlackBerry user, you can display your unique QR code on your phone that friends can scan to add you to their friends list:


While in Bangalore recently, I noticed a McDonald’s billboard in Bangalore with a large mysterious QR code on it. This is something advertisers have been doing for a while:


(via Mashable)

Google trends confirms the growing popularity of QR codes:


So why are they becoming so popular as a tool to engage users in the digital economy? Because they simple, yet powerful. They have the following characteristics:

·         Pretty – they are a type of digital art

·         Mysterious – evoking curiosity and intrigue

·         Convenient – eliminate typing, clicking etc. and make like easy for the user

·         Provide Instant Gratification – there’s something really satisfying about taking a picture of something and having your phone automatically take some action

·         Versatile – have a large number of uses

If you think about it, QR codes in the “real world” enhance the user’s experience of the real world by augmenting it with digital information.  Ultimately then, QR codes are a simple and effective way to achieve augmented reality.

For example, if I come across an interesting web page, I bookmark it or save it for later reading using a tool like Read it Later.  QR codes can be used in the same way, as bookmarks for the real world.  Imagine walking past a restaurant in your neighborhood. If it had a QR code displayed prominently, you could scan it for checking out later. What would be even nicer is if the QR code linked to a website (like JustEat) that allowed you to order takeaway.  Fascinated? Google “innovative uses of qr codes” to discover more.

If you’re wondering how you can use QR codes into your own business, check out my company Infragistics’ QR code generator here: http://labs.infragistics.com/silverlightdv/2010.3/#/Samples/Barcode/BarcodeQRCode.

Talks, User Experience

My Talk at India HCI 2011: “A Pragmatic View of UX Driven Development”

Thanks to the India HCI 2011 organisers for inviting me to speak at this year’s conference in Bangalore.

It was great to meet and listen to thought leaders from India and around the world in this space.  Of particular interest were:

  • research into AR (Augmented Reality) by HITLabNZ
  • eye-tracking technology from SMI and Tobii
  • the work being done on bottom-of-pyramid empowerment through mobile by Microsoft Research
  • design-thinking approach to building exchanges for virtual economies (MMORPG “money”, frequent flier miles, credit card reward points etc.) by Cognizant Technology

I talked about how using UI toolkits that a) have broad and deep functionality exposed by a powerful design-time interface and b) that are “pattern aware” is a winning strategy for UX driven development since they:

  • minimise the disconnect between the customer, UX practictioner and developer by enabling the easy creation of high-fidelity prototypes
  • effectively address the challenges of time, budget, developer ability and the growing need to target multiple devices

As promised here are the slides:

User Experience

Don’t Tell Me, Show Me!

It turns out that one of the key evolutionary adaptations that sets human being apart is the ability to simulate experiences.  According to psychologist Dan Gilbert, in his fascinating talk on what makes us happy, ‘it’s right up there with standing upright, language and opposable thumbs as one of the things that got our species out of the trees and into the shopping mall.’  It’s because of this experience simulator that Ben & Jerry’s don’t have a “liver & onion” ice cream flavour.  And it’s not because they made some up and tried it, it’s because we can simulate the experience in our heads while sitting in our armchairs.

It also turns out that our experience simulator is flawed.  It works well for some types of experiences and not so well for others.  Software is notorious for being firmly in the “not so well” category as illustrated by this classic cartoon:

I’m not a psychologist but I think it’s safe to say that software is simply too complex to be adequately simulated by the brain just by using words.  If you think about it a software requirements specification is just that – a simulation of the actual software to be built using words.  So if it’s so inadequate as a tool to simulate how a piece of software will function, then why has it been so popular as the primary means of documenting and communicating requirements?

In my experience, one reason for the popularity of the SRS is to constrain scope or to put it more bluntly, to cover one’s behind.  The team or organisation building the software has an interest in constraining scope because often attached to the scope are time and resource commitments.  If at a later stage the customer wants changes, then the SRS is used as a tool to justify more resources.  “Sorry, that wasn’t in the original spec, we’re going to have to charge you more /it’s going to take longer / we need more developers.”

But I think the primary reason is that software emerged from electronics engineering and so naturally electronics engineers tried to apply the the engineering principles and methods that worked so well for them.  As a case in point, consider the name of the industry standard for a software requirements specification document: IEEE 830.  IEEE stands for Instution of Electrical and Electronics Engineers.  Wait a minute?  What are electrical and electronics engineers doing defining how software should be specified?  I think they should stick to defining things that are, well, about electrical and electronics engineering.  Like WiFi: IEEE 802.11.  But the truth about the nature of software emerged over time.  Software is as much art as it is engineering.  It’s as much a creative endeavour as it is a scientific one.  There are aesthetics and other human factors involved just as there are when building a house, another activity that combines art and engineering.

Because software is a human invention, it isn’t bound by the laws of physics or chemistry.  It is limited only by the bounds of human imagination.  That makes it a field that evolves at a furious pace, constantly entering into unexplored territory and with limitless opportunities to innovate.  All this makes it a very exciting area to work in but it also means that there are a lot of unknowns both in the problem and solution spaces.  In other words, the customer rarely has a clear idea of what he wants (“I know what I want when I see it.”), and the business analyst or architect rarely has a clear solution.

In a recent episode of the television show Mythbusters, President Obama  asked the Mythbusters Adam Savage and Jamie Hyneman to revisit (spoiler alert!) the previously busted “Archimedes’ Death Ray” myth that Archimedes constructed a death ray by reflecting sunlight onto, and thus igniting, Roman vessels.  A key challenge in the revisit was to design an aiming mechanism that would allow 500 people to aim  at a single point their individual rays reflected off mirrors.  Adam and Jamie both tested ideas in small scale.  While experimenting with his idea, Adam realised that the idea itself was not feasible.  But in process of experimenting with it and “seeing it”, he had a an “Eureka moment” which led to a much more superior design, one that was eventually used in the actual full-scale experiment.  ‘Failure is always an option’ is one of Adam Savage’s favourite sayings and the process of designing the aiming mechanism illustrates why.  At the end of the episode, Jamie Hyneman says, ‘When we experiment, when we try things, and we fail, we start to ask why… And that’s when we learn.‘  This learning through experimenting and failing is typical in software development.

So how can you efficiently deliver what the customer wants and at the same time facilitate experimentation and learning? Through mockups, prototypes and iterative development. All these techniques cater for the inherent complexity of software, the power of visualisation and the usefulness of learning through experimenting.

Here are the various techniques I’ve discussed so far on a heatmap showing fidelity vs. ease of creation.

Mockups allow the customer to effectively simulate what the end software is going to be.  Paper mockups are of course the simplest way to nut out a concept for a user interface.  There are lots of software tools for creating “functioning” mockups that simulate the final work software.  Some excellent ones are iRise and StetchFlow.

Prototypes take this one step further and actually include key working parts allowing the customer to play with the software and the development team to experiment with certain ideas, test them out and in the process refine the solution without a lot of investment.  The key type of tool that enables prototype creation is user interface controls that provide a lot of rich functionality out of the box and are easy to use (such as those made by my company Infragistics; the added benefit of using Infragistics controls is that you get a lot of UX (user experience) expertise, knowledge and investment baked into the controls, and so your prototypes automatically have rich UX that users/customers love.)  Prototypes are the sweet-spot of high fidelity and ease of creation.  Using rich UI controls that will be used in actual development means that there is no disconnect between what the user sees and what is finally delivered.  The gap between the problem and solution spaces is minimised with minimum effort.

Iterative development by incrementally adding functionality that is tested by the customer simultaneously conserves development efforts and satisfies customer requirements effectively.  Agile project management, test-driven development and continuous integration are some aspects that in my experience are incredibly effective in facilitating this.

I’d like to thank my favourite professor at university, Pj Radcliffe for arming me with these thoughts and tools very early on in my career.  Thanks Pj!

Archimedes constructed a death ray by reflecting sunlight onto, and thus igniting, Roman vessels.

User Experience

UX Lessons: Cleartrip

There is a plethora of flight booking websites in India: MakeMyTrip, Yatra, Ixigo, Ezeego etc. I have tended to mainly use MakeMyTrip.  That is, until now.

Enter Cleartrip which delivers, simply put, a great user experience.

Let me highlight some things I like.

Design, Layout & Navigation

  • The layout and navigation are simple, uncluttered and clear.  Good use of whitespace.  The visual design is obviously inspired by Google.  Who better to ape?
  • From and To cities are autocomplete textboxes so I can type the first few letters of the city name rather than having to select the city from a long list like with some other travel websites.  The autocomplete is smart so I can type the airport code instead:

UX Lesson: It’s easier to type when the user has to choose from lots of data.

Typing is easier than pointing and clicking.  That’s why I think Spotlight is so awesome and Desktop Search is the killer feature in Windows 7.


The site feels quite snappy (much faster than the other sites out there).

UX Lesson: Performance is a key part of the overall user experience.

‘Memory’, Ease of Booking & Account Creation

  • I was searching for some flights but got interrupted and when I went back to the site it remembered the details of my last search.  Note that I didn’t create an account – it just remembered.
  • I didn’t have to create an account to book my flights.  I just needed to provide the minimum information required to make a booking and pay for the flights and I received an email with my ticket details.
  • What happened next is great.  I received a separate email saying that an account had been created using the basic information I have provided at the time of booking.  I had the option to activate the account by providing a password and some additional details.  This is a great example of breaking down barriers to using your application.

UX Lesson: Be smart about the information you collect and remember it so that the user doesn’t have to retype it.

UX Lesson: Don’t force the user to create an account unless absolutely necessary.

Everyone hates creating accounts.  Nobody wants to keep track of yet another username and password.  So the best thing you can do is simply to let the user use an account he already has.  OpenID seems to be the de-facto way to achieve this and StackOverflow does an excellent job.  Kudos to Jeff Atwood.

Other Little Things That Make a Big Difference

  • The subject of the confirmation email is clear and meaningful: Ticket for Mumbai – New Delhi one-way flight — Trip ID XXXXXXXX.  This is great if I’m searching my mail in a hurry to print out the ticket or check flights details.  Much more useful than something like MakeMyTrip E-Ticket for Booking ID FLT0000XXXXXX
  • If I log in, I can see a list of upcoming trips and cancel tickets.  I can also apparently see the refund amount before I cancel but this didn’t work for me because of some fare code information not being updated or something.  But at least Cleartrip was good enough to give me a plausible reason for this feature not working as advertised and provide customer service contact details.

UX Lesson: UX is about paying attention to lots of little things that all combine together to make a big difference.

The user experience is my no means perfect.  For example there are some interesting innovations like Graphs but they didn’t work.  But the point is that the few things that stand out are enough for me to switch over to Cleartrip.  They show that they have put real thought into making the booking experience simple and hassle-free.  The cost for me to switch is minimal so I will.  But if something better comes along I’ll switch again.  So in order to be competitive and stay competitive it’s not enough just to design for UX upfront but instead to to view it a continuous process.   I therefore think that organisations that integrate UX design into the development process will win.


What is a Technical Evangelist?

It’s been a while since I’ve posted to this blog, so first things first, I’d like to bring you up to date.  After moving from Melbourne to London and spending a year there consulting to Earthport and working with Thomsons I have moved to India and joined Infragistics as a Technical Evangelist.

As someone whose bread and butter has been very closely tied to the delivery of production software for more than 10 years (as a developer, technical lead, architect, consultant and even an entrepreneur) this represents a shift in career path into to a professional function that is business focused.  What is a Technical Evangelist? is the inevitable question I am asked when I tell people what I do.  Wikipedia, the first stop for all of life’s pressing questions says,

A technical or technology evangelist is a person who attempts to build a critical mass of support for a given technology in order to establish it as a technical standard in a market that is subject to network effects.

Thanks to my colleague Tony Lombardo’s excellent insights, and the benefit of having spent a few month on the job I think I have a fairly good understanding this dynamic and exciting role with elements of sales, marketing and business and technology innovation.

As I see it, a Technical Evangelist’s role is to engage and inspire potential users of the technology.


This is done through various forms of communication.  In my case: presentations, demos, talks, proof-of-concepts, sample code, blogs, articles, phone calls, emails, social media and the occasional bit of technical support.  Because Infragistics primarily sells development software, I communicate with developers, architects, project managers, product owners , business analysts and senior managers.  I speak different languages to each user so in a day I could be talking to an architect about streaming realtime data to a browser-based application using push technologies and then to a manager about agile methodology and the value of UI prototyping.  I strive to put myself in each user’s shoes and understand what is important to them so I have a context in which to communicate effectively.  My background in software development, consulting and entrepreneurship helps me immensely in this.  Being a Technical Evangelist is also a continuous learning process.  Apart from keeping up to date with Infragistics products and trends in the .NET/Microsoft ecosystem, I make an effort to to aware of software, technology and business trends at large.


Because the ultimate goal is to sell, a Technical Evangelist could be viewed a salesperson, but as Tony points out, selling is almost like a side effect.  The reason for this is that an evangelist communicates not to sell, but to educate.  Tony continues,

I present demos to teach about the product, and why I think it’s great.  I’m showing you how to accomplish a task using the product.  When I build a sample, I’m not just building another test project.  I’m demonstrating the capabilities of a product that have the potential to change your job, or at least make it easier.

A technical evangelist does what he does because he is passionate about technology and the impact that it can have in making life better.  Evangelism is a natural byproduct of that.   Personally, I am passionate about many things that help me in my job:

  • The importance of usability, user experience and user interface design (and visual and product design in general)
  • KISS
  • Efficiency and productivity: working smarter, not harder
  • Agile methodology
  • SaaS and web applications
  • SOA
  • Cloud computing
  • RIA, AJAX and Silverlight
  • Software development with .NET and the Microsoft ecosystem
  • The Internet
  • Innovation in technology and business

One of my heroes, Guy Kawasaki is a former Apple Technical Evangelist and is noted for having brought the concept of evangelism to the high-tech business.  Here are some words of wisdom from the man himself: The Art of Evangelism.  Incidentally I also use Guy’s 10/20/30 rule for my presentations.

I hope this gives you a better understanding of what a Technical Evangelist is.

I look forward to sharing my thoughts on user experience, software development with Infragistics/.NET and business and technology in general.


Improving LINQ Except and Intersect by using a lambda expression for custom comparison

I was recently doing some work where I had to use Except and Insersect, but with some custom comparison logic.  Let me illustrate by way of an example.  If I had the following class

public class Widget
    public int ID { get; set; }
    public string Name { get; set; }

and created two lists like this

List<Widget> first = new List<Widget>()
    new Widget() { ID = 1, Name = "Alpha"},
    new Widget() { ID = 2, Name = "Beta"},
    new Widget() { ID = 3, Name = "Gamma"},

List<Widget> second = new List<Widget>()
    new Widget() { ID = 2, Name = "Foo"},
    new Widget() { ID = 3, Name = "Bar"},
    new Widget() { ID = 4, Name = "Baz"},

and tried to use Except like this

first.Except(second).ToList().ForEach(x => Console.WriteLine("ID=" + x.ID + ", " + x.Name));

I would get:

ID=1, Alpha
ID=2, Beta
ID=3, Gamma

Since I wanted to do a comparison on the ID property, what I really want is just the first item the list i.e. [ID=1, Alpha].  One way of achieving this to override Equals() on the Widget class, but this may not always be practical or even possible.  Another option is to supply a custom IEqualityComparer<T>.  To do this I would need to a define a class that implements Equals() and GetHashCode(), the two methods on IEqualityComparer<T> and supply an instance of this class as an additional parameter to Equals() or Intersect().  Unfortunately, I found neither of these practical since I had a number of classes that that I wanted to use with Except() or Intersect() and wanted a more elegant solution.

“Why not just use a lambda expression to express the comparison?”, I thought and came up with the following two extensions:

public static class LinqExtensions
    public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, Func<TSource, TSource, bool> comparer)
        return first.Where(x => second.Count(y => comparer(x, y)) == 0);

    public static IEnumerable<TSource> Intersect<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, Func<TSource, TSource, bool> comparer)
        return first.Where(x => second.Count(y => comparer(x, y)) == 1);

Now I can compare on the ID by supplying the comparison logic as a lambda expression:

first.Except(second, (x, y) => x.ID == y.ID).ToList().ForEach(x => Console.WriteLine("ID=" + x.ID + ", " + x.Name));

first.Intersect(second, (x, y) => x.ID == y.ID).ToList().ForEach(x => Console.WriteLine("ID=" + x.ID + ", " + x.Name));

This gives me the results I want:

ID=1, Alpha
ID=2, Beta
ID=3, Gamma

Hope you find them useful!

Trends & Strategy

The Rich Web Development Landscape

A few years ago if you wanted to develop a web application all you could do was build a classic synchronous web application using plain old ASP.NET, JSP or PHP depending on which camp you were in. Then along came Ajax and Web 2.0 and changed the landscape. In my last post, I touched on some of technologies that make today such an exciting time to be an Internet developer.

On the software-side, AJAX has so far been the primary reason for this, but Silverlight and Adobe AIR are blurring the lines even further. On the infrastructure-side, broadband and faster hardware have been the main catalysts, but access to cheap and reliable server-side computing resources such as Amazon’s S3 and EC2 are giving application developers unprecedented ability to scale elegantly. Throw in to the mix innovative web services from the likes of Google and Flickr and we have a wondefully-rich array of tools and technologies to build web applications with.

Now, I’d like to list some types of interesting options for types of applications and tools in this new landscape and point out some interesting developments and trends along the way. If you’re a developer or entrepreneur looking for ideas for your next project (like I am), perhaps this will give you some options you may not have considered.

Regular Ajax

Ajax is quite a mature technology now, tested and proven and with a wide range of tooling and support (listen up you conservative pointy-haired bosses!)

ASP.NET Ajax has a low learning-curve. Standard ASP.NET skills along with a grasp of Ajax concepts are all that are required for you to use it effectively since all the plumbing Javascript code is taken care of. It’s appropriate for basic applications (for example Quotiki) using mostly standard ASP.NET controls and requiring infrequent updates.

But for highly-dynamic applications with lots of updates or a graphics-intensive user interface (think Google Maps), you’ll need to use a Javascript Ajax framework. Although I haven’t used it in anger, I’ve played with and heard good things about Ext and I’m quite impressed with it. Google Web Toolkitis very compelling since it lets you write applications in Java (which it compiles it to Javascript) and boasts some other great features.

Rich Internet Applications

Microsoft Silverlight. Love it or hate it, it’s here to stay.

Personally, I think its a brilliant piece of technology and am a big fan of its potential. It brings the advantages of desktop applications (responsive UI, easy to build, local storage, networking) to web applications.

There’s also Adobe Airto look at for building RIAs.


Until recently, applications on mobiles were disconnected. But, just as your computer seems pretty much useless without Internet access today, mobile phones too will seem pointless without some kind of access to the cloud. Mobile applications are going to be increasingly web-based. And it seems that Apple is who is going to make it happen.

The iPhone has of course set the mobile market on fire sitting at 28% of the U.S. SmartPhone market share only eight months from release, second only to RIM (BlackBerry) at 41% (ars technica).

When it was first introduced, there was no SDK to build native iPhone applications – just web applications viewed through iPhone’s Safari browser. A couple of months ago, however, Apple unveiled their iPhone Software Roadmap and released the iPhone SDK.

In his iPhone software roadmap presentation, Jobs says, “The iPhone is really bringing the Internet to a mobile device for the first time. You really do have the Internet in your pocket.” And he appears to be right – a whopping 71% of U.S. mobile browser usage is on Safari, followed by Pocket IE at 12%.

If you’re thinking of learning Objective C, why not get stuck into it and develop an iPhone app?

Another interesting development is Google’s mobile platform Android. Definitely worth checking out.

Microsoft’s development platform in this space is ASP.NET for Mobiles. I haven’t used it so not much more to say about it except, go check it out and/or post your thoughts in a comment.