<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Koen Metsu]]></title><description><![CDATA[Software Crafter]]></description><link>https://www.koenmetsu.com/blog/</link><image><url>https://www.koenmetsu.com/blog/favicon.png</url><title>Koen Metsu</title><link>https://www.koenmetsu.com/blog/</link></image><generator>Ghost 2.23</generator><lastBuildDate>Thu, 16 Apr 2026 15:38:40 GMT</lastBuildDate><atom:link href="https://www.koenmetsu.com/blog/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[The Open Space, explained.]]></title><description><![CDATA[A clear and concise description of the idea behind an Open Space.]]></description><link>https://www.koenmetsu.com/blog/the-open-space-explained/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e963</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:55:37 GMT</pubDate><media:content url="https://www.koenmetsu.com/blog/content/images/2019/05/2015-goals.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://www.koenmetsu.com/blog/content/images/2019/05/2015-goals.jpg" alt="The Open Space, explained."><p>Over a year and a half ago, my friend Erik invited me to <a href="http://www.socratesuk.org">SoCraTes UK</a>, an international software craftsmanship retreat, where I discovered the concept of an open space. I fell in love with the format, so much so that shortly after our return we changed our own software craftsmanship monthly meetup to the open space format as well. Later that year we also organized <a href="http://www.socratesbe.org">SoCraTes BE</a>, which is basically two full days of open space. Needless to say, we really like open spaces.</p><p>Despite my enthusiasm about open spaces - or perhaps exactly because of it - I have often found myself struggling to explain what an open space is to people unfamiliar with the concept. Open spaces can mean so many different things to different people, at different times in their career. It's easy to get carried away with <em>'Why you should totally come to our next open space'</em> instead of explaining <em>what it is</em>, causing confusion instead of excitement for the format.</p><p>For someone facilitating open spaces, it's rather disappointing to be unable to spread my love for open spaces, so I set about trying to come up with a clear and concise description of what an open space is.</p><h6 id="a-two-minute-introduction">A two minute introduction</h6><p>An open space is a way to facilitate collaboration between individuals around a central theme through self-organization, in a way that maximizes each individual's learning.</p><p>Everyone is encouraged to write down, on a post-it, whatever topics he is interested, curious or passionate about. After a few minutes, everyone queues up and gets a chance to present one of their topics, place it on an empty time slot on the market place, and re-queue if they have more topics.  After everyone has presented their topics, you get one minute to move your post-its to another empty spot on the market place, or negotiate with someone else about moving theirs.</p><p>The open space is guided by four principles:</p><p>It starts when it starts. <br><br>Whoever comes are the right people. <br><br>Whatever happens is the only thing that could have happened. <br><br>When it's over, it's over.<br></p><p>While there is some structure provided by the market place, the time slots and rooms available are only there as a guideline, and are not a binding law. It often happens that people break out of a session to form their own session in an another room, or sessions form organically over some drinks in the lounge.</p><p>In fact, the only law that applies to the open space is The Law of 2 Feet. This law states that whenever you feel you're either not contributing or learning anymore during a session, you use your two feet and leave for another session. Session hosts know they should not feel offended if you leave, and I know of no one who ever has been offended by this.</p><p>For newcomers, I encourage you to try out this law at the first opportunity.</p><!--kg-card-begin: hr--><hr><!--kg-card-end: hr--><p>The above description should give me a simple enough approach to explaining the open space format. The description goes from general to more specific, so depending on time and audience I'm able to trim the explanation without making it inconsistent. Even the first sentence alone could do when I'm under a lot of time pressure.</p><p>Feel free to use this explanation if you want. I did not invent these sentences, and I owe a lot to other facilitators before me like <a href="https://twitter.com/talboomerik">Erik</a> and <a href="https://twitter.com/rachelcdavies">Rachel</a>, as well as the various guides on the internet.</p><p>If I got you at least a bit interested in joining an open space once, check out our <a href="https://www.meetup.com/socratesbe/">monthly open space</a> or join us at our annual <a href="http://www.socratesbe.org">SoCraTes BE</a> unconference.</p>]]></content:encoded></item><item><title><![CDATA[Doing what scares you]]></title><description><![CDATA[<p>So, a year has passed since a tweet from Mathias passed in my twitter feed.</p><p>Plan for 2015: fuck up the comfort zones that survived 2014.— Mathias Verraes (@mathiasverraes) <a href="https://twitter.com/mathiasverraes/status/550598596064993280">January 1, 2015</a></p><p>The message struck a chord with me, so I wrote it down somewhere, and thought to myself: "It's</p>]]></description><link>https://www.koenmetsu.com/blog/doing-what-scares-you/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e962</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:55:13 GMT</pubDate><content:encoded><![CDATA[<p>So, a year has passed since a tweet from Mathias passed in my twitter feed.</p><p>Plan for 2015: fuck up the comfort zones that survived 2014.— Mathias Verraes (@mathiasverraes) <a href="https://twitter.com/mathiasverraes/status/550598596064993280">January 1, 2015</a></p><p>The message struck a chord with me, so I wrote it down somewhere, and thought to myself: "It's time to blog again". That obviously didn't work out very well.</p><p>However, looking back on this year, I'm pretty happy with the number of comfort zones I attacked. A lot of the things on this list scared me, but I'm so glad I said <strong>yes</strong> to every one of them. There's a lesson in there.</p><h4 id="speaking-at-xpdays-belgium-and-atbru">Speaking at XPDays Belgium and AtBru</h4><p>Together with Erik, we hosted several workshops around <a href="http://xpdays.net/Xpday2015/XPDays/Program/Friday.html#session_361">"Splitting up a problem into microservices"</a>. Running these sessions has been a lot of fun, but don't let yourself be fooled by it's technical appearance. Every time we ran this session, we got surprised by the direction it took.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2016/01/Intro.jpg" class="kg-image" alt="Intro"></figure><!--kg-card-end: image--><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2016/01/session.jpg" class="kg-image" alt="Splitting up"></figure><!--kg-card-end: image--><h4 id="organizing-the-belgian-software-craftsmanship-community">Organizing the Belgian software craftsmanship community</h4><p>Our community has grown a lot since its start, and I'm very proud to be an active part of it. Last year, I started helping out by hosting some of our monthly open spaces, and organizing technical talks.</p><p>Thanks to <a href="http://www.gissellespeaks.be/">Gien</a> we rebooted the habit of giving <a href="https://koenmetsu.github.io/presentations">lightning talks</a>, and I invite you to come talk about anything you're passionate about in software at our next <a href="http://www.meetup.com/Belgian-Community-for-Software-Craftsmanship/">open space</a>.</p><h4 id="building-a-pet-project-in-f-">Building a pet project in F#</h4><p>I started learning F# last year, and I'm really glad I did. F# is a great place to start learning Functional Programming, with a vibrant and very helpful community.</p><p>A very fun way to start learning something, is by building cool stuff you can use yourself. So I built a little <a href="https://koenmetsu.github.io/Muffin.Pictures.Archiver/">picture archiver</a> in F#, which automatically organizes family pics on my nas.</p><p>Also, if you're looking for a way to bring F# into your daily work, I can recommend taking a look at <a href="https://fsharp.github.io/FAKE/">FAKE</a>. Introducing this at my current client has improved the readability and maintainability of our build and deploy scripts a lot. Even if you don't know F#, it's really easy to get started with this.</p><h4 id="socrates-be-2015">SoCraTes BE 2015</h4><p>Organizing the very first <a href="http://socratesbe.org">Software Craftsmanship and Testing unconference in Belgium</a> was quite the challenge, but it was <strong>amazing</strong>.<br>Three days of getting together with over <strong>50 developers from 8 different countries</strong> to learn, share and practice software craftsmanship.</p><p>I had such a great time, and I can't thank enough everyone who made this experience great. Here are some pictures to make you jealous if you weren't there.</p><p>{&lt;11&gt;}</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2016/01/2015-10-23-nieuwport-socratesbe-0153.jpg" class="kg-image" alt="SoCraTes BE 2015"></figure><!--kg-card-end: image--><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2016/01/2015-10-23-nieuwport-socratesbe-0134.jpg" class="kg-image" alt="SoCraTes BE 2015"></figure><!--kg-card-end: image--><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2016/01/2015-10-24-nieuwport-socratesbe-0200.jpg" class="kg-image" alt="SoCraTes BE 2015"></figure><!--kg-card-end: image--><h4 id="facilitating-a-global-day-of-coderetreat">Facilitating a Global Day of Coderetreat</h4><p>Facilitating this one didn't go anything like I expected. I'm used to doing code reviews and doing technical coaching, but this was very different. My facilitation style was much more forgiving and less "brutal" than I thought it would be. It was fun letting people find their own way, make mistakes, and learn from them.</p><p>There were a lot more people doing Functional Programming than previous years, which we'll have to start taking into account for <a href="http://globalday.coderetreat.org/">Global Day of Coderetreat 2016</a>!</p><h4 id="finishing-my-first-year-as-freelancer">Finishing my first year as freelancer</h4><p>Probably the best decision I ever took for my career, altough I still think this is a very personal decision. A lot of people have asked me whether I'd recommend it, but it's not the panacea some people believe it to be.</p><p>For me, the freedom and responsibility were exactly what I needed. It's been a lot of work and stress at times, but I'd definitely do it again.</p><!--kg-card-begin: hr--><hr><!--kg-card-end: hr--><p>In retrospect, a lot of things on this list still kind of scare me, but some are starting to feel comfortable. And to quote one of <a href="https://www.goodreads.com/book/show/15843041-the-icarus-deception">my favorite books of last year</a>:</p><p>The safety zone has moved. The propaganda has been exposed, and the old promises have been broken: Conformity no longer leads to comfort. But the good news is that creativity is scarce, and more valuable than ever. So is choosing to do something unpredictable and brave: make art.</p>]]></content:encoded></item><item><title><![CDATA[Developer back - fighting back]]></title><description><![CDATA[<p>After years of trying to ignore my lower back pain, it finally culminated in a spinal disc hernia last year. Luckily for me, that hernia was the final straw that got me actively working to improve my back again.</p><!--kg-card-begin: hr--><hr><!--kg-card-end: hr--><p>Disclaimer: I am not in any way a<br>medical doctor, seek</p>]]></description><link>https://www.koenmetsu.com/blog/developer-back-fighting-back/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e961</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:54:57 GMT</pubDate><content:encoded><![CDATA[<p>After years of trying to ignore my lower back pain, it finally culminated in a spinal disc hernia last year. Luckily for me, that hernia was the final straw that got me actively working to improve my back again.</p><!--kg-card-begin: hr--><hr><!--kg-card-end: hr--><p>Disclaimer: I am not in any way a<br>medical doctor, seek advice from<br>qualified medical professionals. <br>This is a brief history of my back<br>problems, and how I'm handling them.</p><p>I've been having lower back pains for almost ten years now, but they gradually got worse when I started my professional life as a developer. It started out with a chronic, nagging discomfort rather than an actual pain. It appeared without warning every couple of weeks or months and disappeared just as suddenly.</p><p>I had x-rays which confirmed that my spinal discs were a bit too close together, but nothing that could directly explain the discomfort. I got nothing more than a "Just a bad back, try some exercises, watch your posture", but nothing really concrete to work with. Since the problem was intermittent without apparent cause, there was no treatment as well. The only thing I could do was try to maintain a better posture. Which I usually did as soon as the pain appeared - too late.</p><p>Two years ago I became a father. Being a father rocks, but isn't really that nice to your back. Lifting up my son all the time made the pain come back more often, and since no father wants to leave his son down, I decided to reevaluate my problem and started with some physiotherapy. The physiotherapy actually made things worse after some bad manipulations, and a couple of weeks later I checked into the hospital with sciatic pains and a hernia. After getting an injection - infiltration, they call it - the sciatic pains went away, but the nagging discomfort came back soon enough.</p><h2 id="attending-a-back-school">Attending a back school</h2><p>Shortly after the hernia, I was recommended to join a back school. Doing this was the best thing I ever did for my back. I was taught how to strengthen it with simple exercises I could do at home, but also showed how to maintain my posture, relax my back and make it more flexible. They also immediately noticed I had hyper-mobility, which means looser joints and tendons, which leads to less support for my back.</p><p>The standard exercises didn't seem to cut it for me, since the nagging pain kept coming back and was atypical for regular hernia pains. Despite the hyper-mobility, they traced the pain back to a shorter hamstring. I'm pretty sure if I hadn't joined the back school, I'd have been unaware of both the hyper-mobility and the hamstring problem.</p><h2 id="starting-strength">Starting Strength</h2><p>I read about Starting Strength a year ago, which is workout routine developed specifically to help you start lifting weights. It focuses almost exclusively on lifting free-weights and doing exercises with a long range of motion. The idea is that lifting weights like that should develop more useful muscles and a stronger body when compared to doing isolated exercises on machines.</p><p>After attending the back school for a couple of months, I felt my back was strong enough and started Starting Strength. I tried going to the gym a couple of times in the past years, but always quit after a couple of sessions. Even though Starting Strength is a rather simple routine, it is quite challenging and it got me coming back 2 to 3 times a week for the last couple of months now.</p><p>More importantly, I have the feeling it's actually working for my back ache. My body feels definitely stronger, my hamstrings get stretched regularly because of the squats and deadlifts, and the pains haven't appeared since I started the routine.</p><p>If nothing else, having a stronger body in general means I no longer worry about lifting my son out of bed every time or being unable to do my job and hobby at the age of 30 because of crippling back pains.</p><h2 id="the-takeaway">The takeaway</h2><p>If you're having back pains, try joining a back school. It's more likely you'll find your specific problem and treatment when you're exercising in a room with multiple experts for months ( 6 months repaid in Belgium ) than going to a single therapist for massages for a couple of weeks - it still took 2 months to figure out my problem in the back school.</p><p>If you want to make your body stronger, take a look at Starting Strength, but <b>consult your medical doctor first</b>. I started only after consulting both my general physician and the people from my back school. It's not a panacea either, it seems to work for me but I might switch in the future if I find something that will benefit my back more. There are lots of other workouts and routines that might work better for you. Most of these fitness sites seem to have a very active forum and a lots of people willing to give you advice.</p><p>Don't settle for the default general answer you get when first diagnosed with back pains. Chances are you can really do something about it.</p><h3 id="related-links">Related links</h3><p><a href="http://www.ccohs.ca/oshanswers/ergonomics/office/chair_adjusting.html">How to adjust your chair</a> - first thing I do on a new chair <br><br><a href="http://www.mensjournal.com/magazine/everything-you-know-about-fitness-is-a-lie-20120504">Everything You Know About Fitness Is a Lie</a> - interesting article on fitness in general, mentions Starting Strength <br><br><a href="http://www.startingstrengthwiki.com">Starting Strength Wiki</a> <br><br><a href="http://www.amazon.com/Starting-Strength-3rd-Mark-Rippetoe/dp/0982522738">Starting Strength book</a> <br><br><a href="http://www.hanoulle.be/2013/02/im-working-from-a-walking-desk/">I’m working from a walking desk</a> - with lots of references to why sitting is bad for you</p><p><a href="http://www.amazon.com/Starting-Strength-3rd-Mark-Rippetoe/dp/0982522738">Starting Strength book</a></p><p><em>If you have any questions or remarks, feel free to leave them in the comments or contact me <a href="http://twitter.com/koenmetsu">@koenmetsu</a>.</em></p>]]></content:encoded></item><item><title><![CDATA[750 words to clear your head]]></title><description><![CDATA[<p>For those of us coming from version control systems like Team Foundation Server, Subversion or similar systems with a graphical user interface, using the command line with your version control systems might come off as arcane, unintuitive and not very user-friendly. Still, both Mercurial (Hg) and Git were primarily made</p>]]></description><link>https://www.koenmetsu.com/blog/750-words-to-clear-your-head/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e960</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:54:40 GMT</pubDate><content:encoded><![CDATA[<p>For those of us coming from version control systems like Team Foundation Server, Subversion or similar systems with a graphical user interface, using the command line with your version control systems might come off as arcane, unintuitive and not very user-friendly. Still, both Mercurial (Hg) and Git were primarily made for use with the command line.</p><p>If you're new to distributed version control systems, I'd recommend you to order the free book (even the printed version is free!) by Eric Sink, <a href="http://www.ericsink.com/vcbe/">Version Control by Example</a>. It has a great workflow comparison of Subversion, Mercurial (Hg) and Git and gives you some insights on why you should use a distributed version control system.</p><h2 id="why-you-should-learn-the-command-line-of-your-dvcs">Why you should learn the command line of your DVCS</h2><p>Next to the advantages of a distributed vcs, using the command line is:</p><ul><li>blazingly fast</li><li>very user friendly ( especially Hg )</li><li>incredibly powerful (especially Git)</li><li>amazingly flexible (especially Git)</li></ul><p>The problem with graphical shells for a command line vcs is that as a new user it's harder to understand the version control system underneath. The graphical shell is trying to shield the user from the internals with "easier" jargon and automatically performing steps for the user ( without the user realizing this).</p><p>On the work floor this custom jargon can cause confusion amongst developers using different graphical shells, when in essence they're using the same version control system. Using Git or Hg via the command line gives you an experience closer to the inner workings, and will enable you to use the full power of those systems.</p><h2 id="starting-with-mercurial">Starting with Mercurial</h2><p>If you're just starting out with a distributed version control system, I'd recommend using the command line with <a href="http://mercurial.selenic.com/">Mercurial</a> for it's <a href="http://www.secretgeek.net/merc_hints.asp">user-friendliness</a> and easier learning curve (see "Other References" for a good example). <a href="http://www.joelonsoftware.com">Joel Spolsky</a> has a wonderful tutorial on Mercurial called <a href="http://hginit.com/">Hg Init</a>. You should totally follow it if you're interested in starting out with Hg or any dvcs.</p><p>If you're still a bit uneasy about going full command-line, try using the command-line together with <a href="http://tortoisehg.bitbucket.org/">TortoiseHg</a> (in my opinion the most mature and user friendly free GUI for Mercurial). This way you can actually see your changes from the command line appear simultaneously in the <a href="http://tortoisehg.bitbucket.org/manual/2.4/workbench.html">TortoiseHg Workbench</a>. The Workbench also shows the commands you made in the GUI in the output log, so you can see which command you have to use the next time you want to merge.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2015/Jan/Tortoise-Workbench.png" class="kg-image" alt="Git graph"></figure><!--kg-card-end: image--><p>Having a GUI as a visual guideline and being able to switch easily between GUI and command line ( for the more complicated commits ) helped me a lot during my initial dvcs learning.</p><h2 id="moving-to-git">Moving to Git</h2><p>Once you've got the taste of working with the command line via Hg, you should definitely try out Git. It's local branching model is more light-weight and intuitive, and doing complicated commits from the command line is much easier.</p><p>With Git's staging model, you can select files individually and even select separate lines of a file for a commit, which means you can now properly commit the lines of code you changed for story/ticket XYZ, and keep your commits smaller and cleaner.</p><p>On top of that, Git feels like it was made purely for command line usage. Need an example? Take a look at this graph Git can generates.</p><p>![git graph](/blog/content/images/2015/Jan/Graph.png)</p><p>I've been using Git at home for about half a year now and 2 months with my employer, and not a single time have I felt the need for a GUI.</p><p>Honestly, the first few weeks ( especially with Git ) you're going to do a lot of lookup work. Git still suffers from a major <a href="https://en.wikipedia.org/wiki/Curse_of_knowledge">curse of knowledge</a>, especially for us Windows users, so I'm trying to add my bit to help you on your way ;-)</p><p>If I've got your attention, hold on to the next post, in which I'll explain in detail how to set up and use Hg and Git with the least possible friction for us Windows users.</p><h2 id="other-references-to-get-you-started">Other References to get you started</h2><p>For a good comparison between the learning curves of Git and Hg, take a look at <a href="http://stackoverflow.com/a/892688/367388">this answer on stackoverflow</a>, it explains why <a href="http://stackoverflow.com/a/35845/367388">Git is MacGyver and Mercurial is James Bond</a></p><p>[Git for beginners: The definitive practical guide] on StackOverflow(<a href="http://stackoverflow.com/q/315911/367388">http://stackoverflow.com/q/315911/367388</a>)</p><p><a href="http://git-scm.com/book">Pro Git</a>, which you can download for free in PDF, mobi or ePub format.</p>]]></content:encoded></item><item><title><![CDATA[Getting started with the command-line of your dvcs]]></title><description><![CDATA[<p>For those of us coming from version control systems like Team Foundation Server, Subversion or similar systems with a graphical user interface, using the command line with your version control systems might come off as arcane, unintuitive and not very user-friendly. Still, both Mercurial (Hg) and Git were primarily made</p>]]></description><link>https://www.koenmetsu.com/blog/getting-started-with-the-command-line-of-your-dvcs/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e95f</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:53:19 GMT</pubDate><content:encoded><![CDATA[<p>For those of us coming from version control systems like Team Foundation Server, Subversion or similar systems with a graphical user interface, using the command line with your version control systems might come off as arcane, unintuitive and not very user-friendly. Still, both Mercurial (Hg) and Git were primarily made for use with the command line.</p><p>If you're new to distributed version control systems, I'd recommend you to order the free book (even the printed version is free!) by Eric Sink, <a href="http://www.ericsink.com/vcbe/">Version Control by Example</a>. It has a great workflow comparison of Subversion, Mercurial (Hg) and Git and gives you some insights on why you should use a distributed version control system.</p><h2 id="why-you-should-learn-the-command-line-of-your-dvcs">Why you should learn the command line of your DVCS</h2><p>Next to the advantages of a distributed vcs, using the command line is:</p><ul><li>blazingly fast</li><li>very user friendly ( especially Hg )</li><li>incredibly powerful (especially Git)</li><li>amazingly flexible (especially Git)</li></ul><p>The problem with graphical shells for a command line vcs is that as a new user it's harder to understand the version control system underneath. The graphical shell is trying to shield the user from the internals with "easier" jargon and automatically performing steps for the user ( without the user realizing this).</p><p>On the work floor this custom jargon can cause confusion amongst developers using different graphical shells, when in essence they're using the same version control system. Using Git or Hg via the command line gives you an experience closer to the inner workings, and will enable you to use the full power of those systems.</p><h2 id="starting-with-mercurial">Starting with Mercurial</h2><p>If you're just starting out with a distributed version control system, I'd recommend using the command line with <a href="http://mercurial.selenic.com/">Mercurial</a> for it's <a href="http://www.secretgeek.net/merc_hints.asp">user-friendliness</a> and easier learning curve (see "Other References" for a good example). <a href="http://www.joelonsoftware.com">Joel Spolsky</a> has a wonderful tutorial on Mercurial called <a href="http://hginit.com/">Hg Init</a>. You should totally follow it if you're interested in starting out with Hg or any dvcs.</p><p>If you're still a bit uneasy about going full command-line, try using the command-line together with <a href="http://tortoisehg.bitbucket.org/">TortoiseHg</a> (in my opinion the most mature and user friendly free GUI for Mercurial). This way you can actually see your changes from the command line appear simultaneously in the <a href="http://tortoisehg.bitbucket.org/manual/2.4/workbench.html">TortoiseHg Workbench</a>. The Workbench also shows the commands you made in the GUI in the output log, so you can see which command you have to use the next time you want to merge.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2015/Jan/Tortoise-Workbench.png" class="kg-image" alt="Git graph"></figure><!--kg-card-end: image--><p>Having a GUI as a visual guideline and being able to switch easily between GUI and command line ( for the more complicated commits ) helped me a lot during my initial dvcs learning.</p><h2 id="moving-to-git">Moving to Git</h2><p>Once you've got the taste of working with the command line via Hg, you should definitely try out Git. It's local branching model is more light-weight and intuitive, and doing complicated commits from the command line is much easier.</p><p>With Git's staging model, you can select files individually and even select separate lines of a file for a commit, which means you can now properly commit the lines of code you changed for story/ticket XYZ, and keep your commits smaller and cleaner.</p><p>On top of that, Git feels like it was made purely for command line usage. Need an example? Take a look at this graph Git can generates.</p><p>![git graph](/blog/content/images/2015/Jan/Graph.png)</p><p>I've been using Git at home for about half a year now and 2 months with my employer, and not a single time have I felt the need for a GUI.</p><p>Honestly, the first few weeks ( especially with Git ) you're going to do a lot of lookup work. Git still suffers from a major <a href="https://en.wikipedia.org/wiki/Curse_of_knowledge">curse of knowledge</a>, especially for us Windows users, so I'm trying to add my bit to help you on your way ;-)</p><p>If I've got your attention, hold on to the next post, in which I'll explain in detail how to set up and use Hg and Git with the least possible friction for us Windows users.</p><h2 id="other-references-to-get-you-started">Other References to get you started</h2><p>For a good comparison between the learning curves of Git and Hg, take a look at <a href="http://stackoverflow.com/a/892688/367388">this answer on stackoverflow</a>, it explains why <a href="http://stackoverflow.com/a/35845/367388">Git is MacGyver and Mercurial is James Bond</a></p><p>[Git for beginners: The definitive practical guide] on StackOverflow(<a href="http://stackoverflow.com/q/315911/367388">http://stackoverflow.com/q/315911/367388</a>)</p><p><a href="http://git-scm.com/book">Pro Git</a>, which you can download for free in PDF, mobi or ePub format.</p>]]></content:encoded></item><item><title><![CDATA[NuGetFight: my first OSS out in the open]]></title><description><![CDATA[<p>The past couple of weeks <a href="http://www.kevinpelgrims.com/blog">Kevin Pelgrims</a> and I teamed up to create <a href="http://www.nugetfight.com">NuGetFight</a>, a website that enables you to easily compare NuGet packages based on their usage stats.</p><p>As part of improving my coding skills, I lot of the time I spend is in reading blogs and articles. However,</p>]]></description><link>https://www.koenmetsu.com/blog/nugetfight-my-first-oss-out-in-the-open/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e95e</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:53:02 GMT</pubDate><content:encoded><![CDATA[<p>The past couple of weeks <a href="http://www.kevinpelgrims.com/blog">Kevin Pelgrims</a> and I teamed up to create <a href="http://www.nugetfight.com">NuGetFight</a>, a website that enables you to easily compare NuGet packages based on their usage stats.</p><p>As part of improving my coding skills, I lot of the time I spend is in reading blogs and articles. However, only reading up on technology will only take you so far. Trying out some new technologies like NoSQL or SignalR is fun as well, but usually doesn't go any further than a few small POCs. It hardly covers all the aspects of software development we "meet" in real life.</p><p>This year I decided to actually create stuff. The premise for this was simple: I wanted to use technologies that are new for me, or learn new ways to use them, everything had to be open-sourced, and probably most importantly: it had to be fun.</p><h1 id="new-technologies">New technologies</h1><p>NuGetFight was created with ASP.NET MVC 3, along with an HTML 5 canvas to create and animate the bar graphs. We decided not to use a library to create these bar graphs, but instead rolling our own. This is not something I'd recommend for real business projects (use a framework instead), but it was great fun and frustration as we were learning all about the different ways to animate the canvas with javascript. I learned a lot of new stuff there, and I'm pretty glad with the results as well.</p><p>We wanted to create some very basic and light-weight logging of the fights, for which we ended up using <a href="http://www.mongodb.org/">MongoDB</a>, a document-oriented NoSQL database I talked about earlier on this blog. We used <a href="https://www.mongolab.com">MongoLab</a> to host a free database in the cloud. This was very lightweight like we wanted to, but we also had some minor issues with it that you would never notice without actually using it in production. In the end however, I am very pleased with how it worked out, and would definitely use this setup again.</p><p>We also used the <a href="https://www.nuget.org/api/v2/">NuGet OData API</a> to query the packages, which was a breeze to use, and hardly worth mentioning here as it's as simple as consuming a common webservice. The most important thing here is that I learned how invaluable <a href="http://www.linqpad.net">LinqPad</a> really is if you want to try out some queries to an OData feed, before you actually start coding them. We had some issues with the data coming through, and LinqPad was a very useful tool to verify and fix this little bug on our side.</p><p>And finally, as we are working from geographically very different locations, a <a href="https://en.wikipedia.org/wiki/Distributed_revision_control">distributed version control system</a> like Mercurial seemed like a natural fit. I've known and used <a href="http://mercurial.selenic.com/">Mercurial</a> and <a href="http://git-scm.com/">Git</a> for a little while now, but had never used it this extensively and actually, you know, distributed. We used <a href="https://bitbucket.org/">BitBucket</a> as our central repository, and it worked great in every single way. The peace of mind local checkins give you, the ease of merging, light-weight branching, ... Once you get used to DVCS you wonder how you ever coped without. If you're working on a pet project in your spare time right now, even if you're working alone on this, I can fiercely recommend learning about DVCS and using it together with a hosting like <a href="https://bitbucket.org/">BitBucket</a>  or <a href="https://github.com/">Github</a>.</p><h1 id="overcoming-fear-of-being-in-the-open">Overcoming fear of being in the open</h1><p>We decided on BitBucket because it can host Mercurial ( which is easier <a href="http://hginit.com/">if you're new to DVCS</a>, in my opinion ), and because it allows for repositories to be private. Putting our code out in the open for the first time is something we were reluctant to do, and BitBucket gave us the opportunity to develop in a private repository, before <a href="https://bitbucket.org/kevinpelgrims/nugetfight">opening it up to the public</a> when we were ready for it.</p><p>For me, the decision to open-source NuGetFight and our future projects was not necessarily made just to contribute to the community, or because we expected a lot of pull requests from the community. If the community does benefit from our code, all the better, but on a personal level the decision was much more about overcoming the notion that all code should be perfect before putting it out in the open.</p><p>I see a lot of developers having great ideas, but keeping their projects and code to themselves only because "their code is not good enough". This is a shame, and I encourage you to share your pet projects regardless of how good your code is.</p><h1 id="more-fights-to-come">More fights to come</h1><p>I had a lot of fun developing NuGetFight, and we will definitely have fun further improving the code and making NuGetFight better. We already implemented integration with <a href="http://http://www.symbolsource.org/">SymbolSource</a> after a suggestion from <a href="https://twitter.com/tripleemcoder">@TripleEmcoder</a>, so any feedback or ideas you might have for NuGetFight are welcome.</p><p>We've also got a couple of very exciting features coming in the next week(s), so keep in touch.</p>]]></content:encoded></item><item><title><![CDATA[Starting up fast with NoSQL: first steps]]></title><description><![CDATA[<p>After reading up a bit on NoSQL, I decided it was time for me to do some experimenting and see how quickly I could set up an application using NoSQL. One of the things I like about NoSQL is that it supposedly supports very low-friction development, which I'm going to</p>]]></description><link>https://www.koenmetsu.com/blog/starting-up-fast-with-nosql-first-steps/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e95d</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:52:32 GMT</pubDate><content:encoded><![CDATA[<p>After reading up a bit on NoSQL, I decided it was time for me to do some experimenting and see how quickly I could set up an application using NoSQL. One of the things I like about NoSQL is that it supposedly supports very low-friction development, which I'm going to try and find out soon.</p><p>I'm not going to talk about <a href="http://stackoverflow.com/q/2875432/367388">whether or not NoSQL is right for you</a>, <a href="http://blog.nahurst.com/visual-guide-to-nosql-systems">which NoSQL implementation/provider is best</a> or <a href="http://stackoverflow.com/q/2571098/367388">whether or not NoSQL is better or worse than SQL</a>. I'm just having some fun with it, and seeing how easy this goes. I will focus on <a href="http://ayende.com/blog/4459/that-no-sql-thing-document-databases">document store databases</a> and C# .NET.</p><p>Personally, I'm also hoping to find out if NoSQL is a better match for quick and dirty personal projects than Plain Old SQL.</p><h1 id="choosing-a-nosql-for-net">Choosing a NoSQL for .NET</h1><p>After reading up on what NoSQL databases are most popular for .NET, the choice came down to <a href="http://ravendb.net/">RavenDB</a>, <a href="http://couchdb.apache.org">CouchDB</a> and <a href="http://www.mongodb.org">MongoDB</a>.</p><h2 id="ravendb">RavenDB</h2><p>RavenDB is made by <a href="http://ayende.com/blog">Ayende</a> ( among others, I suppose ), and has the reputation of having a very nice and clean API plus a very good-looking management application made in Silverlight ( perhaps Silverlight isn't dead yet after all ). RavenDb however has a commercial license for non-open-sourced projects, and since I wanted to use NoSQL for one of my personal ( non-OS ) projects, I decided to let this one go for the moment. It's definitely worth taking a look at though, so it stays on my list for later projects.</p><h2 id="couchdb-and-mongodb">CouchDB and MongoDB</h2><p>This left me with the other 2 competitors. I didn't put much effort into comparing the two in terms of functionality since I'm only exploring the the subject of NoSQL, and decided on a "community knows best" approach.</p><p>A quick <a href="http://www.nugetfight.com">NuGet Fight</a> ( somebody should make this into a website, <a href="http://kevinpelgrims.com/blog/2012/05/21/introducing-nugetfight">which we now did</a> ) gave the advantage to MongoDb ( aka Mongo ), and off I went.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2015/Jan/nuget_fight.png" class="kg-image" alt="nuget fight"></figure><!--kg-card-end: image--><p>I usually don't let a simple NuGet Fight <a href="http://davybrion.com/blog/2012/01/how-do-you-pick-open-source-libraries/">decide which libraries I use</a>, but since this is only experimentation, it's good enough for me.</p><h2 id="setting-up-mongo-the-very-easy-way-">Setting up Mongo ( the very easy way )</h2><p>The whole point of this exercise was to have a no-friction-at-all experience. Setting up a mongoDb locally? Aaah, friction, get it away!</p><p>But seriously, I wanted none at all.</p><h2 id="mongo-in-the-cloud">Mongo in the cloud</h2><p>This matches my philosophy of "somebody probably already did this better than me", and since a lot of these providers offer a free sample of their services, how much less friction can you have?</p><p>I decided to use MongoLab, mostly because their free offer was the best I could find. They offer 240MB for free, all you need to do is sign up.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2015/Jan/mongoloab_sign_up.png" class="kg-image" alt="sign up"></figure><!--kg-card-end: image--><p>How can you resist?</p><h2 id="creating-your-database">Creating your database</h2><p>MongoLab offers a nice web interface for all creation and management of your MongoDB.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2015/Jan/mongolab-myfirstmongodb-1.png" class="kg-image" alt="mongolab overview"></figure><!--kg-card-end: image--><p>Creating a new database is easy, you can even choose your provider. I also like the fact you can get different pricing schemes for different databases. For now, we'll test our luck with the free version.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2015/Jan/mongolab-create-new-db.png" class="kg-image" alt="create new db"></figure><!--kg-card-end: image--><p>Et voila! We have our new database. You can see the connectionString in the overview, which we'll use in our application later.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2015/Jan/mongolab-myfirstmongodb.png" class="kg-image" alt="my first mongo db"></figure><!--kg-card-end: image--><p>All we have to do now is create some collections ( aka tables in other environments ) to put our data in. We can do this via the web interface as well as in code. For now, we'll stick to the web interface.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="https://www.koenmetsu.com/blog/content/images/2015/Jan/mongolab-add-new-collection.png" class="kg-image" alt="add collection"></figure><!--kg-card-end: image--><p>I want to create a small exhibitor website for this demo, but I don't know which properties I will store for each entity. With document store database, you do not have to define any columns on your table (because there is no table, only a collection of documents), so I can choose  what to store later instead of having to decide right now. This once again removes some friction, and more importantly: it delays design choices to when I'm ready for it.</p><h1 id="consuming-mongo">Consuming Mongo</h1><p>A small controller and an entity class later, and my little expirement is already taking form.</p><!--kg-card-begin: code--><pre><code>public class HomeController : Controller
{
    readonly MongoServer server;
    readonly MongoDatabase mongoDb;
    readonly MongoCollection&lt;Exhibitor&gt; exhibitors;
    public HomeController()
    {
        server = MongoServer.Create(string.Format("mongodb://{0}:{1}@ds031587.mongolab.com:31587/myfirstmongodb", ConfigurationManager.AppSettings["MongoUser"], ConfigurationManager.AppSettings["MongoPwd"]));
        server.Connect();

        mongoDb = server.GetDatabase("myfirstmongodb");
        exhibitors =
           mongoDb.GetCollection&lt;Exhibitor&gt;("exhibitors");
    }
    public ActionResult Index()
    {
        return View(exhibitors.FindAll());
    }
}        
</code></pre><!--kg-card-end: code--><h1 id="conclusion">Conclusion</h1><p>So far, everything is still going well for me. I've set up a small database in a couple of minutes and got a simple piece of code working.<br>Next post, I'll be going deeper into the code and create a simple CRUD application using our newly created Mongo database.</p>]]></content:encoded></item><item><title><![CDATA[Moving from WordPress to FunnelWeb]]></title><description><![CDATA[<h1 id="the-problem">The problem</h1><p>Begin this year, I decided to pick up blogging again. I had some good ideas to blog about (most of which I probably forgot already), but one thing kept me from doing so: <b>WordPress</b>.</p><p>I think WordPress has a great platform, but I've never found the actual blogging</p>]]></description><link>https://www.koenmetsu.com/blog/moving-from-wordpress-to-funnelweb/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e95c</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:52:16 GMT</pubDate><content:encoded><![CDATA[<h1 id="the-problem">The problem</h1><p>Begin this year, I decided to pick up blogging again. I had some good ideas to blog about (most of which I probably forgot already), but one thing kept me from doing so: <b>WordPress</b>.</p><p>I think WordPress has a great platform, but I've never found the actual blogging to feel natural. This is mostly due to the online editor which is just really, really awful to work with.</p><p>The biggest dealbreaker for me? The lack of control.</p><p>Moving away from WordPress was a real pain at times. The plan involved using BlogML and Disqus to make the move an easy one, however nothing worked out of the box.<br>If you're interested in reading the full story on moving away from WordPress, I suggest you read <a href="http://kevinpelgrims.com/blog/2012/02/27/upgrading-my-blog-from-wordpress-to-funnelweb">this post</a> by <a href="http://www.kevinpelgrims.com">Kevin Pelgrims</a>. He kept a nice log of everything that did and didn't go according to plan  :)</p><h1 id="looking-at-alternatives">Looking at alternatives</h1><p>Looking at alternative blog engines, I met <a href="http://octopress.org/">OctoPress</a>, a static site generator which looked really promising (all the cool Ruby kids use this today). I kept holding on to the idea of <a href="http://www.aaronsw.com/weblog/000404">baking vs frying</a> my site because I liked <a href="http://inessential.com/2011/03/16/a_plea_for_baked_weblogs">the philosophy</a> of not having to go to your database for every page view (even if that number is not very high).</p><p>However, OctoPress missed the ability to publish from anywhere (ie: online) and had a steep enough learning curve to keep me away from it. I was very excited about <a href="http://code52.org">Code52</a>'s .NET open-source alternative called <a href="http://code52.org/pretzel.html">Pretzel</a>, but this too missed the ease of use I was looking for.</p><h1 id="enter-funnelweb-full-control-meets-ease-of-use">Enter FunnelWeb: Full Control meets Ease of Use</h1><p>When I met <a href="http://funnelweblog.com">FunnelWeb</a>, I found what I was looking for:</p><ul><li>Easy editing with <a href="http://daringfireball.net/projects/markdown/syntax#list">MarkDown</a>, which you can easily edit with <a href="http://code52.org/DownmarkerWPF/">MarkPad</a></li><li>Good looking source code in posts with <a href="http://code.google.com/p/google-code-prettify/">Prettify</a></li><li>Support for themes, and a good number of nice and clean <a href="http://www.funnelweblog.com/theme/gallery">themes</a> available</li><li><a href="http://hg.funnelweblog.com">FunnelWeb's source code</a> (in .NET) looks really good, so I can change anything I want</li></ul><p>In short: lots of control and still easy to use.</p><h1 id="the-result">The result</h1><p>I'm really liking my new blog! Discussions and analytics have been outsourced to Disqus and Google Analytics, and the fact that FunnelWeb has a BlogML export means I can move away from it anytime I want. This post was written using <a href="http://code52.org/DownmarkerWPF/">MarkPad</a>, which is a breeze to use and gives me the content without having to mess around in some badly-generated HTML.</p><p>It's exactly this feeling I was after: being enabled by my tools, instead of being hindered by it. I look forward to using FunnelWeb for my further blogging, as well as contributing to it =)</p>]]></content:encoded></item><item><title><![CDATA[Something, something, … Refactor!]]></title><description><![CDATA[<p>Many of us developers leave for work on a daily basis, ready to throw ourselves onto the next change request that will change the world as we know it, only to find yourself hack ‘n’ slashing through <a href="http://thedailywtf.com/">a jungle of WTF’s</a>, <a href="http://en.wikipedia.org/wiki/Copy_and_paste_programming">copy-paste inheritance</a>, <a href="http://stackoverflow.com/questions/143701/what-is-the-worst-class-variable-function-name-you-have-ever-encountered">awfully named fields</a>, and <a href="http://www.osnews.com/story/19266/WTFs_m">more WTF’</a></p>]]></description><link>https://www.koenmetsu.com/blog/something-something-refactor/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e95b</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:51:57 GMT</pubDate><content:encoded><![CDATA[<p>Many of us developers leave for work on a daily basis, ready to throw ourselves onto the next change request that will change the world as we know it, only to find yourself hack ‘n’ slashing through <a href="http://thedailywtf.com/">a jungle of WTF’s</a>, <a href="http://en.wikipedia.org/wiki/Copy_and_paste_programming">copy-paste inheritance</a>, <a href="http://stackoverflow.com/questions/143701/what-is-the-worst-class-variable-function-name-you-have-ever-encountered">awfully named fields</a>, and <a href="http://www.osnews.com/story/19266/WTFs_m">more WTF’s</a>.</p><p>This probably sounds like a broken record to you, and though I could go on all day presenting you with examples, I’d rather suggest an alternative: <strong>Refactoring.</strong></p><p>Refactoring is a word mostly spoken in the domain of <a href="http://en.wikipedia.org/wiki/Test-driven_development">TDD</a>, from its well known mantra “<a href="http://www.kodefuguru.com/post/2011/01/29/Red-Green-Refactor.aspx">Red - Green - Refactor</a>”.  However, refactoring does not belong exclusively to the exotic world of TDD, which can spark fear in the minds of many developers not familiar with TDD.</p><p>Refactoring has been the topic of <a href="http://www.refactoring.com/sources.html#Books">many books</a>, and rightfully so. The <a href="http://www.refactoring.com/catalog/index.html">list of possible refactorings</a> is a long one, but many of these techniques are really quite simple.<br>And more importantly: it can <strong>significantly improve your code base</strong>.</p><p>Yes, refactoring can <strong>improve readability and flexibility</strong>, which in turn <strong>improves maintainability</strong>. Improved maintainability leads to <strong>less money spent</strong> on fixing bugs, which leads to <strong>happy customers</strong>, which leads to less picking on us poor developers, a more <strong>satisfying job</strong> and ultimately: <strong>improved health by reduced stress</strong>. See that? All benefits! =)</p><h2 id="when-done-refactor">When done, refactor</h2><p>So why do we write less readable, less flexible code than we possibly can?</p><p>With deadlines and project managers breathing down our neck, it is easy to conveniently forget the refactoring part and move on to the next task at hand. We hope to never see that piece of code again, or think that the code we just wrote is “pretty ok enough" to understand 6 months down the line ( hint: it isn’t ).</p><p>So when you’re leaving the campground, be sure to <a href="http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule">leave it cleaner than you found it</a>, and <strong>clean up after yourself</strong>. Start off by asking yourself the following simple questions:</p><ul><li>Could my field names be any more meaningful?</li><li>Are my method names truthful? ( ie: <a href="http://blogs.msdn.com/b/marcelolr/archive/2010/06/30/api-design-rule-first-don-t-lie.aspx">don’t lie</a> )</li><li>Do I repeat myself unnecessarily?</li><li>Does my code need any documentation? ( answer = <strong>yes </strong>)</li><li>Do I still need that piece of commented code? ( answer = <strong>no </strong>)</li><li>Could any other developer read this code and on sight understand what it does?</li></ul><p>Contemplating about these things alone can be the first step towards a cleaner codebase and a happier life in code, knowing you’ve become a better developer. Next time you have to change something in that particular code file, you will thank yourself you took 5 minutes to clean up.</p><p>So while you’re at it, why not also improve your codebase with:</p><ul><li>Checking if your code is <a href="http://en.wikipedia.org/wiki/Solid_(object-oriented_design)">SOLID</a></li><li>Programming to interfaces instead of     implementations?</li><li>Writing meaningful tests?</li></ul><p>There are so many other things you can do to improve your code. <a href="http://codebetter.com/">Keep reading about ways to code better</a>, and remember to refactor and clean up your code whenever you’re done with a little piece of code.</p><h2 id="conclusioneven-if-you-won-t-have-to-maintain-your-code-in-the-future-never-say-never-clean-up-your-code-when-you-re-done-with-it-even-if-it-s-just-for-good-programmer-s-karma-and-the-next-guy-that-might-have-to-maintain-it-">ConclusionEven if you won’t have to maintain your code in the future ( never say never ), clean up your code when you're done with it, even if it's just for good programmer’s Karma and <a href="http://www.codinghorror.com/blog/2008/06/coding-for-violent-psychopaths.html">the next guy that might have to maintain it</a>.</h2><p>Stay realistic: your code will never be perfect. But <a href="http://www.mehdi-khalili.com/bad-code">writing bad, cluttered or unreadable code willingly or knowingly</a> should never be an option, and since you have read this post, you now no longer have any excuse. ;-)</p>]]></content:encoded></item><item><title><![CDATA[Code Contracts Static Checker: Best practices & guidelines]]></title><description><![CDATA[<p>As stated <a href="http://koenmetsu.wordpress.com/2010/05/13/using-code-contracts-to-define-behavior/">previously</a>, Code Contracts can give you certainty that your classes behave exactly in the way you want them to.<br>By defining pre- and postconditions on them, you can tell what you expect from a certain class and what others can expect from your classes.</p><p>A number of posts</p>]]></description><link>https://www.koenmetsu.com/blog/code-contracts-static-checker-best-practices-guidelines/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e95a</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:51:33 GMT</pubDate><content:encoded><![CDATA[<p>As stated <a href="http://koenmetsu.wordpress.com/2010/05/13/using-code-contracts-to-define-behavior/">previously</a>, Code Contracts can give you certainty that your classes behave exactly in the way you want them to.<br>By defining pre- and postconditions on them, you can tell what you expect from a certain class and what others can expect from your classes.</p><p>A number of posts and concerns about Code Contracts revolve around the static checker, and how to make it prove that certain contracts are correctly followed.<br>Sometimes this can be quite challenging, though I see this more as a pro than a con.<br>Making you think twice (or more) about your code is never a bad thing, really.</p><p>But for those who desperately seek salvation in their quest to annihilate all static checker warnings ( with or without Contract.Assume() ), I would recommend the following guidelines:</p><ol><li>Install the Code Contracts Extension for Visual Studio 2010.</li><li>Use Reflector to see Code Contracts on the Base Class Libraries.</li><li>Use Pex to automatically test your methods.</li><li>Split more complicated statements into multiple lines.</li></ol><h2 id="1-code-contracts-intellisense-">1. Code Contracts Intellisense.</h2><p><a href="http://koenmetsu.wordpress.com/2010/09/10/new-code-contracts-extension-see-contracts-in-intellisense/">Install the Code Contracts Extension</a> for Visual Studio 2010. This brings contracts right to your Intellisense as you type, as well as some other handy features.</p><h2 id="2-use-reflector-to-see-code-contracts-on-the-base-class-libraries-">2. Use Reflector to see Code Contracts on the Base Class Libraries.</h2><p>When you use the static checker, you might notice that a lot of methods in the BCL already have contracts defined on them. For example, the IList.Clear() method has a postcondition stating that the Count property will be equal to zero.</p><p>These contracts are not magically inferred from the BCL assemblies, but rather found in the Contract Reference Assemblies that are included with the Code Contracts installation. These assemblies are found under &lt;%YourProgramFiles%&gt;\Microsoft\Contracts\Contracts.NETFramework\v4.0.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/11/code_contracts_bcl_assemblies.png" class="kg-image" alt="Code Contracts BCL Assemblies" title="Code_Contracts_BCL_Assemblies"></figure><!--kg-card-end: image--><p>Using <a href="http://www.red-gate.com/products/reflector/">Reflector</a> you can browse through these assemblies, which contain nothing but Contracts. Although a lot of methods already have contract defined on them, the BCL contract assemblies still have a lot of contracts missing.<br>Using Reflector on these assemblies, you can find out for yourself why you keep getting a warning that a certain "contract cannot be proven".</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/11/code_contracts_bcl_reflector.png?w=150" class="kg-image" alt="Code Contracts String.Format in Reflector" title="Code_Contracts_BCL_Reflector"></figure><!--kg-card-end: image--><h2 id="3-use-pex-to-automatically-test-your-methods">3. Use Pex to automatically test your methods</h2><p>Pex provides a way to create parameterized unit tests to see which input causes your method to violate a contract. Actually, it does a lot more than that. Way too much to elaborate on in this post.</p><p>To make a long story short, Pex can automatically unit test your parameterized methods with different kind of inputs ( without resorting to brute-force). What's great about this, is that it works in combination with Code Contracts, and can actually suggest contracts for you.</p><p>The <a href="http://research.microsoft.com/en-us/projects/pex/documentation.aspx">documentation pages</a> includes a <a href="http://research.microsoft.com/en-us/projects/pex/pexandcontracts.docx">nice tutorial</a> on how to use the power of Pex in combination with Code Contracts.</p><h2 id="4-split-more-complicated-statements-into-multiple-lines-">4. Split more complicated statements into multiple lines.</h2><p>Although simple, quite effective.</p><p>A lot of concerns surrounding the static checker's inability to prove something are easily solved by this one. Some developers have the tendency of joining multiple statements in one big statement. This can improve readability and shorten your code files, but also confuse you about which statement the static checker is complaining about.</p><p>Split your big statement into several lines, and it will become more clear which method the static checker is complaining about.</p><p>For example:</p><!--kg-card-begin: code--><pre><code>StringHelper.CleanUrl( new PageManager("BasePage.aspx").GetFullUrl()) ;</code></pre><!--kg-card-end: code--><p>has a lot of places where there could be a nullreference occurring. Splitting this into several statements would make this a lot easier for you to see what method gives you the problem. ( This is actually general debugging advice, not just for the static checker )</p><h2 id="conclusion">Conclusion</h2><p>A lot of static checker warnings will easily be solved by following one or more of the solutions provided here, others will require more digging through your own code. There will be times when you will still need to Assume some conditions, as the static checker will never be able to statistically proof every line of code you write.</p><p>However, hopefully these guidelines will aid you in proving your contracts to the static checker, further improving your code base with better documented behavior, promises and expectations.</p>]]></content:encoded></item><item><title><![CDATA[New Code Contracts Extension: See Contracts in Intellisense]]></title><description><![CDATA[<p>Code Contracts just got a whole lot better with a brand new extension for Visual Studio 2010!<br></p><p>This new extension brings a couple of cool new features that help you while developing with Code Contracts.<br></p><h2 id="see-contracts-as-you-type">See contracts as you type</h2><p>Just start typing a method with contracts, and they will</p>]]></description><link>https://www.koenmetsu.com/blog/new-code-contracts-extension-see-contracts-in-intellisense/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e959</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:51:19 GMT</pubDate><content:encoded><![CDATA[<p>Code Contracts just got a whole lot better with a brand new extension for Visual Studio 2010!<br></p><p>This new extension brings a couple of cool new features that help you while developing with Code Contracts.<br></p><h2 id="see-contracts-as-you-type">See contracts as you type</h2><p>Just start typing a method with contracts, and they will be listed right beneath the description of the method.<br></p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/09/091010_1709_newcodecont1.png" class="kg-image"></figure><!--kg-card-end: image--><p>The great thing about this is that it works for methods in the BCL as well as your own methods.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/09/091010_1709_newcodecont2.png" class="kg-image"></figure><!--kg-card-end: image--><h2 id="see-inherited-contracts">See inherited contracts</h2><p>Contracts that are inherited show up above your methods. It's a helpful visual reminder of the contracts that are defined on the interface or class you're inheriting from.</p><p>This way you can easily add preconditions and postconditions without having to look back and forth to see which contracts are already defined.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/09/091010_1709_newcodecont3.png" class="kg-image"></figure><!--kg-card-end: image--><p>And it doesn't actually add text to your code file, it's just an adornment which you can easily click away too.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/09/091010_1709_newcodecont4.png" class="kg-image"></figure><!--kg-card-end: image--><h2 id="see-contracts-for-external-assemblies">See contracts for external assemblies</h2><p>Another helpful addition is being able to see contracts of external assemblies. The contracts are visible in the metadata file you see when you 'go to definition' of a member of a class of which you don't have the source.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/09/091010_1709_newcodecont5.png" class="kg-image"></figure><!--kg-card-end: image--><p>This can also be disabled by a simple click of a button labeled "Hide all contracts" ( See, it's all obvious ).</p><h2 id="conclusion">Conclusion</h2><p>Before this extension, visibility of the contracts was one of my major concerns with Code Contracts. Not being able to see contracts as you type made you rely on the static checker to see what contracts were defined on your code. This extension is a great improvement and incentive to using Code Contracts. It's only just released, but I'm loving it already!</p><p>Great! So how  can you have a piece of this?</p><p>It's easy!</p><ol><li>Install the latest version of <a href="http://research.microsoft.com/en-us/projects/contracts/">Code Contracts</a></li><li>Install the <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/85f0aa38-a8a8-4811-8b86-e7f0b8d8c71b">Code Contracts Editor Extension</a> for Visual Studio 2010.</li><li>Enable Code Contracts and choose 'Build' for 'Contract Reference assembly' in the Code Contracts properties pane.</li><li>Build your code</li></ol><p>And you're ready to see your contracts showing up as you type! Have fun =)</p>]]></content:encoded></item><item><title><![CDATA[Code Contracts: Is the static checker really that thick?]]></title><description><![CDATA[<p>When you start working with Code Contracts, you often get the feeling that you have to add contracts everywhere for everything. When you enable the static checker on an existing project, you might get <strong>a lot</strong> of warnings.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/06/code_contracts_warnings2.png" class="kg-image" alt="A lot of these" title="Static Checker Warnings"></figure><!--kg-card-end: image--><p>Something that troubles starting users is the fact that you have to</p>]]></description><link>https://www.koenmetsu.com/blog/code-contracts-is-the-static-checker-really-that-thick/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e958</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:51:01 GMT</pubDate><content:encoded><![CDATA[<p>When you start working with Code Contracts, you often get the feeling that you have to add contracts everywhere for everything. When you enable the static checker on an existing project, you might get <strong>a lot</strong> of warnings.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/06/code_contracts_warnings2.png" class="kg-image" alt="A lot of these" title="Static Checker Warnings"></figure><!--kg-card-end: image--><p>Something that troubles starting users is the fact that you have to add a lot of contracts 'twice or more'. I've recently seen this issue appear on <a href="http://stackoverflow.com/questions/3141025/net-4-code-contracts-do-i-need-to-include-the-same-contracts-twice/3141176#3141176">stackoverflow</a> as well. You can check out the specific code sample there, but I'll lay it out for you here as well.  Suppose you have a public method calling a private method, both of which accept an input parameter of type string.</p><!--kg-card-begin: code--><pre><code>public void ValidateString(string givenString)
{
    Contract.Requires(!string.IsNullOrEmpty(givenString));

    var isValid = SomeValidatingMechanism( givenString );
}

private bool SomeValidatingMechanism( string toValidate )
{
    return toValidate.Contains(&amp;quot;someImportantValue&amp;quot;);
}
</code></pre><!--kg-card-end: code--><p>I've immediately added a precondition to the ValidateString method, to make sure the caller never wrongfully provides me with an empty string and make my application crash to death.  Now when you let the static checker loose ( and you've set it to check for possible nullreference occurrences), it will whine about my private method calling Contains on a possible null value. What's that all about? I added a precondition to the public method, so the toValidate string can't be empty, right?</p><h2 id="solution">Solution</h2><p>Well, actually the static checker is really thinking ahead here. First of all you've got the static checker which cannot <strong>prove</strong> that the the toValidate string isn't actually null. <strong>You know it</strong>, because you can clearly see from the code above. But the static checker cannot mathematically prove that you did not alter the toValidate string after it entered the public method. For all it knows, you might have maliciously set it to be null right after it entered the method, trying to crash my application once again!  This might seem like a limitation to the static checker, but imagine you made some calls to an external API before you called the private method here. The static checker is just really playing it safe.  Secondly, for now you might have only one call to the private method, but what happens when you add more calls to it from methods which didn't have a precondition like the one above? Adding a precondition to the private method now can prevent future errors and possibly lots of debugging.</p><!--kg-card-begin: code--><pre><code>public void ValidateString(string givenString)
{
    Contract.Requires(!string.IsNullOrEmpty(givenString));

    var isValid = SomeValidatingMechanism( givenString );
}

private bool SomeValidatingMechanism( string toValidate )
{
    Contract.Requires(!string.IsNullOrEmpty(toValidate));
    return toValidate.Contains(&amp;quot;someImportantValue&amp;quot;);
}
</code></pre><!--kg-card-end: code--><p>With the above code the static checker's warning is gone, and your code feels safer once again =) You can sleep tight and never worry about some co-developer calling your private method with an empty string.  So no, the static checker isn't really that thick, it's actually quite smart and following it's advice can often lead to better and safer code.</p>]]></content:encoded></item><item><title><![CDATA[Using Code Contracts to define behavior]]></title><description><![CDATA[<h2 id="first-an-introduction">First: an introduction</h2><p>Code Contracts is a language-agnostic tool that provides you the power of <a href="http://en.wikipedia.org/wiki/Design_by_contract">Design By Contract</a> development. In short, it enables you to make statements about what your code expects and delivers. It's a great way of telling whether or not your code does what you expect it</p>]]></description><link>https://www.koenmetsu.com/blog/using-code-contracts-to-define-behavior/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e957</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:50:36 GMT</pubDate><content:encoded><![CDATA[<h2 id="first-an-introduction">First: an introduction</h2><p>Code Contracts is a language-agnostic tool that provides you the power of <a href="http://en.wikipedia.org/wiki/Design_by_contract">Design By Contract</a> development. In short, it enables you to make statements about what your code expects and delivers. It's a great way of telling whether or not your code does what you expect it to do.</p><p>Actions speak louder than words, so let's bring in an example:<strong> the BankAccount class</strong>.</p><!--kg-card-begin: code--><pre><code>public class BankAccount
{
    public decimal Balance { get; set; }
    public double InterestRate { get; set; }

    public void Withdraw(decimal amount)
    {
        Balance -= amount;
    }

    public void Deposit(decimal amount)
    {
        Balance += amount;
    }

    public void AddInterests()
    {
        var interests = Balance * (decimal)InterestRate;
        Balance += interests;
    }
}
</code></pre><!--kg-card-end: code--><p>A real simple class that should speak for itself. It maybe could use some comments, DDD or better logic, but it'll do for this post.</p><h2 id="adding-preconditions">Adding preconditions</h2><p>Preconditions are a way to define what state your application must be in at the start of execution of a called method. They're all about telling what you expect from someone calling your methods.</p><p>Let's take the <strong>Withdraw</strong> method: someone withdraws money from their account. We might have the following expectations:<br></p><ul><li>If you withdraw money, you should at least have money on your account.<br></li><li>You have to withdraw some money, which means more than nothing ( else it wouldn't be really withdrawing, would it? ).<br></li><li>You aren't allowed to withdraw more money than you have.</li></ul><p>All of these expectations can easily be converted to preconditions in Code Contracts, by using the <strong>Contract.Requires</strong> method.</p><!--kg-card-begin: code--><pre><code>public void Withdraw(decimal amount)
{
    Contract.Requires(amount &amp;gt; 0);
    Contract.Requires(Balance &amp;gt; 0);
    Contract.Requires(Balance &amp;gt;= amount);
    Balance -= amount;
}
</code></pre><!--kg-card-end: code--><p>The nice stuff is that you're not only defining the state your application must be in, you're also defining behavior here.</p><h2 id="adding-postconditions">Adding postconditions</h2><p>Postconditions define what state your application should be when it leaves the called method. This is the part that's all about <strong>delivering promises</strong> about your code, as well as checking if the method did what you expected it to do.</p><p>For the <strong>Withdraw</strong> method:<br></p><ul><li>We state that after we withdraw money, the balance  of the bank account won't be negative.<br></li><li>We also state that after the withdrawal, the balance will be the starting balance ( when we entered the method ) minus the amount we withdrawn.</li></ul><p>Once again, the postconditions are easily converted to contracts. The <strong>Contract.OldValue()</strong> represents the value of a certain field or parameter as they were in the beginning of the method.</p><!--kg-card-begin: code--><pre><code>public void Withdraw(decimal amount)
{
    Contract.Requires(amount &amp;gt; 0);
    Contract.Requires(Balance &amp;gt; 0);
    Contract.Requires(Balance &amp;gt;= amount);
    Contract.Ensures(Balance == Contract.OldValue(Balance) - amount);
    Contract.Ensures(Balance &amp;gt;= 0);

    Balance -= amount;
}
</code></pre><!--kg-card-end: code--><p>The second statement here seems pretty obvious because of the actual code following the contracts, but a lot of times this code will obviously be quite more complicated.</p><h2 id="isolating-object-invariants">Isolating object invariants</h2><p>Object invariants are conditions on an object which should be true at all times that object is visible to a client. They express the conditions under which the object is in a "good" state.</p><p>As good programmers we try to prevent writing the same code twice, and if we look at the preceded code we notice the balance must always be greater than zero.</p><p><em>For the balance to be in a good state, it must never be zero.</em></p><p>We can isolate this contract by creating a method that contains <strong>Contract.Invariant()</strong> statements, and decorate this method with the <strong>ContractInvariant</strong> attribute.</p><!--kg-card-begin: code--><pre><code>[ContractInvariantMethod]
private void EnsureBalanceIsPositive()
{
    Contract.Invariant(Balance &amp;gt; 0);
}
</code></pre><!--kg-card-end: code--><p>All the invariants will be checked at the end of every public method. So now we added these, we no longer need the preconditions regarding the balance being greater than zero.</p><h2 id="conclusion">Conclusion</h2><p>Although this example uses really simple code, by using Code Contracts we made it exactly clear what this BankAccount can and cannot do.</p><p>Your code can become immensely more complicated, new developers can join your project but <strong>by defining the behavior</strong> of this class by contracts, they will <strong>immediately recognize</strong> what the class does.</p><p>Ideally we would define the contracts on an interface or base class, so deriving classes would all share a base behavior, but that's out of scope for this post. =)</p><p>For more info on Code Contracts, visit the homepage <a href="http://research.microsoft.com/en-us/projects/contracts/">here</a>.</p>]]></content:encoded></item><item><title><![CDATA[Calculating Routes in .NET: 5 minutes tutorial]]></title><description><![CDATA[<p>Calculating the 'road distance' between two points can come in handy when you want to calculate the transport costs between your company and your customers.</p><p>Google Maps is great for calculating a single route, but when you want things automated, you need some kind of web service for this, which</p>]]></description><link>https://www.koenmetsu.com/blog/calculating-routes-in-net-5-minutes-tutorial/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e956</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:50:15 GMT</pubDate><content:encoded><![CDATA[<p>Calculating the 'road distance' between two points can come in handy when you want to calculate the transport costs between your company and your customers.</p><p>Google Maps is great for calculating a single route, but when you want things automated, you need some kind of web service for this, which Google doesn't provide.</p><p>A lesser known competitor of Google Maps is Microsoft's Bing Maps, which has a great SDK that you can get up and running in about 5 minutes, and 4 easy steps.</p><h2 id="1-create-a-bing-appid">1. Create a Bing AppID</h2><p>To be able to use the Bing Web Services, Microsoft requires you to request a unique key through <a href="http://www.bing.com/developers/createapp.aspx">this website</a> ( you will need a Live ID ).</p><h2 id="2-add-a-service-reference">2. Add a Service Reference</h2><p>Add the following service reference to your project: http://dev.virtualearth.net/webservices/v1/routeservice/routeservice.svc?wsdl</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2010/01/011510_1704_calculating12.png" class="kg-image"></figure><!--kg-card-end: image--><h2 id="3-setting-up-your-request">3. Setting up your request</h2><p>Next thing we do is set up the RouteRequest.</p><p>In this example I provide the latitude and longitude myself ( from a random geocoding site ), but you could use Microsoft Bing's or Google's geocoding service as well, to get the lat/long from any address you like.</p><p>I've added some commentary in the code, so it should be self-explanatory.</p><!--kg-card-begin: code--><pre><code>// Get a key at http://www.bing.com/developers/createapp.aspx
string key = &amp;amp;quot;xxx&amp;amp;quot;;

BingRoutingService.RouteRequest request = new RouteRequest();
request.Credentials = new Credentials { ApplicationId = key };

// the actual waypoints, from start to finish.
request.Waypoints = new Waypoint[]
{
  // Brussels
  new Waypoint(){ Location= new Location(){ Latitude = 50.8462807, Longitude= 4.3547273}},
  // Paris
  new Waypoint(){ Location= new Location(){ Latitude = 48.8566667, Longitude= 2.3509871}},
};

// For the international crowd, you can also switch this to miles.
request.UserProfile = new UserProfile
{
  DistanceUnit = DistanceUnit.Kilometer
};

// some optional parameters
request.Options = new RouteOptions()
{
  Mode = TravelMode.Driving,
  Optimization = RouteOptimization.MinimizeTime
};
</code></pre><!--kg-card-end: code--><h2 id="4-getting-the-results">4. Getting the results</h2><p>Last thing on the to-do list is setting up our RouteServiceClient. This will send the actual request, and get the results back in a nice RouteSummary object.</p><!--kg-card-begin: code--><pre><code>RouteServiceClient client = new RouteServiceClient();

RouteResponse response = client.CalculateRoute(request);
RouteResult result = response.Result;
Console.WriteLine(result.Summary.Distance);
</code></pre><!--kg-card-end: code--><p>The distance will be in the unit specified in the UserProfile object.<br>The RouteSummary object will also contain the time needed to drive in seconds.</p><p>If you like you can even get the full route path from the RouteResult object, and a lot more, but I'm not going to be able to cover that in a 5 minute post ;-)</p>]]></content:encoded></item><item><title><![CDATA[STM.NET and .NET Framework 4.0 beta 2 ( Error 1603: A fatal error occurred. )]]></title><description><![CDATA[<p>Recently I ran into some problems installing the latest Visual Studio 2010 beta 2. It gave me the very clear error message:</p><p>"Error 1603: A fatal error occurred."</p><p>Well that about says it all, right...?</p><p>After a lot of googling and frustration, it seemed that my previous installation of STM.</p>]]></description><link>https://www.koenmetsu.com/blog/stm-net-and-net-framework-4-0-beta-2-error-1603-a-fatal-error-occurred/</link><guid isPermaLink="false">5ced4e5cc2e0df40f8c4e955</guid><dc:creator><![CDATA[Koen Metsu]]></dc:creator><pubDate>Mon, 27 May 2019 12:47:51 GMT</pubDate><content:encoded><![CDATA[<p>Recently I ran into some problems installing the latest Visual Studio 2010 beta 2. It gave me the very clear error message:</p><p>"Error 1603: A fatal error occurred."</p><p>Well that about says it all, right...?</p><p>After a lot of googling and frustration, it seemed that my previous installation of STM.NET caused this error.</p><p>I should have remembered that  "<em>the STM enabled version of Microsoft .NET version 4.0 and official versions of .NET</em><br><em>version 4.0 are mutually exclusive, and cannot be installed simultaneously on the same computer</em>".</p><p>Uninstalling STM.NET was not as easy as I thought. I assumed the almighty internet would have answers, but no dice. I spent  about a day and a half of trying almost everything : .NET Framework Cleanup tools, uninstalling anything with '.NET or 'Visual' in it's name, registry cleaning, manually removing folders from the Windows folder  ( I got desperate ).</p><p>Finally, I found the answer, thanks to an old Microsoft Support article.</p><!--kg-card-begin: image--><figure class="kg-card kg-image-card"><img src="http://koenmetsu.files.wordpress.com/2009/11/uninstall-net-framework-4-stm.png?w=300" class="kg-image" alt="Uninstall NET Framework 4 STM" title="Uninstall NET Framework 4 STM"></figure><!--kg-card-end: image--><ol><li>Go to : Start &gt; Run &gt; type 'Installer', press enter</li><li>Right click on the column header and add the 'Comments' column</li><li>Sort alphabetically and search for 'Microsoft .NET Framework 4 Client Profile Beta 1 enabled to use Software Transactional Memory...'</li><li>Right-click and uninstall!</li><li>Reboot ... just in case =)</li></ol><p>This should enable you to succesfully install the 'regular' .NET Framework 4 Beta 2 and enjoy the new Visual Studio 2010 Beta!</p>]]></content:encoded></item></channel></rss>