Posts

Showing posts from April, 2016

A primer on manipulating data frame with Deedle in F#

A primer on manipulating data frame with Deedle in F#The first time I encountered Deedle was from @brandewinder book Machine learning projects for .NET developers. Deedle is a library which facilitates the manipulation of data frames and data series.http://bluemountaincapital.github.io/Deedle/A data frame is like a table with rows and columns where columns don’t need need to be of same type. A data series is like a vector (an array of values) where each value is itself a key value pair. A very famous data series is a time series which is a vector of value with a key representing an instant in time and a value associated with it (it isn’t limited to this single property).Although Deedle website contains very good tutorials, like the Deedle in 10 minutes tutorial, I still found it a bit hard to grasp.So why would you need Deedle?One of the reason why I think Deedle is interesting is that it makes the manipulation of data frame much more pleasant. With Deedle,it is possible to goup by ro…

Get started with F# on Mac with VSCode and Ionide

Image
Get started with F# on Mac with VSCode and IonideYesterday, a friend of mine asked me what was the easiest way to get started with F# on Mac. I pointed him to http://fsharp.org/use/mac/ which gives multiple options to install F# on Mac but it doesn’t contain the option of using VSCode with Ionide. Since I think it is the most straight forward way to have an environment setup to use of F# rapidly especially when someone wants to just have a quick look, I decide to write a blog post to go through the installation step by step.The steps are:Install brewInstall mono from brewInstall VSCodeInstall IonideWrite a .fsx script1. Install brewhttp://brew.sh/To install brew, start a terminal and paste the following:/usr/bin/ruby -e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"Homebrew is a package manager. We will use it to install mono. After executing the command, you should have access to brew from the terminal.2. Install monoMono is an open source …

Dealing with stress and anxiety in the Software industry

Dealing with stress and anxiety in the Software industryLately I’ve seen a lot of posts about burnout in the the Software industry blogs. Burnout refers to the lost of motivation, hopelessness at work or life, and lost of interest in anything. Stress and anxiety are symptoms which can lead to it.All the articles and blog posts address a real problem in the Software industry - a subject hard to discuss with others. Sharing with colleagues or managers that we are stressed or depressed brings a sentiment of weakness. In this world which promotes that only the strong survive, we traded kindness, understanding, and compassion for oppression, threat, and intimidation, thinking that they will generate better results.In industries like Banking, Fashion, Entertainment, Medical, it is well known that people experience a considerable amount of stress, anxiety and/or exhaustion.What about the Software industry, do “we” programmers experience stress, anxiety, depression?Software industry is no dif…

Proxies in WebSharper, how, when, where!

Proxies in WebSharper, how, when, where!When I first started to play with WebSharper, everything was nice and clean. I was coding in my own world/sandbox/project whatever you want to call it. But the thing is that most of the time, we don’t start from empty, blank project. What we do instead, is that we write code which integrates with an existing application. I was lucky enough to work on a project with a backend written in F# with a Domain library containing all the application domain written in F# as well. Being in this situation, the first think I tought of was:Wouldn’t it be amazing if I could use the Domain library directly in my webapp?Turns out it is absolutely possible! And we will see how in this post. There are multiple scenarios when referencing libraries and in this post we will address the following requirements:I want to use the record types defined in Domain libraryI want to use the record types with the functions attached to the record types from Domain libraryI want …

Sort, drag and drop in UI Next with Sortable

Image
Sort, drag and drop in UI Next with SortableFew weeks ago I covered how to use external JS libraries with WebSharper. I explained how we could integrate tagsinput which is a cool library that allows us to use tags in our webapp. It was used with JQuery and I showed you how we could extended WebSharper JQuery and add tagsinput functionalities.Today I will show you how to use another cool JS library - Sortable. Sortable brings drag - drop - sorting functonalities. Also, it does not require JQuery which is good as we can see how to integrate libraries which don’t depend on JQuery.Here is a preview of what we will be building:You can find the full source code here.How does Sortable works in JS?Sortable examples can be found here. On top of allowing us to sort elements, it also provides drag and drop functionalities which are very handy to make interactive webapps.In JS, all you need to do is to create a list of elements (ul, ol or div containing other elements) and pass it to the create f…