The Code Manual

It always seems impossible until its done - Nelson Mandela

IT emigration to the USA - FSharp and D3.js shows you where people goes

10 Jan 2017

The USA map.

I heard many times about people going to the USA to live and work there. For some people, it stills revealed as the best plan for life and the best country to live. However, it is not an easy thing. A company must to request for you and organise a visa, mostly H-1B and pay for it. This process, by itself nature takes some time and requires you and your future company to pay an attention. It is intriguing and this was an impulse for my small research. I was wondering where people mostly goes and today we create a map showing us that. As usually, FSharp helps us with that, but this time we orchestrate it with D3.js library.

Read more

FSharp helps you find duplicates in your project file

03 Jan 2017

The image with Star Wars Troopers

On my daily work, I deal with a complex solution counting more than 100 projects. As probably like the most of you, we have branches dedicated to production, testing and development. In such environment, it is a normal thing that you have to merge your changes from one branch to another. And sometimes, not everything will go smoothly. Then, when someone overwrites merged changes, roll back becomes problematic. So when you'll find yourself in that situation, and you'll find out that this bad merge generated duplicates in your project files, FSharp could be a remedy. We'll write today a piece of code, which locates for you those duplicates. Of course, this is not necessary for compiling files because compilator generates an error for that case, but it could be easier to get all duplicates at once - compiling and non-compiling.

Read more

How to report your SQL - FSharp and XPlot make it easy

26 Dec 2016

The image with chart on a tablet and a coffee

It's a time to go further. Recently we modified SqlProfilerTraceAnalyzer by adding different ways of showing recorded trace. Today we'll do something even better - we'll generate an HTML page with charts showing count, the total and the average time for our SQL. After that, we'll add a table containing information about our store procedures. Last time we used F# Charting, but today we'll take another F# library, and it will be XPlot.

Read more

How to show your SQL

19 Dec 2016

The image with chart on a tablet

Last time we did a good job. We tracked store procedures hitting our server and we printed some details to the console. This was good, but this is not the end of what we can do. The first version contained hard-coded file name used to extract data and we only put the result on the console. Today we'll change this hard-coded file to a parameter and we add printing result to the file and to the chart.

Read more

How to trace your SQL

12 Dec 2016

The image with SQL code

Have you ever thought how many store procedures your code is calling? Have you tracked them to find duplicate calls? Maybe there is a place which could be optimized but going through the code without information what procedure you are looking for is difficult or at least time consuming. There is probably a many ways to do that but here you'll find a way with F#.

Read more