Last June I was in Madrid for TechEd Conference. The main focus was The Cloud.
Microsoft has actually done a really good job and the platform is very
mature. I’m not going to lie by saying that I will prefer to host everything in
the cloud than doing it on-premise. A few PowerShell scripts and voila you got
yourself the desired environments. And with the instance slider, you got
yourself the amount of instances that you could need for a specific period. Try
to do something similar with your on-premises infrastructure. Another awesome
feature is that from now on you will only pay for the environments if they are
running. This means that DEV and TEST can be shut down while they are not
being used:
Lucian Wischik gave three talks with regards to async arriving to C# 5.0
(no callbacks needed). Hmmmm, I wonder were we have seen this before, who said
F#?
Another really interesting talk was David Starr regarding Brownfield
Development. We all have seen this huge amount of spaghetti code right?
But how do we actually ensure that we don’t get to this point? And how do we
avoid that methods grow to become huge? I think the main problem is because we
use a toolbox that actually allows this to happen, mostly cos it’s part of
it’s verbosity …
… well the answer isn’t that difficult. Even though Dustin Campbell gave a
good talk, Microsoft really needs to understand that they are not going to catch
the businessmen attention by showing a how F# is really good to solve
Project Euler problems. What Microsoft needs to do, is to show on one of
their platforms how using F# provides a more clean and robust way to make
quality software, and we might able to help out on this one, stay tuned:
Finally, not everything in Madrid had to be hard work, there were also time to
some pleasure:
As it has been a while since I went to TechEd and because I have to give a small
talk for the rest of Delegate A/S employees, I needed to get the PowerPoints
and some videos. I was a bit bored and cos I love F# I decided to make a
small file crawler. Things I noticed while creating the app is how simple it is
to convert from a sequential to parallel app. Just convert the sequence to an
array and then apply parallelism, as simple as that. The only issue I found
while converting the app to run in parallel is that printfn is not
thread-safe so a few changes to Console.WriteLine and sprintf and voila,
it’s 100% parallel. This is one of the strong sides of F#, like any other
.NET language, it has access to the whole Frameworks API.
Remark: There is no need to actually change the algorithm, so it is still as
readable as it was before. Like stated before, change three lines and voila,
the app runs in parallel …
The crawler is called from a terminal like this:
And will save the files and write the following output:
p.s.: It wouldn’t be that difficult to convert the code above to a generic
website file crawler …