I’m Eric Tummers, Technical Consultant at Valid, and this is how I work

hulk_behind_me
I’m hired as a Software Architect to build a solution with Microsoft products. Our team works by the scrum guide and is moving towards continuous deployment. We are learning and growing while delivering business value. This is hard work. Every sprint we complete means the retrospective is done in the pub.

I expect the best and I give the best. Here’s the beer. Here’s the entertainment. Now have fun. That’s an order!
Rasczak

Location: Sittard, NL
Current Gig: Technical Consultant, Valid
Word that best describes how you work: Teamwork
Current mobile device: iPhone se
Current computer: MacBook 15 inch

What apps/software/tools can’t you live without? Why?

Wunderlist: work tasks, chores, groceries, planning, every task is there.
Evernote: I’m a fan for years now. Not to happy about the recent update but time will improve this.
iSmoothrun: when I’m not working, I’m running, this app tracks just about every metric I can think of and shares it to all the platforms (runkeeper for one)
Parallels 11: Running Windows on my MacBook is a must. And of course visual studio, team foundation server, build, release manager, sql server management studio, remote desktop, powershell, and some other tools I need for work.

What’s your workspace setup like?

Work at the office is on a thin client with 21 inch screen and (wired) mouse and keyboard. The desk and chair comply with all regulations. We have a great coffee machine.

dekstop_2017

My home workspace has moved to the kitchen table with my Macbook 15 inch. No externals and enough battery for the whole day. Freedom!

What’s your best time-saving shortcut/life hack?

Timebox. Start on a task and spent the time you’ve got to get the best result. Get someone to look at it, get feedback. Then decide if the result is final or to spent some more time.

Besides your phone and computer, what gadget can’t you live without and why?

I’ve been running with my Magellan Echo for some time. It is a sports watch that hooks up to my phone by bluetooth to start / stop my runs, control the music and see the metrics right on my wrist. It is powered by a battery that lasts 6 months and is easy to replace.
My Apple TV2 (jailbroken) hooked up to my NAS for movies and series. Also hooked to my stereo for music streaming. Awesome device!

What everyday thing are you better at than everyone else? What’s your secret?

Learning new things. My current project lets me implement new things (joy) Also I try to learn the things I know to my team or anyone who listens.
I have a basic understanding of how things work and try to map new things on there. For the details I have a Pluralsight subscription and black belt google skills.

What do you listen to while you work?

My alarm clock plays classical music to wake me up in the morning. The car stereo plays about everything (grunge, rock, kids stories) driving to work. When I need some focus I play drum and bass on my headphones. My ringtone is still Run riot by Camo & Krooked.

What are you currently reading?

Tools of Titans by Tim Ferriss. A Christmas gift. Best described as a book of “How I Work” posts full with tips and tricks of the titans (experts)

tools-of-titans

How do you recharge? What do you do when you want to forget about work?

Spending quality time with my wife and daughters. Phone on silent, no screens, no work. Mostly piggyback riding and thee parties
Also sports like running, fitness, climbing and snowboarding to keep me fit and healthy.

Fill in the blank: I’d love to see _________ answer these same questions.

Iris Classon, because she had to start from zero with her career shift and is now a Microsoft MVP (Most Valuable Professional).

What’s the best advice you’ve ever received?

someecards.com - Make a shit first draft you cannot edit a blank page
I believe this is a variant on a Hemingway quote.

Is there anything else you’d like to add that might be interesting to readers?

Learn Powershell. There is so much possible with Powershell. If you can learn one thing this year pick Powershell. 

Original idea from Lifehacker.com.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Continuous deployment step by step

This is not a how-to blog post guiding you to DEVOPS heaven. I write down the steps we are taking to get continuous deployment in place for our project. Every time we take another step I’ll update this post.

First of all: what are we aiming at?

We do our project using scrum. Product owners, scrum master and developers form the team. Like most projects we struggle with things like build, release and automated tests. Things scrum assumes to be just there. What do we want our continuous deployment to do?

Continuous deployment for us is being able to get the software build, deployed and tested without user interaction.

TFS 2015 with the scrum template is the tooling we use. TFVC is the version control. Build will create the software and do the unit testing. Release Management handles the deployment.

Step by step

Below is a schema of the proces we have in place now.

continuous_deployment

1. Build

First we created a build definition that pulls the sources from version control and puts the software on a drop location. During the build the unit tests are run. This was created the first week of the project.

We created / configured the proces for the build in the project portal. The supplied Visual Studio template was a good start. After a few days we added some steps like a powershell to update the assembly version with the build number.

2. Release

With the build creating software on the drop location we started creating the release pipelines. Installation of the software is done with DSC.

All developers (and testers) now have the tooling to start a release. Everything is triggered manually, but that will soon change.

3. Schedule

In the build definition we setup the trigger to scheduled every night. Now we have a nightly build.

4. Auto deployment

Together with the nightly build we added another step to the build that triggers the release of that build. This is done with an API call. Now we have new software on our server every morning.

Next steps

We plan to include test manager in the mix. After the auto deployment the integration tests are run and a report is waiting our team in the morning.

Takeaway

gwe0dlvd9e0-benjamin-child

You might notice that this post is really superficial and not of much use when you run into trouble. Since every project is different and google-is-your-friend, I’m sure you’ll manage.

My post describes the steps we (you) need to take to get continuous deployment implemented in the project. I think multiple small steps are better than one huge leap. In the end we need to add business value by writing software. Sometimes the tooling gets in the way of that.

Posted in Development, Tooling | Tagged , , , | Leave a comment

WPF Toolkit DateTimePicker customisation of header

In my previous post WPF Toolkit PropertyGrid direct update I’ve written about getting the Property Grid from the WPF toolkit. Now I want to tell you about how I got the DateTimePicker to behave my way.

First of all the DateTimePicker is well documented. It offers a lot of properties, methods and events. Samples and solutions are available. But when I use it, it looks like the image below on the left. The header is to small and makes the text unreadable.

datetimepicker-wrong

Calendar with header too small

datetimepicker-right

Calendar the way I like it

After reading a lot of suggestions online I created a customised version of the control that increases the header. That makes the text readable again. The code below hooks into the OnApplyTemplate event from the control and registers for the loading of the child controls. When (finally) the Calendar is loaded the header is adjusted by using the PART_xxx templates provided by Microsoft.

public class CustomDateTimePicker : Xceed.Wpf.Toolkit.DateTimePicker {
    public override void OnApplyTemplate() {
        // 1. Look for the Popup (that holds the calendar)
        base.OnApplyTemplate();
        var popup = Template.FindName("PART_Popup", this) as Popup;
        popup.Loaded += Popup_Loaded;
    }

    private void Popup_Loaded(object sender, RoutedEventArgs e) {
        // 2. When popup is loaded find the Calendar control/part
        var cal = Template.FindName("PART_Calendar", this) as Calendar;
        cal.Loaded += Cal_Loaded;
    }

    private void Cal_Loaded(object sender, RoutedEventArgs e) {
        // 3. When calendar is loaded alter the header
        var cal = sender as Calendar;
        var calItem = cal.Template.FindName("PART_CalendarItem", cal) as CalendarItem;
        var header = calItem.Template.FindName("PART_HeaderButton", calItem) as Button;
        // 4. Finally ...
        if (header != null) {
            header.Height = 30;
            header.Width = 120;
        }
    }
}

In the Resolve editor method (see previous post) I create a CustomDatePicker, set some properties and bind it to the value. Code collapsed below. Now the DateTimePicker behaves my way.

public class InstantUpdatingDateTimePicker : ITypeEditor {
    public FrameworkElement ResolveEditor(PropertyItem propertyItem) {
        var dateTimePicker = new CustomDateTimePicker {
            BorderThickness = new Thickness(0),
            AllowSpin = false,
            AllowTextInput = false,
            ShowButtonSpinner = false,
            TimePickerShowButtonSpinner = false,
            AutoCloseCalendar = true
        };

        var _binding = new Binding("Value"); //bind to the Value property of the PropertyItem
        _binding.Source = propertyItem;
        _binding.ValidatesOnExceptions = true;
        _binding.ValidatesOnDataErrors = true;
        _binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
        _binding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;

        BindingOperations.SetBinding(dateTimePicker,
            Xceed.Wpf.Toolkit.DateTimePicker.ValueProperty,
            _binding);

        return dateTimePicker;
    }
}
Posted in Development | Tagged , , | Leave a comment

MacBook case

For some protection I bought and installed a case on my MacBook. I installed it 6 months ago and wanted to share my thoughts.

Installation starts with the bottom. It has little feet and grid slots for airflow.  On the back the cover clicks into the cooling opening, but leaves the hinge free to move. Next step was clicking the top cover on. The front has 3 hooks that have cut-outs in the bottom cover.

 

Installation is very easy. All ports are available. The case feels very cheap, but  €15 is cheap. Hasn’t failed me jet. Thumbs up 😀

Posted in Uncategorized | Tagged | Leave a comment

DataGridViewAutoFilter

Our WinForms application needs a filter on the DataGridView control. The google search took me back to July 2006 when Microsoft published Building a Drop-Down Filter List for a DataGridView Column Header Cell.

Fast forward back to 2017. Turns out someone put the code on codeplex under datagridviewfilter and I just downloaded the sources.

  1. Add 3 files to project
  2. find-replace DataGridViewTextBoxColumn -> DataGridViewAutoFilterTextBoxColumn
  3. done
Posted in Development | Tagged , , | Leave a comment

WPF Toolkit PropertyGrid direct update

For the visuals in our WPF project we use the WPF toolkit. An awesome library that offers a lot of controls for free (Community Edition) and even more controls in the paid editions.

product_wpf_toolkit_plus_horizontal-300x53

When editing a string property in the PropertyGrid, we noticed some strange behaviour. The ViewModel would only be updated after changing the selection. This required the user to first switch to another property before clicking the save button. Unacceptable!

Custom Editors with DataTemplates in the WPF Toolkit documentation handed the solution. But first we dug around the source code for the controls. Why was the string property not updated as we typed the new value?

A string in the PropertyGrid is default edited with the PropertyGridEditorTextBox control. This can be stripped down to a TextBox. The TextBox has UpdateSourceTrigger set to LostFocus. All other types (int, DateTime, bool) have default controls that handle the change of value like masters, so no coding required for those.

We made a custom editor for strings and hooked it up to the PropertyGrid by adding the EditorAttribute to the ViewModel. See simplified code below.

public class InstantUpdatingTextBox : ITypeEditor{
   public FrameworkElement ResolveEditor(PropertyItem propertyItem) {
      var textBox = new TextBox();
      var _binding = new Binding("Value");
      _binding.Source = propertyItem;
      _binding.ValidatesOnExceptions = true;
      _binding.ValidatesOnDataErrors = true;
      _binding.Mode = BindingMode.TwoWay;
      _binding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
      BindingOperations.SetBinding(textBox, TextBox.TextProperty, _binding);
      return textBox;
   }
}

public class ViewModel {
   [Category("(General)")]
   [Editor(typeof(InstantUpdatingTextBox), typeof(InstantUpdatingTextBox))]
   public string Name {
      get { return _name; }
      set
      {
         _name = value;
         RaisePropertyChanged(() => Name);
      }
   }
}

Now we see changes everywhere as we type the new value. Got to love WPF and its DataBinding. 😉

Posted in Development | Tagged , | 1 Comment

Code standards review with RegEx

On our project we use Macroview to visualise and edit data. The script that drives the proces is subject to our definition of done code standards. A review of the script is a time consuming activity that is leading to frustration in our team. Time to get some tooling support.

First we looked at StyleCop and other static code analysis tools. Since the script language isn’t widely used no of-the-shelve solution was found. We did stumble upon a tool that seemed to use regular expressions. This was an idea worth exploring.

We have a full license to EditPad Pro. This rich text editor has the ability to search with regular expressions. When a match is found, the text is highlighted. In an hour or two we developed some expressions that can be divided in three groups:

  1. Highlight blocks, used to view comment blocks

    regex-codereview-highlight-blocks-comments

    Comment blocks to inspect

  2. Highlight correct, correct used and spelled keywords are highlighted, this was abnormalities are found easy (not highlighted)

    regex-codereview-hightlight-correct-keywords

    Correct cased keywords

  3. Find defects, negative search used for explicit rules, highlighted items are wrong

    regex-codereview-highlight-wrong-naming

    Wrong prefix in name

Using the list of regular expressions sped up the code review and made it more reliable. The code quality has gone up and new code is quickly reviewed. One up for regular expressions. 1up

Posted in Development, Tooling | Tagged , , | Leave a comment