Month: April 2017

Recently, I’ve started working on a small side-project with one of my friends and this project requires a mobile app. Originally the idea was to do a cross platform mobile app using Xamarin (the reason for choosing Xamarin will be discussed later), but quickly we realized that this would not be feasible.

When you mouse over the last quarter of last year (2016) you’ll notice that Windows is sitting at a mere 0.3%. Targeting a mobile app for such a small portion of users does not seem feasible at all (esp. for a small side-project).

When you look at the Android vs. iOS percentages, these are at least a little reasonable with iOS sitting at 17.9% and Android sitting at a staggering 81.7%.

Cross platform considerations

We had then considered, “let’s make an iOS and Android app, using Xamarin”. Since Xamarin gives us easy tools to create both apps, however, there was one small problem. After creating the Xamarin cross platform project, we came to understand that creating iOS apps, requires a Mac. This is apparently due to some licensing restrictions from Apple that require all iOS apps to be built and compiled on Mac computers.

Needless to say, we decided to scrap the notation of creating any cross platform application, since we do not have funding to purchase a Mac in order to develop an app for iOS. This is an unfortunate restriction that exists, however my friend and I both have Android phones which made the decision that much easier.

Verdict

I will leave you with the following food for thought. Considering that the percentage of user’s using smart phones is sitting above 80% for Android, how much visibility/usage would you lose if you solely developed for Android? My advice would be – if you do not have a Mac, do not worry about creating an iOS app at all, since the number of users that you will be losing will have little impact on your overall success. If however, you do have a Mac, and the extra time to invest in simply creating a native UI for the iOS app, go ahead and create an iOS app too. In closing though, I do not believe that it is worth any effort to create a Windows phone app, since the percentage is extremely small.

Xamarin choice

The video below was a great introduction into creating cross platform mobile apps using Xamarin and the link provided for the video jumps straight to a section where the speaker explains some aspects about mobile development.

One of the key points that stood out is that Xamarin offers native performance for the apps that you create. This is because it hooks into the native API and is able to build the app as a native app for the platform.

This is different from other tools (e.g. ionic) out there which he describes as a “hybrid” approach . With these tools, the app is usually a general purpose browser that runs your app. This gives no native performance and does not give access to native APIs.

For the above mentioned reasons, Xamarin is the best tool to create an mobile app – if you are looking to code the app in a C# environment. If you are a Java developer looking to create an Android app, Android Studio might be more applicable for you.

Inception – the word’s definition is simple, the start of something . The movie on the other hand is a lot more complex and intricate.

Inception follows a team of highly skilled professionals on a mission to plant an idea in a multi-millionaire heir’s (Robert Fischer – played by Cillian Murphy) mind, in order to get him to dissolve his father’s company. In order to get Mr Fischer to dissolve his father’s company, the idea needs to be planted deep in his subconscious so that he believe it is his own idea.

In order to do this, the team performs what is known as “dream sharing” – a method of entering someone’s dream – whereby the original dreamer is unaware that they are dreaming but everyone else knows that it is a dream.

Most of the movie takes place in the dream world – where time is highly exaggerated. As Cobb (the main protagonist – played by Leonardo DiCaprio) explains – normally five mins in the real world translates to an hour in the dream world.

The movie deals with some complex inner conflict which our protagonist is struggling with. With the help of Ariadne (played by Ellen Page), Cobb’s new dream architect, he is able to break through the walls of this conflict and face it head on.

The movie keeps you guessing and pushes the boundaries of what is real and what is a dream to the extent that you will be mesmerized for the entire duration of this lengthy film.

Spoilers galore below this line

The movie begins with a man – Cobb – who washes onto the shores of a beach. Some security around the beach find him and take him to the “man in charge”. The man, unknown at this point, tells Cobb that he can recall him from “some half-remembered dream” many years ago…

The scene cuts and Cobb is now having dinner with another man, in a seemingly similar room. It is here that we learn that Cobb is an “extractor” – one who goes into people’s dreams to steal ideas.

We begin to understand that Cobb is inside a dream, and he is trying to get information from this man he was initially having dinner with – Saito. Things turn sour and Cobb is unable to get the information he needs from Saito’s mind, as Saito was able to realize what Cobb was trying to do.

Jump back to reality and we learn that Cobb is on the run from a corporation that hired him to get the information from Saito. Saito finds Cobb and his apprentice -Arthur – and makes him an offer which he can’t turn down. Saito’s request is (as he would deem) simple. Perform “inception” in someone’s mind. The start of a idea. Arthur proclaims that it’s impossible, but Cobb assures us that it is possible, the idea just needs to be simple! Saito explains that he wants a multi-millionaire heir (Robert Fischer) to dissolve his father’s company. The idea is seemingly more complex that Saito had originally lead us to believe.

Cobb needs to assemble a team to help him plant this idea into the mind of Robert Fischer. During the assembling of the team we learn that Cobb is a man seeking redemption for a crime which he did not commit. The murder of his wife. He longs to return to America to see his two children – which he had to leave behind due to the charges against him. Saito’s offer from earlier will allow him to return to America with the charges dropped. This is where Cobb gets all his motivation to complete this job.

Cobb finds all the members of the team he requires; a new architect (to build dream levels), a forger (to help impersonate others within the dream), a chemist (in order to produce a sedative strong enough to keep them in uninterrupted dream state), and a close friend of Cobb’s.

Mr Fischer’s father dies and it gives the team the perfect opportunity to enter his dreams – because the funeral is held in Los Angeles, a 10 hour flight.

The original plan is to go three levels deep (a dream, within a dream, within a dream). The reason for this is, each dream level compounds time giving them more time to work on getting the idea to stick in Mr Fischer’s head. However, as soon as they enter the first dream level, Mal (Cobb’s late wife) is in the dreams too, as part of Cobb’s subconscious.

The team manage to “kidnap” Mr Fischer in the first level, despite the obstacles that they face. Apart from Mal interfering with the dream, Mr Fischer has also been trained against “dream extraction” – which means that his subconscious is able to fight the invaders – with extreme force.

Once at the second level of the dream, Cobb decides to masquerade as “Mr Charles” – who is effectively the head of security for “dream extraction” security. This involves telling Mr Fischer, that he is in a dream, which can be extremely dangerous. However, this pays off and allows the Team to win over Mr Fischer’s trust.

They then proceed into the third level of the dream where Mr Fischer is unfortunately killed by Mal before he is able to unlock the safe – where the idea has been planted. This forces Cobb and Ariadne to go yet another level deeper, in order to recuse Mr Fischer, so that he can open the safe and can successfully have a new idea in his mind.

Cobb and Ariadne manage to find and recuse Mr Fischer, but at a cost that Cobb is left behind – entering limbo. At this point, we jump back to the scene where we left right at the beginning of the movie and realise that the man Cobb after washing onto the shore is Saito.

We are lead to believe that Saito and Cobb kill themselves which allows them to leave the dream state they were in on the plane. Once Saito awakens, he promptly makes the phone call to allow Cobb to re-enter America (free of charges).

Cobbs enters America and is greeted by his grandfather, who takes him back to his children. Cobb meets his children, but not before spinning a spinning top on the table. The significance of this top is that in the dream state – it is believed to spin forever. Before the top is able to stop spinning, the picture fades to black.

I have compiled my notes from a couple of years ago back onto a wiki format (on my wiki site) for everyone to have access to. The content that I have uploaded relates to a home surveillance project that you can do with a raspberry pi and a web cam.

You’ve recently installed TeamCity on your Azure Windows Server and would like to access the TeamCity page from a remote computer. However, you are getting a timeout error when you try to access this page from the remote computer. What gives?

Firstly, let me just point you to these two resources for getting started with Azure Windows Server and TeamCity installations.

For the Windows Server setup, there is a tutorial video that you can watch on the Azure Portal. Navigate to: https://portal.azure.com/ and you will see the following on your dashboard.

Once you select Virtual Machines you see the tutorial to get started with Windows Server on Azure.

Once you’ve installed TeamCity, you’d like to access it from a remote computer, as mentioned previous, however, you can’t because the web page keeps timing out. I experienced the same problem and below I’ve got the solution for you to save you some headache (as I had).

While searching around for why this was happening, I found this article here: http://www.danmusk.com/setting-up-teamcity-8-on-an-azure-virtual-machine/. It seems extremely promising, until I realized that it appears to be out of date, and Microsoft have made some major changes to the way that they have the UI structured to achieved what is mentioned in the article.

In a nutshell, what we need to do is configure the port to be accessible from a public facing computer (i.e. the remote that you are trying to connect from). From the Azure environment, this is handled slightly differently than a traditional server where you would just configure the router/hub/switch and the server’s firewall settings. Once you know where to find the configuration, it is much simpler than doing it the traditional way (as one would hope for cloud hosted solutions).

Let me walk you through the steps to get this configured.

Please note that this “tutorial” is for the UI version of Azure as at April 2017. If you are reading this in the future and do not see any of the components that I am talking about, Microsoft may have changed the way that you need to navigate to the setting in order to get this configured. Hopefully, the explanation that is provided here is enough to help you regardless of the UI.

On your dashboard you should see the following

Note the Network Security Group. This is the one that you need to click on.

Once there you will see a overview page similar to the one below (note that the TeamCity line will be missing in your case, since it has not been set up yet). (Click on the image if it is too small)

From the side menu, select Inbound Security Rules and you will see an option to add a new Security Rule.

Once you select Add, you will be able to fill in the details that pertain to your TeamCity instance. Enter the port number that you used when installing TeamCity and you will now be able to connect to your TeamCity instance from a remote computer.