<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.atalasoft.com/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Atalasoft Community</title><link>http://www.atalasoft.com/cs/blogs/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Why It Helps to Understand Pixel Formats</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx</link><pubDate>Tue, 16 Mar 2010 15:53:27 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20343</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A pixel format in dotImage is a description of the depth, color space and layout of the memory used to represent a pixel.&amp;#160; Mathematically, there are an infinite number of possible pixel formats as color space is as much a space as Cartesian space.&amp;#160; You can create any number of &lt;a href="http://en.wikipedia.org/wiki/Basis_%28linear_algebra%29"&gt;basis sets&lt;/a&gt; that map onto any particular color space.&amp;#160; However, only a small subset are actually useful.&amp;#160; In dotImage we represent 12 formats, 3 paletted, 3 gray, and the rest color.&lt;/p&gt;  &lt;p&gt;It helps to understand the meaning of pixel formats in terms of &lt;strong&gt;&lt;em&gt;quantity&lt;/em&gt;&lt;/strong&gt; of information rather than quality of information.&amp;#160; Having this understanding will help you in avoiding possible problems when processing images or converting from one format to another.&lt;/p&gt;  &lt;p&gt;All ImageCommand classes in dotImage advertise a list of all PixelFormats that they operate in.&amp;#160; The property SupportedPixelFormats gives you this list.&amp;#160; You can also call IsPixelFormatSupported() to ask if a specific format is supported.&lt;/p&gt;  &lt;p&gt;I would like to say that IsPixelFormatSupported returns true if and only if an ImageCommand natively supports a given PixelFormat.&amp;#160; In most cases this is true, but some older commands (before I got my hands on them) were written to operate on some formats as a convenience, but without letting the caller know.&amp;#160; They still behave exactly as before for compatibility.&amp;#160; ScribbleCommand is an example of this – it will strip out the alpha channel into a temporary image, before performing the operation.&lt;/p&gt;  &lt;p&gt;What is true, is that every implementation of SupportedPixelFormats will return the “best” pixel format for the command as the first entry in the list.&amp;#160; This is by convention, but we enforce it strictly.&amp;#160; There’s a reason for this: all ImageCommands have the ability to operate on any pixel format.&amp;#160; This is done by setting the property ApplyToAnyPixelFormat to true.&amp;#160; Then, when the command is executed, if the source image is not in SupportedPixelFormats, the command will create a new version of the image in a better PixelFormat for the command.&amp;#160; This is done internally by the command by calling SelectBestAlternatePixelFormat.&amp;#160; The default implementation is to return the 0th entry in SupportedPixelFormats.&lt;/p&gt;  &lt;p&gt;In short, if ApplyToAnyPixelFormat is true, the command will create a new image in the pixel format SupportedPixelFormats[0].&amp;#160; The default value for ApplyToAnyPixelFormat is false.&lt;/p&gt;  &lt;p&gt;Wait a minute – this sounds like a tremendously useful feature!&amp;#160; Why would we have it off by default?&lt;/p&gt;  &lt;p&gt;There are two reasons: (1) backwards compatibility – where possible we try to assure that all commands in new versions of dotImage operate as they did in the past. (2) “Do No Harm” – changing the PixelFormat of an image may be a lossy operation.&amp;#160; If the amount of information in the source image’s pixel format is greater than the amount of information in the target pixel format, then information has to be discarded in the translation.&amp;#160; How that information is discarded makes all the difference in the world, and the choice that is made should be dependent on the source image domain.&amp;#160; That is, if the image is a photograph, you should use one technique (dithering or another type of halftoning) and if it is a document, you should use another (dynamic or adaptive threshold).&lt;/p&gt;  &lt;p&gt;When ApplyToAnyPixelFormat is turned on, ImageCommands will use AtalaImage.GetChangedPixelFormat() to create the new image.&amp;#160; By default (and again, to match legacy behavior), when dotImage reduces a image to 1-bit per pixel, it uses either dithering or color quantization to generate the target image.&amp;#160; This is fine for photographic images, but lousy for documents.&amp;#160; Fortunately, &lt;a href="http://www.atalasoft.com/cs/blogs/stevehawley/archive/2006/06/05/10102.aspx"&gt;you can change how this change will happen&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;How can I know if changing a pixel format would be lossy?&lt;/p&gt;  &lt;p&gt;You can do that by comparing the number of bits per pixel:&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; IsPixelFormatChangeLossy(PixelFormat source, PixelFormat target)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; PixelFormatUtilities.BitsPerPixel(source) &amp;gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        PixelFormatUtilities.BitsPerPixel(target);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;and while the accuracy of this predicate is arguable, it will be good enough for most cases.&amp;#160; For the nit pickers, conversion from color to 8 or 16 bpp gray, while lossy is well-defined enough to let it go – although you should be aware that the color conversion is done through a &lt;a href="http://www.atalasoft.com/cs/blogs/stevehawley/archive/2008/01/25/never-forget-floating-point-sucks.aspx"&gt;perceptual model&lt;/a&gt;, rather than a linear model.&amp;#160; Also, conversions of 24 bit color to 8 bit paletted may be lossless in some cases, but that is more computationally and memory intensive than I’d like to put in such a simple predicate.&lt;/p&gt;

&lt;p&gt;As a side node, PixelFormatUtilities is my favorite grab bag of useful functions and predicates based around PixelFormats.&amp;#160; They are akin to the functions in the C routines defined in ctype.h in that they are almost always table driven and operate in constant time.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx&amp;amp;;subject=Why+It+Helps+to+Understand+Pixel+Formats" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx&amp;amp;;title=Why+It+Helps+to+Understand+Pixel+Formats" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx&amp;amp;title=Why+It+Helps+to+Understand+Pixel+Formats" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx&amp;amp;;title=Why+It+Helps+to+Understand+Pixel+Formats" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx&amp;amp;;title=Why+It+Helps+to+Understand+Pixel+Formats&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/16/why-it-helps-to-understand-pixel-formats.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20343" width="1" height="1"&gt;</description></item><item><title>When Optimization Pays Off</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx</link><pubDate>Fri, 12 Mar 2010 21:38:48 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20331</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;blockquote&gt;   &lt;p&gt;“&lt;strong&gt;We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil&lt;/strong&gt;” – Don Knuth&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you are doing image processing, you are firmly in that remaining 3%.&amp;#160; I had some code that I had factored into two major cases: 1 bit per pixel and n bits per pixel (where n is a multiple of 8).&amp;#160; Each chunk of code was more or less parallel in that it did something along the lines of this:&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; PredicateInRow(BYTE *imagePtr, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; x, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; bytesPerPixel, fPredicate predicate, &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; *predicateData)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    BYTE *pixelPtr = imagePtr + x * bytesPerPixel;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; predicate(pixelPtr, bytesPerPixel, predicateData);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ProcessRange(BYTE *imagePtr, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; height, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; width, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; bytesPerPixel, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; bytesPerRow, fPredicate predicate, &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; *predicateData)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; y=0; y &amp;lt; height; y++) {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; x=0; x &amp;lt; width; x++) {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (PredicateInRow(imagePtr, x, bytesPerPixel, predicate, predicateData)) {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#008000;"&gt;// perform processing&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        imagePtr += bytesPerRow;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;This does some image processing across the whole image based on a predicate using the current pixel’s data.&amp;#160; The predicate has to be vectored out to other code instead of being done inline (technically, there are other ways I can do this, but way of doing it avoids a lot of duplication of effort).&amp;#160; I liked the factoring in that it made the code fairly easy to read, but I knew when I wrote it that I would regret this decision.&lt;/p&gt;

&lt;p&gt;After noting that client code of this routine was slower than I preferred it to be, I fired up a profiler and found that PredicateInRow was chewing up a fair amount of the total time and it was being called 50 million times over the comparatively short life of my test application.&lt;/p&gt;

&lt;p&gt;I refactored it to this instead:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ProcessRange(BYTE *imagePtr, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; height, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; width, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; bytesPerPixel, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; bytesPerRow, fPredicate predicate, &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; *predicateData)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; y=0; y &amp;lt; height; y++) {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        BYTE *pixelPtr = imagePtr;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; x=0; x &amp;lt; width; x++) {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (predicate(pixelPtr, bytesPerPixel, predicateData)) {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#008000;"&gt;// perform processing&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            pixelPtr += bytesPerPixel;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        imagePtr += bytesPerRow;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;I’ve now lost the PredicateInRow routine, took a hit in readability but the code runs &lt;strong&gt;twice as fast&lt;/strong&gt; now that I eliminated 50 million function calls and 50 million multiplies.&lt;/p&gt;

&lt;p&gt;I should note that I tried inlining PredicateInRow which resulted in a negligible increase in performance.&amp;#160; In my actual code, the structure of ProcessRange is much more complex – there are three small state machines that run inside of the y-based for loop and each state machine ended up looking at rows above and below in addition to the current row.&amp;#160; The refactoring was more complicated than the example above, which resulted in two bugs, both of which I found by reading the code closely.&lt;/p&gt;

&lt;p&gt;The code of a multiply is tiny, but when you multiply it by 50 million, it becomes significant.&amp;#160; When I wrote this, I &lt;em&gt;knew&lt;/em&gt; that the per-pixel accessing was going to slow it down.&amp;#160; Nonetheless, I took the high road of “make it work, then make it fast(er)”.&lt;/p&gt;

&lt;p&gt;If need be, I will change the code the work with specific byte per pixel values, removing the predicate call entirely, but that will take a 2x duplication of code (1-bit and n-bit) and turn it into a pentiplication (1 bit, 8 bit, 16 bit, 24 bit, 32 bit)&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx&amp;amp;;subject=When+Optimization+Pays+Off" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx&amp;amp;;title=When+Optimization+Pays+Off" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx&amp;amp;title=When+Optimization+Pays+Off" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx&amp;amp;;title=When+Optimization+Pays+Off" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx&amp;amp;;title=When+Optimization+Pays+Off&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/12/when-optimization-pays-off.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20331" width="1" height="1"&gt;</description></item><item><title>F# Discoveries This Week 03/12/2010</title><link>http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx</link><pubDate>Fri, 12 Mar 2010 21:03:07 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20330</guid><dc:creator>RickM</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Tons this week.&amp;#160; Vladimir Matveev’s is my favorite new F# blogger with very well written data structure posts, Ashley Feniello continues his fantastic FScheme series, and Jomo Fisher posts some great Freebase and DGML examples.&amp;#160; That’s just the tip of the F# iceberg, do come inside.&lt;/p&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;h3&gt;Ashley Feniello’s FScheme Parts &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/03/05/functional-i-o-or-at-least-o.aspx"&gt;Twelve&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/03/09/functional-i-o-including-i-this-time.aspx"&gt;Thirteen&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/03/10/functional-i-o-historical-debugging.aspx"&gt;Fourteen&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The basic idea is to run a simulation by iterating a pure function from world state to world state. We’ll add a new ‘run’ primitive which will expect several user-defined functions to have been set up. The world state is initially produced by an ‘init’ function. Then every 30th of a second a ‘tick’ function is called to produce a new world state from the current state. Finally a ‘draw’ function will be called to render the world.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Luca Bolognese’s &lt;a href="http://lucabolognese.wordpress.com/2010/02/26/downloading-stock-prices-divs-and-splits-in-f-updated-to-visual-studio-2010/"&gt;Updated Stock Prices, Divs and Splits Example&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I’m working on a program to keep track of paired trades with trailing stops. I need to download stock prices, so I thought I might reuse some old code of mine. Here is the updated framework.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;David Carlisle’s &lt;a href="http://www.nag.co.uk/numeric/DT/fsharp/"&gt;NAG F# Examples&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;NAG (Numerical Algorithms Group) is currently running a beta test of a NAG Library for .NET. One noticeable feature of the comments received so far is the relatively large number of users interfacing to the library from F# rather than C# or VB.NET.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Phillip Trelford’s &lt;a href="http://www.trelford.com/blog/post/The-Associative-Model-of-Data.aspx"&gt;The Associative Model of Data&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;But what if you wanted to extend the web store to have features like the online retailer Amazon, e.g. multiple sellers, recommendations, etc.? Answer: serious table and relationship proliferation. Enter an alternative model: the Associative model of data, a dynamic model where data is defined simply as items and links.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Jon Harrop’s &lt;a href="http://fsharpnews.blogspot.com/2010/03/f-vs-unmanaged-c-for-parallel-numerics.html"&gt;F# vs Unmanaged C++ for Parallel Numerics&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;We obtained a surprising performance result when comparing optimized parallel ray tracers written in F# and C++ recently. The following two programs render the same highly complex scenes containing over a million objects. Surprisingly, the 136-line managed F# program runs slightly faster at 17s than the 168-line unmanaged C++ which takes 18s.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Vladimir Matveev’s &lt;a href="http://v2matveev.blogspot.com/2010/03/f-and-iron-python.html"&gt;F# and Iron Pyton&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Today’s post will be devoted to various ways of integration between Iron Python and F#. I’ll try to skip the details of DLR configuration, because this is vast topic that worth separate post (maybe even a few posts). Instead I’ll focus on questions of integration.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Vladimir Matveev’s &lt;a href="http://v2matveev.blogspot.com/2010/03/data-structures-finger-tree-part-1.html"&gt;Data Structures: Finger Tree (Part 1)&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;What we’ll try to do in this post is to create the structure (based on 2-3 trees) with following characteristics.&amp;#160; Immutable (modification returns new instance of structure with changes applied),&amp;#160; Enqueue/Dequeue both in start and end in amortized constant time, and Concatenation support.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Vladimir Matveev’s &lt;a href="http://v2matveev.blogspot.com/2010/03/data-structures-2-3-tree.html"&gt;Data Structures: 2-3 Tree&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;There are many special types of trees that perform insert/remove operation in intelligent way ensuring that result tree is small but branchy :). This trees are called self-balanced, most well-known of them are AVL trees, Red-black trees, 2-3 trees. This post is dedicated to the latter ones.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Vladimir Matveev’s &lt;a href="http://v2matveev.blogspot.com/2010/02/overview-of-f-async-module.html"&gt;Overview of F# Async Module&lt;/a&gt; and &lt;a href="http://v2matveev.blogspot.com/2010/02/event-based-async-pattern-in-f.html"&gt;Event-based Async Pattern in F#.&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;This post I’d like to dedicate to reviewing functionality of Async module – creating and manipulating async computations.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Luis Diego Fallas’s &lt;a href="http://langexplr.blogspot.com/2010/03/some-basic-image-processing-operations.html"&gt;Basic Image Processing Operations with F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The previous post presented a way to access the image data from the Webcam using DirectShow.Net and F#. We can manipulate this data to do some basic image processing operations with it.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Jomo Fisher’s &lt;a href="http://blogs.msdn.com/jomo_fisher/archive/2010/03/09/neat-samples-extend-your-f-program-with-mef.aspx"&gt;Extend your F# program with MEF&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/jomo_fisher/archive/2010/03/10/neat-samples-f-in-mef-scripts.aspx"&gt;MEF in F# Scripts&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The Managed Extensibility Framework is an interesting new technology in .NET 4.0.&amp;#160; This is a simple example in F#. This code sets up MEF hosting and asks for all extensions in the c:\extensions folder.&lt;/em&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Jomo Fisher’s &lt;a href="http://blogs.msdn.com/jomo_fisher/archive/2010/03/06/neat-samples-f-freebase-and-dgml.aspx"&gt;Neat Samples: F#, Freebase, DGML&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I recently posted about the freebase web service here. This sample reads biological classifications and renders them in DGML. The result is a huge graph, here’s a little piece of it…&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Jomo Fisher’s &lt;a href="http://blogs.msdn.com/jomo_fisher/archive/2010/03/06/neat-sample-f-and-bing-api.aspx"&gt;Neat Samples: F# and Bing API&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Here’s another F# web service sample. This one uses the Bing Phone API to do a query. This time the code uses Xml instead of JSON and XmlDocument instead of a DataContract deserializer. This is pretty much a straight transliteration of one of the Bing SDK samples.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Jomo Fisher’s &lt;a href="http://blogs.msdn.com/jomo_fisher/archive/2010/03/06/neat-sample-f-and-freebase.aspx"&gt;F# and Freebase&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The web service at Freebase.com lets you access all sorts of structured data from a web service. Here’s a sample that shows you how to access this data from F#. It uses DataContract and the JSON serializer. The code below reads and prints the elements of the periodic table.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Julien Ortin’s BitTorrent in F# series: &lt;a href="http://lepensemoi.free.fr/index.php/2010/03/05/bittorrent-in-f-io-operations"&gt;I/O Operations&lt;/a&gt; and &lt;a href="http://lepensemoi.free.fr/index.php/2010/03/06/bittorrent-in-f-bitfield"&gt;Bitfield&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;One important thing is that a BitTorrent transfer is considered as a stream of pieces. So, if you have a 100-byte file, and a 400-byte one, and if the piece size is 200-byte long, the data from the piece need to be appropriately split (both when reading and when writing).&amp;#160; In this library, we use a reference to the AsyncWorker described on Don Syme’s blog.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160; &lt;/p&gt;  &lt;h3&gt;Matt Moloney’s &lt;a href="http://www.mattssoftwareblog.com/?p=227"&gt;Drag and Drop using Rx and WPF in F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I have recently been experimenting with combining Reactive X, WPF, and F# and have found the combination to be very palatable. I chose drag and drop as the test case because it is both non trivial and generally deeply stateful. The resulting Rx turns out to be one fifth the code of my original C#, much easier to read and has fewer errors.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Kean Walmsley’s &lt;a href="http://through-the-interface.typepad.com/through_the_interface/2010/03/using-a-jig-from-f-to-create-spirographs-patterns-in-autocad.html"&gt;Using jig from F# to create Spirograph patterns in AutoCAD&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;After my initial fooling around with turning AutoCAD into a Spirograph using F#, I decided to come back to this and bolt a jig on the front to make the act of making these objects more visual and discoverable.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Joh’s &lt;a href="http://sharp-gamedev.blogspot.com/2010/03/thoughts-about-f-and-xbox-games.html"&gt;Thoughts about F# and Xbox games&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I have been working for quite some time now on Asteroid Hunter. This has not left me much time for exploration with F#, but there is quite a bit a learned during the process anyway.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Richard Minerich’s &lt;a href="http://richardminerich.com/2010/03/abstract-thoughts-about-f-abstractions/"&gt;Abstract Thoughts about F# Abstractions&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;My recent work on Professional F# 2.0 has left me thinking a lot about the nature of abstractions.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Oliver Strum’s &lt;a href="http://www.sturmnet.org/blog/2010/03/10/creating-a-lazy-sequence-of-directory-de"&gt;Creating a Lazy Sequence of Directory Descendants&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I thought these code examples all look rather verbose – in the case of Clojure because in that way rather typical for Java, the APIs are pretty verbose to use, and in the case of C# because of all the syntactic, well, ahem, necessities, as well as the fact that there’s no language feature for integrating nested sequences seamlessly. Keeping it nice and simple, in F# that example can look like this…&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Tormod Fjeldskar’s &lt;a href="http://lookingsharp.wordpress.com/2010/03/08/tail-recursion-in-csharp-and-fsharp/"&gt;Tail Recursion in C# and F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Tail recursion is essential in functional languages like F#, where iterative solutions are often implemented using recursion.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx&amp;amp;;subject=F%23+Discoveries+This+Week+03%2f12%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+03%2f12%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx&amp;amp;title=F%23+Discoveries+This+Week+03%2f12%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+03%2f12%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+03%2f12%2f2010&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/03/12/f-discoveries-this-week-03-12-2010.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20330" width="1" height="1"&gt;</description><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/asynchronous/default.aspx">asynchronous</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/AutoCad/default.aspx">AutoCad</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Bing/default.aspx">Bing</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/comparison/default.aspx">comparison</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/data/default.aspx">data</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/data+structures/default.aspx">data structures</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/DGML/default.aspx">DGML</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/F_2300_/default.aspx">F#</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Freebase/default.aspx">Freebase</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/FScheme/default.aspx">FScheme</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fsharp/default.aspx">fsharp</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/image+processing/default.aspx">image processing</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/IronPython/default.aspx">IronPython</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/MEF/default.aspx">MEF</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/NAG/default.aspx">NAG</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/roundup/default.aspx">roundup</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/scheme/default.aspx">scheme</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Stocks/default.aspx">Stocks</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/unmanaged/default.aspx">unmanaged</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/xbox/default.aspx">xbox</category></item><item><title>I’m not only the Hair club president, i’m also a client.</title><link>http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx</link><pubDate>Thu, 11 Mar 2010 18:47:17 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20321</guid><dc:creator>christina</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;(Remember that &lt;a href="http://en.wikipedia.org/wiki/Hair_Club" target="_blank"&gt;commercial&lt;/a&gt;? It always makes me laugh. It’s related. I promise.)&lt;/p&gt; &lt;p&gt;Lately I’ve been having some computer drama. When I say “drama” I mean “expenses,” and when I say “expenses” I mean $1,400 poorer. &lt;/p&gt; &lt;p&gt;You know what a new computer means—the transfer of your ENTIRE LIFE to another machine. It’s scary and painful, and I don’t know why anyone buys a new computer ever. &lt;/p&gt; &lt;p&gt;Because this isn’t my personal blog, I won’t go into the reasons why I had to do that twice. Twice! It’s like 2 root canals in 3 weeks. Ugh.&lt;/p&gt; &lt;p&gt;Part of that includes updating wireless logins and other various important things.&lt;/p&gt; &lt;p&gt;Now—my memory for passwords is amazing. I am a whiz with 6-7 character phrases. For whatever reason, I can never remember the wireless password at work. &lt;/p&gt; &lt;p&gt;Here at Atalasoft, we use a product called &lt;a href="http://sharepoint.microsoft.com/Pages/Default.aspx" target="_blank"&gt;SharePoint&lt;/a&gt;. Heard of it? (Ha.) Stored in a document in SharePoint is our wireless internet password. I remember the first time I found the document—I had to 1. Find it through various folders and sub-folders, 2. Click to open it, and 3. Launch MS Word to view it. It was annoying and I groaned at the thought of going through that again.&lt;/p&gt; &lt;p&gt;BUT. BUT! We have a little something called &lt;a href="http://www.vizitsp.com/products/vizitsp" target="_blank"&gt;Vizit SP&lt;/a&gt;. So, I 1. Searched for the document using SharePoint’s search feature and 2. Clicked a little “Vizit Preview” button next to the document. How about this? A PREVIEW OF THE DOCUMENT APPEARED. I did not have to launch Word. I did not have to remember the hierarchy of folders. The password was in front of me. &lt;/p&gt; &lt;p&gt;It was one of those moments where I was so tickled that the company I work for makes COOL STUFF THAT WORKS. &lt;/p&gt; &lt;p&gt;To sum this up: I’m not only the Vizit SP Marketing Manager, I’m also a User. &lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx&amp;amp;;subject=I%e2%80%99m+not+only+the+Hair+club+president%2c+i%e2%80%99m+also+a+client." target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx&amp;amp;;title=I%e2%80%99m+not+only+the+Hair+club+president%2c+i%e2%80%99m+also+a+client." target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx&amp;amp;title=I%e2%80%99m+not+only+the+Hair+club+president%2c+i%e2%80%99m+also+a+client." target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx&amp;amp;;title=I%e2%80%99m+not+only+the+Hair+club+president%2c+i%e2%80%99m+also+a+client." target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx&amp;amp;;title=I%e2%80%99m+not+only+the+Hair+club+president%2c+i%e2%80%99m+also+a+client.&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/11/i-m-not-only-the-hair-club-president-i-m-also-a-client.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20321" width="1" height="1"&gt;</description></item><item><title>Solving Problems, aka, Nobody Codes Like This Anymore</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx</link><pubDate>Wed, 10 Mar 2010 22:04:24 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20315</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When I was in college, I had a class in machine architecture/assembly language.&amp;#160; At the time that I took it, I knew 6502 already and had published two video games for the Apple II written entirely in assembly.&amp;#160; I love the drunken power of having access to the entire machine and making it do things it wasn’t precisely designed for – so the class was easy to me.&amp;#160; We started off with a fake Von Neumann architecture machine called MANIAC.&amp;#160; MANIAC was a basic accumulator-model machine – not too different from the 6502, so coding for it was familiar ground.&lt;/p&gt;  &lt;p&gt;We then transitioned to VAX assembly and were writing code to run directly on the machine.&amp;#160; Compared to the barren wasteland of 6502, VAX was like stepping into Paris.&amp;#160; 16 registers?&amp;#160; What the hell am I going to do with them all?&amp;#160; Multiply?&amp;#160; Divide?&amp;#160; Floating point?&amp;#160; SOBGTR (subtract one and branch on greater)?&amp;#160; There was even an instruction to insert into a queue.&amp;#160; Yikes.&lt;/p&gt;  &lt;p&gt;In class, the final assignment was to write a program to maintain a family tree.&amp;#160; The program needed to read a line and parse out a set of commands:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;CREATE &lt;em&gt;name&lt;/em&gt; – create a new person named &lt;em&gt;name&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;MARRY &lt;em&gt;name1 name2&lt;/em&gt; – mark persons named &lt;em&gt;name1&lt;/em&gt; and &lt;em&gt;name2&lt;/em&gt; as married&lt;/li&gt;    &lt;li&gt;CHILD &lt;em&gt;name1 name2&lt;/em&gt; – mark person named &lt;em&gt;name1&lt;/em&gt; as a child of &lt;em&gt;name2&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;GRANDCHILDREN &lt;em&gt;name&lt;/em&gt; – prints a list of &lt;em&gt;name’&lt;/em&gt;s grandchildren&lt;/li&gt;    &lt;li&gt;COUSIN &lt;em&gt;name1 name2&lt;/em&gt; – prints TRUE if person named &lt;em&gt;name1&lt;/em&gt; is a cousin of &lt;em&gt;name2&lt;/em&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I looked at this task and thought, family tree?&amp;#160; Really?&amp;#160; In assembly?&amp;#160; No.&amp;#160; Wrong approach.&lt;/p&gt;  &lt;p&gt;So I first wrote it in Pascal and got it working.&amp;#160; Then I hand compiled each procedure (I didn’t know how compilers worked yet, but I had a pretty good idea).&amp;#160; I noted that many of my peers were struggling with the argument passing in VAX, so I avoided the whole problem and adopted register passing as the protocol where the caller, not the callee was responsible for saving registers.&amp;#160; Every subroutine was clear what it used as arguments and I set aside some registers that were free to be destroyed.&lt;/p&gt;  &lt;p&gt;Once I had my “architecture” in place, it was a matter of writing little subroutines that matched the Pascal.&amp;#160; I even included the Pascal in the source as documentation.&amp;#160; The only documentation.&amp;#160; Why would you need more?&lt;/p&gt;  &lt;p&gt;It wasn’t without bugs, but it eventually worked just fine and I was done well before most of my peers, even though I technically wrote the program twice.&lt;/p&gt;  &lt;p&gt;So, nobody really writes code like this anymore.&amp;#160; Compilers are good enough that unless you doing something like image processing, you don’t really need to drop to the machine level.&amp;#160; That doesn’t mean that we can’t learn something from the process.&lt;/p&gt;  &lt;p&gt;This particular problem lent itself to being solved in a particular language domain – Pascal (or your favorite procedural or OOP language).&amp;#160; So much so that writing it in another language was trivial.&amp;#160; It became divide and conquer to factor the tasks out to reasonable pieces: a simple parser, a &lt;a href="http://en.wikipedia.org/wiki/Read-eval-print_loop"&gt;REPL&lt;/a&gt;, a structure definition, and five procedures.&amp;#160; Then I picked a mapping strategy to go from my problem language domain into my solution language domain and followed through on it.&amp;#160; This is still a valid way to solve problems, even though this particular solution language domain is obsolete.&amp;#160; This particular approach is how we end up with domain specific languages and small virtual machines to run them.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx&amp;amp;;subject=Solving+Problems%2c+aka%2c+Nobody+Codes+Like+This+Anymore" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx&amp;amp;;title=Solving+Problems%2c+aka%2c+Nobody+Codes+Like+This+Anymore" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx&amp;amp;title=Solving+Problems%2c+aka%2c+Nobody+Codes+Like+This+Anymore" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx&amp;amp;;title=Solving+Problems%2c+aka%2c+Nobody+Codes+Like+This+Anymore" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx&amp;amp;;title=Solving+Problems%2c+aka%2c+Nobody+Codes+Like+This+Anymore&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/10/solving-problems-aka-nobody-codes-like-this-anymore.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20315" width="1" height="1"&gt;</description></item><item><title>Writing a Composite ImageCommand – Gamma Corrected Resampling</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx</link><pubDate>Wed, 03 Mar 2010 16:05:52 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20289</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;We have a customer who expressed some concern over how our resample command works (and how many similar commands work, in general).&amp;#160; He pointed us to &lt;a href="http://www.4p8.com/eric.brasseur/gamma.html"&gt;an article here&lt;/a&gt; which describes the problem.&amp;#160; The short of it is that the energy in a pixel is an expression of power (Watts) over the area of the pixel and although the scale of the pixel component intensities is represented as linear, it is really exponential.&amp;#160; Averaging a set of power measurements linearly produces results which don’t effectively represent the average power.&amp;#160; The trick is compensate for this is to make the power scale linear by applying an inverse gamma function to the image, then resampling it and finally applying the original gamma function to restore it.&lt;/p&gt;  &lt;p&gt;The gamma function looks like this:&lt;/p&gt;  &lt;p align="center"&gt;&lt;font size="5"&gt;&lt;font face="Times New Roman"&gt;pv’ = pv&lt;sup&gt;γ&lt;/sup&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;where pv is the normalized value for the channel of a pixel – this means it is a value between 0 and 1 inclusive.&amp;#160; γ is a value &amp;gt; 0, typically 2.2 for most monitors.&amp;#160; So the typical process of converting an 8-bit per channel pixel is something like this:&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; pixel
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;   &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; channel
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;double&lt;/span&gt; normalizedChannel = channel / 255.0;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;double&lt;/span&gt; channelPrime = Math.Exp(normalizedChannel, gamma);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        channel = Math.Floor(channelPrime * 255);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;DotImage has an ImageCommand for performing this transformation efficiently.&amp;#160; We can do the transformation I’ve described as a sequence of steps, but I thought it would be nice to combine everything into one command.&lt;/p&gt;

&lt;p&gt;The first thing to do is to make a subclass of ImageCommand.&amp;#160; ImageCommand is an abstract class which is, more or less the a collection of GoF &lt;a href="http://en.wikipedia.org/wiki/Template_method_pattern"&gt;template methods&lt;/a&gt;.&amp;#160; This is to make it easy to implement ImageCommands from scratch.&amp;#160; We’re not doing that – we’re making a composite command.&amp;#160;&amp;#160; We’ll implement the abstract methods, but they won’t be needed.&amp;#160; So let’s start off with an outline of what we want:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; GammaResampleCommand : ImageCommand
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    GammaCommand _gammaCommand = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; GammaCommand();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    ResampleCommand _resampleCommand = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ResampleCommand();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; GammaResampleCommand()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; GammaResampleCommand(&lt;span style="color:#0000ff;"&gt;double&lt;/span&gt; gammaLevel, Size destSize, ResampleMethod method)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        GammaLevel = gammaLevel;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;       DestSize = destSize;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        Method = method;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; AtalaImage PerformActualCommand(AtalaImage source, AtalaImage dest, System.Drawing.Rectangle imageArea, &lt;span style="color:#0000ff;"&gt;ref&lt;/span&gt; ImageResults results)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; NotImplementedException();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; PixelFormat[] SupportedPixelFormats
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _gammaCommand.SupportedPixelFormats; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; VerifyProperties(AtalaImage image)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;       ImageCommand.ProxyVerifyProperties(_gammaCommand, image);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        ImageCommand.ProxyVerifyProperties(_resampleCommand, image);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;double&lt;/span&gt; GammaLevel
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _gammaCommand.GammaLevel; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; { _gammaCommand.GammaLevel = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; Size DestSize
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _resampleCommand.DestSize; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; { _resampleCommand.DestSize = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ResampleMethod Method
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _resampleCommand.Method; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; { _resampleCommand.Method = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;You’ll note that rather than implement the properties or VerifyProperties, we’re just acting as a &lt;a href="http://en.wikipedia.org/wiki/Proxy_pattern"&gt;proxy&lt;/a&gt; to existing instances of GammaCommand and ResampleCommand.&amp;#160; This means we don’t need to implement error checking on the properties – that will happen for free.&amp;#160; In fact, to implement VerifyProperties, we’re taking advantage of a feature of ImageCommand – ImageCommand has a set of methods named Proxy&lt;em&gt;XXXX&lt;/em&gt;, which will call the method &lt;em&gt;XXXX&lt;/em&gt; for us, even though it is protected.&amp;#160; This breaks encapsulation, but it is there just for this purpose – creating composite commands.&amp;#160; Finally, you’ll note that PerformActualCommand throws an exception.&amp;#160; That’s OK – we’re going to ensure that it is never called.&lt;/p&gt;

&lt;p&gt;What remains is to do the actual work, and for that we’ll override the method Apply().&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; ImageResults Apply(AtalaImage image)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (AtalaImage gammaCorrected = image.Clone() &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; AtalaImage)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;double&lt;/span&gt; gamma = _gammaCommand.GammaLevel;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;double&lt;/span&gt; inverseGamma = 1 / gamma;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            GammaLevel = inverseGamma;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _gammaCommand.Apply(gammaCorrected);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            AtalaImage finalImage = _resampleCommand.Apply(gammaCorrected).Image;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            GammaLevel = gamma;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _gammaCommand.Apply(finalImage);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ImageResults(finalImage, &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;GammaCommand is InPlaceProcessing = true, which means that it side-effects the source image.&amp;#160; I don’t want this, so I’ll make a copy of the source image using Clone, then apply the inverse gamma to the source, resample it, then apply the normal gamma.&lt;/p&gt;

&lt;p&gt;Here is some quick test code for this:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (AtalaImage image = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; AtalaImage(@&amp;quot;&lt;span style="color:#8b0000;"&gt;..\..\gamma_dalai_lama_gray.jpg&lt;/span&gt;&amp;quot;))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;     GammaResampleCommand resampler = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; GammaResampleCommand(2.2,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;           &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Size(image.Width / 2, image.Height / 2),
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;           ResampleMethod.LanczosFilter);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;     &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (AtalaImage smaller = resampler.Apply(image).Image)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;     {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;         smaller.Save(&amp;quot;&lt;span style="color:#8b0000;"&gt;dalailama.jpg&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; JpegEncoder(), &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;     }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;The input file is this:&lt;/p&gt;
&lt;img src="http://www.4p8.com/eric.brasseur/gamma_dalai_lama_gray.jpg" /&gt; 

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;and the subsequent output is here:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.atalasoft.com/cs/blogs/stevehawley/dalailama_624DC89B.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="dalailama" border="0" alt="dalailama" src="http://www.atalasoft.com/cs/blogs/stevehawley/dalailama_thumb_6900D21E.jpg" width="129" height="111" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx&amp;amp;;subject=Writing+a+Composite+ImageCommand+%e2%80%93+Gamma+Corrected+Resampling" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx&amp;amp;;title=Writing+a+Composite+ImageCommand+%e2%80%93+Gamma+Corrected+Resampling" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx&amp;amp;title=Writing+a+Composite+ImageCommand+%e2%80%93+Gamma+Corrected+Resampling" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx&amp;amp;;title=Writing+a+Composite+ImageCommand+%e2%80%93+Gamma+Corrected+Resampling" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx&amp;amp;;title=Writing+a+Composite+ImageCommand+%e2%80%93+Gamma+Corrected+Resampling&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/03/03/writing-a-composite-imagecommand-gamma-corrected-resampling.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20289" width="1" height="1"&gt;</description></item><item><title>I’m looking for the Lord high Executioner. Is he/she available?</title><link>http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx</link><pubDate>Tue, 02 Mar 2010 21:52:32 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20283</guid><dc:creator>christina</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I recently put out the call that we’d be ordering new business cards, and that interested people should forward me their preferred name/email/title. &lt;/p&gt; &lt;p&gt;Here are some of the specific title requests received:&lt;/p&gt; &lt;p&gt;THE MAN&lt;/p&gt; &lt;p&gt;Sales God&lt;/p&gt; &lt;p&gt;The Sellinator&lt;/p&gt; &lt;p&gt;The Dude&lt;/p&gt; &lt;p&gt;Steve noted that &lt;a href="http://en.wikipedia.org/wiki/Gilbert_and_Sullivan" target="_blank"&gt;Gilbert &amp;amp; Sullivan&lt;/a&gt; had a knack for coming up with titles, such as The Lord High Executioner, Wicked Baronet, etc.&lt;/p&gt; &lt;p&gt;Coming up with titles is always tricky, especially when your employees are quite versatile. What especially awesome titles have you held in the past?&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx&amp;amp;;subject=I%e2%80%99m+looking+for+the+Lord+high+Executioner.+Is+he%2fshe+available%3f" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx&amp;amp;;title=I%e2%80%99m+looking+for+the+Lord+high+Executioner.+Is+he%2fshe+available%3f" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx&amp;amp;title=I%e2%80%99m+looking+for+the+Lord+high+Executioner.+Is+he%2fshe+available%3f" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx&amp;amp;;title=I%e2%80%99m+looking+for+the+Lord+high+Executioner.+Is+he%2fshe+available%3f" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx&amp;amp;;title=I%e2%80%99m+looking+for+the+Lord+high+Executioner.+Is+he%2fshe+available%3f&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2010/03/02/i-m-looking-for-the-lord-high-executioner-is-he-she-available.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20283" width="1" height="1"&gt;</description></item><item><title>F# Discoveries This Week 02/25/2010</title><link>http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx</link><pubDate>Thu, 25 Feb 2010 21:31:07 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20254</guid><dc:creator>RickM</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Between Atalasoft, Professional F# 2.0 and the MVP Summit I’ve been completely swamped and ended up with quite a backlog of posts.&amp;#160; Between the Brian-Chris F# Code Battle, Luca’s LChart, Ashley’s continuing FScheme series and Matthew’s MongoDB stuff I’m not sure I can pick a favorite.&amp;#160; That’s not true, I’d go right for the DAWG-fight series.&amp;#160; The arcane secrets of F# optimization await inside.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/shows/Going+Deep/C9-Lectures-Dr-Don-Syme-Introduction-to-F-3-of-3/"&gt;C9 Lectures: Dr. Don Syme - Introduction to F#, 3 of 3&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In Part 3 of this 3-part lecture series, Dr. Don Syme elaborates further on: Patterns, Object Basics, [and] Imperative Programming.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/dsyme/archive/2010/02/15/async-and-parallel-design-patterns-in-f-part-3-agents.aspx"&gt;Dr. Don Syme’s Async and Parallel Design Patterns in F#: Agents&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In part 3 of this series, we explore lightweight, reactive agents in F# and look at some typical design patterns associated with these agents, including isolated internal state.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/chrsmith/archive/2010/02/17/dawg-fight-optimizing-text-search-in-f-ii.aspx"&gt;Chris Smith’s DAWG-fight, Optimizing text search in F# II&lt;/a&gt; and &lt;a href="http://lorgonblog.spaces.live.com/Blog/cns!701679AD17B6D310!1803.entry"&gt;Dr. Brian McNamara’s DAWG-Gone&lt;/a&gt; (F# Language Team Code Battle Summary) &lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;So today I’ll walk you through what Chris did right (shortest… subsection… ever!), as well as what he did wrong (get comfy in your chair), and then show my own implementation.&lt;/em&gt;&amp;#160;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Luca Bolognese’s LChart: Displaying Charts in F# Parts &lt;a href="http://blogs.msdn.com/lucabol/archive/2010/02/17/lchart-displaying-charts-in-f-part-i.aspx"&gt;One&lt;/a&gt;, &lt;a href="http://lucabolognese.wordpress.com/2010/02/17/lchart-displaying-charts-in-f-part-ii/"&gt;Two&lt;/a&gt; and &lt;a href="http://lucabolognese.wordpress.com/2010/02/19/lchart-displaying-charts-in-f-part-iii/"&gt;Three&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I want to use F# as a exploratory data analysis language (like R). But I don’t know how to get the same nice graphic capabilities. So I decided to create them. Here is a library to draw charts in F#.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Dr. Brian McNamara’s An RSS Dashboard in F# Parts &lt;a href="http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!1780.entry"&gt;Four&lt;/a&gt;, &lt;a href="http://lorgonblog.spaces.live.com/Blog/cns!701679AD17B6D310!1790.entry"&gt;Five&lt;/a&gt; and &lt;a href="http://lorgonblog.spaces.live.com/Blog/cns!701679AD17B6D310!1802.entry"&gt;Six&lt;/a&gt;.&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;You can see from the colors in the screenshot from part one what I desired, but this requires knowing which links are ‘visited’ and which are not, so I can color each link appropriately.&amp;#160; It turns out, this information can be had via unusual means…&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Ashley Feniello’s FScheme Parts &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/02/11/turning-your-brain-inside-out-with-continuations.aspx"&gt;Ten&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/02/21/playing-dice-with-the-universe.aspx"&gt;Eleven&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;We’re now taking the first small step into the world of nondeterministic logic programming (chapter 16 of Bill Hails’ book). Hopefully you enjoyed the last post about continuation passing and found the idea to be ripe with potential power; indeed so powerful that we’re going to use it now to bifurcate the universe! No really, we are…&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/lucabol/archive/2010/02/12/a-simpler-f-mailboxprocessor.aspx"&gt;Luca Bolognese’s A simpler F# MailboxProcessor&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I always forget the pattern to use to create a functioning MailboxProcessor in F#. I mean, which piece has to be async and how to structure the recursive loop. When I find myself in that kind of a situation situation, my instincts scream at me: “Wrap it and make it work how your mind expects it to work”. So here is a simplification of the paradigm.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/02/11/the-f-powerpack-released-on-codeplex.aspx"&gt;Matthew Podwysocki’s The F# PowerPack Released on CodePlex&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;As announced yesterday, the new February 2010 release of F# is out. This release is much more of a stabilization release instead of adding a lot of features including improvements in tooling, the project system and so on.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/02/09/exploring-mongodb-with-f.aspx"&gt;Matthew Podwysocki’s Exploring MongoDB with F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I just want a quick answer with the data I have.&amp;#160; There was one issue of course that nagged me which was the ubiquitous use of strings for everything from databases, collections, and keys.&amp;#160; With a language such as F#, could we do any better than this approach?&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/02/10/f-and-the-dynamic-lookup-operator-ala-c.aspx"&gt;Matthew Podwysocki’s F# and the Dynamic Lookup Operator ala C#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In the F# language, we have the ability to define two “dynamic” operators, a get member operator denoted by the ( ? ), and the set member operator denoted by the ( ?&amp;lt;- ).&amp;#160; The F# language and its associated libraries do not have an actual implementation of these operators, but instead allow you to implement them as you see fit. &lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Steve Gilham’s Updating F# posts to 1.9.9.9 Parts &lt;a href="http://stevegilham.blogspot.com/2010/02/updating-f-posts-to-1999-part-1-before.html"&gt;One&lt;/a&gt; and &lt;a href="http://stevegilham.blogspot.com/2010/02/updating-f-posts-to-1999-part-2-october.html"&gt;Two&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Possibly a few more issues will come out as I reconstitute my analysis tool, which is currently undergoing a retooling of its build system to automate some of the manual checks for whether the operational tests succeeded or not.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.navision-blog.de/2010/02/14/fake-f-make-0-29-released-ready-for-f-february-2010-ctp-and-net-4-0-rc/"&gt;Steffen Forkmann’s FAKE – F# Make 0.29 Released&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Last week I released version 0.29 of my build automation tool “FAKE – F# Make”. The new version comes along with a couple of changes which I will now describe.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://langexplr.blogspot.com/2010/02/using-webcam-with-directshownet-and-f.html"&gt;Luis Diego Fallas’s Using a Webcam with DirectShowNET and F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In this post I'm going to show a small F# example of using DirectShowNET to access a webcam and manipulate the image data.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.markhneedham.com/blog/2010/02/15/f-passing-an-argument-to-a-member-constraint/"&gt;Mark Needham’s F#: Passing an argument to a member constraint&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I've written previously about function overloading in F# and my struggles working out how to do it and last week I came across the concept of inline functions and statically resolved parameters as a potential way to solve that problem.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Julien Ortin’s &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/10/bittorrent-bencoded-values-in-f"&gt;BitTorrent Bencoded values&lt;/a&gt; and &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/13/bittorrent-metainfo-file-handling-in-f"&gt;BitTorrent Metainfo file handling&lt;/a&gt; in F#&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Byte strings can be strings represented as byte strings (such as the description of the exchanged data), as well as an array of bytes (such as a hash). Representing them with the .Net strings can thus lead to errors. Hence we shall keep the byte array representation.&lt;/em&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Julien Ortin continues his series on Purely Functional Data Structures with a &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/11/skew-binomial-heap"&gt;Skew binomal heap&lt;/a&gt;, a &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/11/bankers-double-ended-queue"&gt;Banker’s double-ended queue&lt;/a&gt;, a &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/11/alternative-binary-random-access-list"&gt;Alternative binary random access list&lt;/a&gt;, a &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/18/bootstrapped-queue"&gt;Bootstrapped queue&lt;/a&gt;, and a &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/18/implicit-queue"&gt;Implicit queue&lt;/a&gt;.&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;This post describes the F# implementation of the &amp;lt;insert data structure here&amp;gt; from Chris Okasaki’s “Purely functional data structures”.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.scottseely.com/Blog/10-01-13/F_is_Changing_My_Style.aspx"&gt;Scott Seely’s F# is Changing My Style&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The types I’m interested are concrete (no abstract methods) and have a zero-argument constructor. A few years ago, I would have done a bunch of looping constructs to look at each element. However, I’ve been doing a lot more work with F#. While doing this experiment in C# for a project, I wound up writing the following instead:&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://stevegilham.blogspot.com/2010/02/it-almost-feels-like-cheating.html"&gt;Steve Gilham’s It almost feels like cheating…&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Having renamed all the .c files as .cpp, getting a first building assembly was simple, and then making it refer to an initially empty F# library, no problem; and then setting up an (again, initially empty) unit test assembly depending on both (where vice-tests to match up new and old implementations, and their eventual unit test replacements can accumulate), just as normal.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://bradclow.blogspot.com/2010/02/f-examples-talk-at-bfg.html"&gt;Brad Clow’s F# Examples talk at BFG&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Earlier this week I gave a short talk at the Brisbane Functional Group on F#. The idea was to give an introductory feel for the language by way of some simple examples.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.trelford.com/blog/post/F-Talk-at-Edge-UG-Slides-and-Demos.aspx"&gt;Phillip Trelford’s F# Talk at Edge UG: Slides and Demos&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I presented a 1 hour talk introducing F# with 4 demos (attached to this post):&amp;#160; Full-screen WPF POS Checkout sample with Barcode scanner integration (in 100 lines).&amp;#160; Twitter WPF client script (200 lines).&amp;#160; Matermind board game in WPF (300 lines).&amp;#160; Lunar Lander XNA game (&amp;gt;400 lines). &lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blog.mwjackson.net/?p=40"&gt;Matt Jackson’s AssertWasCalled in F# (or how I learned to stop worrying and hate extension methods)&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Unfortunately, this upcasting led me on a short goose chase to find out which interface in the Rhino Mocks codebase was responsible for AssertWasCalled only to realise that it was an extension method sitting hiding away somewhere else.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx&amp;amp;;subject=F%23+Discoveries+This+Week+02%2f25%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+02%2f25%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx&amp;amp;title=F%23+Discoveries+This+Week+02%2f25%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+02%2f25%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+02%2f25%2f2010&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/25/f-discoveries-this-week-02-25-2010.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20254" width="1" height="1"&gt;</description><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/async/default.aspx">async</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/charting/default.aspx">charting</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/data+structures/default.aspx">data structures</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/DAWG/default.aspx">DAWG</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Dynamic+Lookup/default.aspx">Dynamic Lookup</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/F_2300_/default.aspx">F#</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fake/default.aspx">fake</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/FScheme/default.aspx">FScheme</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fsharp/default.aspx">fsharp</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/LChart/default.aspx">LChart</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Mailboxes/default.aspx">Mailboxes</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/MongoDB/default.aspx">MongoDB</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/optimization/default.aspx">optimization</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/parallel/default.aspx">parallel</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/powerpack/default.aspx">powerpack</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/roundup/default.aspx">roundup</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/rss/default.aspx">rss</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/scheme/default.aspx">scheme</category></item><item><title>Libpng – You’re Doing It Wrong</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx</link><pubDate>Tue, 23 Feb 2010 17:24:28 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20239</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I took a three day hiatus from developing DotImage 9.0 to work on an experiment: how would a 100% managed PNG decoder perform, compared to libpng?&lt;/p&gt;  &lt;p&gt;Using only C#, I knocked together a very basic chunk of code that has a very strong .NET feel/smell to it to decode PNG images.&amp;#160; Internally, I build a map of the available chunks in the file and then I ask for them by type.&amp;#160; This is different from most PNG consuming code – the spec encourages you to read chunks in possible expected order, which requires a very state machiney layout.&amp;#160; State machines aren’t bad, per se, but they do lead to code that is not always easy to read or maintain.&amp;#160; So instead of waiting for a chunk of the right type to arrive, I just ask for it by name.&lt;/p&gt;  &lt;p&gt;For the required zlib compression, I used &lt;a href="http://dotnetzip.codeplex.com/"&gt;DotNetZip&lt;/a&gt;, in particular the Zlib assembly.&amp;#160; The main reason for this choice was that Ionics implementation is a filter stream.&amp;#160; I give their stream another stream to work with and it will decompress it while I read from it.&amp;#160; This is awesome, because I don’t need to worry about the underlying implementation.&lt;/p&gt;  &lt;p&gt;Well, that’s actually a lie.&amp;#160; I do have to worry about it.&amp;#160; PNG allows compressed image data to be spread across multiple PNG chunks in the file.&amp;#160; So I created a ChunkStream that give a stream a List&amp;lt;ChunkDescriptors&amp;gt; that describe where image data chunks reside, it will read/seek through the chunks as needed.&lt;/p&gt;  &lt;p&gt;In sum, my reading model for image data is this Stream-&amp;gt;ChunkStream-&amp;gt;ZLibStream.&lt;/p&gt;  &lt;p&gt;So here is my code for decoding a non-interlaced PNG image:&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;List&amp;lt;ChunkDescriptor&amp;gt; chunks = _chunkMap[ChunkType.IDAT];
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;ChunkStream chunkstm = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ChunkStream(_stm, chunks);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;ZlibStream stm = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ZlibStream(chunkstm, CompressionMode.Decompress);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; y = 0; y &amp;lt; Header.Height; y++)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; filter = stm.ReadByte();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (filter &amp;lt; 0)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Exception(&amp;quot;&lt;span style="color:#8b0000;"&gt;unexpected EOF&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!FilterIsValid(filter))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Exception(&amp;quot;&lt;span style="color:#8b0000;"&gt;invalid filter&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; count = stm.Read(currLine, 0, bytesPerLine);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    Unfilter(currLine, prevLine, (PngAdaptiveFilter)filter, bytesPerLine);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    OnScanlineRead(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ScanlineEventArgs(y, currLine));
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;byte&lt;/span&gt;[] temp = prevLine;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    prevLine = currLine;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    currLine = temp;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;That’s all that it takes – this code is easy to read, easy to maintain, and nicely abstracted.&amp;#160; Do you see the &lt;em&gt;total lack&lt;/em&gt; of special case handling?&amp;#160; All that is wrapped up in the stream model and instead, I can concentrate on the decoding.&lt;/p&gt;

&lt;p&gt;I did some testing and found that compared with a libpng, this code takes a little less than twice as long.&amp;#160; With some tweaking, I can make it better.&amp;#160; In my case, the bottleneck is not where I expected.&amp;#160; It’s not in I/O.&amp;#160; It’s not in reordering color channels.&amp;#160; It’s not in using an event driven model for reporting scanlines read.&amp;#160; It’s not in mapping out the chunks at the start.&amp;#160; In my particular test case, the bottleneck is the &lt;a href="http://gnupdf.org/PNG_and_TIFF_Predictors_Filter"&gt;Paeth predictor&lt;/a&gt; that was used on the test file to improve compression.&lt;/p&gt;

&lt;p&gt;Here is the Paeth predictor as I originally implemented it:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; PaethPredictor(&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; a, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; b, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; c)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; p = a + b - c;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; pa = Math.Abs(p - a);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; pb = Math.Abs(p - b);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; pc = Math.Abs(p - c);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (pa &amp;lt;= pb &amp;amp;&amp;amp; pa &amp;lt;= pc)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; a;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (pb &amp;lt;= pc)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; b;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; c;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;This is very simple code, so it’s hard to imagine how you might make it better.&amp;#160; I took this approach:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; PaethPredictor(&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; a, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; b, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; c)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; bmc = b - c;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; pa = bmc &amp;lt; 0 ? -bmc : bmc;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; amc = a - c;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; pb = amc &amp;lt; 0 ? -amc : amc;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; apbmcmc = a + b - c - c;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; pc = apbmcmc &amp;lt; 0 ? -apbmcmc : apbmcmc;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (pa &amp;lt;= Math.Min(pa, pc))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; a;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (pb &amp;lt;= pc)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; b;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; c;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;I eliminated the calls to Math.Abs, which helps a little.&amp;#160; I also broke apart the expression p which also helped a little bit.&amp;#160; When I say “a little”, I mean that it shaves off maybe a few hundredths of a second.&amp;#160; To read my source image 100 times took 1500ms and after these basic rearrangements, I got it down to 1100ms.&amp;#160; These tiny changes help because the Paeth Predictor gets called 7.5 million times in my test code.&amp;#160; If I inline it (seriously hurting readability), the result is slightly faster.&amp;#160; At this point the pure managed code runs at 1.5x libpng, which is way better than I expected.&lt;/p&gt;

&lt;p&gt;I looked at the image decoding in libpng and while the authors clearly went to a great deal of effort to handle errors and special cases and to make the code as readable as possible, ultimately I think they’re doing it wrong.&amp;#160; My code is memory efficient, easy to read, easy to maintain, and will never leak memory&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx&amp;amp;;subject=Libpng+%e2%80%93+You%e2%80%99re+Doing+It+Wrong" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx&amp;amp;;title=Libpng+%e2%80%93+You%e2%80%99re+Doing+It+Wrong" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx&amp;amp;title=Libpng+%e2%80%93+You%e2%80%99re+Doing+It+Wrong" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx&amp;amp;;title=Libpng+%e2%80%93+You%e2%80%99re+Doing+It+Wrong" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx&amp;amp;;title=Libpng+%e2%80%93+You%e2%80%99re+Doing+It+Wrong&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20239" width="1" height="1"&gt;</description></item><item><title>A personal note.</title><link>http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx</link><pubDate>Mon, 22 Feb 2010 16:35:47 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20236</guid><dc:creator>Elaine</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Page 1, paragraph 3, sentence 1 of Seth Godin’s &lt;strong&gt;Tribes&lt;/strong&gt; reads “A tribe is a group of people connected to one another, connected to a leader, and connected to an idea.”&lt;/p&gt;  &lt;p&gt;I could not get this out of my head Saturday.&lt;/p&gt;  &lt;p&gt;I play ice hockey, and at 3:10 PM this past Saturday, I found myself playing goalie for a team that was not my own, under the worst set of circumstances.&lt;/p&gt;  &lt;p&gt;“How did I get here?” was the second thought going through my mind.&amp;#160; I was on the ice because of the multitude of tribes to which I belong.&lt;/p&gt;  &lt;p&gt;First, Atalasoft.&amp;#160; Our small tribe all working together to be leaders in our industry.&amp;#160; Part of that tribe includes Steve, our chief architect.&amp;#160; Because of Steve, I’m involved with another tribe, the Massachusetts Down Syndrome Congress.&amp;#160; I play hockey for them in a charity game to raise money for awareness.&lt;/p&gt;  &lt;p&gt;Because we play against former NHL players, I joined a women’s team out of Boston, the Raging Storm, to get in playing shape.&amp;#160; So there are more tribes – athletes, women athletes, hockey players, goalies – to name a few.&amp;#160; Through this tribe, someone passed my name to another team who was looking for a goalie to play for them this past weekend in the Fitchburg Have A Heart tournament.&amp;#160; I joined another tribe, the Panthers.&lt;/p&gt;  &lt;p&gt;While dressing for our first game, we heard devastating news.&amp;#160; The goalie for the tournament host team had chest pains in the second period of her game.&amp;#160; She refused to leave the ice, not recognizing the seriousness of the situation.&amp;#160; She finished the game, returned to the locker room, and had a massive heart attack.&amp;#160; She did not survive.&lt;/p&gt;  &lt;p&gt;Her team decided to continue in the tournament, as that is what she would have wanted.&amp;#160; When I heard they were playing, I approached the captain and let her know I would play for them if they needed me.&lt;/p&gt;  &lt;p&gt;She informed me that they did need me for their third game of the tournament, and so I joined their tribe.&lt;/p&gt;  &lt;p&gt;While dressing for that game, the team let me know that they rarely won, and that I shouldn’t expect them to score more than one goal, if that even.&amp;#160; Their faces were heartbreaking to look at – they were in grief and in shock, eyes red and puffy – but they put on brave faces.&amp;#160; They bonded together over the tragedy, and connected with each other over their (and their goalie’s) love of hockey.&lt;/p&gt;  &lt;p&gt;We took the ice.&amp;#160; I have never wanted to win so badly in my life.&amp;#160; I have played at the national level, USA Hockey B division, but that was nothing compared to the pressure I felt playing behind these women.&lt;/p&gt;  &lt;p&gt;We won 5-3.&lt;/p&gt;  &lt;p&gt;It was the hardest game I have ever played, but will go down in my mind as the best game I have ever played, both physically and mentally.&lt;/p&gt;  &lt;p&gt;Everything we do in life affects everyone we know, even if the details are so small not to be noticed directly.&amp;#160; Every one of my customers will interact with someone who is improved.&amp;#160; Each tribe I am a member of is now stronger, because I am stronger for the experience.&lt;/p&gt;  &lt;p&gt;Thank you, Shelly Leclier.&amp;#160; I would say rest in peace, but I know you’ll find ice time in heaven.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx&amp;amp;;subject=A+personal+note." target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx&amp;amp;;title=A+personal+note." target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx&amp;amp;title=A+personal+note." target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx&amp;amp;;title=A+personal+note." target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx&amp;amp;;title=A+personal+note.&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/22/a-personal-note.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20236" width="1" height="1"&gt;</description></item><item><title>42 things you can do to get bad customer service</title><link>http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx</link><pubDate>Wed, 17 Feb 2010 21:35:52 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20218</guid><dc:creator>Elaine</dc:creator><slash:comments>0</slash:comments><description>&lt;h5&gt;It’s been a while since I posted anything campers.&amp;#160; I actually only have five suggestions…&lt;/h5&gt;  &lt;h5&gt;1.&amp;#160; Be unprofessional.&lt;/h5&gt;  &lt;p&gt;We have had voicemails that made us cringe (like the customer who flushed the toilet – we don’t think he realized he had dialed the phone… at least, we hope he didn’t know), and people with children screaming in the background.&amp;#160; No excuse for the first case.&amp;#160; The second case – we sometimes work from home as well, and understand that those things can happen sometimes.&amp;#160; In fact, I have two dogs, and &lt;a href="http://www.atalasoft.com/cs/photos/elainesgallery/images/19827/original.aspx"&gt;one of them&lt;/a&gt; hates when I am on the phone and tries to talk to me himself.&amp;#160; If you hear “A-ROO-ROO-ROO” in the background when talking to me, please know it’s not me howling into the speaker.&amp;#160; However, when he does that, I make sure to quiet him as soon as possible with a rawhide or a biscuit.&amp;#160; Point is, it happens only once.&lt;/p&gt;  &lt;p&gt;Secondly, ending your support case descriptions with “U giv code, plz?&amp;#160; KTHXBAI.”&amp;#160; Really?&amp;#160; Show me your resume’.&amp;#160; Tell me how you got a job.&amp;#160; I expect to be greeted by English (and I will be quite lenient with non-English speakers using a translator), but text speak should be used on the &lt;a href="http://forums.worldofwarcraft.com"&gt;WOW forums&lt;/a&gt; or with your teenage little brother over IM.&lt;/p&gt;  &lt;h5&gt;2.&amp;#160; Complain, complain, complain.&lt;/h5&gt;  &lt;p&gt;When I first started with Atalasoft, my eyes glazed over when trying to read the documentation.&amp;#160; Now, it’s the easiest thing in the world for me to find what I’m looking for.&amp;#160; (Practice, practice, practice.)&amp;#160; I understand that a lot of people have trouble with it.&amp;#160; But, if over the course of a 20-minute conversation, you spend 19 minutes complaining about the documentation, then we’ve wasted 18 minutes.&amp;#160; You could have complained for 1 minute and I could have helped you in 1 minute.&amp;#160; Which one sounds more productive?&lt;/p&gt;  &lt;p&gt;Don’t tempt me to send you to a &lt;a href="http://support.microsoft.com/"&gt;different support group&lt;/a&gt;.&lt;/p&gt;  &lt;h5&gt;3.&amp;#160; Lie, cheat, steal…&lt;/h5&gt;  &lt;p&gt;Software piracy is an unfortunate way of life.&amp;#160; From Windows to Adobe to DotImage, people are always on the hunt to get around paying for products they use.&amp;#160; We can’t stop everybody, and we’ve put in quite a few &lt;a href="http://en.wikipedia.org/wiki/Jack_Bauer"&gt;measures&lt;/a&gt; to prevent people from taking advantage of us.&amp;#160; However, people do what they do, and then expect to get the same service as people who legitimately pay for the product and service.&amp;#160; When they get caught, they ask why they’re not receiving timely service.&amp;#160; I think the answer is obvious – you get what you pay for.&lt;/p&gt;  &lt;h5&gt;4.&amp;#160; Refuse to help us help you.&lt;/h5&gt;  &lt;p&gt;We are not mind readers.&amp;#160; If we were, we would not be engineers.&amp;#160; In fact, I would be going on game show after game show (“No whammies… no whammies… STOP!”)&amp;#160; When we ask you questions, when we make suggestions, it is because we are trying to determine the issue, not waste your time.&amp;#160; We do not know the answer to every single problem immediately – sometimes we need to investigate down to the real cause of the problem.&amp;#160; Never say “this doesn’t work” and leave it at that.&amp;#160; If I ask you a question, and you do not answer it, I’m going to repeat the question until you do.&amp;#160; If I make a suggestion, and you don’t try it, I’m going to &lt;a href="http://www.youtube.com/watch?v=p-oHuogx6_Y"&gt;repeat&lt;/a&gt; the suggestion until you do.&amp;#160; We don’t follow a script, and no one develops the exact same application.&amp;#160; We treat you like an individual, just like everyone else.&lt;/p&gt;  &lt;h5&gt;5.&amp;#160; Expect us to debug your code.&lt;/h5&gt;  &lt;p&gt;As an engineer for a software company, my family can afford more than &lt;a href="http://en.wikipedia.org/wiki/Ramen"&gt;ramen&lt;/a&gt; noodles every night.&amp;#160; As an engineer for a SMALL software company, we’re not eating prime rib every night, either.&amp;#160; So when a contract programmer making 5 times more than me per hour expects me to pore over their code to find where they forgot to set something to true, I tell them politely that that’s not what I do.&amp;#160; &lt;a href="http://en.wikipedia.org/wiki/Bill_Gates"&gt;Give a college kid $20&lt;/a&gt;, and I’m sure he’ll do it for you.&amp;#160; Be careful, though – he might take your place on the next contract.&lt;/p&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h3&gt;Which leads to… one thing you can do to get great customer service.&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.wikihow.com/Be-Nice"&gt;Be nice&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you’re nice, we might overlook the fact that you’re popping gum into the phone.&amp;#160; If you’re nice, we might step you through the documentation and show you how we find things quickly.&amp;#160; If you’re nice, we might hint that you can find your answer in a particular demo.&amp;#160; If you’re nice, we might make other suggestions for you to try.&amp;#160; If you’re nice, we might start a go-to meeting and give you a second set of eyes.&lt;/p&gt;  &lt;p&gt;It seems that a little over a year ago I posted something similar with the same conclusion, but it can’t hurt to repeat this message until everyone gets it.&lt;/p&gt;  &lt;p&gt;Be nice.&amp;#160; (I was going to link to a YouTube clip of Patrick Swayze’s “Be nice” speech in &lt;em&gt;Roadhouse&lt;/em&gt;, but, uh, the language wasn’t very… nice.)&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx&amp;amp;;subject=42+things+you+can+do+to+get+bad+customer+service" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx&amp;amp;;title=42+things+you+can+do+to+get+bad+customer+service" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx&amp;amp;title=42+things+you+can+do+to+get+bad+customer+service" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx&amp;amp;;title=42+things+you+can+do+to+get+bad+customer+service" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx&amp;amp;;title=42+things+you+can+do+to+get+bad+customer+service&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/support/archive/2010/02/17/42-things-you-can-do-to-get-bad-customer-service.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20218" width="1" height="1"&gt;</description></item><item><title>Get Started with F# via Higher order IEnumerable&lt;T&gt; extension methods in C#</title><link>http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx</link><pubDate>Fri, 12 Feb 2010 16:03:05 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20203</guid><dc:creator>RickM</dc:creator><slash:comments>7</slash:comments><description>&lt;p&gt;The more I use F# the more I want to write my every day production C# code in a functional way.&amp;#160; To this end, I’ve written a few higher order extension methods as the need arose.&amp;#160; I wanted to take a moment and share them with you.&amp;#160; I think that in seeing an implementation of these functions in C#, what they do becomes easy to understand.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee370294%28VS.100%29.aspx"&gt;Filter&lt;/a&gt; provides a new collection with unwanted items removed.&amp;#160; &lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fda0f143-014b-482e-9712-1d89c0238d93" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background-color:#ffffff;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; Filter&amp;lt;T&amp;gt;(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; list, &lt;span style="color:#2b91af;"&gt;Predicate&lt;/span&gt;&amp;lt;T&amp;gt; predicate)&lt;br&gt; {&lt;br&gt;     &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;T&amp;gt; newList = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;T&amp;gt;();&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; list)&lt;br&gt;     {&lt;br&gt;         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (predicate(item))&lt;br&gt;             newList.Add(item);&lt;br&gt;     }&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; newList;&lt;br&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee370239%28VS.100%29.aspx"&gt;Reduce&lt;/a&gt; boils down a collection into exactly one item of the collection’s containing type.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b57aa49a-a379-4360-8658-8d7cb0aeb38c" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background-color:#ffffff;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; T Reduce&amp;lt;T&amp;gt;(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; list, &lt;span style="color:#2b91af;"&gt;Func&lt;/span&gt;&amp;lt;T, T, T&amp;gt; function)&lt;br&gt; {&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; enumerator = list.GetEnumerator();&lt;br&gt;     enumerator.MoveNext();&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; last = enumerator.Current;&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;while&lt;/span&gt; (enumerator.MoveNext())&lt;br&gt;     {&lt;br&gt;         last = function(enumerator.Current, last);&lt;br&gt;     }&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; last;&lt;br&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee353894%28VS.100%29.aspx"&gt;Fold&lt;/a&gt; is much like reduce except that it boils the collection down into an instance of any type.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b5245d74-9afc-4355-ad80-ec0f1e7b24b2" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background-color:#ffffff;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; U Fold&amp;lt;T, U&amp;gt;(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; list, &lt;span style="color:#2b91af;"&gt;Func&lt;/span&gt;&amp;lt;T, U, U&amp;gt; function, U initial)&lt;br&gt; {&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; enumerator = list.GetEnumerator();&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; last = initial;&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;while&lt;/span&gt; (enumerator.MoveNext())&lt;br&gt;     {&lt;br&gt;         last = function(enumerator.Current, last);&lt;br&gt;     }&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; last;&lt;br&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee370378%28VS.100%29.aspx"&gt;Map&lt;/a&gt; takes one collection and returns another of the same length by applying a function to each element.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6713886b-7118-4043-8a97-617e603885a5" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background-color:#ffffff;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;U&amp;gt; Map&amp;lt;T, U&amp;gt;(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; list, &lt;span style="color:#2b91af;"&gt;Func&lt;/span&gt;&amp;lt;T, U&amp;gt; mapFunction)&lt;br&gt; {&lt;br&gt;     &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;U&amp;gt; newList = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;U&amp;gt;();&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; element &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; list)&lt;br&gt;     {&lt;br&gt;         newList.Add(mapFunction(element));&lt;br&gt;     }&lt;br&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; newList;&lt;br&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;While these four are a good subset to begin with, &lt;a href="http://msdn.microsoft.com/en-us/library/ee353635%28VS.100%29.aspx"&gt;F# provides a much broader range of IEnumerable functionality&lt;/a&gt;.&amp;#160; Also, while examples here build new lists, their F# counterparts often evaluate lazily and so are usable with very large, parallelized or even infinite sequences.&amp;#160; &lt;/p&gt;  &lt;p&gt;For a more detailed view with some F# and Linq code check out &lt;a href="http://codebetter.com/blogs/matthew.podwysocki/archive/2008/06/16/functional-c-learn-from-f-and-linq.aspx"&gt;Matthew Podwysocki’s post on learning Functional C# from F# and LINQ&lt;/a&gt;.&amp;#160; His example are actually lazy when appropriate and have precondition checks.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx&amp;amp;;subject=Get+Started+with+F%23+via+Higher+order+IEnumerable%26lt%3bT%26gt%3b+extension+methods+in+C%23" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx&amp;amp;;title=Get+Started+with+F%23+via+Higher+order+IEnumerable%26lt%3bT%26gt%3b+extension+methods+in+C%23" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx&amp;amp;title=Get+Started+with+F%23+via+Higher+order+IEnumerable%26lt%3bT%26gt%3b+extension+methods+in+C%23" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx&amp;amp;;title=Get+Started+with+F%23+via+Higher+order+IEnumerable%26lt%3bT%26gt%3b+extension+methods+in+C%23" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx&amp;amp;;title=Get+Started+with+F%23+via+Higher+order+IEnumerable%26lt%3bT%26gt%3b+extension+methods+in+C%23&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/12/get-started-with-f-via-higher-order-ienumerable-t-extension-methods-in-c.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20203" width="1" height="1"&gt;</description><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/extension+methods/default.aspx">extension methods</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/F_2300_/default.aspx">F#</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fsharp/default.aspx">fsharp</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/higher-order+functions/default.aspx">higher-order functions</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/IEnumerable/default.aspx">IEnumerable</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/lists/default.aspx">lists</category></item><item><title>DataMatrix Described</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx</link><pubDate>Tue, 09 Feb 2010 16:33:50 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20176</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Saw this &lt;a href="http://www.ams.org/featurecolumn/archive/data-matrix.html"&gt;great description of Datamatrix encoding&lt;/a&gt; via &lt;a href="http://chneukirchen.org/trivium/"&gt;Trivium&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Very good your us visual thinkers.&lt;/p&gt;  &lt;p&gt;And if you need it, Atalasoft has tools for both &lt;a href="http://www.atalasoft.com/products/dotimage/barcode/"&gt;reading&lt;/a&gt; and &lt;a href="http://www.atalasoft.com/products/dotimage/barcode-writer/"&gt;writing&lt;/a&gt; Datamatrix 2D barcodes (and other barcodes as well).&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx&amp;amp;;subject=DataMatrix+Described" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx&amp;amp;;title=DataMatrix+Described" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx&amp;amp;title=DataMatrix+Described" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx&amp;amp;;title=DataMatrix+Described" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx&amp;amp;;title=DataMatrix+Described&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/09/datamatrix-described.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20176" width="1" height="1"&gt;</description></item><item><title>F# Discoveries This Week 02/08/2010</title><link>http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx</link><pubDate>Mon, 08 Feb 2010 19:28:41 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20161</guid><dc:creator>RickM</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Back again with another F# community roundup.&amp;#160;&amp;#160; There’s been a ton of great content this week, almost too much.&amp;#160; To try to combat this I’ve attempted to sort posts roughly in terms of how interesting I found them.&amp;#160; All were worth the read though.&lt;/p&gt;  &lt;p&gt;Also, I’ll be speaking this Wednesday on F# at the &lt;a href="http://www.bostondotnet.org/"&gt;Boston .NET User Group&lt;/a&gt;.&amp;#160; If you find yourself there, be sure to say hello!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/shows/Going%20Deep/C9-Lectures-Dr-Don-Syme-Introduction-to-F-1-of-3/"&gt;Don Syme’s Introduction to F# (Video 1 of 3)&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Dr. Don Syme is a principal researcher in MSR Cambridge. He has a rich history in programming language research, design, and implementation (C# generics being one of his most recognized implementations), and is the principle creator of F#.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/30/language-vs-library.aspx"&gt;Ashley Feniello’s FScheme Part 8: Language vs. Library&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Perhaps this post should have gone along with the one about macros and how Lisp is a “programmable programming language.” The common tension in any language or runtime design is how much to build in as primitives and how much to implement as libraries within the language or atop the runtime.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/lukeh/archive/2010/02/01/f-for-parallel-and-asynchronous-programming-pdc-2009.aspx"&gt;Luke Hoban’s F# for Parallel and Asynchronous Programming&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Last November at PDC 2009 in Los Angeles I gave a talk on F# for Parallel and Asynchronous Programming.&amp;#160; The talk begins by covering basic F# concepts, and then focuses on four challenging issues related to concurrency and the tools F# brings for addressing these - immutability, async workflows, and agents.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://brehaut.net/blog/2010/on_iteration"&gt;Andrew Brehaut’s On Iteration (Could just as well be entitled “Why Programmers Leave Python/C#/Java&amp;quot;)&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;There is an observable trend in Python programmers that results in a reasonable section of them moving to functional programming languages. This trend is encouraged by the Python language, and has a couple of temporal considerations.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/02/05/using-and-abusing-the-f-dynamic-lookup-operator.aspx"&gt;Matthew Podwysocki’s Using and Abusing the F# Dynamic Lookup Operator&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Much like C# 4.0 has the ability to do dynamic lookup, F# also has the same capability, although in a different capacity.&amp;#160; The language has support for a dynamic lookup get operator ( ? ) and set operator ( ?&amp;lt;- ), but note that I said support and not actual implementation.&amp;#160; The actual implementation is up to you and how you want to use it.&lt;/em&gt;&amp;#160;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/02/01/a-kick-in-the-monads-writer-edition.aspx"&gt;Matthew Podwysocki’s A Kick in the Monads – Writer Edition&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In the past couple of Monads posts, we’ve talked briefly about the State and Reader Monads and their potential uses and misuses.&amp;#160; Before this series completes, I have a few more to cover including the Writer, Continuation and eventually Observable monad.&amp;#160; Today, we’ll get started looking at the Writer Monad and what it can do for us.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/02/06/recursion-is-the-new-iteration.aspx"&gt;Ashley Feniello’s Recursion Is the New Iteration&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Not all recursive expressions represent recursive behavior. In fact, iteration can be expressed recursively. One trick when considering the process that an expression represents is to think of functions as reducing to values rather than returning them. In a pure functional style (precisely because of referential transparency) you can do analysis by successive substitution.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Julien Ortin continues his series on Purely Functional Data Structures with a &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/05/real-time-double-ended-queue"&gt;Real-time double-ended queue&lt;/a&gt;, a &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/05/skew-binary-random-access-list"&gt;Skew binary random access list&lt;/a&gt; and a &lt;a href="http://lepensemoi.free.fr/index.php/2010/02/05/binary-random-access-list"&gt;Binary random access list&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;This post describes the F# implementation of the &amp;lt;insert data structure here&amp;gt; from Chris Okasaki’s “Purely functional data structures”.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/02/john-conways-game-of-life-in-32-lines.html"&gt;Flying Frog Consultancy Presents - John Conway’s Game of Life in 32 lines of F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;John Conway's Game of Life is a famous example of a simple cellular automaton that produces remarkably diverse results. The game can be implemented in only 32 lines of F# including real-time visualization using Windows Presentation Foundation as follows:&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!1778.entry"&gt;Brian McNamara’s An RSS Dashboard in F# (Part 3)&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Last time I covered IObservables and we created a useful ObservableSource class.&amp;#160; Today I’ll cover the next technology piece of the app: reading RSS feeds.&amp;#160; I’ll discuss the design considerations regarding how to poll feed for updates and publish feed items as IObservables, and walk through one implementation.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://nickgravelyn.com/2010/02/pong-in-fsharp-with-xna-game-studio/"&gt;Nick Gravelyn’s Pong in F# with XNA Game Studio&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;A few of my colleagues were discussing F# today and when/where/how it is/isn’t better than C#. I haven’t ever really used F# beyond a very, very brief look at the syntax, so tonight I decided to see what it was all about. As a little project, I decided to make Pong with XNA Game Studio using F# with Visual Studio 2010.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://cultivatingcode.com/2010/02/03/maybe-f-isnt-for-you/"&gt;Jim Burger’s Maybe F# isn’t for you…&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;If you aren’t excited about new ways to tackle the concurrency problem, or new approaches to handling generic and mathematical problems, and if the thought of breaking out the shiny new lexer and parser don’t give you a tingle, then maybe F# isn’t actually marketed at you at all.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.codeproject.com/KB/net-languages/COBOL-FSharp1.aspx"&gt;Alex Turner’s Calling F# from COBOL and Back Again (CodeProject)&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Running languages on .NET is ultra-powerful. Using managed COBOL (from Micro Focus), it is possible to use F# code to work with COBOL code. Imagine a Cloud based F# map reduce system consuming legacy COBOL - yes, that really is on the horizon.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.navision-blog.de/2010/02/08/new-syntactic-sugar-for-fake-f-make-getting-rid-of-magic-strings/"&gt;Steffen Forkmann’s New syntactic sugar for “FAKE – F# Make”&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The new version 0.27 of “FAKE – F# Make” comes with new syntactic sugar for build targets and build dependencies. Don’t be afraid the old version is still supported – all scripts should still work with the new version.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/jaredpar/archive/2010/02/03/having-fun-with-events-in-f.aspx"&gt;Jared Parsons’s Having fun with events in F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;h6&gt;&lt;/h6&gt;    &lt;p&gt;&lt;em&gt;Recently I ran into a situation where I needed to handle some events in F# in a special way.&amp;#160; In this particular case I wanted to be able to disable and re-enable my handler based on changes in the program.&amp;#160; Essentially the C# equivalent of continually adding and removing the handlers.&lt;/em&gt;&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://stevegilham.blogspot.com/2010/01/glade-from-f.html"&gt;Steve Gilham’s “Hello Glade#” from F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Another bit of spiking, a rather tardy follow up from raw GTK#, starting from the C# example at the Mono Project site, but incorporating the earlier example, so as to build in a clean application exit, for one thing.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://langexplr.blogspot.com/2010/02/using-webcam-with-wia-and-f.html"&gt;Luis Diego Fallas’s Using a Webcam with WIA and F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In this post I'm going to show a small example of taking a picture using a Webcam with Windows Image Adquisition 1.0 . This API seems to have changed in Vista and above, the following code only applies to XP.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/02/tic-tac-toe-demo.html"&gt;Flying Frog Consultancy’s WPF Tic-tac-toe demo&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The article walks through the design and implementation of a multithreaded program that uses logic programming to create an unbeatable computer opponent and Windows Presentation Foundation to provide a graphical user interface in only 115 lines of elegant F# code!&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://developers.slashdot.org/story/10/02/07/0059233/An-Interview-With-F-Creator-Don-Syme"&gt;A (Relatively Reasonable) Discussion of F# on Slashdot&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;OCatenac passes along an interview with Don Syme, chief designer of F#, which is Microsoft Research's offering for functional programming on the .Net platform. Like Scala, which we discussed last fall, F# aims at being an optimal blend of functional and object-oriented languages.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx&amp;amp;;subject=F%23+Discoveries+This+Week+02%2f08%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+02%2f08%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx&amp;amp;title=F%23+Discoveries+This+Week+02%2f08%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+02%2f08%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+02%2f08%2f2010&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/02/08/f-discoveries-this-week-02-08-2010.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20161" width="1" height="1"&gt;</description><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/data+structures/default.aspx">data structures</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/events/default.aspx">events</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/F_2300_/default.aspx">F#</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fake/default.aspx">fake</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fsharp/default.aspx">fsharp</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/recursion/default.aspx">recursion</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/roundup/default.aspx">roundup</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/rss/default.aspx">rss</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/scheme/default.aspx">scheme</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/slashdot/default.aspx">slashdot</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/webcam/default.aspx">webcam</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/WIA/default.aspx">WIA</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/wpf/default.aspx">wpf</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/xna/default.aspx">xna</category></item><item><title>What is /?</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx</link><pubDate>Fri, 05 Feb 2010 21:21:01 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20138</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I learned something today about the humble slash character: /.&lt;/p&gt;  &lt;p&gt;First, let me say that to me, / is always pronounced ‘slash’.&amp;#160; This is due to my first encountering of this character as a path separator in UNIX when I worked at Bell Labs.&amp;#160;&amp;#160;&amp;#160; The other slash, \, I only knew as back slash.&amp;#160; When I encountered it in DOS paths, I was appalled that people used the name ‘slash’ interchangeably with ‘back slash’ and called ‘/’ ‘forward slash’.&amp;#160; Slash/back slash made sense to me because it fit cleanly with tick/back tick (‘ and ’).&lt;/p&gt;  &lt;p&gt;What I learned is that the character that we think of as slash (or forward slash to you heathens) is really called ‘&lt;a href="http://en.wikipedia.org/wiki/Solidus_%28punctuation%29"&gt;solidus&lt;/a&gt;’.&lt;/p&gt;  &lt;p&gt;I also found out that the paragraph symbol, ¶, is called ‘&lt;a href="http://en.wikipedia.org/wiki/Pilcrow"&gt;pilcrow&lt;/a&gt;’ or ‘alinea’.&lt;/p&gt;  &lt;p&gt;How about that?&lt;/p&gt;  &lt;p&gt;I’ll take “Punctuation Names” for $800, Alex.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx&amp;amp;;subject=What+is+%2f%3f" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx&amp;amp;;title=What+is+%2f%3f" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx&amp;amp;title=What+is+%2f%3f" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx&amp;amp;;title=What+is+%2f%3f" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx&amp;amp;;title=What+is+%2f%3f&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/05/what-is.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20138" width="1" height="1"&gt;</description></item><item><title>F# Discoveries This Week 01/29/2010</title><link>http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx</link><pubDate>Fri, 29 Jan 2010 19:15:34 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20100</guid><dc:creator>RickM</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Many apologies if I missed your post.&amp;#160; Having skipped last week due to some uncontrollable circumstances left me with quite a large number to sort through.&amp;#160; My personal favorite this week is Ashley Feniello’s series.&amp;#160; SICP eat your heart out.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.simple-talk.com/opinion/geek-of-the-week/don-syme-geek-of-the-week/"&gt;Richard Morris’s Geek of The Week is Don Syme&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“It came as a surprise to many of us when Microsoft pulled from it's hat a rabbit in the form of an exciting, radical, language that offers an effective alternative to the Object-oriented orthodoxy. The creative force behind this language, F#, turns out to be a brilliant Cambridge-based Australian called Don Syme, already well known for his work on generics in .NET.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Ashley Feniello’s extremely cool eight part (so far) series FScheme:&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“One of my New Year’s goals is to re-read Lisp in Small Pieces and implement all 11 interpreters and 2 compilers. As much as I like the &amp;quot;Lisp in Lisp&amp;quot; idea and enjoyed the eureka moment in SICP when Sussman writes the metacircular interpreter on the board to the music from Space Odyssey, I don't want to do Lisp in Lisp itself. Lisp in F# sounds like more fun.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Part 1: &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/15/fscheme-0-0-0.aspx"&gt;FScheme - Scheme in F#&lt;/a&gt;    &lt;br /&gt;Part 2: &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/15/fscheme-0-0-1.aspx"&gt;Just ‘let’ Me Be Already!&lt;/a&gt;    &lt;br /&gt;Part 3: &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/15/fscheme-0-0-2-lambda.aspx"&gt;Lambda the Ultimate!&lt;/a&gt;    &lt;br /&gt;Part 4: &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/16/fscheme-0-0-3-letrec.aspx"&gt;Rinse and Recurse&lt;/a&gt;    &lt;br /&gt;Part 5: &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/18/fscheme-0-0-4-let.aspx"&gt;What ‘letrec’ Can’t Do&lt;/a&gt;    &lt;br /&gt;Part 6: &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/18/fscheme-0-0-5-cons-car-cdr-list-quote.aspx"&gt;What's Lisp Without Lists?!&lt;/a&gt;    &lt;br /&gt;Part 7: &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/21/fscheme-0-0-6-macro-quote-unquote-eval.aspx"&gt;No Wait, Macro the Ultimate!&lt;/a&gt;    &lt;br /&gt;Part 8: &lt;a href="http://blogs.msdn.com/ashleyf/archive/2010/01/22/fscheme-0-0-7-set-define-begin.aspx"&gt;Oh, The Humanity!&lt;/a&gt;&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Matthew Podwysocki’s Series - Creating Extended Builders &lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/01/18/much-ado-about-monads-creating-extended-builders.aspx"&gt;Part 1&lt;/a&gt;, &lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/01/21/much-ado-about-monads-creating-extended-builders-part-ii.aspx"&gt;Part 2&lt;/a&gt; and &lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/01/25/a-kick-in-the-monads-creating-extended-builders-part-iii.aspx"&gt;Part 3&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p align="left"&gt;&lt;em&gt;“But, what we lack is an imperative programming model on top to allow for such things as if statements, for and while loops, and try/catch or try/finally blocks.&amp;#160; Luckily, there is a programmatic model to follow to make these things possible inside of our expressions.&amp;#160; Let’s cover each of these functions in turn and see what each one does and in the process implement them for the Reader Monad.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/chrsmith/archive/2010/01/24/being-an-evil-genius-with-f-and-net.aspx"&gt;Chris Smith’s Being an Evil Genius with F# and .NET&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p align="left"&gt;&lt;em&gt;“Rather than doing the prototypical “Intro to F# Talk” I figured I go with something a bit more fun and relevant to the every day developer. Sure F# is neat and everything – but why bother to learn a new programming language unless you can use it to do something meaningful. Well, in addition excelling at both functional and object-oriented programming, F# is ideal for world domination.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://tomasp.net/blog/accelerator-quotations.aspx"&gt;Tomas Petricek’s Accelerator and F# (IV.): Composing computations with quotations&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“In this part of the series, we're going to look at working with quotations explicitly. We'll use meta-programming techniques to work with Accelerator. Meta-programming means writing programs that manipulate with other programs or pieces of code.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/visualizeparallel/archive/2010/01/19/tuning-a-parallel-ray-tracer-in-f.aspx"&gt;Luke Hoban’s Tuning a Parallel Ray Tracer in F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p align="left"&gt;&lt;em&gt;“One of the samples that is included with the Parallel Programming Samples for .NET 4 is a simple Ray Tracer.&amp;#160; This ray tracer provides a nice visual way of seeing the benefits of .NET 4 parallelism features, as well as giving insights into the way work stealing happens under the hood.” &lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Julien Ortin continues his series on Purely Functional Data Structures with a &lt;a href="http://lepensemoi.free.fr/index.php/2010/01/21/scheduled-binomial-heap"&gt;Scheduled binomial heap&lt;/a&gt;, &lt;a href="http://lepensemoi.free.fr/index.php/2010/01/21/scheduled-bottom-up-merge-sort"&gt;Scheduled bottom-up merge sort&lt;/a&gt; and a &lt;a href="http://lepensemoi.free.fr/index.php/2010/01/21/hood-melville-queue"&gt;Hood-Melville queue&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“This post describes the F# implementation of the &amp;lt;insert data structure here&amp;gt; from Chris Okasaki’s “Purely functional data structures”.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://lepensemoi.free.fr/index.php/2010/01/27/rate-meter-in-f"&gt;Julien Ortin’s Rate meter in F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“The following code allows us to measure (and keep track of) the exchange rate (whether upload or download), and the time needed to exchange n additional bytes (assuming the rate is stable).”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://lepensemoi.free.fr/index.php/2010/01/27/implementing-two-way-traffic-control-in-f-bucket-approach"&gt;Julien Ortin’s Two-way traffic control in F# – bucket approach&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“The following approach is based on a per-request basis. That is, an actors asks for n tokens to read (or write), and the manager sends it an answer when the actor is allowed perform the action. In effect, if the actor asks for 100 bytes and only 50 bytes can be exchanged per second, it will get a green light only after two seconds have elapsed.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;h3&gt;Stasyan continues his Red and Black tree Series with &lt;a href="http://stasyan.wordpress.com/2010/01/06/red-and-black-tree-in-f-insertion/"&gt;Insertion&lt;/a&gt;, &lt;a href="http://stasyan.wordpress.com/2010/01/20/red-and-black-tree-in-f-deletion/"&gt;Deletion&lt;/a&gt;, &lt;a href="http://stasyan.wordpress.com/2010/01/20/red-and-black-tree-in-f-extras/"&gt;Extras&lt;/a&gt; and a &lt;a href="http://stasyan.wordpress.com/2010/01/20/red-and-black-tree-in-f-post-mortem/"&gt;Post-Mortem&lt;/a&gt;. &lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“But it works nevertheless. I did some random testing of 10000 elements. Insertion and deletion worked. The cool thing is that the Black height of the tree with 10000 elements does not exceed 10.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://msmvps.com/blogs/gbarnett/archive/2010/01/17/book-review-f-for-technical-computing.aspx"&gt;Granville Barnett Review’s F# for Technical Computing&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“An F# book by Jon brings with it excitement and promise: his work is well known for being clear and concise, and the examples he uses to help the reader familiarise themselves with the application of F# are highly stimulating.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://sdtimes.com/link/34075"&gt;David Worthington’s WebSharper platform seeks to broaden F# use&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p align="left"&gt;&lt;em&gt;“Microsoft's F# language is best suited for financial and scientific applications, but a startup wants to broaden its usage to building mainstream Web applications.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.ademiller.com/blogs/tech/2010/01/implementing-a-parallelized-octree-in-f"&gt;Ade Miller’s Implementing a Parallelized Octree in F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“What’s an octree? An octree is a tree structure where each node has up to eight children, one for each of the octants. You can think of them as a three dimensional variation on a binary tree.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://www.intellifactory.com/blogs/diego.echeverri/2010/1/25/Data-Visualization-with-Websharper.article"&gt;Diego Echeverri’s Data Visualization with Websharper&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“In this post I'll show you how to make a nice visualization similar to the ones used by Hans Rosling. For this, we'll use the WebSharper Google Visualization bindings available as an extension package to the core platform.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/matt/archive/2010/01/19/regex-lexer-with-f.aspx"&gt;Matt Manela’s Regex based Lexer with F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“This lexer allows you to define your regular expression based rules in a very declarative way using F# computation expressions.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.trelford.com/blog/post/Sorted-with-F-custom-operators.aspx"&gt;Phillip Trelford’s Sorted with F# custom operators&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“F# lets you define your own operators, and like a man with a new hammer hunting for nails :) I’ve found an application of F# custom operators for sorting multiple columns.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://chrisrizzuto.wordpress.com/2010/01/21/http-requests-in-f-using-a-tcpclient/"&gt;Chris Rizzuto’s Http Requests in F# using a TCPClient&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Obviously a few ways to do this using WebClient, HttpRequests, but in this case I decided to use a TcpClient object as I liked the control, and the ability to easily access the textual outputs.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://chrisrizzuto.wordpress.com/2010/01/22/f-wcf-service-to-calculate-stddev-and-keep-real-time-kpis/"&gt;Chris Rizzuto’s F# WCF Service to calculate StdDev and Keep Real-Time KPIs&lt;/a&gt;, &lt;a href="http://chrisrizzuto.wordpress.com/2010/01/25/f-wcf-kpis_concurrentdictionary-first-class-events/"&gt;F#, WCF, KPIs, ConcurrentDictionary, First Class Events&lt;/a&gt; and &lt;a href="http://chrisrizzuto.wordpress.com/2010/01/28/message-queues-in-f-building-into-the-kpi-service-past-3-posts/"&gt;Message Queues in F# / Building into the KPI Service&lt;/a&gt; &lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“First, below is the functions and events to calculate StdDev.&amp;#160; Thanks again LukeH for doing all the work for this part.&amp;#160; I only made a small change by adding a new method for handling the event when it is raised, and to make Mean and StdDev accessible from a WCF web service so that if polled for the current values, it is able to return them to the user.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blog.ctaggart.com/2010/01/list-transactional-wcf-bindings-in-f.html"&gt;Cameron Taggart’s List Transactional WCF Bindings in F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“The code uses LINQ to print a list of WCF binding that have a default constructor and support transactions.&amp;#160; I think it actually is a whole lot more readable in F#”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blog.ctaggart.com/2009/12/hello-world-for-bing-maps-silverlight-f.html"&gt;Cameron Taggart’s Hello World for Bing Maps + Silverlight + F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“The Bing Maps Silverlight Control was released in November.&amp;#160; […]&amp;#160; I’ve committed code for this blog that shows you how to get started with it using an F# Silverlight application.&amp;#160; I did not need to write any C# or XAML.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.scottseely.com/Blog/10-01-13/F_is_Changing_My_Style.aspx"&gt;Scott Seely’s F# is Changing My Style&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“A few years ago, I would have done a bunch of looping constructs to look at each element. However, I’ve been doing a lot more work with F#. While doing this experiment in C# for a project, I wound up writing the following instead:”&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx&amp;amp;;subject=F%23+Discoveries+This+Week+01%2f29%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f29%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx&amp;amp;title=F%23+Discoveries+This+Week+01%2f29%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f29%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f29%2f2010&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/29/f-discoveries-this-week-01-29-2010.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20100" width="1" height="1"&gt;</description><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Accelerator/default.aspx">Accelerator</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/data+structures/default.aspx">data structures</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/F_2300_/default.aspx">F#</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/FScheme/default.aspx">FScheme</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fsharp/default.aspx">fsharp</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/GeekOfTheWeek/default.aspx">GeekOfTheWeek</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/lisp/default.aspx">lisp</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/quotations/default.aspx">quotations</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/regular+expressions/default.aspx">regular expressions</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/reviews/default.aspx">reviews</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/roundup/default.aspx">roundup</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/trees/default.aspx">trees</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/tuning/default.aspx">tuning</category></item><item><title>DelegatedImageSource</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx</link><pubDate>Thu, 28 Jan 2010 21:24:07 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20095</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;One common task in working with images is, given a file or a set of files, read in each page, perform some operation on it and write it as a page in a target file.&lt;/p&gt;  &lt;p&gt;This is tricky to do out of the box in dotImage in that a lot of the onus of memory management falls onto client code.&amp;#160; The client needs to know how to append images onto a possibly existing file in a way that won’t use up a ton of memory.&lt;/p&gt;  &lt;p&gt;Let me give you an example:&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;TiffDocument doc = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; TiffDocument();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; totalPages; i++) {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    AtalaImage page = GetSomePage(i);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    Watermark(page);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    doc.Pages.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; TiffPage(page, TiffCompression.Default));
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    page.Dispose();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;doc.Save(someOutputFile);&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;This is a chunk of code that is meant to loop through some set of pages, watermark each one, add it to a TiffDocument and then save it to a TIFF.&amp;#160; We’re being good in that we’re calling Dispose() on the AtalaImage to let it go.&amp;#160; The problem is that TiffPage allocates memory for the image (in most cases compressed) so if you’re working with a dozen pages or less, you’ll be fine, but if you work with hundreds, you will bring your machine to a crawl.&lt;/p&gt;

&lt;p&gt;In thinking about this, I decided that what we needed was a flavor of ImageSource and RandomAccessImageSource that could adapt an existing ImageSource and allow the user to inject code into the process.&lt;/p&gt;

&lt;p&gt;To do this, we’ll create a subclass of ImageSource that takes another ImageSource as an argument.&amp;#160; It will let the provided ImageSource do all the heavy lifting, allowing code injection at the appropriate time:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Atalasoft.Imaging;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; DelegatedImageSource
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; DelegatedImageSource : ImageSource
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        Func&amp;lt;AtalaImage, AtalaImage&amp;gt; _imageProc;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        ImageSource _source;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; DelegatedImageSource(ImageSource source, Func&amp;lt;AtalaImage, AtalaImage&amp;gt; imageProc)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (source == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ArgumentNullException(&amp;quot;&lt;span style="color:#8b0000;"&gt;source&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (imageProc == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ArgumentNullException(&amp;quot;&lt;span style="color:#8b0000;"&gt;imageProc&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _imageProc = imageProc;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source = source;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; ImageSourceNode LowLevelAcquireNextImage()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            AtalaImage image = _source.AcquireNext();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            AtalaImage processed = _imageProc(image);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            processed = processed ?? image;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (processed == image)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                processed = (AtalaImage)image.Clone();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Release(image);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ImageSourceNode(processed, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; LowLevelDispose()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Dispose();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; LowLevelFlushOnReset()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; LowLevelHasMoreImages()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _source.HasMoreImages();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; LowLevelReset()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Reset();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; LowLevelSkipNextImage()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Release(_source.AcquireNext());
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; LowLevelTotalImages()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _source.TotalImages;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; LowLevelTotalImagesKnown()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _source.TotalImagesKnown;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;The main meat of the code is in LowLevelAcquireNextImage, which calls AcquireNext on the provided source, then hands the resulting AtalaImage off to the delegate.&amp;#160; If the delegate returns null or the original image, we return a clone, otherwise we return the image created by user code.&lt;/p&gt;

&lt;p&gt;Here is an example snippet which combines a set of images into a single TIFF:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;FileSystemImageSource source = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; FileSystemImageSource(@&amp;quot;&lt;span style="color:#8b0000;"&gt;\Images\Documents&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="color:#8b0000;"&gt;*&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;DelegatedImageSource dis = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; DelegatedImageSource(source,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            (image) =&amp;gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;; });
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;TiffEncoder encoder = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; TiffEncoder();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (FileStream fs = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; FileStream(&amp;quot;&lt;span style="color:#8b0000;"&gt;output.tif&lt;/span&gt;&amp;quot;, FileMode.Create))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    encoder.Save(fs, dis, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;which is a sweet little chunk of code to combine image files into one TIFF.&amp;#160; Further, there won’t be the same memory issue as with our naive example because ImageSource handles resource management for you via the Acquire/Release model.&amp;#160; You might ask, “so why do need the TiffDocument class when I can do all the work like this?”&amp;#160; The answer is that when an AtalaImage is created from a TIFF document, the metadata associated with the page (EXIF, etc) is shed.&amp;#160; TiffDocument maintains that information.&lt;/p&gt;

&lt;p&gt;Now let’s change our task to be “mark each page with a red X and save as a PDF”.&amp;#160; The code doesn’t change much:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;DelegatedImageSource dis = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; DelegatedImageSource(source, (image) =&amp;gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    AtalaImage rgb = &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (image.PixelFormat == PixelFormat.Pixel24bppBgr || image.PixelFormat == PixelFormat.Pixel32bppBgr ||
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        image.PixelFormat == PixelFormat.Pixel32bppBgra)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        rgb = image;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        rgb = image.GetChangedPixelFormat(PixelFormat.Pixel24bppBgr);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (Graphics g = rgb.GetGraphics())
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (Pen p = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Pen(Color.Red, 25))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            g.DrawLine(p, 0, 0, rgb.Width, rgb.Height);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            g.DrawLine(p, 0, rgb.Height, rgb.Width, 0);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; rgb;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;});
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;PdfEncoder encoder = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; PdfEncoder();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (FileStream fs = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; FileStream(&amp;quot;&lt;span style="color:#8b0000;"&gt;output.pdf&lt;/span&gt;&amp;quot;, FileMode.Create))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    encoder.Save(fs, dis, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Note that the save code is identical.&amp;#160; This is because both PdfEncoder and TiffEncoder are MultiFramedEncoder objects which can take an ImageSource in one flavor of Save().&lt;/p&gt;

&lt;p&gt;Let’s say that you want instead to overlay a watermark onto each image – the code, again, doesn’t change much:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;AtalaImage watermark = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; AtalaImage(@&amp;quot;&lt;span style="color:#8b0000;"&gt;C:\Users\shawley\Pictures\bunny.png&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;OverlayCommand overlay = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; OverlayCommand(watermark, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Point(20, 20));
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;overlay.Opacity = 0.50;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;overlay.ApplyToAnyPixelFormat = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;DelegatedImageSource dis = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; DelegatedImageSource(source, (image) =&amp;gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; overlay.Apply(image).Image;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;});
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;TiffEncoder encoder = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; TiffEncoder();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (FileStream fs = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; FileStream(&amp;quot;&lt;span style="color:#8b0000;"&gt;output.tif&lt;/span&gt;&amp;quot;, FileMode.Create))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    encoder.Save(fs, dis, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;In this case, I’m using the captured variable, overlay, to write onto the image, turning the actual watermarking code into a one-liner.&lt;/p&gt;

&lt;p&gt;And here, finally, is the same code modified to work specifically for RandomAccessImageSource:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Linq;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Text;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Atalasoft.Imaging;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; DelegatedImageSource
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; DelegatedRandomAccessImageSource : RandomAccessImageSource
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        Func&amp;lt;AtalaImage, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;, AtalaImage&amp;gt; _imageProc;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        RandomAccessImageSource _source;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; DelegatedRandomAccessImageSource(RandomAccessImageSource source, Func&amp;lt;AtalaImage, &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;, AtalaImage&amp;gt; imageProc)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (source == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ArgumentNullException(&amp;quot;&lt;span style="color:#8b0000;"&gt;source&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (imageProc == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ArgumentNullException(&amp;quot;&lt;span style="color:#8b0000;"&gt;imageProc&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _imageProc = imageProc;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source = source;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; ImageSourceNode LowLevelAcquire(&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; index)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            AtalaImage image = _source[index];
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            AtalaImage processed = _imageProc(image, index);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            processed = processed ?? image;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (processed == image)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                processed = (AtalaImage)image.Clone();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Release(image);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ImageSourceNode(image, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; ImageSourceNode LowLevelAcquireNextImage()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            AtalaImage image = _source.AcquireNext();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            AtalaImage processed = _imageProc(image, -1);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            processed = processed ?? image;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (processed == image)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                processed = (AtalaImage)image.Clone();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Release(image);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ImageSourceNode(processed, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; LowLevelDispose()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Dispose();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; LowLevelFlushOnReset()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; LowLevelHasMoreImages()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _source.HasMoreImages();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; LowLevelReset()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Reset();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; LowLevelSkipNextImage()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            _source.Release(_source.AcquireNext());
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; LowLevelTotalImages()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _source.TotalImages;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;So we see that by using delegates in tandem with ImageSource objects, we can make repetitive tasks much easier and remove a lot of issues in resource management at the same time.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx&amp;amp;;subject=DelegatedImageSource" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx&amp;amp;;title=DelegatedImageSource" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx&amp;amp;title=DelegatedImageSource" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx&amp;amp;;title=DelegatedImageSource" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx&amp;amp;;title=DelegatedImageSource&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/28/delegatedimagesource.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20095" width="1" height="1"&gt;</description></item><item><title>Speaking at The Architect Factory Event</title><link>http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx</link><pubDate>Mon, 25 Jan 2010 21:11:24 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20083</guid><dc:creator>loufranco</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;On Wednesday, I’ll be leading a session at &lt;a href="http://thearchitectfactory.eventbrite.com/"&gt;The Architect Factory event&lt;/a&gt; in Cambridge, MA. My topic is &lt;em&gt;Persuading Product/Project Managers&lt;/em&gt; and is in the Architecture Leadership track.&lt;/p&gt;  &lt;p&gt;I’ll be covering:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;What is a Product Manager?&lt;/li&gt;    &lt;li&gt;How Product Managers think&lt;/li&gt;    &lt;li&gt;How technical should Product Managers be?&lt;/li&gt;    &lt;li&gt;What motivates Product Managers&lt;/li&gt;    &lt;li&gt;How Architects and Product Managers work together&lt;/li&gt;    &lt;li&gt;How to describe technical concepts to non-technical managers&lt;/li&gt;    &lt;li&gt;How to communicate estimates&lt;/li&gt;    &lt;li&gt;How to communicate design choices&lt;/li&gt;    &lt;li&gt;How to describe implementation details like unit testing, refactoring, and infrastructure&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;More than a third of the time will be devoted to discussion.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx&amp;amp;;subject=Speaking+at+The+Architect+Factory+Event" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx&amp;amp;;title=Speaking+at+The+Architect+Factory+Event" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx&amp;amp;title=Speaking+at+The+Architect+Factory+Event" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx&amp;amp;;title=Speaking+at+The+Architect+Factory+Event" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx&amp;amp;;title=Speaking+at+The+Architect+Factory+Event&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/25/speaking-at-the-architect-factory-event.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20083" width="1" height="1"&gt;</description></item><item><title>Vignettes in DotImage</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx</link><pubDate>Fri, 15 Jan 2010 18:38:35 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20047</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;On &lt;a href="http://www.stackoverflow.com"&gt;Stack Overflow&lt;/a&gt;, a user asked how to create vignettes in .NET.&amp;#160; I wrote up &lt;a href="http://stackoverflow.com/questions/2065199/vignetting-image-effect-algorithm-with-net/2065708#2065708"&gt;this answer&lt;/a&gt;, which explains the math and the general approach.&lt;/p&gt;  &lt;p&gt;To give you an idea of what this looks like, here is the output of an application which applies the vignette to an image.&amp;#160; This is different from the Stack Overflow answer in that I chose to do this in an ImageRegionCommand from within dotImage.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.atalasoft.com/cs/blogs/stevehawley/image_16BE99CC.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://www.atalasoft.com/cs/blogs/stevehawley/image_thumb_253995F1.png" width="369" height="557" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To do this, I created a new class called VignetteCommand, overrode four members and added one utility method.&amp;#160; This command works on 24 bit RGB, 32 bit RGB, and 32 bit RGBA which a limitation imposed by GDI+.&amp;#160; Since this command works by painting on top of an existing image, InPlaceProcessing will be overridden to return true always.&amp;#160; In theory, we could do without, but we’d just be copying the existing image onto the new image, then painting.&amp;#160; We override VerifyProperties to make sure that any user set properties are right. Finally, we override PerformActualCommand to do the actual work.&amp;#160; All the rest of the infrastructure is handled by dotImage.&lt;/p&gt;  &lt;p&gt;Here is the code:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Atalasoft.Imaging;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Atalasoft.Imaging.ImageProcessing;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Drawing;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Drawing.Drawing2D;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; Vignette1
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; VignetteCommand : ImageRegionCommand
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; PixelFormat[] _supportedPixelFormats = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; PixelFormat[] {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            PixelFormat.Pixel24bppBgr, PixelFormat.Pixel32bppBgr, PixelFormat.Pixel32bppBgra
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        };
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; PixelFormat[] SupportedPixelFormats { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; _supportedPixelFormats; } }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; InPlaceProcessing { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;; } }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; VerifyProperties(AtalaImage image)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (Positions == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; Factors == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (Positions == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; || Factors == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ArgumentException(Positions == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; ? &amp;quot;&lt;span style="color:#8b0000;"&gt;Positions&lt;/span&gt;&amp;quot; : &amp;quot;&lt;span style="color:#8b0000;"&gt;Factors&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (Positions.Length != Factors.Length)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ArgumentException(&amp;quot;&lt;span style="color:#8b0000;"&gt;position and length arrays must be the same length&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="color:#8b0000;"&gt;Positions&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; AtalaImage PerformActualCommand(AtalaImage source, AtalaImage dest, System.Drawing.Rectangle imageArea, &lt;span style="color:#0000ff;"&gt;ref&lt;/span&gt; ImageResults results)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (Graphics g = source.GetGraphics())
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                PaintVignette(g, imageArea);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; PaintVignette(Graphics g, Rectangle bounds)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            Rectangle ellipsebounds = bounds;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            ellipsebounds.Offset(-ellipsebounds.X, -ellipsebounds.Y);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; x = ellipsebounds.Width - (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;)Math.Round(.70712 * ellipsebounds.Width);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; y = ellipsebounds.Height - (&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;)Math.Round(.70712 * ellipsebounds.Height);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            ellipsebounds.Inflate(x, y);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (GraphicsPath path = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; GraphicsPath())
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                path.AddEllipse(ellipsebounds);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (PathGradientBrush brush = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; PathGradientBrush(path))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    brush.WrapMode = WrapMode.Tile;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    brush.CenterColor = Color.FromArgb(0, 0, 0, 0);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    brush.SurroundColors = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Color[] { Color.FromArgb(255, 0, 0, 0) };
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    Blend blend = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Blend();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    &lt;span style="color:#0000ff;"&gt;float&lt;/span&gt;[] positions = Positions;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    &lt;span style="color:#0000ff;"&gt;float&lt;/span&gt;[] factors = Factors;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (positions == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; || factors == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                        positions = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;float&lt;/span&gt;[] { 0.0f, 0.2f, 0.4f, 0.6f, 0.8f, 1.0F };
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                        factors = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;float&lt;/span&gt;[] { 0.0f, 0.25f, 0.5f, 0.75f, 1.0f, 1.0f };
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    blend.Positions = positions;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    blend.Factors = factors;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    brush.Blend = blend;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    Region oldClip = g.Clip;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    g.Clip = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Region(bounds);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    g.FillRectangle(brush, ellipsebounds);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                    g.Clip = oldClip;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;                }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;float&lt;/span&gt;[] Positions { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;float&lt;/span&gt;[] Factors { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx&amp;amp;;subject=Vignettes+in+DotImage" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx&amp;amp;;title=Vignettes+in+DotImage" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx&amp;amp;title=Vignettes+in+DotImage" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx&amp;amp;;title=Vignettes+in+DotImage" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx&amp;amp;;title=Vignettes+in+DotImage&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/01/15/vignettes-in-dotimage.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20047" width="1" height="1"&gt;</description></item><item><title>F# Discoveries This Week 01/13/2010</title><link>http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx</link><pubDate>Wed, 13 Jan 2010 16:59:05 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20033</guid><dc:creator>RickM</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Back again this week with a fresh batch of F# Posts, Videos and Events.&amp;#160; I’ve been enjoying Matthew Podwysocki’s “Much Ado About Monads” series quite a lot.&amp;#160; They are well worth checking out for beginner and advanced alike. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1 align="center"&gt;Events&lt;/h1&gt;  &lt;p align="left"&gt;If you would like to see your event here, send me an email via the link at the top of the page.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Rick Minerich&lt;/strong&gt; - &lt;a href="http://www.technologyusersgroup.org/2010/01/13/next-meeting-january-27-2009/"&gt;Charleston SC Technology Users Group&lt;/a&gt; on the 27th of January (check out the &lt;a href="http://www.technologyusersgroup.org/wp-content/uploads/2009/10/flyer.jpg"&gt;awesome flier&lt;/a&gt;)&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Steffen Forkmann&lt;/strong&gt; - &lt;a href="http://www.navision-blog.de/2010/01/11/terminverschiebung-des-f-vortrages-in-bad-homburg/"&gt;Frankfurt .NET Usergroup&lt;/a&gt; on the 21st of January&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1 align="center"&gt;Posts&lt;/h1&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/dsyme/archive/2010/01/09/async-and-parallel-design-patterns-in-f-parallelizing-cpu-and-i-o-computations.aspx"&gt;Don Syme’s Async and Parallel Design Patterns in F#: Parallelizing CPU and I/O Computations&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;One simple way to write parallel and reactive programs is with F# async expressions. In this and future posts, I will cover some of the basic ways in which you can use F# async programming - roughly speaking, these are design patterns enabled by F# async programming.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/dsyme/archive/2010/01/08/f-interactive-tips-and-tricks-visualizing-data-in-a-grid.aspx"&gt;Don Syme’s F# Interactive Tips and Tricks: Visualizing Data in a Grid&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The demos in my F# talks use a number of coding snippets to acquire, generate and display data interactively. Some of these little snippets are not so well known, but they are useful :-)&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/dsyme/archive/2010/01/08/some-tips-and-tricks-for-formatting-data-in-f-interactive-and-a-in-sprintf-printf-fprintf.aspx"&gt;Don Syme’s F# Interactive Tips and Tricks: Formatting Data using AddPrinter, AddPrintTransformer and %A in sprintf/printf/fprintf&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Here are some tips and tricks for formatting data in F# Interactive. This is not meant to be a comprehensive guide, just enough to get you started. Please let me know if you need more examples.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://weblogs.asp.net/podwysocki/archive/2010/01/07/much-ado-about-monads-reader-edition.aspx"&gt;Matthew Podwysocki’s Much Ado About Monads – Reader Edition&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;So, our ultimate goal would be instead to have our environment set once and then read from it implicitly.&amp;#160; We still want to keep what we have here in terms of our script, but change the underlying mechanism for how it happens.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://skillsmatter.com/podcast/open-source-dot-net/f-and-units-of-measure-for-technical-computing"&gt;Anton Schwaighofer’s SkillsMatter.com talk: F# and Units-of-measure for Technical Computing&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I will start by giving an introduction to units-of-measure and their implementation in F#. I'll work through smaller and larger code examples that make use of units-of-measure.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1649"&gt;Nancy Strickland’s MSDev.com Training Session on F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Visual Studio 2010 includes a new programming language, F#. This session explains and provides a walk-through demonstration of basic programming in F#.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h5&gt;Julien Ortin continues his series on Purely Functional Data Structures with a &lt;a href="http://lepensemoi.free.fr/index.php/2010/01/07/lazy-pairing-heap"&gt;Lazy Pairing Heap&lt;/a&gt;, a &lt;a href="http://lepensemoi.free.fr/index.php/2010/01/07/real-time-queue"&gt;Real-time Queue&lt;/a&gt; and &lt;a href="http://lepensemoi.free.fr/index.php/2010/01/07/bottom-up-merge-sort"&gt;Bottom-up Merge Sort&lt;/a&gt;&lt;/h5&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;This post describes the F# implementation of the &amp;lt;insert data structure here&amp;gt; from Chris Okasaki’s “Purely functional data structures”.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://bugsquash.blogspot.com/2010/01/translating-haskell-to-f-and-other.html"&gt;Mauricio Scheffer’s Translating Haskell to F# and other considerations&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;BUT, syntactic similarity does not imply that they're semantically the same. There's a fundamental difference from the original code: Haskell is a lazy language, while F#, coming from the ML-family, does eager evaluation.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.markhneedham.com/blog/2010/01/12/f-refactoring-to-pattern-matching/"&gt;Mark Needham’s F#: Refactoring to pattern matching&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I was looking through some of the F# code I've written recently and I realised that I was very much writing C# in F# with respect to the number of if statements I've been using.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.markhneedham.com/blog/2010/01/10/roy-osheroves-tdd-kata-an-f-attempt/"&gt;Mark Needham’s F# attempt at Roy Osherove’s TDD Kata&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;As I've mentioned in a few of my recent posts I've been having &lt;/em&gt;&lt;em&gt;another go&lt;/em&gt;&lt;em&gt; at Roy Osherove's TDD Kata but this time in F#.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://fsharpcode.blogspot.com/2010/01/weak-subscribe-to-iobservable-source.html"&gt;Holoed’s Weak Subscribe to an IObservable Source&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;A code snippet describing how to subscribe to an event via a weak reference.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://codecube.net/2010/01/resource-pool-in-f/"&gt;Erik Schulz’s Resource Pool in F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I’ve been toying around with F# recently, it’s good to see an example that you can easily compare and contrast with the C# version.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.ademiller.com/blogs/tech/2010/01/gotchas-common-traps-for-the-f-n00b"&gt;Ade Miller’s Gotchas: Common Traps for the F# n00b&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I spent a bunch of time over the holidays getting to know F# a bit better. I think I now consider myself to be truly dangerous with it.&amp;#160; A couple of things which repeatedly bit me as I stumbled through learning F# as a n00b.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx&amp;amp;;subject=F%23+Discoveries+This+Week+01%2f13%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f13%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx&amp;amp;title=F%23+Discoveries+This+Week+01%2f13%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f13%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f13%2f2010&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/13/f-discoveries-this-week-01-13-2010.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20033" width="1" height="1"&gt;</description><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/data+structures/default.aspx">data structures</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/DataGrid/default.aspx">DataGrid</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Design+Patterns/default.aspx">Design Patterns</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/F_2300_/default.aspx">F#</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/formatting/default.aspx">formatting</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fsharp/default.aspx">fsharp</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/haskell/default.aspx">haskell</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/IObservable/default.aspx">IObservable</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/monads/default.aspx">monads</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/parallelism/default.aspx">parallelism</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/reader/default.aspx">reader</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/roundup/default.aspx">roundup</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/units+of+measure/default.aspx">units of measure</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/WeakReference/default.aspx">WeakReference</category></item><item><title>SharePoint Document Management Checklist: Get Things Done</title><link>http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx</link><pubDate>Sat, 09 Jan 2010 15:56:21 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20014</guid><dc:creator>loufranco</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Windows IT Pro published a &lt;a href="http://windowsitpro.com/article/articleid/102661/buyers-guide-sharepoint-document-management-tools.html"&gt;checklist for SharePoint Document Management&lt;/a&gt;. It covers some of the things you need to think about in addition to just adopting SharePoint (storage, interoperability, backup, security, etc)&lt;/p&gt;  &lt;p&gt;Those things are important, but instead of concentrating on the infrastructure mechanics of document management, it’s better to talk about the purpose. If you are sitting in front of your computer looking at SharePoint and thinking about folders, Documentum integration, your SAN, and backup procedures, then something has gone completely wrong.&lt;/p&gt;  &lt;p&gt;The reason to use any tool is to get stuff done – pay invoices, process claims, answer inquiries. The more you can get SharePoint and &lt;a href="http://vizitsp.com"&gt;whatever you add to it&lt;/a&gt; to put your work in front of you and help you do it, the more you will get out of it.&lt;/p&gt;  &lt;p&gt;Here’s my checklist of what to look for in Document Management that will help you get work done.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Are all the things you need to process a document organized and easy to get to while viewing it (Annotations, meta-data, document editing)?     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Are related documents readily accessible?     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Can you compare two documents easily? For example, the purchase order and the related invoice or two versions of your newsletter.     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Is search integrated so that I don’t need to leave my management window to bring up another document?     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Can I correct a badly scanned page with an ad-hoc page rescan right from my viewer?&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Of course everything needs to be backed up, versioned correctly, integrated, etc. But if that’s all you get, then you won’t get the full benefit. In the end, the ROI will be driven by the business getting it’s work done, so don’t stop at just the infrastructure requirements.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx&amp;amp;;subject=SharePoint+Document+Management+Checklist%3a+Get+Things+Done" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx&amp;amp;;title=SharePoint+Document+Management+Checklist%3a+Get+Things+Done" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx&amp;amp;title=SharePoint+Document+Management+Checklist%3a+Get+Things+Done" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx&amp;amp;;title=SharePoint+Document+Management+Checklist%3a+Get+Things+Done" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx&amp;amp;;title=SharePoint+Document+Management+Checklist%3a+Get+Things+Done&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2010/01/09/sharepoint-document-management-checklist-get-things-done.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20014" width="1" height="1"&gt;</description><category domain="http://www.atalasoft.com/cs/blogs/loufranco/archive/tags/document+management/default.aspx">document management</category><category domain="http://www.atalasoft.com/cs/blogs/loufranco/archive/tags/sharepoint/default.aspx">sharepoint</category></item><item><title>F# Discoveries This Week 01/05/2010</title><link>http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx</link><pubDate>Tue, 05 Jan 2010 21:10:05 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:20002</guid><dc:creator>RickM</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;It’s 2010, the year of F#, and the quantity of posts in this last week reflects it.&amp;#160; Not to pick favorites but the work Tomas Petricek has been doing with Accelerator is amazing, be sure to check it out.&lt;/p&gt;  &lt;p&gt;Also, I’d like to thank everyone who supported me on the road to becoming a Microsoft MVP.&amp;#160; I couldn’t have done it without you.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://tomasp.net/blog/accelerator-dataparallel.aspx"&gt;Tomas Petricek parallelizes Quotations with Accelerator&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In this article, we'll look at more sophisticated way of using Accelerator from F#. We'll introduce F# quotations and look at translating 'normal' F# code to use Accelerator.&lt;/em&gt;&lt;em&gt;&lt;em&gt;&lt;/em&gt;&lt;/em&gt; &lt;/p&gt;    &lt;p&gt;&lt;em&gt;&lt;em&gt;&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/dsyme/archive/2010/01/04/beta2-updates-to-the-f-jaoo-tutorial-code.aspx"&gt;Don Syme Posts updates his F# JAOO tutorial code&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I've now updated this tutorial code for the F# Visual Studio 2010 Beta2 release (with matching CTP release for Visual Studio 2008). We've also added some more content and explanatory comments.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://weblogs.asp.net/podwysocki/archive/2009/12/30/much-ado-about-monads-state-edition.aspx"&gt;Matthew Podwysocki investigates the State Monad&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In the past, I’ve had a series on Much Ado About Monads where I look at the basic Monads such as Maybe and List, but this time, let’s look at what we can do with the State Monad.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://web.conf.hu/sites/default/files/HWC-2009-ClientBasedWebApplicationDevelopmentInFSharp.pdf"&gt;Adam Granicz shows off WebSharper at the Hungarian Web Conference&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In this talk, I will present our new web development platform, WebSharper(TM), that leverages the power and expressiveness of F# to allow .NET developers to write robust web applications in mere hours.&lt;/em&gt; &lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;&lt;a href="http://refcardz.dzone.com/refcardz/essential-f?oid=hom16267"&gt;Chance Coble and Ted Neward release DZone Refcardz for F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;This DZone Refcard will lead you through the basic essentials so that you can quickly move on to using this Functional Programming Language for creating some mind-bending code.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://talbottc.spaces.live.com/Blog/cns!A6E0DA836D488CA6!422.entry"&gt;Talbott Crowell posts his FSUG Parallel Programming Talk &lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In this video, I discuss some of the advantages of .NET 4 and F# for asynchronous programming plus some of the new analysis tools built into Visual Studio 2010 for visualizing concurrency.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://bitbucket.org/forki/fake/wiki/Home"&gt;Steffen Forkmann creates a ‘FAKE – F# Make’ group on BitBucket and releases version 0.17&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Due to its integration in F#, all benets of the .NET Framework and functional programming can be used, including the extensive class library, powerful debuggers and integrated development environments like Visual Studio 2008 or SharpDevelop, which provide syntax highlighting and code completion.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Julien Ortin continues his series on Purely Functional Data Structures with a &lt;a href="http://lepensemoi.free.fr/index.php/2009/12/31/physicist-queue"&gt;Physicist Queue&lt;/a&gt;, a &lt;a href="http://lepensemoi.free.fr/index.php/2009/12/31/lazy-binomial-heap"&gt;Lazy Binomal Heap&lt;/a&gt; and a &lt;a href="http://lepensemoi.free.fr/index.php/2009/12/31/bankers-queue"&gt;Bankers Queue&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;This post describes the F# implementation of the &amp;lt;insert data structure here&amp;gt; from Chris Okasaki’s “Purely functional data structures”.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://stackoverflow.com/questions/1989487/f-development-and-unit-testing"&gt;Mathias Brandewinder StackOverflows on Unit Testing with F#&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;So far, my process with F# has been to write some functions, play with them with the interactive console until I am &amp;quot;reasonably&amp;quot; sure they work, and tweak &amp;amp; combine. This works well on small-scale problems like the Euler Project, but I can't imagine building something large that way.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://muckandbrass.com/web/display/~cemerick/2009/12/30/All+my+methods+take+316+arguments%2C+and+I+like+it+that+way"&gt;Chas Emerick demonstrates the problem with mutable objects&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;316 arguments to a method (which I don't think is actually possible in the jvm, but bear with me)? &amp;quot;That's absurd!&amp;quot;, you'd say. The problem, of course, is that the 3-arg doSomething actually has far more arguments than its signature implies:&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://stasyan.wordpress.com/2009/12/31/red-and-black-tree-in-f/"&gt;A Mysterious Stranger implements a Red-Black Tree&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Both 2-4 and Red and Black tress are self balancing trees. They are kind of like cousins, since one could be converted into the other quite easily. Hence all performance analysis that apply to 2-4 trees applies to Red and Black trees.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.markhneedham.com/blog/2010/01/04/f-expressing-intent-and-the-forwardapplication-operators/"&gt;Mark Needham discusses expressing intent with application operators&lt;/a&gt;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;While trying out Roy Osherove's TDD Kata I realised that perhaps the choice of which of these to use or whether to use them at all depends on what intent we're expressing.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx&amp;amp;;subject=F%23+Discoveries+This+Week+01%2f05%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f05%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx&amp;amp;title=F%23+Discoveries+This+Week+01%2f05%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f05%2f2010" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx&amp;amp;;title=F%23+Discoveries+This+Week+01%2f05%2f2010&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/rickm/archive/2010/01/05/f-discoveries-this-week-1-05-2010.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=20002" width="1" height="1"&gt;</description><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Accelerator/default.aspx">Accelerator</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/data+structures/default.aspx">data structures</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/F_2300_/default.aspx">F#</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fake/default.aspx">fake</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fsharp/default.aspx">fsharp</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/fsug/default.aspx">fsug</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/JAOO/default.aspx">JAOO</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/monad/default.aspx">monad</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/opinion/default.aspx">opinion</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/quotations/default.aspx">quotations</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/Refcardz/default.aspx">Refcardz</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/roundup/default.aspx">roundup</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/state/default.aspx">state</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/tutorial/default.aspx">tutorial</category><category domain="http://www.atalasoft.com/cs/blogs/rickm/archive/tags/WebSharper/default.aspx">WebSharper</category></item><item><title>12 Pink Highlighters</title><link>http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx</link><pubDate>Wed, 30 Dec 2009 21:48:00 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:19984</guid><dc:creator>christina</dc:creator><slash:comments>1</slash:comments><description>&lt;h2&gt;(Alternate Title: An Obvious Lesson in Customer Service.)&lt;/h2&gt; &lt;p&gt;We use W.B. Mason for our office supply company. My predecessor used them here and there, and I started using them more regularly when price shopping at B.J.’s and CostCo became a pain.&lt;/p&gt; &lt;p&gt;They matched prices, and give us great deals on K-Cups for coffee (an engineer’s life blood). Plus they have great prices on recycled products (like biodegradable plastic cups! Corn Cups—the official beverage container of Atalasoft.)&lt;/p&gt; &lt;p&gt;Amidst the coffee shipment today, I ordered an Air Wick air freshener system and 2 refills. I received 1 refill and a box of 12 pink highlighters. &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.atalasoft.com/cs/blogs/office/P1050221_41F90806.jpg"&gt;&lt;img src="http://www.atalasoft.com/cs/blogs/office/P1050221_thumb_5612248F.jpg" style="border:0px none;display:block;float:none;margin-left:auto;margin-right:auto;" title="P1050221" alt="P1050221" width="139" border="0" height="244"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;This hasn’t really happened before, but I can understand how—the boxes are hand packaged. Human error. No big deal.&lt;/p&gt; &lt;p&gt;And for some reason, I found a box of 12 pink highlighters to be hilarious. What’s wrong with green and yellow? A variety pack can really spice up your document annotation, you know? (I like to think I know a little something about document annotation, too.)&lt;/p&gt; &lt;p&gt;So, as I do when certain things strike me as funny, I tweeted about it.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.atalasoft.com/cs/blogs/office/12pinkhighlighters_393C4DB0.png"&gt;&lt;img src="http://www.atalasoft.com/cs/blogs/office/12pinkhighlighters_thumb_587EF483.png" style="border:0px none;display:block;float:none;margin-left:auto;margin-right:auto;" title="12 pink highlighters" alt="12 pink highlighters" width="314" border="0" height="158"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;And, shortly after, I mean, WITHIN MINUTES, I received a voice message from my W.B. Mason rep. I called him back, he apologized for the error, and shipped out the missing Air Wick refill. Even though I had an inkling, I asked him how he knew. “Oh,” he replied, “My marketing department forwarded me your Twitter message.” &lt;/p&gt; &lt;p&gt;Man. Twitter is powerful stuff.&lt;/p&gt; &lt;p&gt;I assured him that we are happy with their business and thanked him for the speedy response.&lt;/p&gt; &lt;p&gt;The bonus of all of this? He’s letting us keep the 12 pink highlighters. &lt;/p&gt; &lt;p&gt;Now, faithful readers—my challenge to you—what would you do with 12 pink highlighters?&lt;/p&gt; &lt;p&gt;Leave a comment here or drop us a line on twitter (we’re &lt;a href="http://twitter.com/atalasoft" target="_blank"&gt;@Atalasoft&lt;/a&gt;. Use the tag &lt;a href="http://twitter.com/#search?q=%2312PH" target="_blank"&gt;#12PH&lt;/a&gt;). &lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx&amp;amp;;subject=12+Pink+Highlighters" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx&amp;amp;;title=12+Pink+Highlighters" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx&amp;amp;title=12+Pink+Highlighters" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx&amp;amp;;title=12+Pink+Highlighters" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx&amp;amp;;title=12+Pink+Highlighters&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/office/archive/2009/12/30/12-pink-highlighters.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=19984" width="1" height="1"&gt;</description></item><item><title>The Elements of Programming Style</title><link>http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx</link><pubDate>Wed, 30 Dec 2009 17:01:29 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:19977</guid><dc:creator>Steve Hawley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Many years ago, I had the pleasure of working at Murray Hill Bell Labs.&amp;#160; My job, of all things, was making violins, but that’s a story for another time.&amp;#160; My office was in section D of the 5th floor of building 2, which was also where the UNIX room was.&amp;#160; I learned a lot from looking at the code written by the creators of C and UNIX.&lt;/p&gt;  &lt;p&gt;It is terrific to watch &lt;a href="http://video.ias.edu/stream&amp;amp;ref=270"&gt;Brian Kernighan giving this talk&lt;/a&gt; about clarity in code.&amp;#160; A lot of what he shows as bad examples are grist for the mill of the &lt;a href="http://thedailywtf.com/"&gt;Daily WTF&lt;/a&gt; and such sites.&amp;#160; And while I don’t always meet all of the goals of clarity (who does?), I do try to write things so that they can be read.&lt;/p&gt;  &lt;p&gt;That’s one of the reasons why I was so pleased when Rick showed me his &lt;a href="http://www.atalasoft.com/cs/blogs/rickm/archive/2009/12/28/steepest-ascent-hill-climbing-in-c-and-f.aspx"&gt;hill climbing code&lt;/a&gt; before he wrote his blog article: it’s beautiful code.&amp;#160; It reads like a textbook algorithm.&amp;#160; Nice job, Rick.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx&amp;amp;;subject=The+Elements+of+Programming+Style" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx&amp;amp;;title=The+Elements+of+Programming+Style" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx&amp;amp;title=The+Elements+of+Programming+Style" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx&amp;amp;;title=The+Elements+of+Programming+Style" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx&amp;amp;;title=The+Elements+of+Programming+Style&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/12/30/the-elements-of-programming-style.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=19977" width="1" height="1"&gt;</description></item><item><title>Atalasoft 2009 Blog Retrospective</title><link>http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx</link><pubDate>Wed, 30 Dec 2009 14:01:27 GMT</pubDate><guid isPermaLink="false">647108ca-f046-4d8d-9feb-a7fbd2049b37:19962</guid><dc:creator>loufranco</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Last year, around this time, I did a &lt;a href="http://www.atalasoft.com/cs/blogs/loufranco/archive/2008/12/29/atalasoft-blogs-a-year-end-retrospective.aspx"&gt;2008 retrospective&lt;/a&gt; with one blog post from each of the blogs hosted by Atalasoft. Here is my 2009 version.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Atalasoft Office Blog&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This year, Christina (our Vizit Marketing Manager among other things) started an office blog to let our customers, partners, etc get to know us a little better. No post does that better than the &lt;a href="http://www.atalasoft.com/cs/blogs/office/archive/2009/10/27/swine-flu-HA-bacon-fever.aspx"&gt;chronicle of Bacon Day&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The 3 of us sat around my desk and thought, &amp;quot;What is something FUN we can do for the handful of staff members in the office? Something that will make the rest of those guys, enjoying the night life in Philadelphia, CRINGE with JEALOUSY?&amp;quot;&lt;/p&gt;    &lt;p&gt;Steve's answer to everything is &amp;quot;bacon.&amp;quot; And in this case, he was 100% spot on.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I’m not sure how you name something “Bacon Day” when you do it three times in a year.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Rick Minerich’s Development Wonderland&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Rick has been speaking more and more about F#, and his blog has become a popular destination for the community. In June, he wrote &lt;a href="http://www.atalasoft.com/cs/blogs/rickm/archive/2009/06/11/a-short-history-of-programming-languages-generations.aspx"&gt;this concise history of programming languages&lt;/a&gt; – my favorite part is the quotes he chose for each part:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Real programmers can write assembly code in any language.”       &lt;br /&gt;- &lt;/em&gt;&lt;em&gt;Larry Wall&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Steve’s Tech Talk&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Staff meetings at Atalasoft became epic in 2009. In May, we changed our format so that a rotating producer would be in charge of organizing and running the meeting. One aspect of the meeting is a topical presentation on something relevant to the company – in July, Steve, our Chief Architect, explained &lt;a href="http://www.atalasoft.com/cs/blogs/stevehawley/archive/2009/07/27/what-is-scrum.aspx"&gt;our development process&lt;/a&gt; to the rest of the company with an educational video.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Bill Bither’s Insights&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Bill, our CEO and founder, wrote this entry just ahead of the Vizit 1.0 release with some &lt;a href="http://www.atalasoft.com/cs/blogs/billbither/archive/2009/01/29/bootstrapping-a-new-product-in-a-recession.aspx"&gt;practical advice on introducing a new product on a limited budget&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;We researched the market, talked to potential customers, built relationships with industry recognized players, and are now in the midst of turning Atalasoft from a one product company to a two product company – all without any external financing, and during a recession.&lt;/p&gt;    &lt;p&gt;I believe that now IS a good time to start a new company, or launch a new product. This is the year for small agile companies to innovate while larger companies cut back and wait it out.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;David Cilley’s Ajax Imaging Blog&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;While Dave was working on a demo using YUI, he whipped up a way of &lt;a href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2009/01/21/converting-yui-buttongroups-into-image-buttons.aspx"&gt;converting YUI Button Groups into Image Buttons&lt;/a&gt;.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;I poked around YUI’s documentation a bit and came up with simple function that can convert a YUI Button into an image only button, much like a button on a tool bar.&amp;#160; These converted YUI Buttons still maintain the same original properties internally, so you can use them interchangeably.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Jake Opines&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When Jacob told me he was going to move his personal projects from WordPress to SharePoint, I was shocked. I personally use WordPress, but have been unhappy with it for years – it’s just the best of a lot of bad alternatives to me. This entry explains some of &lt;a href="http://www.atalasoft.com/cs/blogs/jake/archive/2009/11/03/sharepoint-2010-a-better-investment-for-developers-than-lamp.aspx"&gt;his rationale for using SharePoint 2010 over LAMP&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;SharePoint offers a framework that abstracts away databases and security design, it gives you a complete content management system, a plug-in architecture, and for the price, unmatched scalability. This doesn't even begin to take into account the growing ecosystem of third party features available both for free and fee.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;If you can’t be a developer, be a developer supporter&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Elaine runs our support and training. On her blog, you’ll find a mixture of information about our products and posts like this one, an account of her &lt;a href="http://www.atalasoft.com/cs/blogs/support/archive/2009/01/21/customer-service-observed.aspx"&gt;experience as a customer using some other company’s support&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;I could end all this with some philosophical advice and parallels of my experiences as a support engineer in the software industry, but, really, everything is pretty clear in four rules:&lt;/p&gt;    &lt;p&gt;1. Do it right.     &lt;br /&gt;2. If you can’t, communicate.      &lt;br /&gt;3. Do what you can do.      &lt;br /&gt;4. Do it quickly.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;If you build it, They will come&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Dave named this blog when he was in charge of builds – now, he’s a Vizit engineer (but still the most knowledgeable about our builds). When these worlds collide, you get a very thorough post on &lt;a href="http://www.atalasoft.com/cs/blogs/dterrell/archive/2009/02/10/mocking-spsecurity-delegates.aspx"&gt;using TypeMock for SharePoint to mock SharePoint SPSecurity Delegates&lt;/a&gt;.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The main problem I found was that SPSecurity had to be mocked, otherwise it would throw a NullReferenceException […] for obvious reasons, there’s no SharePoint to test against!&amp;#160; Let’s flex those Mock muscles and handle calls to SharePoint’s static objects.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Insert Quality Here&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In 2008, I discovered LLVM for Cocoa/Objective-C static analysis, which, unlike Lint, lists problems with no false positives. Adam did &lt;a href="http://www.atalasoft.com/cs/blogs/insertqualityhere/archive/2009/08/26/go-on-go-get-all-static-y.aspx"&gt;this round-up of static analysis tools&lt;/a&gt; last year that gives a few good reasons to use them even if their output is unwieldy.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;It has seemed to me that most folks' (including mine) first impression of the massive amounts of output that a static analysis tool generates is, “Oh, dear Lord. What's all this crap about code style?”, and “Where're the useful results?”.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Dan Barvitsky&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Our newest engineering blog is from Dan. I’m a sucker for sequence diagrams and unit testing techniques, so I love this post he wrote about &lt;a href="http://www.atalasoft.com/cs/blogs/danbarvitsky/archive/2009/06/11/thinking-aloud-concurrent-unit-tests.aspx"&gt;unit testing to find concurrency bugs&lt;/a&gt;. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;When I run this test it passes on my laptop. Why? Because it is fairly old and has single CPU. Once I move it to my desktop (TADA) it still passes &lt;i&gt;inconsistently&lt;/i&gt;. If I uncomment priority setting line it messes everything up badly. It turns out threading introduces some randomization which makes test non-deterministic. Bad test. We’d better fix it.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;He &lt;a href="http://www.atalasoft.com/cs/blogs/danbarvitsky/archive/2009/06/12/techniques-for-testing-concurrent-code-in-nunit.aspx"&gt;thought about the problem some more&lt;/a&gt; and eventually &lt;a href="http://www.atalasoft.com/cs/blogs/danbarvitsky/archive/2009/06/15/my-solution-for-unit-testing-concurrent-code-in-nunit.aspx"&gt;documented a solution&lt;/a&gt;.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx&amp;amp;;subject=Atalasoft+2009+Blog+Retrospective" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx&amp;amp;;title=Atalasoft+2009+Blog+Retrospective" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx&amp;amp;title=Atalasoft+2009+Blog+Retrospective" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx&amp;amp;;title=Atalasoft+2009+Blog+Retrospective" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx&amp;amp;;title=Atalasoft+2009+Blog+Retrospective&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/loufranco/archive/2009/12/30/atalasoft-2009-blog-retrospective.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=19962" width="1" height="1"&gt;</description></item></channel></rss>