Programming

.Net Tips – use [field:NonSerialized] to stop serializing your event handlers

In C#, when you define an event in your class, e.g.: the event handlers will be serialized along with other properties, etc. This is because under the hood, the compiler translates your event into the following, as can be seen through JetBrain’s dotPeek decompiler: Since the generated EventHandler is not marked with the [NonSerialized] attribute …

.Net Tips – use [field:NonSerialized] to stop serializing your event handlers Read More »

Performance Test – Binary serializers Part II

Note: don’t forget to check out the Benchmarks page to see the latest round up of binary and JSON serializers. A little while ago I put together a quick performance test comparing the BCL’s BinaryFormatter with that of Marc Gravell‘s protobuf-net library (.Net implementation of Google’s protocol buffer format). You can read more about my …

Performance Test – Binary serializers Part II Read More »

Performance Test – SortedDictionary vs Dictionary vs Map vs Array

I stumbled upon this interesting question on StackOverflow today, Jon Harrop’s answer mentions a significant overhead in adding and iterating over a SortedDictionary and Map compared to using simple arrays. Thinking about it, this makes sense, the SortedDictionary class sorts its constituent key-value pairs by key, which will naturally incur some performance overhead. F#’s Map …

Performance Test – SortedDictionary vs Dictionary vs Map vs Array Read More »

Slides and Source Code for my talk with UKDG and NxtGenUG

Following my back-to-back talks with the UK Developers Group and NxtGenUG Southampton, I just like to say thanks those guys for having me, it’s been a great pleasure :-) For anyone interested, here are the links to the slides and the source code I used for the demo. Slides: http://www.slideshare.net/theburningmonk/introduction-to-aspect-oriented-programming Source Code: http://aop-demo.s3.amazonaws.com/AopDemo.zip

Project Euler – Problem 65 Solution

Problem The square root of 2 can be written as an infinite continued fraction. The infinite continued fraction can be written, ?2 = [1;(2)], (2) indicates that 2 repeats ad infinitum. In a similar way, ?23 = [4;(1,3,1,8)]. It turns out that the sequence of partial values of continued fractions for square roots provide the …

Project Euler – Problem 65 Solution 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