Naeem Sarfraz

Blogging about Enterprise Architecture, ALM, DevOps & happy times coding in .Net

Sketchnotes from SDD Deep Dive 2015

This was something new for me; sketchnoting a 3 day workshop. The workshop was Architecting applications for the enterprise hosted by the Software Design & Development group as part of their Deep Dives series.

Dino Esposito is someone who I’m familiar with as I have both editions of the book he co-authored Architecting Applications for the Enterprise (Microsoft Press). So I approached this workshop with some prior knowledge of the subject matter. I was surprised when I managed to produce only one sheet of A5 for each day of the workshop, I thought I would have had pages and pages of them.

So what did I learn?

  • Sketchnoting technical content is hard
  • I’m getting better at focusing on the BIG ideas
  • I like my freebie pen I got at DDDEA, more on that later
  • I will make mistakes (spelling, positioning) but they can be fixed, nearly always
  • Using a pencil helps when you’re not sure, is it cheating?

SDD 2015 D1SDD 2015 D2SDD 2015 D3

The pen I’ve switched to was a freebie I received at DDDEA from the stand. It flows really well, is multifunctional and has a bit of meat to it so it feels great in my hand. It has a stylus, pen and light. The ink refil has D15 written on it which I followed to find the pen. Nice bit of conference swag.

Photo_2015-11-13_06-56-28_PM - Copy

Sketchnote from DDDNorth 2015

Another fantastic event with a brilliant range of topics and I captured one of them in a new sketchnote presented below. The day started with a session on Sketchnoting for Developers which covered most of what I know about sketchnoting so far.

Other sessions I attended included:

  • IoT development fun with .NET and Rasberry PI @christosmatskas (slides) – Potentially a great session but was a little short and missed sharing some lessons learnt during the development process.
  • Microservice Architecture, what is it, why it matters and how to implement it in .NET @shawty_ds (slides) – I heard about Nancy previously but after this talk I tried it for the first time and was impressed at how easy it was to get it up and running. Another useful takeaway was the topshelf library for creating windows services.
  • Monoliths to Microservices @samelamin (slides) – See the sketchnote below. Really good and valuable real world experience, try and catch this talk at other conferences where Sam is presenting.
  • Monitoring and addressing technical debt with SonarQube @richardfennell (slides) – Again some good real world experience and factors to consider when starting with SonarQube.

Onto my sketchnote. I’m still using the same pen and paper as I did in my last attempt but this time I didn’t feel the need to sketch each session and stuck to the one I felt was of most value to me. And this time I used a scanner to take a copy which gives a much better result than my phone.

DDDNorth 2015 Monoliths 2 Microservices

Tips on Running a Code Club

It was a pleasure to give a short talk to potential volunteers at the Code Club Leeds meet-up yesterday. Here’s a summary of what I discussed.

  1. Check your motivation
    You’ve got to be doing it for the right reasons and there are many good reasons to want to volunteer. Check your intentions and set yourself personal goals for what you want to get out of the experience. At the end of the day it has to be about the children and getting them engaged and having fun whilst learning these new skills.
    I firmly believe if you are motivated for the right reasons and enthusiastic about the cause that will project on to the children. I know I was inspired most by my teachers who not only knew their subject but knew how to engage.
  2. Make life easy, use the starter projects
    The starter projects are a great place to start, ensuring that there is a level of consistency between clubs. Be sure to read through and practise the projects before hand so that you can think about potential problem areas and further areas of enhancements if students finish early.
    We did have to lead our group a little using a smart board to demonstrate the next task and then letting them get on with it. But this doesn’t work for all students as you’ll discover, get out of the way of the ones that pick it up a lot quicker!
  3. Check the equipment
    I didn’t before I arrived for the first session only to discover we couldn’t run the latest version of scratch, the version the starter projects are based on. We were seeing lots of performance issues like machines freezing and an unresponsive UI because of the pc spec. We turned to the web version which was better but again we’re running on old browsers so the experience wasn’t what it should have been. However we managed to work around those things with my IT experience coming in to play.
  4. Work with your employer
    If you’re in full time employment then you’re going to need to get time off to attend a club. Work with your employer to come to an arrangement that works for both parties. Choose a school close to your office which will reduce the travel time and in the end you may only need a couple of hours off each week (3pm-5pm) but be prepared to make up that time if need be. An alternative could be to start a pre-school club which means you’ll get to work slightly later than usual but doesn’t disrupt your work so much.

I highly recommend it to anyone looking to give something back to their community and hoping to inspire young people about a career in IT.

An Alternative Method to Timestamp a File or Folder in Release Management 2013

In a previous post I presented a powershell script to attach a timestamp suffix to files or folders backed up prior to a deployment. At the point of writing that post I wasn’t aware of a collection of runtime variables that are available in your powershell script.

Below is alternate script to the last one I presented. The suffix in this script is not using the current date and time but the $ReleaseId variable which is a number. Each time a new released is created and executed this variable will contain a new value but remember a release maybe re-tried in which case this value will not change. You could also use the $BuildNumber variable (alter line 7) which is the unique Id TFS assigns to the build and is a number.

Sketchnotes from DDDEA 2015

Over the weekend I was at DDD East Anglia armed with my gel pen and notebook. I’ve been attending these events for years taking the odd note here and there but recently I came across a different way of note taking called Sketchnoting. The end result is fab and one quick glance at my notes allows me to quickly recall all the important info from the talk.

Below you can find my notes from the event right after reflections from the experience.

  • Get a moleskin notebook. I couldn’t use the reverse side of the paper because it was too thin and the gel ink came through.
  • The big message I took from the book was to listen out for the big ideas. You can only do that when you’re not sketching so I tried my best not to be sketching all the time.
  • Practise, practise and more practise. This is key to being quicker with the pen and being able to do more with it.

The sessions:

  • DDD, CQRS and Event Sourcing... how do I actually DO it? @neilbarnwell
  • Monolith to Microservices @IJohnson_TNF
  • Become a MEAN developer!! @shonuzzz
  • You keep using the word agile, I do not think it means what you think it means @NathanGloyn

DDDEA 2015 DDD CQRSDDDEA 2015 Monolith 2 MicroservicesDDDEA 2015 MEANDDDEA 2015 Agile

I’m looking forward to doing this again at DDD North (24th October) and the session “Sketchnoting for Developers”.

Feel free to share any tips in the comments below and check out the recent podcast episode of the MS Dev Show on Sketchnotes with Mike Rohde for more info on, you guessed it, Sketchnoting.

Runtime Variables in TFS 2015 Build

Following my previous post here is a script which writes out all the TFS 2015 Build variables. These variables are documented here however as you’ll see the names are not quite correct so you should find this script useful.

The end of the script will also dump out all variables (undocumented ones) to the logs too.

Runtime Variables in Release Management

Deploying a vNext release means you can take advantage of global variables in your powershell script. A complete description of what is available and how you can configure your own is available here.

Here is a simple script which I found useful when you simply want to know\confirm the values being pushed to your script. The end of the script will also dump out all variables (undocumented ones) to the logs too.

Timestamp a File or Folder in Release Management 2013

TLDR: Download and use this powershell script in your deployments to append a timestamp to a file or folder.

Typically you’ll backup a database prior to upgrading it through Release Management or you’ll copy a website folder to a backups folder as part of your rollback strategy. Both tasks are easily achieved using the Backup SQL Database and Copy File or Folder tasks.

RM Web DB tasks - no unique name

You’ll most likely want to version your backup copies using a timestamp strategy. This would involve passing some sort of token which can be evaluated at runtime and your input value modified to accommodate this token and this is where we find RM wanting. For example you can’t use a token such as __BuildID__ in the DestinationFileFolder (Copy File or Folder task) like so D:\Sites\InvoiceApp\Backups\InvoiceWebapp__BuildID__. The input fields simply won’t recognise any token so our only option is to follow up the task with a new one that will rename the newly created file or folder.

PowerShell to the rescue

Here is a powershell script which can be can be used to rename either a file or a folder. By default it will append a timestamp in the format yyyyMMddhhmmss but you can override that to match your requirements.

To begin to use this in RM you will need to create a Tool like this:

RM RenameObject Tool

And then create a couple of Actions like this:

RM RenameObject Action File RM RenameObject Action Folder

And finally use it in your template like this:

RM Suffix file RM Suffix Folder

An approach that didn’t work

For completeness I’m including an approach that didn’t work me and I never got to the bottom of why it never worked.

From the command line I can rename a file or folder using xcopy whilst at the same time I can use %date% and %time% to create a timestamp. A typical command would look like this:

xcopy D:\Sites\AppA\Current D:\Sites\AppA\Backups\AppA_%date:~-4,4%%date:~-7,2%%date:~-10,2%%time:~-11,2%%time:~-8,2%%time:~-5,2%%time:~-2,2% /I /E

You’d think then if I used this command in the Run Command Line task that we have the desired behaviour well RM doesn’t like this command. An error occurred from the task which looked like it was trimming down the command. I gave up after a few hours and pursued the solution above.

Organising your TFS Build Output with GenerateProjectSpecificOutputFolder

When you set TFS to compile your project it will deliver the output of the build into a builds folder. You have three options as to how the output is organised and this is controlled by the Output location option located in your Build process parameters.

  • SingleFolder (default) – All binaries from the build are copied to the specific build folder.
  • PerProject – For each project/solution (and yes you can specify more than one project to build) you’ll find a folder matching the name of the project/solution and all of the binaries for that solution inside that folder.
  • AsConfigured – no binaries are copied therefore you’ll have to use a post build script to copy the files.

Your solution will typically contain more than one project and you might expect choosing PerProject will create a set of directories that match your projects. Not quite.

To rectify this you need to add /p:GenerateProjectSpecificOutputFolder=true to the MSBuild arguments (available in .Net 4.5). Output location should be set to SingleFolder or PerProject, I prefer the latter in case you select a second project in the same build.


For each project you’ll now see a separate folder like so: {drop number} \ {project name} \ *.dll | *.exe | *.pdb

Defining my terms

It’s time to start sharing, testing and promoting my ideas and solutions on interested topics. Over the past few years both my StackOverflow profile and Twitter account have been a great way of engaging the .Net community both receiving and giving. Reflecting my development and success developing .net solutions right across the Microsoft stack these two mediums have served me well. My focus now switches over to Enterprise Architecture and a longer term view of application software which a blog lends itself a more suitable solution.

Why keep track of this blog?

If you’re interested in my content then take note of this rss feed. You’ll find me blogging about the following.

  • Enterprise Architecture
    Journeying into delivering Enterprise applications using all the knowledge of building .Net applications over the last decade. I’m hoping to also provide some insight into governance and more formalised standards including TOGAF and how this works with delivery using Scrum.
  • Application Lifecycle Management & DevOps
    I still like to get my hands dirty with build tools so you’ll snippets of powershell or customised build scripts for TFS.

There will be the odd post on productivity tools and strategies as I explore better ways of working.

Keep in touch

These links are dotted around this site however they are here for convenience.

The stainless steel back cover replica watches sale protects the interior of the watch. Equipped with replica watches uk an ETA 2824 calibre, the travel time is more precise. With replica watches a 42-hour power reserve and a water-resistant depth of 100 meters, this watch is rolex replica watches a new watch that can be moved.