Follow up: FM-Web meets the iPhone

This post comes as a follow up on some of the questions I received based on my initial post regarding development for the iPhone using Mono.

Question: Tell me more about Mono?

(Warning, a lot of technical drivel)
Quoting from the Mono website, “It [Mono] is an open source implementation of Microsoft’s .Net Framework based on the ECMA standards for C# and the Common Language Runtime.” – http://www.mono-project.com/What_is_Mono

Browsing to the referenced page, you will see Mono’s C# compiler is feature complete for C# 1.0, 2.0, 3.0, and 4.0 (ECMA). This means that if you are C# proficient, you already have the required skill set to develop cross platform applications. (I have to distinguish cross platform and cross platform User Interface applications, but I’ll get to this point later in this post.)

Following up on the cross platform statement, you will also notice the following on the same page: “Cross Platform – Mono is built to be cross platform. Mono runs on Linux, Microsoft Windows, Mac OS X, BSD, and Sun Solaris, Nintendo Wii, Sony PlayStation 3, Apple iPhone. It also runs on x86, x86-64, IA64, PowerPC, SPARC (32), ARM, Alpha, s390, s390x (32 and 64 bits) and more. Developing your application with Mono allows you to run on nearly any computer in existence (details).” This is a pretty bold statement coming from a language, which by some, is perceived as a Microsoft only language.

To sum it up, Mono is an open source implementation of the Microsoft.Net Framework, capable of running on multiple platforms.


Question: What is the speed of delivery impact on the iPhone?

You could see this from two sides. The first could be the speed of development and delivery time to market of MonoTouch developed applications.

To put some weight behind my thoughts I would suggest listening to the following .Net Rocks podcast Weyer and Rammer Program iPhones with MonoTouch. What it boils down to is it depends on your proficiency levels. If I know nothing of Objective-C and the iPhone API and internals, but I know C#, using MonoTouch provides me with a familiar language reducing the of language up skill.

Yes, I admit, this is a subjective argument. You could argue someone proficient in Objective-C would have already overcome the iPhone technical development intricacies and would not have language up skill problems. And this statement is very much true, however having C# SOAP web service proxy classes generated for me versus parsing XML by hand using Objective-C wins hands down any day.

I’ll rather focus the extra time I have now on stuff that really matters in the application, i.e. the user experience.

The second view could be actual file sizes and execution time of the application on the device. Currently the compilation size of the prototype app is 8.5Mb, this includes the scaled down Mono run time and Garbage collector. As a download to the phone for initial installation, the package size drops to 2.5Mb.

Start up time for an application depends on what your application is doing at start up combined with the loading of the executable into memory. This means the 1st time run will be slower than a 2nd or subsequent run and so forth. In order to curb applications from turning into resource hogs, Apple enforces strict rules over the execution of applications within the OS. If there is no response within 20 seconds from an application, the OS will terminate the application.

Question: Silverlight is rather heavy/expensive isn’t it?

Although Silverlight has got nothing to do with iPhone development, I mentioned Silverlight as the same web service communication dlls used in Moonlight is used in MonoTouch. This question still has got merit in terms of the previous question, speed of delivery.

To understand why I say this, let us look at the location of the application. The application is downloaded and installed onto the iPhone, only when there is an update to the application code, will there be a new download of the application. Once installed, only data is transmitted to and from the device.

This as a matter of fact, holds true for the Windows 7 phones, running Silverlight as well as Out-of-Browser Silverlight / Moonlight applications.

However, let me not make this post about Silverlight, I’ll keep that for another time.

Question: Do you think it is the preferred way and/or what have you proved?

Do I think it is the preferred way?

If I had been a proficient Objective-C coder, I would not hesitate to say no. If I had been a Java developer, I am sure the response would not be better and I would have pointed you to a framework such as “Applause“, which uses a declarative language to define the iPhone UI and application functionality. With this response, I would already be leaning away from Objective-C.

However, I’m neither a Objective-C developer nor a Java developer. I am a C# developer with a specific skill set. MonoTouch allows me to apply this skill set today.

What have I proved?

Use the right tool for the right job. I’ve heard this a number of times the last few months. Theoretically that is the best way to go. However, I do not believe practically this is always the best route to follow.

You do not want to extend time to market with unneeded costs and risks if taking into consideration that 3 months is not that long for a product’s 1st release cycle. Even 3 months may be to optimistic.

Learning the “right tool” falls into both cost and risk categories for me. Cost in time to learn the tool and risk in terms of hitting a brick wall when your go-to-guy for knowledge disappears.

Something that may be a good idea now, with the potentially to make you heaps of money, is not always the best idea in 3 months time. Even if you were the only person to think of it the idea, nothing prevents the opposition from having the same light bulb moment in the meantime and acting on it.

I would like to think that I proved you are able to be competitive, productive and create easily maintained code, using a current skill set, even though other people may not perceive it as the right tool for the job.

Photo

Chris

November 30th

General

FM-Web meets the iPhone

Since I’ve started at MiX Telematics I have become a self-confessed Apple fan boy. It all started with an iPhone and progressed to a MacBook. Nothing up to know has beaten the “unpacking” experience of each of these devices. The attention to user detail is really amazing. This post however, is not to convert people to Apple, but rather to show what can be done with some C# coding for the iPhone. Yes, it’s not a typo, C# code was used to write a basic iPhone application.

Objective-C, however much touted as user friendly by Apple, I have up to now found a cumbersome language to get into. Based on this and having followed the progress of Mono, the open source implementation of .NET languages such as C# and Visual Basic, I decided to invest some time in MonoTouch.

MonoTouch as described on the Mono website: “Create C# and .NET apps for iPhone and iPod Touch, while taking advantage of iPhone APIs, and reusing existing .NET code, libraries, and skills.” And I must admit, the last part of the above ”…reusing existing .NET code, libraries, and skill.” so far has proved to 100% on the mark.

For example, I have been able to reuse the Silverlight 3 (Moonlight) libraries to create the web service proxy classes as well as implement familiar .NET bindings, code that runs not only on the iPhone, but Mono as well Microsoft.NET. Can you see where this is going? Code share between Windows, Linux, Mac, iPhone and Windows Phone 7. Ok, enough about all that let me show you the screenshots. I decided to base my initial investigation on interacting with FM-Web as it is the area in which I am currently most active development wise at MiX Telematics.

The login screen.

As you can see there is no deviance from the iPhone application look and feel. This makes it extremely easy to keep with the specified Apple iPhone/iPad development guidelines.

Having logged in the user is presented with a listing of Organizations he/she is able to access.

Followed by the Sites defined per Organization.

Followed by the Vehicles grouped into the Site.

Making use of the Apple MapKit, it is possible to show the Last Know Position of the vehicle on a map interface.

To me the above is really exciting, however basic it may seem. The possibilities in terms of coding against the iPhone, in C#, are only limited by the availability of data and imagination. Admittedly you’ll use the iPhone different to the iPad which would lead to different applications, but that is a topic for a another post.

Till then, cheers.

Photo

Chris

November 9th

c#

General

iPhone

Getting comfortable with SCRUM

I’ll be the 1st to admit, up to mid last week, prior to the SA Scrum Gathering on the 2nd of September; Scrum was making no sense to me. Up to then, practicing Scrum was really frustrating. I’m not saying it is going to be smooth sailing from here on forward; I am sure we will still have several obstacles to overcome.

Different skill sets, legacy systems, inter-team dependencies, getting our heads around team self-management and how all of this should fit into the bigger picture of the company. And lastly, the big question, how to keep delivering value to business amidst all of this.

The single biggest revelation I had at the Scrum Gathering, was the following:

Scrum is NOT EFFICIENT (at least not where we are at currently), however Scrum IS EFFECTIVE.

So what does it mean? Well, our team has most definitely dropped the amount of tangible output we delivered in our 1st sprint compared to pre scrum days. By tangible output I mean “stuff” that we can show, i.e. “click-button-show-page-capture-data” “stuff”. This really got me down, where is the business value we are supposed to be delivering was the question I had more often than not driving home and some days, driving to work?

We have now established efficiency has dropped, what has happened to our time, what are we doing to be able to justify our pay check at the end of the month? We have become more effective in terms of what we knew all along we should have been delivering on previous development iterations. Unfortunately, this is the point where this post becomes fluffy, as we now are dealing with mostly intangible output.

Let me start with something easy,

Documentation

We now have, for each piece of work, the following documentation:

a)      A user story, elaborated into a functional specification

b)      A number of scenarios, elaborated into use cases

c)       User acceptance tests derived from our use cases

Now the other:

Testable code

Ok, so not a lot of it, but we have been able to create unit tests in our database code with proper sample data, and not just AAAAA and BBBB for data fields, but proper test data to satisfy our above scenarios, which in our environment is rather challenging.

A lot of effort wet into this, 1 because we are new to it, 2 because to test some stuff turns out to be pretty hard. This is to the nature of the environment and the project. We have however learned more of each of these aspects. Did I mention we are a brand spanking new team with sparse domain knowledge?

Pair Programming

Not in the sense that we shared a keyboard or mouse or even half a screen or desk, however we did sit together to figure out the problem and create a solution everyone in the team is able support should it be required for each piece of work we committed to.

Better Team Member Knowledge

What makes the other guy tick, what she/he is good at, what does he/she sucks at and in which areas would she/he like to gain more knowledge? Help me help you so that we can be the best team we can be.

So let us look at the value proposition again. Yes, we are not currently delivering the same amount of tangibles, but we are forming a team with the common goal of delivering value to business. We are sharing our knowledge, improving our skills and putting down a knowledge base of all work we are doing. Therfore enabling people joining and/or taking over form us, making life easier for them.

So am I converted to scrum? Time will tell. The honest truth is I can see value, but I can also see this is going to be hard. We are definitely finding ourselves about to progress through the typical stages of Tuckman’s stages of group development – Forming, Storming, Norming and Performing (Adjourning and Transforming).

We will have to take it sprint by sprint.

Some photos of the team and our environment:

Photo

Chris

September 7th

General

Scrum

Changing driver behavior

I always thought a tracking device would be a grudge purchase, something you have to do to reduce insurance fees, and when your vehicle is stolen at least give you a fighting chance to get it back. I did not have one installed in 2007 when my previous vehicle got stolen, hence the fact that up to today I have not seen the vehicle again.

As an employee at MiX Telematics, you are entitled to install one of the company’s tracking devices into your vehicle on request. We have a few options to choose from, these currently fall into 3 areas, fleet management, stolen vehicle recovery and self service units.

I opted for an X-Drive unit falling in the self service range. My initial decision was partly based on the fact that an iPhone application existed for tracking which is rather cool and then the self service side of the unit. Since then I have discovered even more features offer by the unit which are all pretty nifty and should be applicable to small “fleets”.

Installation

The 1st part of installation is the physical installation of the unit. The idea behind this unit is for individuals to be able to install it themselves. However, with the installation team here at the office, I decided to rather have the installation done professionally for me. This was completed within an hour of making the vehicle available and the guys really did a great job.

The 2nd part of the installation is via the website, i.e. signing up for an account and web access. Initially the 5 step signup may seem a bit much, but turned out to straight forward and easy. Most of the settings have default options all of which you are able to configure after you have logged into the website.

Once sign up is completed, you’ll receive a confirmation email and you and the unit are provisioned on the system.

Usage

My 1st interaction with the system was a message sent from the unit notifying me of a low battery condition on the unit. This meant the unit was busy charging itself. It also meant all communication channels was working properly all the way from GPS to GSM.

The next communication I received was a unit firmware upgrade. This impressed me, having gone through several firmware upgrades on other electronic devices. The new firmware was delivered remotely to the unit with the unit responding with an automatic upgrade and reactivation.

Two of the features configurable for a unit include over speeding and movement outside a set time frame. Each event can either  be delivered by email and/or sms. The movement outside a set time frame event is straight forward, for example, my unit is set up to notify me if the vehicle moves between 10pm and 6am. An example notification of this is below.

This is ideal to prevent the situation where you get outside, expecting to see your vehicle, and it is gone.

Over speeding however, is one of the unit features that impacts driver behaviour and is one of the features which I find rather useful, apart from being able to track my vehicle on my phone or the XDrive website. Each time you exceed the set speeding limit for your unit, you will receive a notification stating this fact. This is not a once of notification, if you do not slow down this event keeps firing.

As a self servicing unit, for me to receive tracking and event notification, I am required to top up the prepaid credit account for the unit. Each notification costs credits, which means over speeding is costing me money. Not to mention the fact that over speeding could cost someone else or my own life. Needles to say for me this feature has become one of the most important driver behaviour changers on the unit.

It is now 3 months since I have the unit installed and in this time I am much more aware of the vehicle’s speed and those of others on the road.

Please note, there are a lot more than the above to the XDrive, such as vehicle tracking and other notification options. However, before I do a post on these features, I’ll do a post on the FM unit installed on my wife’s vehicle (fleet management unit). In the meantime, should you want to find out more about the XDrive, head over to www.x-drive.co.za for more information.

Photo

Chris

August 15th

General

MiX Telematics

Firefox & Silverlight Debug Problem

I use Firefox as my default browser, but with the upgrade of FireFox to 3.4.6, “lost” the ability to debug Silverlight solutions with only the standard message “No symbols have been loaded for this document” returned by the IDE.

To enable debugging of Silverlight applications you need to make sure you have enabled the options as below:

1. Alt+Enter
2. Select the Web tab
3. Check both ASP.NET and Silverlight in the Debuggers section at the bottom of the page.

image

Double checking the above I started to check around for some solutions and found the following, not ideal but had to do for now. Since then I found the following solution which is less cumbersome to execute and provides a much improved debugging experience.

1.    Type “about:config” into FF’s address bar
2.    Accept the warning (if applicable)
3.    Search for the entry “dom.ipc.plugins.enabled.npctrl.dll”
4.    Change its value from “true” to “false” (double-click)
5.    Restart the browser

This solution works with FF4.02b as well.

Hope this helps

Photo

Chris

August 4th

General

Installing SharePoint 2010 on Windows 7

This is a short summary of my SharePoint 2010 install as there are already a few blogs out there describing the process in more detail.

I’ve decided to do the install on my notebook, an Acer Extensa 5620G, with 4GB RAM and a 160GB hard drive. Nothing fancy, but it seems to be coping so far.

The installation started by installing Windows 7 x64, as the T5550 Processor in the Acer does not support virtualization. Running something virtual on Windows 7 x86 was not going to work for me in any event as 4GB of RAM does not seem to be enough to pull it off, even if I had virtualization support.

Once done, I decided to install Visual Studio 2010 Ultimate. The reasoning is that since I’m going to do some development against SharePoint 2010, why not have VS2010 take care of the prerequisites for me. As with Windows 7 this install went uneventful, on to SharePoint.

I’ve decided to follow the online instructions as posted in Setting Up the Development Environment for SharePoint Server. The Installation went smooth up to the point where I did not select Standalone. Ok, so I did not follow the article that closely as the SharePoint Products and Technologies Configuration Wizard prompted me with a friendly, but firm stop message, not allowing me to continue with a local account installation unless I install in standalone mode. Uninstall SharePoint.

After restarting the installation, I this time selected the standalone option.

Running the SharePoint Products and Technologies Configuration Wizard I reached step 2 to have the wizard halting with the following exception: System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.IdentityModel. This error turned out to be due to a missing/old prerequisite, the Microsoft “Geneva” Framework Runtime. Ok, download and install the updated version and restart the SharePoint Products and Technologies Configuration Wizard.

All seemed well until I reached step 8 of 9 where the install failed due to an Unrecognized attribute ‘allowInsecureTransport’ Exception. The work around for me was to edit C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\SearchService\client.config to finish the install, but since then it sounds as if Microsoft will be releasing a hot fix for this and do not recommend changing config files. This post by Jie Li outlines the WCF hot fix in more detail.

Restarting the SharePoint Products and Technologies Configuration Wizard for a 3rd time completed the installation for me and I now have a running SharePoint 2010 instance.

There are workarounds to get past the standalone server installation as outlined in these posts involving Power Shell:

http://blogs.msdn.com/ekraus/archive/2009/11/06/sharepoint-2010-provisioning-a-new-farm-with-powershell.aspx

http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?ID=112

I’m going to stick to standalone for the time being.

All in all it was not that much of a big pain getting the SharePoint 2010 Beta installed. As I said starting out this post, there are a lot of resources already available to guide you through a typical installation and as much help available should you get stuck.

Hope the above helped.

Chris

Photo

Chris

November 18th

General

The accustomed ‘Hello world!’ post

I have finally found, or so I try to believe, purpose for this domain. Having registered it way back when, I could not get myself to really put it to use. Oh yes, at some stage I had a big idea in which this website would have made me buckets full of money, but alas converting big ideas into reality tends to requires more effort than what one initially expect.
Then I saw this “sad” cartoon and it struck me how you get bogged down by life and everything else that you forget to dream and explore.

calvin_and_hobbes_on_ritalin

For the time being I’m going to see where this blog takes me, again I have big plans, but this time I’m going to try and stick to the basics and take it post by post.

Photo

Chris

November 2nd

General
line
May 2012
M T W T F S S
« Nov    
 123456
78910111213
14151617181920
21222324252627
28293031