Marqueed – Online Collaboration (FREE)

Marqueed is a free way to markup and discuss images online. You can easily add multiple images with the drag and drop interface, either from your computer or another browser window. Adding collaborators is simple via email.

Collaborators can point to areas and have threaded discussions right on the image. There’s even a freehand drawing tool for more options.

marqueed

Advertisements

C#7 – Design Meeting Notes for Jan 21, 2015

Working with data

Today’s programs are connected and trade in rich, structured data: it’s what’s on the wire, it’s what apps and services produce, manipulate and consume.

Traditional object-oriented modeling is good for many things, but in many ways it deals rather poorly with this setup: it bunches functionality strongly with the data (through encapsulation), and often relies heavily on mutation of that state. It is “behavior-centric” instead of “data-centric”.

Functional programming languages are often better set up for this: data is immutable (representing information, not state), and is manipulated from the outside, using a freely growable and context-dependent set of functions, rather than a fixed set of built-in virtual methods. Let’s continue being inspired by functional languages, and in particular other languages – F#, Scala, Swift – that aim to mix functional and object-oriented concepts as smoothly as possible.

Here are some possible C# features that belong under this theme:

  • pattern matching
  • tuples
  • “denotable” anonymous types
  • “records” – compact ways of describing shapes
  • working with common data structures (List/Dictionary)
  • extension members
  • slicing
  • immutability
  • structural typing/shapes?

A number of these features focus on the interplay between “kinds of types” and the ways they are used. It is worth thinking of this as a matrix, that lets you think about language support for e.g. denoting the types (type expressions), creating values of them (literals) and consuming them with matching (patterns)

Continue reading “C#7 – Design Meeting Notes for Jan 21, 2015”

Download 50+ e-books on popular technologies for free from Syncfusion!

All e-books are in Amazon Kindle and PDF formats

The download link is at the bottom of this page 

Cassandra Succinctly
by Marko Švaljek

Step outside the relational world and learn how to store data with Apache Cassandra, the massively popular NoSQL distributed database system.


Directory Enabled Applications Succinctly
by Giancarlo Lelli

Easily manage network resources by automating tasks.

PowerPivot Succinctly
by James Beresford

Take control of vast amounts of data using an easy-to-learn tool found within Microsoft Excel.

CUDA Succinctly
by Chris Rose

Use that high-end graphics card for more than games—use it to run massively parallel operations with CUDA, NVIDIA’s technology for programming with its hardware.

Microsoft Unity Succinctly
by Ricardo Peres

Incorporate Microsoft Unity when writing enterprise applications.

Continue reading “Download 50+ e-books on popular technologies for free from Syncfusion!”

Visual Studio and Git

So it happens that the company I started working for yesterday uses Git for all their source control needs. Having heard a lot of positive stuff about Git, but having no experience of actually using it,I had to dig around to find some decent integration tools that work well with Visual Studio 2013.

To my surprise, as of Visual Studio 2012.2, Microsoft already supports Git (I had to double check this and pinch myself!) There are Visual Studio Tools for Git available for download directly from Microsoft and there is quite a chunky write up Getting Started with Git in Visual Studio and Team Foundation Service

Will try it out at work today!

C#6 – String interpolations

String interpolation lets you more easily format strings. String.Format and its cousins are very versatile, but their use is somewhat clunky and error prone. Particularly unfortunate is the use of numbered placeholders like {0} in the format string, which must line up with separately supplied arguments:

var s = String.Format("{0} is {1} year{{s}} old", p.Name, p.Age);

String interpolation lets you put the expressions right in their place, by having “holes” directly in the string literal:

var s = "\{p.Name} is \{p.Age} year{s} old";

Just as with String.Format, optional alignment and format specifiers can be given:

var s = "\{p.Name,20} is \{p.Age:D3} year{s} old";

The contents of the holes can be pretty much any expression, including even other strings:

var s = "\{p.Name} is \{p.Age} year\{(p.Age == 1 ? "" : "s")} old";

Notice that the conditional expression is parenthesized, so that the ‘: “s”’ doesn’t get confused with a format specifier.

Note: This describes the syntax that works in the Preview. However, they have decided to change the syntax, to even better match that of format strings. In a later release you’ll see interpolated strings written like this:

var s = $"{p.Name,20} is {p.Age:D3} year{{s}} old";

They are adding a scheme so that you can influence the formatting behavior; e.g. to use Invariant Culture.

Some Rx goodness

The observer pattern

In .NET 4 Microsoft introduced the IObserver<T> and IObservable<T> interfaces. These interfaces give you a generic way of providing push-based notification, which is also known as the observer pattern. The provider (IObservable<T>) must implement a Subscribe method, which lets the caller indicate it wants to receive push-based notifications. The caller passes an instance of the observer. The observer (IObserver<T>) must implement three methods (OnNext, OnError and OnCompleted) which the provider calls to send different kinds of notifications.

For slightly more detail and some simple examples, take a look at the interfaces for IObservable<T> andIObserver<T> in the msdn documentation.

A quick and high level overview of Rx

The Reactive Extensions libraries from Microsoft provide implementations of the interfaces outlined above. Rx uses LINQ to allow incredibly powerful but simple and declarative solutions to complex problems, when dealing with sequences of events. It is available as a number of different packages on NuGet. To install them all, look for Rx-Main. There is also an “Extensions for Reactive Extensions” package available on NuGet, called Rxx. This provides many more useful Reactive LINQ extensions that aren’t in the main Rx library from Microsoft.

View original

Blog at WordPress.com.

Up ↑