C#

Upcoming webinar on Localization and Design Pattern Automation

Hello, just a quick note to say that I’m doing a webinar with the PostSharp folks on a technique my team developed whilst working on Here Be Monsters (a MMORPG that had more text than the first 3 Harry Porter books combined) which allowed us to localise the whole game with a handful of lines of code …

Upcoming webinar on Localization and Design Pattern Automation Read More »

Fasterflect vs HyperDescriptor vs FastMember vs Reflection

The other day I had a small task to inspect return values of methods and if the following property exists then set it to empty array.         public long[] Achievements { get; set; } This needed to happen once on every web request, and I decided to implement it as a PostSharp attribute. WHY I …

Fasterflect vs HyperDescriptor vs FastMember vs Reflection Read More »

Beware of implicit boxing of value types

In the last post, we looked at some inefficiencies with reference types in .Net and perhaps oversold value types a little  In any case, now that we’ve made the initial sale and you’re back for more, let’s talk about some pitfalls wrt the use of value types you should be aware of. Specifically let’s focus on cases …

Beware of implicit boxing of value types Read More »

Smallest .Net ref type is 12 bytes (or why you should consider using value types)

(Update 2015/07/21 : read the next post in this series to learn about the places where implicit boxing happens with value types and how you can prevent them)   I chanced upon Sasha Goldshtein’s excellent book, Pro .Net Performance : Optimize Your C# Application, a few years back and I thoroughly enjoyed it. Even though …

Smallest .Net ref type is 12 bytes (or why you should consider using value types) Read More »

Seven ineffective coding habits many F# programmers don’t have

This post is part of the F# Advent Calendar in English 2014 project. Check out all the other great posts there! Special thanks to Sergey Tihon for organizing this. A good coding habit is an incredibly powerful tool, it allows us to make good decisions with minimal cognitive effort and can be the difference between …

Seven ineffective coding habits many F# programmers don’t have Read More »

A look at Microsoft Orleans through Erlang-tinted glasses

Some time ago, Microsoft announced Orleans, an implementation of the actor model in .Net which is designed for the cloud environment where instances are ephemeral. We’re currently working on a number of projects in Erlang and have run into some assumptions in distributed Erlang which doesn’t hold true in a cloud-hosted environment where nodes are …

A look at Microsoft Orleans through Erlang-tinted glasses Read More »

Announcing libraries for C# and F# to make it easier to integrate with Sentry

Here at Gamesys social team, we’re rethinking our current approach to logging in general, from both server and client’s perspective. Having looked at many different alternatives (it was a little hard to imagine how crowded a space log aggregation and visualization is..) one of the services which we have decided to experiment with is Sentry. …

Announcing libraries for C# and F# to make it easier to integrate with Sentry Read More »

C# – extern alias, and ILMerge’d assemblies

Suppose you want to merge an assembly A (AssemblyA.dll) with another assembly B (AssemblyB.dll) with ILMerge into a merged assembly (Merged.dll), and everything works fine until the user of your merged assembly also references that AssemblyB.dll, at which point that user will get Ambiguous reference errors for any reference to types defined in assembly B, …

C# – extern alias, and ILMerge’d assemblies Read More »

Be Lazy, but be ware of initialization exception

.Net 4 introduced the Lazy<T> type which allows you to create an object that can be lazily initialized so that you can delay the creation of large objects, for instance. However, if your initialization logic has the potential to except at runtime (e.g. time out exceptions reading from some external data source) then you should …

Be Lazy, but be ware of initialization exception Read More »

LINQ OrderBy – using Comparer<T>.Create and F#’s Object Expressions

.Net 4.5 introduced a handy little new method Comparer<T>.Create to aid the creation of bespoke comparers, which is great because it means that you don’t have to define a new Comparer class when it is going to be needed once. In case you’re wondering, it’s still not possible to define anonymous implementation of interfaces in …

LINQ OrderBy – using Comparer<T>.Create and F#’s Object Expressions Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close