Quantcast
Channel: The Chronicles of Nojo
Browsing all 49 articles
Browse latest View live

Code Motion

The code we write in C# undergoes many changes before it is finally executed. There's the usual stuff interviews are made of: C# source is compiled to IL into a byte code representation that can be...

View Article



CIL Constant Literals

Sometimes you'll want to create constant literals in CIL code. Most of the time you won't, but when you do, you'll need this. There are multiple ways of representing a constant, such as a constructor...

View Article

Idle = m + C1 + C2 + C3

There are a group of processor performance counters in Windows called "% Cx Time", which show the break down of processor idle time in which the processor goes into a low-power mode. Not all processors...

View Article

Effective Aperture

Ever wondered what the numbers on an SLR camera's lens meant? My Nikon D80 has an 18-135mm 3.5-5.6 zoom lens. At the shortest focal length - 18mm - the maximum effective aperture is 3.5 f/stops; at the...

View Article

Mercator

There's a ship anchored in Oostende harbour named Mercator, after the Flemish cartographer Gerardus Mercator. I've seen it a few times and registered that there must be something vaguely interesting...

View Article


Supersize Me

The Mac mini is not a great beast; its 120GB hard drive is very easy to fill. Seeing as it's smaller than my iPod Classic and there's no more space on the computer, I needed to upgrade - I needed to...

View Article

Great Zero Challenge

Don't just throw your old hard disks out (especially if they're still inside a laptop, as this only makes it easier for casual analysis) without first wiping them clean. A long time ago, according to...

View Article

Asynchronous ASP.NET / SQL Server

We all agree that waiting is evil, right? Well, threads are evil too! Ok, we need a few threads to get the job done, but they (ideally) shouldn't ever block.Achieving high concurrency has never been...

View Article


Asynchronous ASMX Web Services

To avoid threads from blocking in an ASMX web service, Microsoft have given us a nifty pattern to employ: instead of declaring your method with a signature like this [WebMethod]public ReturnType...

View Article


Asynchronous ASP.NET MVC

Since ASP.NET MVC 2, Microsoft's thrown the AsyncController class into the framework, enabling asynchronous ASP.NET MVC applications without forcing developers to hand-craft their own weird and...

View Article

External Sort

If you're ever tasked with sorting a data set larger than can fit into the memory of a single machine, you shouldn't need to panic. Put on your outside-the-box hat (pun intended) and get to work.First...

View Article

Ambient Transactions

With a title like that, you'd be forgiven for thinking that the post was going to be about purchasing a beer at Cafe del Mar while watching the sun set. Unfortunately not.First, consider this sample...

View Article

Version Tolerant Serialization

Somewhere in the vast gap between version 1.1 and version 4 of the .NET Framework, Microsoft came up with a solution to the version intolerance problem of serialization. I may have been living under a...

View Article


Monad

Don't expect a great answer from me as to what constitutes a monad; there's already a good question/answer on Stack Overflow.Basically, it's a bit of glue that joins two functions together. I decided...

View Article

FaultException

If you're stuck trying to get WCF to play nicely with a FaultException<T> where T is a custom System.Exception-derived type, you may be interested to know that the exception needs to have this...

View Article


Map Reduce Example in F#

A while back I blogged about the canonical map reduce example (as seen in the Hadoop user manual) of counting words. Today I noticed that an alias for F#'s List.fold function is List.reduce*. I had...

View Article

Real World Scalability

Armed with [edit: never quite] all there is to know about solving scalability problems, it's just short of impossible to walk onto a client site and fix their poorly performing application. Changes to...

View Article


Covariance / Contravariance

This is a little experiment to get your head around co- and contravariance, as applied to generic interfaces in C#. Covariance allows the result of a computation to vary, while Contravariance allows...

View Article

Memoize

The first time I saw this word I thought someone had mispelled it. Instead - as I later found out - it's the name for a common pattern in functional programming. Memoize caches the result of a function...

View Article

Diskette

I was emptying out a bunch of junk from my apartment and came across an old 3.5" floppy disk. My mind - being as it is - immediately wondered what the unit tests would look like if I were writing a...

View Article
Browsing all 49 articles
Browse latest View live




Latest Images