The Tale of Two Tankers

one reason why Alberta crude doesn't sell on the world market

Tanker Aqualeader

AQUALEADER (1)

On October 15th the tanker Aqualeader left the Port of Vancouver loaded with Alberta crude heading for Ningbo China. The Aqualeader is classed as a large Aframax tanker which is a medium-sized crude tanker with a dead weight tonnage (DWT) ranging between 80,000 and 120,000 (Aquadleader tips in at 115,669 t).

petroleum-transportation-vessels

This is as big a tanker as can enter the port of Vancouver due to low height restrictions on the Ironworkers Memorial Bridge at the second narrows that the tanker must pass to get to the Westridge Marine Terminal to load crude. The Aqualeader can carry roughly 750,000 barrels of crude however due to shallows at the seconds narrows its capacity is restricted to about 80% (with favorable tides) and on this day the Aqualeader left Vancouver with about a 60% load or about 450,000 barrels of crude which gave it a draught (depth in water) of 11.9m


Tanker New Odyssey 

NEW_ODYSSEY

A little further to the south in Long Beach California the tanker New Odyssey was loaded and left for Qingdao China on August 12th. The New Odyssey (DWT 318445 t) is a VLCC (Very Large Crude Carrier) and carries about 2,000,000 barrels of crude and it left fully loaded with a draught of 20.4m

So why does this matter?

The buyer of the crude pays shipping so for example when the Chinese bought the Alberta crude, it purchased it at Hardisty Alberta and the buyer is responsible to pay pipeline charges to get it to Vancouver which depends on the grade of the oil but we’ll say about $4.00 per barrel, then they would have to pay for the tanker to get it to China and sending 4 partial loaded Aframaxs to equal the amount of crude the New Odyssey carries is substantially more expensive. So it should be obvious that buying American crude shipped from Long Beach California is far cheaper for the buyer then buying Alberta crude from Vancouver, toss in the pipeline charges and buyers really aren’t big fans of Alberta crude. This is only one of the problems with selling Alberta crude on the world market that no one wants to talk about. Expanding the capacity of the TransMountain pipeline does not fix this problem and as such we will see very little of increased sales of Alberta crude to world markets (but we will see an increase in discounted crude sales to the Washington state refineries, especially now that Alaskan crude is being exported directly to China from Valdez, so who exactly does this expanded pipeline benefit?).

Tracking Petroleum Exports/Imports from the Port of Vancouver

With all the talk and interest around the Trans Mountain Pipeline Expansion I became very interested Tanker traffic in the port of Vancouver both to understand the environmentalists claims and the petroleum industries claims of access to world markets, both of which are full of udder lies. I hope the following information helps you to track for yourself tanker traffic in and out of Vancouver so you can see how little crude Canada exports to world markets and also how little tanker traffic there is in Vancouver compared to say Bulk Carriers hauling coal to China from Vancouver and that most tankers coming into Vancouver are here for other things then petroleum (canola oil for example).

First the petroleum layout of the port of Vancouver. Once upon a time Vancouver used to be a major refinery hub and was home to four refineries (and there was a refinery in Kamloops), but now all of those have closed and become product terminals (tank farms for holding product refined elsewhere) other than the smallest refinery, Parkland Burnaby Refinery  Burnaby Refinery – Wikipedia NOTE all of these have a connection to the Trans Mountain Pipeline. In the last few years that I have been watching traffic in the port of Vancouver there has never been a tanker or barge carrying petroleum at the IOCO terminal as it is pretty much completely closed down. So the only facilities we need to concentrate on for tracking petroleum in Vancouver are the Parkland Terminal, Shellburn, Westridge, and Suncor terminals.

VancouverMap

Westridge Marine Terminal

This is the famed end of the line for the Trans Mountain Pipeline and is to be expanded to be able to handle roughly 34 tankers a month, but I have no idea why as 2 or 3 tankers in a month qualifies as a busy month for this terminal. There are typically two types of tankers that visit this terminal, the first of course is coming to load crude for export to world markets , and the second is coming into Vancouver loaded with aviation fuel (typically from Korea) to unload at the Westridge Marine Terminal. In 2019 more tankers unloaded aviation fuel then loaded crude at the Westridge Marine Terminal. So when you see a tanker coming into the Westridge Marine Terminal you need to note the draught (how deep the tanker is running in the water) to tell if it is loaded or unloaded (NOTE I use Marine Traffic MarineTraffic: Global Ship Tracking Intelligence | AIS Marine Traffic to track shipping in real time in the port of Vancouver, there are other similar sites but this one seems to work the best for Vancouver).

Product Terminals (Parkland, Shellburn, Suncor)

These terminals deal in refined product only, so crude is neither loaded or unloaded at product terminals. Typically refined product from the US, usually from refineries in Washington state is unloaded at product terminals from Articulated Barges pushed by tugs like the One Cure, but these are pretty much a constant parade of different articulated barges as Vancouver imports more petroleum then it exports Port of Vancouver 2018 Statistics Overview (portvancouver.com) NOTE in the report exported refined product includes product sent to Vancouver Island on articulated barges from Vancouver as Vancouver Island gets all its petroleum from Vancouver.

ONE_CURE

There are also tankers that arrive from the gulf coast of the US like the Port of Good Hope near New Orleans which bring in refined petroleum to Vancouver (traversing the Panama Canal to get to Vancouver).

In 2020 we have noticed an increase in the export of Fuel Oils from Vancouver likely because the Sturgeon Refinery in Alberta came on line this year, however Alberta is on the hook for $26.4 Billion for this refinery and so it will be decades at best  (likely never) before it returns a profit on behalf of Alberta taxpayers but at least it is exporting some product from Canada OPINION | This 'Bitumen Boondoggle' is costing Alberta taxpayers billions | CBC News

Some additional notes

The port of Vancouver is a terrible port for shipping crude from, first due to low bridges the biggest tanker that can get into the port is an Aframax and second because of shallows at the narrows there are capacity/depth limitations so for example Aframax tankers can only be filled to 80% capacity. This ensures that exports from Vancouver will always cost more then shipments from other crude export ports around the world.  Safe movement of petroleum products | Port of Vancouver (portvancouver.com)

petroleum-transportation-vessels

The majority of product flowing down the Trans Mountain Pipeline is discounted crude being sent to Washington State Refineries via the Puget Sound Pipeline. Product Destination - Trans Mountain (transmountain.com)

Yearly Vessel Movement Data for the Port of Vancouver is available for analysis here Vessel Movement Data | Pacific Pilotage Authority (ppa.gc.ca) NOTE this doesn’t contain articulated barge traffic as those don’t require a pilot.

Why the Carbon Tax Doesn’t Work For Me

There are mainly two types of taxes, the first kind is what we pay from income or otherwise profits to cover the cost of living with the conveniences we have as a society, things like roads and other infrastructure, law enforcement, health care, education, etc. The other type of tax is to persuade behavior change or at least help cover the costs inflicted on society by some forms of negative behavior. Taxes on cigarettes would be an example of this, or the new instituted carbon tax in Alberta and or Canada. The idea behind the carbon tax is to get Canadians to reduce their carbon footprint and to raise money for so called Green initiatives. Now I’m all for reducing carbon footprints and all, but this carbon tax is going to be far worse then a complete failure and let me explain the reasons why and finally how I would do this.

The biggest problem is that this tax comes in as an upfront cost such that everything Canadians do will have an increase in costs as this tax will be passed onto consumers. This has a two-fold impact, first it will teach Canadians to buy products not made in Canada as those products will be cheaper as they don’t have this extra cost to pass onto the consumer and second it will handicap Canadian businesses trying to complete in the world market. So, you will see more Canadian Companies closing, more Canadians unemployed and increased trade deficits as Canadian purchases of foreign carbon tax free product increases. Neither of these are acceptable, but why does a tax on say cigarettes work, but the carbon tax won’t. In Canada you can only buy cigarettes that are taxed, everything else is illegal the government spends a great deal of money and resources to ensure that non-taxed cigarettes are not available in Canada, this doesn’t apply in the case of the carbon tax. I should also point out that Canada only exports a tiny amount of tobacco (0.4% of the world's tobacco exports, about a $100 Million worth) as tobacco is not an industry that Canadians really want to be in.

But we really want to be green and so how can we do that. First, I’d offer tax reductions for greener products which would enable those products to have a lower consumer cost and use that as the encouragement to switch consumers to greener products. Second, use on profit/income taxes to fund green initiatives, we do this for many other Canadian feel good projects. This way everyone gets to keep their job and we remain a competitive player in the global market and can use the profits from success to drive further success in green initiatives. Anything that kills the economy will also kill the desire and funding for going green, so carbon tax is completely non-sustainable in terms of making Canada Green and will fail horribly. Only a balance between a healthy vibrant economy and green initiatives will produce the long-term green objectives of Canadians.

China is a very interesting country.  They are the world leader in a number of so call green technologies and initiatives.  #1 in wind power generation (and wind power manufacturing), #1 in solar power generation (and solar power manufacturing), #1 in electric car manufacturing, #1 in electric bus and truck manufacturing, #1 in lithium ion technology and manufacturing, and the list goes on and on because China is the world’s largest investor in renewable energy.  The Chinese understand change costs money, big money, huge money and that money is created by people working to generate the technology and money needed to fund the changes they want to have.  China is not the same China people think it is from 50 years ago, they are progressing at outstanding rates because they have the resources and money to drive change.  They are the model for change as they are walking the talk if you believe that becoming a leader in green technologies is what is needed to change the world.  Our Carbon Tax will in fact hinder Canada’s progression to green by limiting the money and resources required to drive change, so scrap this counter productive tax now before it is too late.

Why Wind Power Generation Isn’t the Savior You Think It Is

I’m a scientist, which means I live and die by numbers and details. There is a lot of truth in the old saying ‘the devil is in the details’ and whenever I hear people talk about renewable energy, it is always very clear to me that they intentionally skip the details to hide from the devil. Yes, I acknowledge our over use of fossil fuels isn’t good or wise, but I also have a some very different reasons behind that which I hope to write about later, but most green people haven’t got a clue as to what replacing fossil fuels with renewables means. Lets dive in and look at a couple of details and why the Devil is living large in those details.

Today is Friday March 22 and it is a beautiful spring day in Calgary, the sun is shining (good for solar but considering its only 9:30 AM and the sun is still low on the horizon still not generating much power), but there is no wind to speak of. There hasn’t been any wind to speak of for the last couple of days and won’t be any in the next couple of days. Looking at the wind forecast for the Pincher Creek area where several wind farms are, its not looking good for power generation.

clip_image002[4]

We see this reflected when we look at the Current Supply Demand Report for Alberta as Wind Power generation is operating at about 13% of its capacity under optimal conditions.

clip_image003[4]

The point is optimal conditions for generating 1,445 MW are rare and most of the time wind power generation is operating under sub optimal conditions, so what does this mean? It means that if we had nothing other than wind generation (not like that would ever happen but to show the point) Alberta would need 124,000 MW of optimal Wind Power Production to generate the required 16,157 MW under the current 13% power production rate we have at this moment. That works out to about 86 times more Wind Power Generation then we currently have. Considering most of the best wind generation sites are already running wind farms, it’s more like 175 times more wind farms are needed. Think that is possible, I don’t and I’ve yet to have a ‘Green’ person explain to me what happens on low wind days. The cost alone is beyond the ability of Alberta to cover (currently only China has this much wind power capacity) never mind the environmental impact this many wind farms would have (bats and bird strikes for example).

The problem is basically that renewal power generation is not consistent or reliable but our demand for power requires both. Even solar in Calgary has huge swings for example the power generation of the Southland Leisure Centre solar PV System for the last five years shows that we would need massive quantities of solar power generation to compensate for the variability of Solar based power production.

clip_image005[4]

Remember I like renewable energy generation like wind turbines (I wish the physics was better for vertical axis as they are quieter and kill far fewer birds and bats etc), but to believe that they are the silver bullet that is going to save us, is just plain ignoring the devil in the details. The biggest devil isn’t in power production, it’s in power consumption, but that is a problem no one wants to tackle, but it is the actual problem we will have to solve.

Why you should still eat your own dog food

I recently read a blog post by Steven Sinofsky (smart guy that I follow on Twitter) in defense of why he didn’t eat his own dog food at Microsoft and while I agree with some of what he said I think he came up short on execution because he didn’t eat the dog food and left their customers and products wanting because of an unwillingness to truly commit to and champion the vision.

Like Steve I love competitors, I respect them immensely, by them having customers I happily acknowledge their intelligence and efforts or if nothing else their dumb ass luck, but regardless they are a competitor and must have done something right to be such. I study my competitors, their product, their evolution, their successes and failures, their choice and use of technology, training, leadership, marketing, their direction, product releases and timing, customer support, everything I can learn about them, but my goal is not to copy what they have done, but to understand the market and our customers. All I really care about is what customers want and or need and so if I’m coming into an existing market then only a fool would ignore the wealth of experience their competitors already have. Even failed competitors can teach you something. While I’m learning about the market you better believe I’m using the competitor’s products, talking to their customers about their product, their x-customers, whoever, but again the focus isn’t their product, it serves merely as a reference point for understanding the market. My objective is simply to become a market and domain expert. Then use that knowledge to formulate what I think the best product is that we can build and what the best path forward is for that product to gather market share. Once I’ve become an expert the need to use a competitor’s product would be briefly at best to see what changes or modification they have made to measure my understanding of them as a competitor and to validate my expertise in the understanding the market. To say that I must keep using their product to keep track of them, would question my knowledge of the market.

I love building commercial apps, competitors and customers, where it is a battle of vision and who has it and who doesn’t and who can improve it. Do I look at competitors as enemies to be vanquished off the face of the planet, not in the least. If they are doing better then me, then I look at them as teachers as clearly, they know something I need to learn. If I’m doing better then them, then they are my motivation to constantly improve, and I get pissed if they quit pushing me. In the end I believe deeply in having competitors as it fuels the drive for the best possible product in the least amount of time and that is ultimately what the market wants and deserves.

There were lots of things I didn’t like about Steve Jobs, but certainly there were things to admire about him. His expertise and commitment to his vision of what customers wanted despite what other companies were doing was admirable, but also endorsed by the fact he was right and dominated the phone and tablet markets (proof is always in the pudding, lots of people have a dedicated vision that results in disaster, but we tend to call those obsessions). You didn’t see Steve Jobs using a Windows Phone, or even a Windows laptop as he felt they were beneath his vision and lacked soul. He didn’t feel a need to track what his competitors were doing, to be honest I doubt he even cared as he believed in his expertise and vision and that was all that needed to be championed. This isn’t about not liking someone else’s product, it is about constantly driving improvements and confidence in your product. When you admire someone else’s product, you are really admiring their vison and that is fine, lots of very smart folks out there, but your job is your product’s vision. Have you ever seen Tim Cook use a Surface, Android phone, fit bit, etc? Any Google Executives using an iPhone or Bing? Image does matter both to the market and your employees, but most importantly if their product doesn’t work for them, they fear that also doesn’t work for their customers and that pain point helps drive improvement. You are a phone developer and get a call that the CEO’s phone just ate his data, you are on that like white on rice, but you’re also impressed he is using it.

I believe in eating your own dog food. If your product isn’t working, has awkward flow or anything else that makes you feel uncomfortable, then you should feel uncomfortable until you fix it. If you can simply switch to a competitor’s product, then you lose that motivation to really drive improvement in your product. It is vitally important for your market to see you using your product, especially if its a new product as it helps them feel confident that you are also experiencing their frustrations while using your product and you are not only motivated to fix them but that you are confident in and committed to the product long term.  You have put your skin in the game, and you have something to lose just like your customers, but more importantly you validate their belief in your product and it’s future.  When you use a competitor’s product what you are really saying is “our product might be pretty good, but its not as good as the competitor’s product that I’m currently using otherwise why wouldn’t I use our product”. 

You don’t get to control the customer’s perception, certainly you try to influence it in a product positive way, but customers perceived Microsoft management using competing products not as market research (which should have been finished long before the Windows Phone was released), but as an admission that the competitor was still better.  Why should they use the less desirable product?  You wouldn’t use it, why should they?  Eat the dog food, make the commitment to your customers. 

I’ll admit in the case of the Windows Phone it had some problems coming out of the gate, but so did the other guys.  UWP was moonshot and development tools and API’s for example weren’t ready for prime time at the release of the phone, but UWP was a great idea and I love now being able to use tools and code I know on everything from simple IoT Devices to Augmented Reality Headsets and everything in between.  I think Microsoft’s shareholders were far to short sighted to see the vision and Mobile paid for that and the repercussions are going to last a long time (most apps are run on mobile devices and the problem isn’t just not having the apps or developers, its having access to the data the apps create and use to drive things like Machine Learning, not being in the mobile space is going to hurt).

Now I’ll admit I’ve never had the chance to run something as ambitious or complex as building a new OS and hardware for a company where software was pretty much a cut in stone religion, but I have experience with several successful start-up companies. Including one where we were the new kid on the block but within a year we were the 800lb Gorilla with a market cap of almost 2 Billion dollars because we nailed the vision and executed and delivered the product that the market wanted. Did I know my competitors and their products, I knew them intimately and because they were such very good teachers they helped me become a domain and market expert. Our vision and product was significantly different then theirs and ultimately more in line with what the market really wanted.  Which product would I use, ours of course, it does what I need and in a way that makes sense, and does it consistently without surprises and is committed to a long future of innovation and improvements, why would I want to use anything else?  I enjoyed that dog food, we worked hard to make nutritional and great tasting and far better for our customers then our competitors did.  Too bad I can’t say the company lasted long after I left to go do another company, I’m always looking to learn new things, it is what makes life interesting.


Release of Winner Winner App

Always fun releasing apps and especially so for apps you designed and built as something you need.  I do a number of presentation every year and handing out door prizes at the end tends to be a bit of a confused scramble and not the cherry on the top of a great presentation that I’d like.  So I needed something better, something easier, faster, more engaging, something smooth and professional, but I couldn’t find an app that worked for me, so being a Windows software developer I wrote my own.  May I present Winner Winner the easiest and fastest way to let people enter and win prizes that runs on a number of Windows 10 devices including desktop, tablets, phones, hub and even the HoloLens. Everyone carries or wears an electronic device with Bluetooth, so let that be their entry into your raffles or door prizes. No more hassles with lists, paper or tickets, as with Winner Winner you can quickly and easily have people enter your draws anywhere. Just have them put their Bluetooth device in discovery mode and Winner Winner will discover and enter them and even randomly select the winners. Want to limit the entries to only certain types of devices, no problem as Winner Winner can filter devices to only those you want. Winner Winner has addition features and controls will make your contests even easier and more successful and that’s what we call a Winner Winner.  You can see a brief overview of Winner Winner here

If you have been to one of my recent presentations then you have seen Winner Winner in action and seen how fast and easy it handled entering contestants and handing out prizes.  You can download Winner Winner for free here in the Microsoft App Store.

Confessions of an app store developer - One App One Month

After spending the last four or five years building and coding hardware devices and becoming an IoT expert, its time for a new challenge and a return to designing and building apps for users again. I first started writing code in the late 1970’s in FORTRAN on punch cards and over the years I’ve made a living from Shareware and creating my own Software companies which helped me learn a lot about users and business and prepared me for doing Startup companies and despite the success of creating almost a billion dollars worth of companies, I didn’t enjoy it as clearly the emphasis is on making money and not much else and its often a Survivor like game when the money hits the table which was enough to end my involvement in start-ups.

I love creating stuff, and the process of taking an idea to a finished product in the hands of users, is my thrill, so after spending years building IoT devices I wanted to get back to pure software again. I decided after looking at Windows 10, and the rapidly maturing UWP (Universal Windows Platform) and development tools (Visual Studio 2015 and beyond), that writing apps for the Microsoft App Store would be an interesting, toss in that I really love my Windows Phone (currently a Lumia 950XL) that building UWP apps which have a phone slant would be worthy and fun adventure and just be a great learning adventure.

Now I’ve been a Microsoft MVP winner for 13 years and in a number of different areas over the years as my interests change, so this year I’m ‘Visual Studio and Development Technologies’. NOTE I’m not a Microsoft employee, nor does Microsoft tell me what to do (other then my wife not many people do), but I’m awarded my MVP usually because I spend a lot of time giving presentations to various user groups, or teaching, or just sharing my knowledge and experiences with others as I’m a huge believer in the power of developer communities, and its for that purpose that I’m writing this blog entry.

One of the challenges I had when considering building apps for any app store is the lack of information as to what to expect as an app developer and in particular how much money do they make. I’m not particularly motivated by money, but I understand that you need money to live, to pay for a roof over your head and put food on your table and such. I’m not interested in driving a Lamborghini, but I am interested in making a reasonable living which is likely less then what some people consider making a living as I’m trend to live a more minimalistic lifestyle to reduce the amount of control that stuff has on me. The question is, how much money does a person need to make and can you do that as an app store developer? I can’t tell you how much money you need to make as it has been my experience that everyone is different, but I will tell you about how much money my first app has made in its first month and share some of my experiences and learning thus far.

Some important points concerning this first and please read these so you understand what I’m doing and what my objectives are.

  • In Calgary, we are currently around 10.3% unemployment and office space vacancy downtown is about 30% as the collapse of the petroleum business has hit hard and so some folks are scrambling to find alternate employment. So my first objective is to see if it is possible to make a living from or a reasonable income supplement or at least a self sustain hobby writing apps for the App Store.
  • The IT industry is very discriminatory and so a lot of qualified and capable people are without suitable employment for all the wrong reasons, could be gender, could be race, could be age, education or whatever, but in my experience of writing Shareware or apps for other app stores, users don’t discriminate, they just want quality software that does something they want done, or something that otherwise they like. An App Store is a great equalizer where as long as you don’t name your company something inflammatory, it comes down to who makes the customer happy and not much else other then some basic business skills.
  • There are other App Stores, but I’m only interested in Microsoft’s App Store so my focus is apps written using UWP just for Microsoft’s Windows 10 App Store. Reasons for this are both personal (I’ve been writing Windows code since 1990 and to paraphrase Roberto Clemente, Windows has been very good to me). I also believe that Microsoft is onto something with its Universal Windows Platform as it’s a logical extension to the concept of cross platform languages as it enables cross device development where I can write the same code and using Adaptive Display have it run on different devices and be able to take advantages of each device’s capabilities. Not only is this a powerful development tool, but will also simplify future maintenance which is very important to an Independent Software Vendor (ISV) as there are only so many hours in a day.
  • Microsoft seems to be working a long plan that the other platform vendors aren’t and that plan seems to be coming together (they still have some work in the mobile side, but they are making good progress but quietly). The platform, tools, devices, are all making great strides, and if they juice the App Store like they have Groove (and it appears they are), then jumping on to this now might be just good business timing.
  • I’ve been impressed with the user community and while it might be small they seem willing to support app developers and that is very important.
  • I want to write at least four apps in different areas in order to build up some expertise and hence be able to evaluate the concept as being viable or not or how to make it viable as I’m not a believer that one app does an expert make (there are some in IT who think reading one article makes you an expert).

First App, First Month

As the idea man behind a number of companies I have lots of ideas for apps, but I chose the Weather Barometer app as my first app as I wanted something simple where I could focus on the processes and such of getting an app into the store and my Pioneer Farmer Grandfather left me with a love of Barometers. Reading tips from other developers like Atley Hunter I also wanted to focus a bit on features which help build a developer user relationship like feedback. I also wanted to try HockeyApp for beta testing so the app took three months to write (not full time), so I could explore some different features and such and this is time while spent as every app I write will have features and such that I researched and built during this time.

wp_ss_20161119_0004

There were a number of things that I tried and certainly Template10 was a huge find as it gave me an excellent UWP foundation to build on and with the Template10 courses on Microsoft Virtual Academy I was very confident in using Template10 as my starting point.

HockeyApp I liked and I’ll talk more about why you should use HockeyApp below but my first impressions were its very useful for testing but still has some work to do for Phone Apps. For example deploying an app to my beta testers could be problematic if the app was using components/dependencies my testers didn’t already have installed as sending out the .appx file made the app installable by clicking on it, it didn’t install any of the dependencies, so I lost a few testers because of this complexity. If I deploy everything to my testers then they had to install a zip extractor and then work their way through the .appx files to install everything including the dependencies. I did find HockeyApp to be useful for finding problems during beta testing and will use it again and especially that I believe that they are constantly improving it and are addressing some of the issues I ran into.

Initial Release

Once I had completed beta testing the submission and release process is pretty straight forward and my app hit the store for download on Nov 2nd which was good as I was attending a MVP Summit Meeting at Microsoft starting on Nov 4th. I had included a way for user to email me suggestions, comments etc which some users used to send me messages about the units not displaying correctly. I had some code in the app which was supposed to check the user’s region/language setting and return if they used Metric or Imperial units and while I tested this for Canada and the USA, but it didn’t work for some countries/regions in Europe for example. I posted the problem in the developer forums and Microsoft jumped on it and are working on a fix for some language/regions where IsMetric doesn’t return the correct measurement units. That said however I had some users send me some feedback explaining cases where they might want to use the other units, so I planned to add the ability to select the measurement units in the app settings in the next release.

The other comment that I heard from a number of users was they didn’t like the ad banner. As I mentioned the idea of these app is to see if a developer could make a living doing this so I started with monetization via ad banners, which are pretty much trivial to add to your app and manage, so it allowed me to give the app away for free and yet hopefully make a small revenue stream. Users were ready, willing and wanting to ‘buy’ the app so they wouldn’t have to look at advertising.

Post mainscreen with ad

The other comment I heard fairly often was around updating the Live Tile which I thought was interesting as users really like that so upon returning from the MVP Summit I had an update to work on which included adding unit of measure preference to settings, In App Purchase of an ad free version, updating the Live Tile, using Feedback Hub and a small bug fix as when a user changes their font size it can change the screen width and/or height and messed up my adaptive display for rotating the screen.

Coding the Update

One thing that I should mention is Microsoft has made In App Purchases very easy to code and manage, but testing it is a bit of fuzzy area. Now there are two options for in app purchases in terms of what library you use, one library is old and in the process of being depreciated and the other new. I choose the new library as while it requires at least the Anniversary Update I could tell looking at my Store Reports that most of my users were running the Anniversary Update so it wouldn’t be much of a problem. The old library had better testing as it allowed you to connect to a ‘test’ store where you could test having, not having made the purchase etc, but the new version is pretty much a black and white affair so I tested all sorts of negative conditions first like no network access to the store etc, not purchased, canceled purchase etc as once you have purchased the ad in, its yours and the there is no going back to not having the purchase so plan your testing accordingly. I also created a testing Add-on just for testing so I could test an actual purchase of the no ads Add-On once it had gone live in the store.  The store process for the user is pretty good as once they select to purchase the Add-On in the app, they are taken to the store where they have to login and then approve the purchase and then the Add-On works immediately so they can be fairly confident that they are ultimately in control of the purchase process and get their purchased Add-On immediately.

wp_ss_20161118_0001

Live Tiles and toast messages are also fairly simple and I’d highly recommend using the UWP Community Toolkit as it made this fairly simple. The UWP Community Toolkit should be in front and center in your toolbox as its full of coder goodness and will save you many hours of coding and testing as its intent is make your apps better and your life easier, what's not to like about that?

wp_ss_20161118_0002

 

Releasing the Update

Again the store is pretty good for submitting and releasing your apps, but in my case my store reported crashes went up immediately which wasn’t good (the Developer Dashboard for the store gives you access to lots of reports so you can track how your application is doing). Looking at the crash data reported in the store I could see that the crash was happening in some countries but not others but I wasn’t getting enough information to figure out the cause of the crash, enter HockeyApp and some great users to the rescue. I built a version of the app using HockeyApp and then made the it available to some users who were having the problem and didn’t mind running the HockeyApp version which returned crash data to me immediately and from the stack I could see where in the code it was blowing up and with a little testing I found the exact cause of the crash, so now I could start on a fix. I sent the issue to Microsoft as if you called DateTimeFormatter.Format(DateTimeOffset.MaxValue) (which gives you a localized date time string) with some language/region combination, it would crash. I looked at the one case where because of threading I might pass a DateTimeOffse.MaxValue to the DateTimeFormatter.Format and determined that a correction for that which removed the problem from my app.

Releasing the Fix

Again the release process went very well and I took advantage of a store feature for promotions where you can generate free promo codes for apps and add-ons so that I could send those users who helped me find this bug a free add-on to remove the ads from their app, which was the right thing to do and again the promo codes were easy to generate and use so points again to the store there.

The Numbers

Downloads

clip_image002

You can certainly see the value of being mentioned on AppRaisin and WindowsCentral so when you release an app don’t forget to let the news sites know about it. So other then the opening rush, I’m seeing about 35 downloads a day, which isn’t a lot but really this doesn’t have a large market size as its Windows Mobile 10 and only for Lumia 950 and 950XL phones as they are the only ones with a barometer sensor so I wasn’t expecting huge download numbers.

Revenue

clip_image004

As you can see from the initial flat line, this app wasn’t making much from ads, but once the option to purchase an ad free version was released, revenue improved. This app made approximately $34.89 CAD for the month of November where about $1.48 CAD was from advertising and the rest $33.41 CAD was from users buying the ad free option over the last eight days of the month. So clearly, I should have had the ad free option available from the start, but the ad free option is generating about $4 CAD a day, which is more then I expected as I my target was about $3 a day so I’m happy.

Conclusions

For the first month, I’ve learned a ton and my revenue targets were passed by about 20% so I’d have to call this a good start. I’m currently working on another app and then once its released I’m thinking about going back and adding languages to this app to see what impact that will have. Currently this app is in 242 markets which are English only but available in a lot of countries and I see a lot of downloads in foreign countries so adding support for those countries likely makes sense and I have had users offer to help me with the translation, so once again Windows Phone users show that they are just a better class of user. I suspect that downloads and purchases will tail off in the future as there are only so many 950 and 950XL’s out there, but perhaps in the future someone will release a new Windows Phone which features a barometer sensor, or perhaps a Surface or other devices will a barometer, in which case it would be simple to support those with this app.

I do have a bunch more features that I want to add to this app which is good as it will help to keep the app fresh, so I’ll work on those as I get time between other apps that I’m writing, but otherwise I’m happy with the progress thus far and working on my next app which will work on a few more devices then just the phone and should be quite unique.

Metric or Imperial–what Windows 10 Mobile setting defines what is shown?

With the release of my Weather Barometer app I received a lot of feedback and questions around incorrect measurement units, so I thought I would put together a blog post about this as it’s a little more ‘interesting’ then one would expect.  Weather Barometer uses meters or feet for elevation and hectopascal (hPa which are the same as millibars) or inches Mercury (inHg) for barometric pressure.  The hectopascal is the international metric unit for measuring atmospheric or barometric pressure. One hectopascal is exactly equal to one millibar, and although the scientific community has officially adopted the hectopascal in preference to the millibar, the millibar is still used extensively throughout the world due to the proliferation of its use historically.  So we are using accepted measurement units, but the question is why don’t I see the unit of measurement I expect.

First let me describe the code that is responsible for displaying the units.  The native Windows GPS units are metric, so if we are going to display GPS elevation in metric then we don’t need to do anything, but if we want to display elevation in feet, however, then we need to convert the native GPS meters to feet; for that we use a Converter.

public sealed class ElevationValueToStringConverter : IValueConverter
    {
        public object ConvertBack(object value, Type targetType,
            object parameter, string language)
        {
            throw new NotImplementedException("Converting from string is not supported.");
            //return value;
        }

        public object Convert(object value, Type targetType,
            object parameter, string language)
        {
            double x;
            try
            {
                x = (double)value;
                if (Double.IsNaN(x))
                {
                    return "";
                }
            }
            catch (Exception)
            {

                return "";
            }

            if (RegionInfo.CurrentRegion.IsMetric)
            {
                return x.ToString("F0");
            }
            else
            {
                return (x * 3.2808).ToString("F0");
            }
        }
    }

NOTE the line RegionInfo.CurrentRegion.IsMetric is responsible for querying the system to see what units the user has selected.  The Microsoft documentation for this is here https://msdn.microsoft.com/en-us/library/system.globalization.regioninfo.ismetric(v=vs.110).aspx and states RegionInfo.IsMetric gets a value indicating whether the country/region uses the metric system for measurements, but why are we using ‘RegionInfo.CurrentRegion’, looking at the Microsoft documentation for this here https://msdn.microsoft.com/en-us/library/system.globalization.regioninfo.currentregion(v=vs.110).aspx we see that it gets the RegionInfo that represents the country/region used by the current thread, ie the Weather Barometer thread, so it should be returning a true or false concerning if the user’s region uses metric measurements or not.

The Windows Phone barometer sensor also returns pressures in metric so we have similar code for displaying pressure where 0.0295299830714 is the conversion factor for converting hPa to inHg.  I should mention that Converters are a cool and handy programming feature in UWP.

public sealed class PressureValueToStringConverter : IValueConverter
{
    public object ConvertBack(object value, Type targetType,
        object parameter, string language)
    {
        throw new NotImplementedException("Converting from string is not supported.");
        //return value;
    }

    public object Convert(object value, Type targetType,
        object parameter, string language)
    {
        double x;
        try
        {
            x = (double)value;
            if (Double.IsNaN(x))
            {
                return "";
            }
        }
        catch (Exception)
        {

            return "";
        }


        if (RegionInfo.CurrentRegion.IsMetric)
        {
            return (x).ToString("F2");
        }
        else
        {
            return (x*0.0295299830714).ToString("F2");
        }
    }
}

So now we know how the code works, how do the settings work to display the data in the units we want to see?  In the Windows Phone Settings there is ‘Time & Language’ which allows you to set ‘Speech, region, keyboard’.

wp_ss_20161103_0001

If we open that we see ‘Date & Time’, ‘Language’, ‘Region’, ‘Keyboard’ and ‘Speech’.

wp_ss_20161103_0002

Now I think that most people believe that unit of measure are controlled by the Region settings, which makes sense given that for most countries the units of measure mandated by the government.  Looking at the Region Settings we see we can change what Country/Region we are in by changing the selected country, so for example one would think that if the Country/Region is say set to ‘Canada’

wp_ss_20161103_0003

then metric units of measure would be used, whereas if we switch that to ‘United States’ that the phone would switch to using imperial given the United States uses the imperial system.  So first a screen shot of the Weather Barometer with Region set to Canada showing metric unit usage:

wp_ss_20161103_0005

Now if we change the Region to ‘United States’ and restart the phone as required,

wp_ss_20161103_0006

we see it is still displaying Metric units in the Weather Barometer.

wp_ss_20161103_0007

Now this isn’t what most people probably expected, so what is it that controls which units are used, if it’s not the Region setting?  If we switch the Region back to ‘Canada’, restart the phone to get back to our ‘all Canada settings’ and go into ‘LANGUAGE’ we see that I have ‘English (Canada)’ as the top listed language which makes it the active language.

wp_ss_20161103_00041

If we tap and hold our finger on ‘English (United States)’ such that the popup menu appears and then select ‘Move up’ until it is at the top of the list

wp_ss_20161103_0009

and then restart as required to make ‘English (United States)’ the active language and, when we run the Weather Barometer we see that the units used are now imperial. 

wp_ss_20161103_0010

So it’s the language setting which determines which units are used.  This might be confusing or counter-intuitive but it is how Microsoft set it up. I was thinking about this and I think it might because there is a country (or countries) that use different units of measure in different regions, and which might have different languages. Microsoft might have connected units to country/languages to accommodate this.  I don’t know of any countries where this is the case, but I can’t claim to be an expert on the topic.  Now remember on the REGION screen for Regional format we were using the default setting of ‘Match phone language’,

wp_ss_20161103_0006

what would happen if we changed that to say ‘English (Canada)’ and did a restart, leaving our active language as ‘English (United States)’?

wp_ss_20161103_0012

If we now run Weather Barometer the units are still shown in imperial,

wp_ss_20161103_0013

so clearly Language controls what units the system uses.

I hope this helps you understand how the Regions/Language setting determines whether your phone is using Metric or Imperial units. I would agree that it seems a little confusing and counter-intuitive, but I’m sure Microsoft has reasons why it is set up this way I’m still considering not using the system unit setting, however, and making it an application setting to make it easy for users to set and get the units they want.

As a follow up I have tested some language settings which should return metric but don’t, so I’m following up with Microsoft to see if its something I need to fix, a setting I’m missing or something else.  I’ll post as I get information.

Windows Phone, Continuum and MS Wireless Display Adapter

I have a 950XL (love it) and was using a Microsoft Wireless Display Adapter (very cool) connected to some projection system that had a HDMI input and a USB socket, so you plug the Display Adapter into the HDMI input and the other end of the Display Adapter into the USB socket (to power the device), connect up and you are rocking. So I fire up Power Point (sorry Don Box) and run my slide deck.


Now it would be great to get the presenter mode on the phone so I could read my notes for each slide, but I don't and I don't think you can, or if you can, to be honest I'm not sure how you get it. To advance the slide, I just tap the screen on my phone, which works great, but you might want to be careful how you hold your phone as I accidental powered my phone down once in the middle of a presentation (bugger). The phone has a range of about 20 feet from the display adapter, which is ample as I tend to move around a bit when I speak.
This presentation was a little over 2 hours long and it maybe used like a 1/5 of my battery, I was quite shocked actually how little battery it ate.


What was really cool is I was able to demo one of the apps I'm writing on Continuum and then I switched Continuum's display settings to display the Phone's screen so I could demo the same app running on the phone, so if you are an app developer I would consider Continuum and the display adapter to be pretty much mandatory in your tool kit.


I really liked showing up without a laptop, just less stuff is always good. Toss in that a lot of hotels have big screen TV with HDMI/USB sockets, I can travel even lighter now, toss a fold-able Bluetooth keyboard and mouse in the suitcase and I'm good to go for keeping up on email and such while on the road.


In short like everything around the Windows Phone, Continuum is a shamefully well keep secret, but it does indicate that Microsoft has plans for the phone, so at least that makes me happy.