Predicting future with F# and Azure Machine Learning

Earlier this year I blogged about StockEstimator – my side project for predicting future stock prices. Recently in addition to F# module, which estimates future prices, I added Web Service that takes advantage of Azure Machine Learning to do the same much faster.

Last month I talked about my project at .NET Developers Association Meetup in Redmond and in Seattle. I streamed both session with YouTube live, and recordings are already available:

Both videos cover the same topics. Not sure, which one is better. However, there was one gentleman who went to both my talks and he said that the second one was better 🙂

In both presentations I do a quick intro to F#, an overview of Machine Learning, and how I took advantage of both to predict future stock prices.

If you are interested in F# I recommend you to check my Getting started with F#.

Presentation slides are available here (you can find there a lot of references to materials about F#, Machine Learning and Azure Machine Learning).

StockEstimator project is open source and available on github.

I’m not going to stop here. As you can see on my slides, and at the end of my presentations I have future plans to evolve this overnight project 🙂


Azure Portal Tips & Tricks – 23. Download invoice

Azure Portal Tips & Tricks is a series of short videos where I am showing various features of the Azure Portal and how you can take advantage of them to be more productive.

In this video I am showing how to download invoices from the Azure Portal.

You can follow the series by subscribing to my channel or going directly to Azure Portal Tips & Tricks playlist:

If you have any suggestions or questions about the Azure Portal, or there is something in particular that you would like to see in this series, tweet me at @JakubJedryszek or leave a comment.


Continuous Integration and Continuous Delivery for Xamarin.iOS with VSTS (Vistul Studio Team Services)

Visual Studio Team Services has great Continuous Integration and Continues Delivery support for Xamarin.

Recently I was configuring pipeline that would build the project, run unit tests (with xUnit), run UI tests (with Xamarin Test Cloud), and, if all tests pass, deploy new version of the app to Hockey App. During the process of creating VSTS build definition I encountered a few problems that I think are worth to share with you.

To make a basic build definition with building Xamarin.iOS project and deploying to Hockey App with VSTS+Xamarin check James Montemagno’s Continuous Integration for iOS Apps with Visual Studio Team Services first.

The issues I had, that were not described anywhere online:

  • I couldn’t use “Visual Studio Test” task for running xUnit tests, because every build definition on VSTS can be executed by only one build agent, and to build Xamarin project I needed Mac build agent.
  • How to run UI tests (with Xamarin Test Cloud) using the same build that would be later on deployed to Hockey App? Test Cloud requires init code that later on shouldn’t be present in deployed app.

Running xUnit tests with Mac build agent

This requires adding 2 tasks to build definition:

  1. Command Line task – to run tests with mono and xUnit console runner.
  2. Publish Test Results task – to display results in build summary

First, install xUnit console runner NuGet package.

To run tests, add command line task with following settings:

  • Tool: mono
  • Arguments: packages/xunit.runner.console.2.1.0/tools/xunit.console.exe YourApp.UnitTests/bin/Debug/YourApp.UnitTests.dll -xml UnitTestsResults.xml

Remember to replace YourApp with your app name, and set the same xUnit runner version that you have installed.

To publish test results, add “Publish Test Results” task with the following settings:

  • Test Result Format: XUnit
  • Test Result Files: **/UnitTestsResults.xml
  • Always run: true

Running Xamarin UI tests with Test Cloud before deploying to HockeyApp

The solution there is rather simple: build in Debug mode that has TEST_CLOUD preprocessor directive defined, run tests, and then build again in Release mode before deploying to Hockey App.

Delete files before build

For a while I couldn’t figure out why my tests are not passing when run from VSTS while they pass on my machine. It turned out, VSTS was using old builds for tests. I am not sure about MacInCloud, but if you are using your own Build Agent running on your Mac the directories that contains binary files are not being cleaned up before next build automatically. To avoid using old builds, you can add, at the beginning of your pipeline, “Delete Files” task and delete everything from bin/* and obj/*.

Summary

The final build definition looks like that:

Azure Status VSTS build definition

Let me know if I missed some details! I would be happy to add them! Also – if you know better way of doing that – let me know as well!


QCon Shanghai

QCon

Last month I had a pleasure to visit China and attend QCon conference in Shanghai.

I gave a talk about building large scale web apps with TypeScript where I updated my talk from last year to TypeScript 2.0, I showed TypeScript boilerplate project created by Remo Jansen, and using TypeScript with Aurelia Framework.

QCon

//video-coming-soon

QCon

I had a great turnout. Room overflow with over 150 people. I also got a great feedback. People could vote green(awesome), yellow(ok), red(bad), and I received 128 green, only 10 yellow and 1 red, which gives over 92% extremely satisfied attendees.

QCon

QCon has the best of the best from the industry. In Shanghai I met Jaime Levy (famous UX strategist from LA), Kinshuk Mishra (Director of Engineering at Spotify), Pete Soderling (successful entrepreneur from New York and Silicon Valley, founder of Hakka Labs & DataEngConf), Sid Anand (former Cloud Data Architect at Netflix who implemented Netflix migration to the cloud that Adrian Cockcroft later on told the World about, former Tech Lead at LinkedIn where he implemented typeahead search, currently Data Architect at Agari – company that provides fraud detection services), Wesley Reisz (Solutions Architect at HP and University Professor), and Igor Marvić (Software Engineer at Spotify).

China is very interesting place for developers, especially because of its scale. They have over 700 million Internet users! One developer from alibaba.com – largest online store in China – told me that during Singles’ Day (Guanggun Jie), which is equivalent of Black Friday in USA, they had over 400 million customers online at the same time. This is more than entire population of the United States (~325 million). They also sold more than $1 billion in merchandise in first 8 minutes! This is SCALE!

While I was in China I was using WeChat (their Facebook equivalent). People don’t use Facebook and twitter, as they are blocked by China Firewall. You can workaround it using VPN, but sometimes it works very slow, or not at all. Thus, it is much easier to just use WeChat. When I am in USA I use Facebook, messenger and twitter everyday. However, I noticed that on my iPhone 5S, WeChat works much better than all mentioned apps. It doesn’t crash, it’s fast, and it has many cool features. Want to add somebody to friends? Just scan they QRCode. You can also shake your phone, and WeChat will try to find closest person who is also shaking their phone, and show on your phone their profile, and on their phone your profile.

Besides the conference, which was very well organized, I was very impressed by how modern the city of Shanghai is. The skyline looks almost like New York City! Shanghai Tower (2,073 ft / 632 m) is the second tallest building in the WorldShanghai World Financial Center (1,614 ft / 492 m) is number 9 on the same list, which contains only 1 American building – One World Trade Center (number 6 – 1,776 ft / 541 m).

Shanghai - skyline

It was a great journey, and all Chinese people were very nice for me. I look forward to come back to China in near future!


Azure Portal Tips & Tricks – 22. Get started tile

Azure Portal Tips & Tricks is a series of short videos where I am showing various features of the Azure Portal and how you can take advantage of them to be more productive.

In this video I am showing the new get started tile that has get started videos, articles and tutorials for most popular Azure Services.

You can follow the series by subscribing to my channel or going directly to Azure Portal Tips & Tricks playlist:

If you have any suggestions or questions about the Azure Portal, or there is something in particular that you would like to see in this series, tweet me at @JakubJedryszek or leave a comment.