in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, Office 365 / SharePoint Online and Visual Studio 2013.

September 2017 - Posts

  • Why Microsoft’s Investment in Quantum Computing Matters

    Updated: 10/2/2017

    When the Ignite keynote shifted to the topic of quantum computing, my inner geek came out.  As they brought out on stage some of the smartest minds Microsoft has to offer, some of the audience glazed over.  Many people come to Ignite to find out what they can use to do their jobs better in the next few months.  However, with quantum computing, some of the reality of what we see is a litter farther out but not as far as you might think.  Not all of us will use quantum computing.  In reality, most of us will never use it directly. After all, your phone is likely never to be powered by a quantum computer.  Especially since it has to be cooled to 0.01 K.  That’s –459 F or –271 C.   You’ll be affected by this technology though. 

    20170925_180232659_iOS

    If you look at the major technological advancements of the human races over the years, you think of things like electricity, semi-conductors, nuclear fission, and space travel.  When we figure out how to make a sustainable, scalable, quantum computer, that will be something that goes on that list.  It’s significance is somewhere up there with things like nuclear fusion and travel to Mars.  Maybe you don’t agree with me there, but it is a significant achievement none-the-less.

    What is Quantum Computing?

    Like many attendees at Ignite, I have a degree in computer science, but I would hardly call myself a computer scientist.  I reserve that term for the professors and PHDs that are doing real research to advance the field.  As you know, traditional computing uses bits which can have a value of 0 or 1.  Quantum computing uses qubits (or quantum bits).  A qubit can have a value of 0 or 1, but it can also have a value of 0 and 1 simultaneously though a phenomenon called superposition. 

    20170925_175503370_iOS

    While I don’t fully understand why this allows us to make computations faster, it effectively lets us compute more with less by being able to check multiple states at once. 

    What can Quantum Computing do?

    Quantum computing is really good at finding a needle in a haystack.  A lot of this is centered around the concept of quantum parallelism which allows a quantum computer to do multiple calculations simultaneously and examine the results.  You might have heard that quantum computing will have an effect on traditional cryptography.  This is partially true because many algorithms are based upon the calculation of two prime numbers together to generate a key.  Since quantum computing can do many of these calculations simultaneously, it can effectively brute force an attack on a key to decrypt the information.  However, only some algorithms are susceptible to this and there are new algorithms and key sizes that can work around this so don’t get too worried about using your credit card number online just yet. 

    20170928_134600081_iOS

    Outside of cryptography, quantum computing will have benefits for chemistry, health care, material science, and more.  While you personally may not be using a quantum computer, you will realize its benefits indirectly through the advances it makes possible.  From Microsoft’s Quantum Computing site, “Quantum computing could solve problems that would take today's computers eons in the time it takes to grab a cup of coffee.” 

    A new approach

    Microsoft’s approach is based on topological quantum computing.  With this approach they are seeing some early success with better error rates.  Error rates are common in early quantum computing because of the concept of quantum decoherence, one of the main obstacles of making a quantum computer.  Microsoft is also focused on building a scalable (think Azure) end-to-end solution.  Microsoft is working on the hardware, software, and tools that will work together to hopefully one-day make a usable solution.

    20170928_144916550_iOS

    Shown above, the plaque outside of the hydrogen isotope dilution refrigerator.  Explains the reason why quantum computing requires such extremely cold temperatures as well as some of the issues that quantum computing might solve.

    Microsoft isn’t the first to the table in quantum computing and they admit that.  Google, IBM, and many universities have already been working on quantum computing for some time.  This isn’t really a space race though.  I think this is something that benefits from more companies and teams working on it.  With that Microsoft is bringing their own approach.

    Quantum Computer Simulator

    With qubits, you really can do more with less.  To give you an idea of scale.  Where as typically do operations 64 bits at a time, today’s quantum computers only 5 and 16 qubits.  Microsoft has said that the simulators that you can run on your Windows PC will let you emulate up to around 30 qubits and you will be able to get around 40 qubits if you push the workload to Azure.  That might not seem like much but each time you add a qubit, you double the computational power.  For example 30 qubits, would be 2^30 while 31 qubits would be 2^31.  Microsoft wants to get to the point where they have computers with hundreds or even thousands of qubits.

    Quantum Computing in Azure?

    That’s what Microsoft want to do.  Just like you can buy a D series or M series virtual machine.  Microsoft wants to do this at scale so it would just be an add-on to its virtual machine offerings.  Whereas getting access to the power of today’s super computers isn’t really feasible for most of us, for businesses that need quantum computing power, you’ll be able to effectively lease time on one without having to invest in having one on-premises.

    20170925_175952697_iOS

    A programming language built for Quantum Computing

    I never imagined people writing programs for a quantum computer using Visual Studio, but that’s exactly what is coming.  At Ignite, they demoed the “Hello World” of quantum computing.  It doesn’t simply display text on the screen.  It actually transmits data from one qubit to another.  At least that's how I understood it.  The syntax reminds me of assembly language programming more than something like C#.  You’ll be able to run these examples on the simulator as well as others when they release the tooling later.

    20170925_180728904_iOS

    Conclusion

    If you have ever watched Big Bang Theory and you start reading up on quantum computing, you’ll start seeing some familiar names and concepts from the show.  Schrodinger’s Cat, Schor’s Algorithm, and Dr. Feynman.  The writers of that show actually do a pretty good job at making sure the show is scientifically accurate.  If you want to learn more about quantum computing, check out Microsoft’s site.  You can also read more on Wikipedia.

    Quantum computing isn’t going to help you sell more widgets today, but it will have an impact on your life sometime in the future.  Again I am no expert on this topic, so if you are a scientist and think I got something wrong, don’t flame me, kindly correct me in the comments and I’ll make updates.

    Posted Sep 27 2017, 10:29 AM by CoreyRoth with no comments
    Filed under:
  • Ignite 2017 Readiness Checklist


    I started doing SharePoint Conference readiness checklists back at SPC11 and I wanted to update it for Ignite 2017.   This list may look similar to previous lists, but I have made lots of updates and additions.

    What to pack:

    • Chargers / Power Supplies – I remember when I went to PDC05 (wow I am getting old), I forgot my laptop charger.  I was quite bummed.  Don’t forget the chargers to your laptop, Surface, phones, table, etc. I have gotten a few of these new emergency phone chargers at conferences lately and they are very handy here. Keep in mind your average day can be 16 – 18 hours plus and you don’t want to be left in the dark and miss that big gathering because your phone died.   Besides, you can’t summon a Lyft if your phone is dead.   Don’t forget chargers for any accessories like Fitbits, Apple Watches as well.
    • Backup power – If any vendors are giving out backup power supplies, grab them!  You know the portable chargers that you can take with you.  We have several of them and they are a life saver.
    • Tablet / Laptop – You’ll want some kind of computer whether that’s a tablet, laptop, hybrid of whatever.  You want something with a keyboard.  This makes it easier to send e-mail or post tweets.  Besides, the more you are on this device, the less you have to rely on your phone and use its power. You also can use these to fill out session evaluations.  There are usually incentives for filling out evaluations so I try to complete each evaluation right before the end of the session so I don’t forget.  
    • Cash – There are a lot of free events but you might go do something before or after the conference and I am not a fan of running tabs at busy restaurants and bars.   Don’t take it all with you every night.  Leave some in the hotel safe.
    • Snacks and Water – After a long night, you will want something to eat.  At the minimum, you might want something to eat in the morning.  The hotels will likely have stuff in your room, but it will cost you dearly.   Stock up whenever you see them available.   Hydrate!
    • Business Cards – Even if you are not in sales, bring twice as many as you think you will need.  You will go through them faster than you think.   It’s amazing how many people forget these at a conference.  Don’t be one of those people!
    • Bail Money – The Houston SharePoint Users Group has a running joke about always keeping a stash of bail money around when attending a #SharePint.  You never know what is going to happen.  If you’re following @SPCPartyPatrol to all of the parties you might certainly need it.
    • Headset – If you think you are going to have to take any calls during the week, don’t forget your Bluetooth or wired headset.  This will make it easier to do your calls for sure.
    • VPN Tokens - If your work network requires a VPN token or Smart Badge you might want to bring it if you think you might need to use it.  Otherwise, you might conveniently forget it, to ensure you can focus on the conference. :)

    Before you go:

    • Arrive early – Come in early and have some fun in Orlando, before you get into the conference grind.  Many of us will be arriving Friday or Saturday.  I tend to arrive on Saturdays while most of the foreign nationals I know, tend to arrive Friday or earlier.
    • Don’t leave early – Normally I say this, but they have extended the conference by a day.  Come Friday, I’ll be ready to be on the first plane out of Orlando.
    • Set your schedule on MyIgnite - This will make your Ignite organizers happy when it comes to capacity planning.  You aren’t required to go to that session you schedule, but it will help you pick from the 10+ sessions going on at any given time slot.  Go to MyMignite and set your schedule now.   Not sure about a session, watch the teaser video on YouTube.
    • Create your Bio on MyIgnite  – Whether you are an end user or a rock star, take a few minutes to write about yourself.  Include where you work if you want along with what you typically do with the Microsoft stack and what you want to get out of the conference.  Upload a picture of yourself to make things more personal.  Be sure and set the privacy settings as desired.  Set your MyIgnite bio now.  Be sure and edit your profile on Yammer too.
    • Connect on MyIgnite - If you go to the Communities tab, you can search for other attendees. 
    • Get on Tech Community - The conversations have already begun about Ignite on Tech Community.  This is a great way to find out what other people are doing, network with others, and talk with people with similar issues.  Most importantly, you can have a conversation about the sessions while they are occurring. 
    • Create a #msignite Search in Twitter – Twitter hasn't gone away by any means, so keep an eye on the activity of the #msignite hash tag.  However, this year, I think Yammer is where you are going to find the most info and conversations.  Twitter will still be good to find out about sessions, events, and it will generally give you an idea of what is happening at the conference.  Be sure and include the #msignite hash tag on anything you post and help get this conference trending!
    • Follow @MS_Ignite on Twitter – @ms_ignite is the official twitter account for Ignite.  This account often posts useful stuff about the conference.  I’ve also used it to ask questions or provide general feedback and I’ve had very good luck getting a response.  Keep in mind this twitter account is effectively manned by one person though.
    • Download the Ignite Mobile App – Whether you use iOS, Android, or you are one of the last few Windows Phone users, be sure and download the Microsoft Ignite App before you go.  Download it now while you still have good Internet!
    • Reach out to your local User Group – Find out what your local User Group is doing while at Ignite.  Many of them are having meetings or socials. 
    • RSVP for Parties – Unfortunately, if you haven’t RSVPed for parties by now, you’re probably out of luck.  However, being persistent can get you in.  Talk to the vendors in the exhibit halls hosting the parties.  Sometimes you can just show up and talk your way in.  Be sure and follow @SPCPartyPatrol to find out where the parties are too!
    • Arrange for Ground Transportation  - Don’t forget to arrange for ground transportation.  You really don’t need a car in Orlando, but you do need a way to get there.  Taking a taxi or Lyft usually isn’t too expensive and there are plenty of shuttle options as well.  This may be less of a concern on arrival but more for your departure.
    • Leave space in your bag – Between the conference materials and the vendors you are going to end up with a heap of product information, trinkets, and T-shirts.  Make sure you have room in your bag to bring them home.  Otherwise you’ll be hand carrying them on the plane or leaving things behind.
    • Update your devices - Now is a great time to make sure your devices are up to date with the latest security patches.  Make sure they are charged too!  If you have an iPhone and you haven’t updated to iOS 11 yet, do it now!  Don’t be one of those people downloading 2 GB worth of updates on the conference WiFi.
    • Set your out-of-office - You're at this conference for a variety of reasons, you need to focus.  Try to stay out of Outlook and let people know that you will be slow to respond.  If you need to stay connected, I recommend picking one time of day, such as in the morning before sessions, to catch-up on what's happening back at home.

    What to do at the conference:

    • What happens in Orlando, will not stay in Orlando– Nerds have gadgets and they like to take pictures.  Do something stupid and you can rest assure it will be on twitter or Instagram within seconds.
    • Ask questions  - Don’t be afraid to walk up to the mic and ask a question.  That’s what you’re here for.  If you don’t want to ask it in front of everybody, wait in line and talk to the speaker at the podium just be mindful that the speaker has to clear out in a hurry.  Don’t be afraid to approach speakers outside the room either.  Most of them are friendly and are easily engaged using beer and cocktails. :)  It's not uncommon to find them at the official SharePint bar.
    • Make friends – You may run into lots of people you know, but many people aren’t active on twitter and aren’t familiar with the SharePoint community at all.  Find a friend if you didn’t come to the conference with any one.  It’s much more fun to go do all of the activities in a group rather than by yourself.  If you have coworkers there, feel free to hang out with them, but don't feel that you are obligated to.
    • Go to the evening events - I can't stress this enough.  Try to avoid team dinners that overlap with the events.  Get them rescheduled or skip them!  The evening events are where the real connections are made, friends are found, contracts are signed, and new jobs are discovered.  If you just go to the conference and nothing else, you are missing out on half the experience.
    • Remember to eat - This one sounds obvious but it’s not.  You may be going to lots of parties with nothing but light appetizers.  This does not give you a good base to work upon before embarking on a night of massive consumption. Pace yourself!
    • Don’t worry about writing everything down – Remember the slides and content will be on Yammer before the session.  Don’t stress out because you weren’t able to write down a URL or code snippet on a slide.   You can also take pictures of slides as well.
    • Visit the Exhibit Hall – The exhibit hall is a lot of fun.  Besides all of the SWAG and drawings, you are likely to find out about evening events that way. Make a point of going there every day.  I spend a good majority of my time there during the conference.  You'll never know who you run into.
    • Attend the sessions – Don’t skip out on the morning sessions.  If I have to get up early, so do you. :)
    • Attend the Hands on Labs – If you haven’t had a chance to get your hands on the latest technology, get down to the HOL and check it out.  This is a great way to experience the product without having to take the time to install it.   It opens at 9:00 am on most days (after the keynote on Monday).
    • Take a test – Go roll the dice and find some time to take a test.
    • Don’t underestimate travel times – It’s a long bus ride to the convention center.  It can be between 15 and 30 minutes if not more.  Even within the convention center, there are long walks between sessions.  Plan accordingly.
    • Set your alarm before you go out for the night - Before you go out for the night, set your morning alarm on your phone.  You may not remember when you get back to your room.
    • Arrive early to sessions – Many sessions will fill up and entrance will be denied, especially futures sessions.  Don’t get left out by showing up late.
    • Don't be afraid to leave a session - If you decide in the middle of the session, that this one isn't for you, don't be afraid to quietly step out and go see something else.  A few speakers might call you out for it, but most won't. :)
    • Learn hash tags for the sessions you are attending – Every session you are attending has an associated hash tag that you can follow. 
    • Don’t wear your badge outside of the convention center – Nothing says you don’t have any game like walking out of the convention center with your badge on.  Take it off as you exit the area.  Don't lose it though as it may cost you a lot to replace it.
    • Don’t forget your badge (and lanyard) at the attendee party – You’ll need your badge everywhere you go.  Bring it and the lanyard if they aren’t doing wristbands.
    • Keep your phone charged – The battery life on LTE phones is horrible and even worse when you are tweeting non-stop all day.  Keep an eye on your phone’s battery life and charge up throughout the day. 
    • Don’t be afraid to leave for lunch – I’m not a huge fan of conference food and it rarely gets along with my diet.  Usually by the second or third day I am grabbing anyone I can find and going off-site.  Find me at the conference and you can join me.
    • Fill out your evaluations – These really are important to the speakers.  Let them know they did a good job and take the time to leave actual text comments in them.
    • Establish rendez-vous points – Establish meeting spots in advance with your group and set a time to meet. 
    • Go to the attendee party – Go to the attendee party.  If you are expecting to meet people there, meet them before you leave the hotel.  If you don’t walk in with the people you want to see, you will likely not see them that night. 
    • Hydrate - Drink lots of water throughout the day.  This is especially important if you have had a lot of late nights.
    • Silence your phone during sessions, turn it on as loud as possible everywhere else - Don't be "that guy" who has your phone ringing in the middle of a session.  That's guaranteed embarrassment. When you're not in sessions, turn the volume up on it as you probably won't hear it go off otherwise when you get a message.

    That’s my list.  I’m sure there are other things to remember.  Do you have anything else to add?  Leave a comment.  This probably goes without saying, but if you are not on Yammer and Twitter, now is the time to join.  It’s the best way to keep up with what’s happening at the conference.

    Follow me on twitter: @coreyroth.

    Posted Sep 22 2017, 01:27 PM by CoreyRoth with no comments
    Filed under:
  • Six considerations for running a multi-tenant mobile app using Azure App Service

    With the launch of HappenZap, I now have two multi-tenant mobile app platforms running on Azure App Service.  When it comes to the backend services for mobile apps, Azure App Service really isn’t used that much though.  In fact, in the 2017 Ionic Developer Survey, Azure only accounted for 10% of the users using it as a server side platform (behind Heroku, Digital Ocean, and Amazon ECS).  For authentication, it ranked even lower at only 2.9% of the survey results.  For Push Notifications, it wasn’t even on the list.  However, for both my platforms, I have chosen to use it and have been doing so successfully.

    Why did I go with Azure App Service?  When I was getting started with mobile development, I found Azure as an option pretty quickly.  Having a lot of experience around the Microsoft stack, I found that App Service was something I could get going with.  Maybe this was partly due to my lack of experience with mobile, but I chose to go this route and I am pretty happy with a lot of it.  Most mobile developers I have ran into don’t even consider Azure App Service as an option, but I think it’s worth a look.

    Let’s look at some of the different aspects.

    Database

    Azure App Service offers Easy Tables and they are in fact easy.  They are awesome for prototyping because you don’t even have to define a schema (although I always do in my apps).  In fact, you can basically just insert anything and if the column doesn’t exist in your table, it will create it for you.  it automatically creates an id column, a createdAt, modifiedAt, version number, and deleted fields for you as well.  It supports a soft-delete capability that you can easily turn on as well.  From a developer stand point, it’s easy to get started with a simple API around your database tables using node.js.

    From a cost perspective, this is where you want to plan.  Even the cheapest Azure SQL database costs you $5.  For a service I am charging $40 a month for, having a separate database for each customer is not cost effective.  As a result, I put all of my customers in the same database and every table is segmented by a tenant_id column.  This works, but that means you have to write a level of security into your API.  We’ll talk more about authorization in a bit, but this means you have to validate that the user making the API call has permission to make queries into that tenant.

    Azure Web Apps / Mobile Apps

    Whether you create a new “Mobile App” or “Web App”, it’s basically the same thing with a different icon in the Azure Portal.  When thinking multi-tenant, your goal is to create one of these that can serve all of your clients.  If each client has to have their own Web App, you will quickly exceed the memory capacity of your App Service plan.  There are reasons why you might consider having more than one though as you will see when you read on.

    Authentication

    Authentication in mobile apps with Azure App Service is easy due to the large number of SDKs available including Cordova, Xamarin, and native iOS and Android.  App Service supports authenticating against Azure Active Directory, Facebook, Google, Microsoft, and Twitter.  If you want to authenticate against Microsoft consumer or AAD, App Service is a great option because Firebase doesn’t support it.  You can authenticate against one or all of the providers too.  Logging a user in as simple as calling azureMobileClient.login(‘providername’).  On mobile apps, it will open the InAppBrowser and sign the user in.  This works great for interactive logins but auto-login with the token is a bit of a different story.  I’ll post in the near future about how to do that as it is not well documented.

    The way authentication works is that your mobile client makes a call into the App Service back in which in effect proxies the request over to the appropriate provider.  The nice thing about this is that, any subsequent API calls you make automatically pass the user’s token and the API can respond accordingly if the user is not authenticated or their token has expired.  If you don’t need authentication on a particular type of API call, you can allow anonymous users to access it.  For example, anonymous users might get read access, but authenticated users can insert / update / delete.

    The issue you run into with authentication on app service is that all users have to request the same scope / permissions.  For example, you may want end users to have just basic profile access to Facebook, but you want administrators to be able to manage pages.  The permissions you request are set in the Azure Portal and are essentially fixed.  That means all users have to request the same permissions.  That’s no good.  One way to work around this is to call the authentication provider directly.  For example, I’ve done this with AAD to request a scope that included admin consent credentials such as Group.Read.All.  Another way to work around this is to have multiple Azure Mobile Apps configured with different permissions.  This really doesn’t scale all that well either, but could be an option for simple scenarios.  It does create a bit of overhead though since you have to push code to each one and your client side code has to know which endpoint to call.

    Authorization

    Azure takes care of the Authentication for you, but authorization is still up to you.  There are not a lot of complex examples out there for this, so I’ll probably write something up soon.  Your API will receive the user’s context and therefore you can get there access token and username if needed.  For authentication, I simply implement a users table which has the user’s unique id, role, and tenant id.  I first make sure that the user is in that tenant id.  Then I make sure the user has the right role for whatever operation I am performing.  It’s fairly simple, but it works.

    Save Cash with Caching

    You pay for every bit of data egress from Azure whether that is your API or SQL.  It can really add up too as your volume grows.  Be sure and take advantage of caching wherever you can. Cache frequent database calls at the API layer.  Cache data that doesn’t change frequently on the mobile app.  Only get data when you need it.

    Push Notifications

    Azure Mobile Apps supports push notifications with Google, Apple, Amazon, and a few others.  It’s pretty simple to set up and their are methods built into the node.js SDK that make it easy to set up.  However, there are a few limitations.  First, App Service doesn’t support the newer key based model used by APNS so that means you need a certificate (for both development and production) for every tenant.  The next issue is that you can only install one key per instance of an Azure Mobile App.  That means you would have to have a separate Azure Mobile App per tenant.  That doesn’t scale well at all.  I used this approach for a while but I switched over to Firebase Cloud Messaging and now I can use a single tenant.

    Summary

    Azure App Service is a cost effective way to run multi-tenant mobile applications.  There are factors that you have to consider, but I do think its a viable choice for hosting your mobile app’s backend. 

  • Ionic app with Cordova Firebase plugin terminates on startup with Xcode 9 and iOS 11

    If you are trying out your Ionic / Cordova apps on iOS 11 with Xcode 9, you might run into an issue where the app terminates immediately.  After examining the logs, you will see that the plugin cordova-plugin-firebase is terminating the app because it cannot find the GoogleService-Info.plist file (even though it is there).   You’ll see an error like the following in your logs.

    The GOOGLE_APP_ID either in the plist file 'GoogleService-Info.plist' or the one set in the customized options is invalid. If you are using the plist file, use the iOS version of bundle identifier to download the file, and do not manually edit the GOOGLE_APP_ID. You may change your app's bundle identifier to '(null)'. Or you can download a new configuration file that matches your bundle identifier from https://console.firebase.google.com/ and replace the current one.

    *** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in GoogleService-Info.plist or set in the customized options.'

    If this happens to you, check your version of the plugin.  On one machine, I had 0.2.4 and on the other I had 0.2.1.  It worked on 0.2.4 so removing the plugin and re-adding it fixed it for me on the affected machine.

  • How to: Fix Something went wrong error in Outlook Customer Manager

    I actually use Outlook Customer Manager (OCM) quite a bit to keep track of my leads for my product BrewZap, a custom mobile app platform for breweries.  Unfortunately, it’s not uncommon to run into an error when launching it that says “Something went wrong”. 

    Screen Shot 2017-09-18 at 7.23.03 PM

    The problem is that sometimes this error will even occur after you close an d restart Outlook.  If that happens to you, then open up Internet Explorer (yes IE), and go to Internet Options.  Then click on Delete under Browsing History.  Check all of the boxes and then restart Outlook.

    Screen Shot 2017-09-18 at 7.27.05 PM

    If all goes well, Outlook Customer Manager will start again and you can use it.again.

    Screen Shot 2017-09-18 at 7.28.10 PM

2015 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems