High speed search millions of phone numbers thumbnail

High speed search millions of phone numbers

In my last post, I wrote about validating phone numbers in Kenya and in it introduced very specific regular expressions. If you haven't read it, you might want to do before proceeding with the rest of this post. A couple of days after the post, I was presented with millions of records having such numbers. The requirement being able to search through these numbers to get the records and get just one of them. As would other persons in my profession, I uploaded the data into a database on my local machine. I chose MS-SQL and used the SQL Server »

Phone Number input validation in Kenya thumbnail

Phone Number input validation in Kenya

Many times, I have seen developers write code for validating entries and they write very many if blocks or worse combine them with numerous switch cases. This approach would not have a problem but then more times than not, they need to be updated in certain periods when something new arises or for certain edge scenarios not originally considered. One of this situations is validating phone numbers input into a field. For the Americas and Europe, this is not normally a problem because several frameworks will have that already inbuilt. This is not the same for other countries, such as »

Changing Azure WebApp AppSetting in VSTS

During an application development cycle, we almost always begin by testing locally. Several times, it works locally but not after deployment. But we also do not like deploying directly to the production environment. To solve this, it is common practice to have a Staging environment that works in between. In Microsoft's Azure App Service, an App can have several slots from the Standard ties and above (as at the time of writing). I commonly use this feature to implement a Staging slot. The essence of the Staging slot is to check if everything is okay before making the app version »

Asp.Net RC2 WebApp with WebJob and VSTS Automation

So you want to deploy your web app and web job(s) together in Azure? Are you looking for the upgrade of my earlier post? This post is here to make it easier for you. It works for Visual Studio Team Services (VSTS). Step 1: Restore NuGet packages For this step, use a simple command line task. Tool: dotnet Arguments: restore Step 2: Build all the projects For this step use a Visual Studio build task. You only need to set the BuildConfiguration to x86 or x64 or Any Cpu or to the environment variable $(BuildConfiguration) since the rest are »

Using authenticated NuGet feeds with dotnet RC2 on VSTS thumbnail

Using authenticated NuGet feeds with dotnet RC2 on VSTS

If you have been using dotnet RC2 with private NuGet feeds such as those offered by VSTS, you might have come across a bug during package restore for automated builds. When working in Visual Studio, the package manager UI handles the authentication for us. If you need to restore on an automated build, you'll get an error reading Unauthorized (401). This is explained in the following github issues: dnx issue #2056 dnx issue #3314 dotnet cli issue #2510 dotnet cli issue #3097 There are more discussions and the issue is pending a fix. The workaround is to put a clear »

asp.net core rc2 with Service Fabric

If you have checked the official site here, you should have seen a warning about the breaking changes in asp.net rc2. It's been about 2-3 weeks since but the template has not yet released. One of Microsoft's employee has been working on a preview/beta available here. However, I found it to have too many details, confusing at first. The solution included for asp.net 4.6 (previous versions of asp.net) is inside one file, the communication listener. I thought; why not do the same for asp.net core rc2? Well, the file is here. It's all you »

Does the mobile carrier matter in your IoT project? thumbnail

Does the mobile carrier matter in your IoT project?

I have written about IoT communication for about 3 months now. It started here. This is the 10th and final blog post on that topic at least for some while. I choose to discuss something with less of coding but more about reliable communications. So let's get right into it. Not many times people consider the mobile service provider for their IoT data needs because they can change the plan anytime. But does it really matter? Well, it does. Before you disagree let me explain it to you. Bandwidth Typically, when you choose a mobile carrier, you are charged by »

Use Azure IoT Hub without client libraries (MQTT)

This is the second last post of the series on IoT Communication which has gone on for slightly more than a month now. In this post, I endeavor to connect an IoT device to the Azure IoT Hub without using the provided IoT libraries. Why Azure IoT Hub? To many, this is a matter of personal preference more than it is of functionality. The Azure IoT Hub is more of a gateway than anything else. It will connect to your IoT devices while your other applications (e.g. management web interface etc.) connect to it. My reasons for choosing it: »

Use MQTT with mbedTLS in Keil uVision 5 (MDK)

Today's post is rather short as the end to the series on IoT communication nears. As per the previous blog post, a TLS connection was established. A few issues like client-side certificate verification were solved. In this post, all I sort to show was doing the MQTT communication on a secure port. The changes done to the code are as shown in commit b85db2c9. The MQTT broker used is hosted at iot.eclipse.org:8883. I printed out the bytes sent and received using a simple hex dump function which I added in commit 82b44fec. The hex dump function gives »