Week roundup

Last week recap and links:
Image courtesy of kanate / FreeDigitalPhotos.net

Image courtesy of kanate / FreeDigitalPhotos.net

What are your best reads this week? Leave them in the comments below.

Posted in Uncategorized | Tagged | Leave a comment

Powershell to move pictures

powershellFor the birthday of our kids my wife creates hard-copy Photo Books. The procedure is time consuming but worth every minute.

Recently I migrated to the new Photos app on my MacBook. The Software for creating the book is on Windows. This means exporting the pictures to disk and moving them to another device (am looking into Parallels) Since the export creates a folder per “event” combining them into monthly folders would take ages. The event folders came with the month spelled out and that is what I used to get the files into the month folder.

See the script below.
First get-childitem selects all folders in the current folder.
Then select all folders that have october in the name.
Get the childitems (the pictures inside the folders).
Last move the pictures to a new folder called 10-2015.

get-childitem | where name -Like '*october*' | `
    Get-ChildItem -Recurse | `
    Move-Item -Destination f:\10-2015

Powershell actually did it in 5 minutes. 30 seconds to figure out the syntax and 4 minutes waiting for the copy of the files to be moved.

Posted in Development | Tagged | Leave a comment

Choose Your Own

ID-100189504My boss lets me choose my own device to work with. Given a budget, some basic rules, two default configurations and this employee is happy. But now the hard part: what do I choose?

Visual Studio and Office are where I spend most of my time. Sometimes I have multiple hyper-v machines running for demos. My current laptop (HP Probook 6570b) manages this barely and overheats / crashes. The 120 Gb space is getting a big hurdle. Battery is not a big thing but could be better too.

Options

Here is a table with the most interesting specs compared

HP Folio 1020 HP Probook 850 Surface 3 Pro
Processor Core M-5Y51 Core i5-5200U Core i5-4300U
Clock 1.1-GHz 2.2-Ghz 1.9-GHz
Memory 8 Gb 8 Gb 8 Gb
Disk 256 Gb SSD 256 Gb SSD 256 Gb SSD
Screen 13.3 inch 15.6 inch 12 inch
Resolution 1920 x 1080 1920 x 1080 2160 x 1440
Video Intel 5300 Intel 5500 Intel 5000
GeekBench 3814 5901 5665

Looks like the Probook 850 is the best option for me.

What’s missing?

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

  • Quad-core option,
  • 16Gb memory option and
  • MacBook Pro.

To be continued …

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

Week roundup

Last week recap and links:
Image courtesy of kanate / FreeDigitalPhotos.net

Image courtesy of kanate / FreeDigitalPhotos.net

What are your best reads this week? Leave them in the comments below.

Posted in Uncategorized | Tagged | Leave a comment

MSTest Code Coverage with runsettings

I’ve been fine tuning my code coverage runsettings file for some time now and I’m ready to share it with the world.

You can use it in Visual Studio by setting the test settings file.
select_test_settings_file

In MSBuild you can specify the runsettings file
msbuild_run_settings_file

My current codecoverage.runsettings is listed below. It excludes the .xaml.cs source files since I can only unit test non-GUI code. Also some third party libraries are excluded with the CompanyName tag.

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <DataCollectionRunSettings>
    <DataCollectors>
      <DataCollector friendlyName="Code Coverage"
                     uri="datacollector://Microsoft/CodeCoverage/2.0"
                     assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
        <Configuration>
          <CodeCoverage>
            <ModulePaths>
              <Include>
              </Include>
              <Exclude>
              </Exclude>
            </ModulePaths>
            <UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
            <AllowLowIntegrityProcesses>True</AllowLowIntegrityProcesses>
            <CollectFromChildProcesses>True</CollectFromChildProcesses>
            <CollectAspDotNet>False</CollectAspDotNet>
            <Functions>
              <Exclude>
                <Function>^std::.*</Function>
                <Function>^ATL::.*</Function>
                <Function>.*::__GetTestMethodInfo.*</Function>
                <Function>^Microsoft::VisualStudio::CppCodeCoverageFramework::.*</Function>
                <Function>^Microsoft::VisualStudio::CppUnitTestFramework::.*</Function>
                <Function>.*::YOU_CAN_ONLY_DESIGNATE_ONE_.*</Function>
              </Exclude>
            </Functions>
            <Attributes>
              <Exclude>
                <Attribute>^System.Diagnostics.DebuggerHiddenAttribute$</Attribute>
                <Attribute>^System.Diagnostics.DebuggerNonUserCodeAttribute$</Attribute>
                <Attribute>^System.Runtime.CompilerServices.CompilerGeneratedAttribute$</Attribute>
                <Attribute>^System.CodeDom.Compiler.GeneratedCodeAttribute$</Attribute>
                <Attribute>^System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute$</Attribute>
              </Exclude>
            </Attributes>
            <Sources>
              <Exclude>
                <Source>.*\\atlmfc\\.*</Source>
                <Source>.*\\vctools\\.*</Source>
                <Source>.*\\public\\sdk\\.*</Source>
                <Source>.*\\microsoft sdks\\.*</Source>
                <Source>.*\\vc\\include\\.*</Source>
                <Source>.*\.xaml.cs$</Source>
              </Exclude>
            </Sources>
            <CompanyNames>
              <Exclude>
                <CompanyName>.*microsoft.*</CompanyName>
                <CompanyName>.*galasoft.*</CompanyName>
                <CompanyName>.*sourceforge.net.*</CompanyName>
              </Exclude>
            </CompanyNames>
            <PublicKeyTokens>
              <Exclude>
                <PublicKeyToken>^B77A5C561934E089$</PublicKeyToken>
                <PublicKeyToken>^B03F5F7F11D50A3A$</PublicKeyToken>
                <PublicKeyToken>^31BF3856AD364E35$</PublicKeyToken>
                <PublicKeyToken>^89845DCD8080CC91$</PublicKeyToken>
                <PublicKeyToken>^71E9BCE111E9429C$</PublicKeyToken>
                <PublicKeyToken>^8F50407C4E9E73B6$</PublicKeyToken>
                <PublicKeyToken>^E361AF139669C375$</PublicKeyToken>
              </Exclude>
            </PublicKeyTokens>
          </CodeCoverage>
        </Configuration>
      </DataCollector>
    </DataCollectors>
  </DataCollectionRunSettings>
</RunSettings>

References

Customizing Code Coverage Analysis

Posted in Uncategorized | Tagged , , | Leave a comment