Showing posts with label blogs. Show all posts
Showing posts with label blogs. Show all posts

Monday, 1 October 2018

Projections, Projections Everywhere - C++17 comes to Town

In a nutshell.
  1. C++/CX ("component extensions") are extensions to C++ to create  Windows Runtime (WinRT) applications in as native a C++ style as possible
  2. C++/WinRT is the recommended alternative to interacting with WinRT (available in the Windows 10 SDK from version 1803 onwards) and is C++17 language compatible
  3. Projections are thee new name for bindings
Roughly speaking, WinRT is the Win32 API ported from C to C++, with a whole load of new stuff for Windows 10 and beyond.

Monday, 5 October 2015

Know your PowerShell

PowerShell was introduced in 2007 as a scripting language for Windows administrators. It was invented by Jeffrey Snover. To PowerShell is to know the lingo of PowerShell. Start your journey here!

There are a few useful guides:

Getting Started with PowerShell by Michael Shepherd (August 2015) from Packt Publishing is a good starter guide.

Also check out the following blogs:

PowerShell Blog (part of Server and Tools blogs)

And here are a few useful commands:

get-verb               - displays list of verbs (commands)
get-verb | more    - displays verbs with pagination
get-date
get-childitem       - does a directory listing. dir is aliased to get-childitem
get-help               - gets help on a specific verb

Commands are also known as cmdlets in PowerShell lingo.

Thursday, 28 August 2014

Math in C#

If you want to do math in C#, and specifically linear algebra math, you have a number of options.

Use the in-built multidimensional array construct, create your own linear algebra library or use an existing one.

Math.Net.Numerics (currently on version 3.2.0) is a good option. It has full documentation here. The guys at Microsoft Research (at least some of them) use it too. You may also want to read Christoph Ruegg's (aka cdr) blog where he covers Math.Net releases.

Wednesday, 11 December 2013

.NET Subtleties: An Assembly's CodeBase versus its Location

CodeBase versus Location

The CodeBase property on the Assembly class gets the "original" location of a .NET assembly, for example, if an assembly was downloaded from the web, the CodeBase property would start with "http://".

The CodeBase property is not guaranteed to be set for assemblies in the GAC.  I repeat, the CodeBase property is not guaranteed to be set for assemblies in the GAC.

This differs from the Assembly's Location, which is where the assembly is currently at. Suzanne Cook's CLR notes are a great starting point to learn more about assemblies in a more coherent setting than just reading standard documentation.

Here's a Thing

Before you go writing code relying on the CodeBase property, take a moment to think whether your application may have the right "path discovery permissions" to actually query this property sensibly.

A Task Worth Doing

As assemblies are fundamental and unavoidable piece of the .NET ecosystem, understanding the Assembly class in System.Reflection is a task well doing.

Tuesday, 5 November 2013

.NET 4 Security Model Acknowledges Mistakes were Made with CAS

.NET 4 changed *many* aspects of the .NET security model. One important change was the reducing the complexity of Code Access Security (CAS) by shifting responsibilities from the runtime to the developers. This certainly impacted code using Assembly.Load in System.Reflection (thank you mscorlib!)

The .NET Security Blog is definitely worth revisiting from time to time to get the latest download on .NET Security design decisions.

Friday, 3 October 2008

Good Programming Blogs (not just OK ones)

Check out Eric Lippert's Fabulous Adventures in Coding Eric is on the C# 4.0 Design Team and has worked on script engines previously.

Also check out this list of the top CLR bloggers.