Thursday, August 20, 2015

Look, No Mocks! Functional TDD with F# - talk by Mark Seaman

I came across this cool video from Mark Seemann, one of my heros - here. I really need to get into F# if I listen to this guy...


The reason I know him is from this video on PluralSight: http://www.pluralsight.com/courses/functional-architecture-fsharp which I very much enjoyed.


Tuesday, August 18, 2015

Creating and running a .NET without Visual Studio or anything over 100 megs...

At home I've got an older laptop with an SSD that isn't that big. This eventing I wanted to fiddle around a bit but I didn't want to install that massive Visual Studio 2015 and everything it comes with.

So ... vNext to the rescue. Here's what you need to do to get going. ( I'm assuming you've got nothing on your box installed ).

1. Get the DNX runtime and the DNVM host. Don't know what I'm talking about ? Check this out. In short - you just need to open up a command window ( in admin mode ) and run:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"

2. Install node from the node website.

3. Reboot your machine. This is convenient because it loads `npm` and `dnvm` / `dnu` commands into the path.

4. OK - once you're machine is back up, open up a command window and we need to install an dnx-runtime - so type `dnvm upgrade`.  Now you should have a runtime installed when you type `dnvm list`.

5. Install Yeoman! - this will help you scaffold the app. `npm install -g yo` will get you there. ( meaning: Node Package Manager ( NPM ) install the YeoMan! clr globally ).

6. If you want to scaffold something with YeoMan! - you need to install the generator itself through the Node Package Manager (NPM), so : `npm install -g generator-aspnet`. You can check out all the other generators over at the YeoMan website.

7. Cool: now we can scaffold our vNext app: `yo aspnet`. This will present a YeoMan! scaffolding menu where you can select the type of app you want. I'm going for console app for this walkthrough.



8. Once that's done - you can see the scaffolded files in the newly created folder:



As you can see - the scaffolded code already contains a Console.WriteLine - so can compile and run this - and should see something already in the console. So:

9. `dnu restore` . This will go out and get all the dependencies defined in the project.json onto your machine. If you don't do this - you will not be able to compile / build because of missing dependencies.

10. Now we can build - so `dnu build`. There you go - there's a /bin folder containing the assembly.

11. Since we run the app within the runtime, the run command is a `dnx` command : `dnx . run`.



Et voila: vNext hello world without Visual Studio!

Finished Stanford's Machine Learning course :)


Had a bit of time on my hands today so I pushed forward with my machine learning course. And ... finished it! Very happy I did it, I can highly recommend it to anyone that ( like me ) thinks big data and big data analysis are going to become very important in the future! Thanks you prof. Andrew Ng.


Monday, August 17, 2015

Monday morning rabbit-hole: JS frameworks and other Web Development

After having prepared the backend services for our app ( all scalable Azure cloud services :) ) I've now moved over to the frontend of our systems, to build the behavior for the site.

The problem with green-fielding anything JavaScript related these days, is that every time you have to start something - the 'hip' technology or framework stack has changed.
  • Go with JavaScript ? If so - v5 or v6 with transcompilation by Babel? Or maybe TypeScript - or AtScript? Oh ... that's already merged into TypeScript... 
  • AngularJS then? Oh v2 is coming up - which is written in TypeScript... hmm...  that makes a case for TypeScript ... But it's already very much in beta.
  • So how about SEO then? Do we have to use prerender on AngularJS to render HTML on the server in order to get better SEO? Or do isomorphic frameworks solve these issues?
  • Isomophism you say? Apps that can run both client-side and server-side? That's a whole new interesting field to explore. Now we're talking MeteorJS, React and other frameworks I haven't worked with before. Is that the future then? React is one-way databinding I think. So is two-way databinding an anti-pattern then? Does flux solve this issue? 
  • And how about Aurelia then? I hold Rob Eisenberg and Scott Allen very high. Rob worked on Durandal first, then moved to Angular, quit that team and is now creating Aurelia. However, Aurelia is not isomorphic at this moment - and is in beta by the way.
  • What about Dart, Coffeescript? And on css side: less, sass or yass? Testing ... oh no ... Karma? QUnit? Mocha? Assertion library ? Chai TDD or BDD style
  • Then there's the Grunt/Gulp choice and how about bower or jspm
Man ... I guess web development is going to puberty with a whole bunch of languages ( and language versions ) to choose from as well as transpilers and compilers. Does it even matter which one you choose - except 'not be hip' ?






Finished week 9 of Stanford's Machine Learning course

Last weekend I finished week 9 of the machine learning course. Topic this weekend: Anomaly detection and Recommender systems. Really interesting stuff!