<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>elberon5.com</title>
    <link>http://elberon5.com/typo/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>elberon5.com</description>
    <item>
      <title>TDD</title>
      <description>&lt;br&gt;
&lt;A href="http://codebetter.com/blogs/jeremy.miller/archive/2008/12/10/design-and-testability.aspx"&gt;http://codebetter.com/blogs/jeremy.miller/archive/2008/12/10/design-and-testability.aspx&lt;/A&gt;</description>
      <pubDate>Wed, 10 Dec 2008 08:52:00 CST</pubDate>
      <guid>http://elberon5.com/typo/articles/2008/12/10/tdd</guid>
      <link>http://elberon5.com/typo/articles/2008/12/10/tdd</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/35</trackback:ping>
    </item>
    <item>
      <title>Foundations of Programming</title>
      <description>If you're programming professionally you should be familiar with everything in this free ebook. 
&lt;p&gt;
&lt;a href="http://codebetter.com/blogs/karlseguin/archive/2008/06/24/foundations-of-programming-ebook.aspx"&gt;http://codebetter.com/blogs/karlseguin/archive/2008/06/24/foundations-of-programming-ebook.aspx
&lt;/a&gt;</description>
      <pubDate>Fri, 19 Sep 2008 11:01:00 CDT</pubDate>
      <guid>http://elberon5.com/typo/articles/2008/09/19/foundations-of-programming</guid>
      <link>http://elberon5.com/typo/articles/2008/09/19/foundations-of-programming</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/34</trackback:ping>
    </item>
    <item>
      <title>Nifty SQL LINQ Tool</title>
      <description>&lt;li&gt;&lt;a href="http://www.linqpad.net/"&gt;http://www.linqpad.net/&lt;/a&gt;</description>
      <pubDate>Wed, 10 Sep 2008 14:03:00 CDT</pubDate>
      <guid>http://elberon5.com/typo/articles/2008/09/10/nifty-sql-linq-tool</guid>
      <link>http://elberon5.com/typo/articles/2008/09/10/nifty-sql-linq-tool</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/33</trackback:ping>
    </item>
    <item>
      <title>More MVP Unit Testing</title>
      <description>&lt;li&gt;&lt;a href="http://www.jpboodhoo.com/publications.oo"&gt;http://www.jpboodhoo.com/publications.oo&lt;/a&gt;
&lt;li&gt;&lt;a href="http://www.polymorphicpodcast.com/shows/mv-patterns/"&gt;http://www.polymorphicpodcast.com/shows/mv-patterns/&lt;/a&gt;</description>
      <pubDate>Wed, 10 Sep 2008 14:02:31 CDT</pubDate>
      <guid>http://elberon5.com/typo/articles/2008/09/10/more-mvp-unit-testing</guid>
      <link>http://elberon5.com/typo/articles/2008/09/10/more-mvp-unit-testing</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/32</trackback:ping>
    </item>
    <item>
      <title>ASP.Net Links</title>
      <description>&lt;p&gt;I was just sending a bunch of links to a friend about what i've been trying to get into with asp.net. These relate to getting myself out of the UI model of programming asp.net where i create web forms with tons of code in them to handle everything. 
&lt;p&gt;
I'm trying to move from the above method to one that implements efficient OOP using LINQtoSQL, MVP (Model-View-Presenter), Domain Driven Design, and Test Driven Design. It has been a hard jump and i'll probably be struggling with it for some time.
&lt;p&gt;
Here are the links.

&lt;br&gt;&lt;br&gt;
MVP Stuff
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc304865.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc304865.aspx&lt;/a&gt;
&lt;li&gt;These three articles below are the best i've found. I don't think enough people are doing this with asp.net yet.
&lt;li&gt;&lt;a href="http://richnewman.wordpress.com/2008/02/23/model-view-controller-explained-introduction-to-cabscsf-part-22/"&gt;
&lt;li&gt;http://richnewman.wordpress.com/2008/02/23/model-view-controller-explained-introduction-to-cabscsf-part-22/&lt;/a&gt;
&lt;li&gt;Windows Client Sample - &lt;a href="http://mrrask.files.wordpress.com/2008/01/model-view-presenter.pdf"&gt;http://mrrask.files.wordpress.com/2008/01/model-view-presenter.pdf&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
Domain Driven Design
&lt;li&gt;
&lt;a href="http://en.wikipedia.org/wiki/Domain-driven_design"&gt;http://en.wikipedia.org/wiki/Domain-driven_design&lt;/a&gt;
&lt;li&gt;
&lt;a href="http://www.infoq.com/minibooks/domain-driven-design-quickly"&gt;http://www.infoq.com/minibooks/domain-driven-design-quickly&lt;/a&gt;
&lt;li&gt;
There is also a podcast from  on this. It's a good listen, it might be on dotnetrocks, i don't remember.

&lt;br&gt;&lt;br&gt;
LinqToSQL - Architecting Applications.

&lt;li&gt;There's a few good articles on codebetter.com from Ian Cooper although he loses it around article 5 referring to some java specific framework. Site is down so i can't find the link.

&lt;br&gt;&lt;br&gt;
Unit Testing w/2008
&lt;li&gt;
&lt;a href="http://odetocode.com/Blogs/scott/archive/2007/07/23/11123.aspx"&gt;http://odetocode.com/Blogs/scott/archive/2007/07/23/11123.aspx&lt;/a&gt;
</description>
      <pubDate>Wed, 20 Aug 2008 13:34:00 CDT</pubDate>
      <guid>http://elberon5.com/typo/articles/2008/08/20/asp-net-links</guid>
      <link>http://elberon5.com/typo/articles/2008/08/20/asp-net-links</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/31</trackback:ping>
    </item>
    <item>
      <title>Better IE</title>
      <description>&lt;A href="http://www.ie7pro.com/"&gt;http://www.ie7pro.com/&lt;/A&gt;</description>
      <pubDate>Wed, 30 Apr 2008 14:04:00 CDT</pubDate>
      <guid>http://elberon5.com/typo/articles/2008/04/30/better-ie</guid>
      <link>http://elberon5.com/typo/articles/2008/04/30/better-ie</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/30</trackback:ping>
    </item>
    <item>
      <title>Great Resource</title>
      <description>&lt;a href="http://www.agiledata.org/"&gt;http://www.agiledata.org/&lt;/a&gt;</description>
      <pubDate>Thu, 10 Apr 2008 15:27:00 CDT</pubDate>
      <guid>http://elberon5.com/typo/articles/2008/04/10/great-resource</guid>
      <link>http://elberon5.com/typo/articles/2008/04/10/great-resource</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/29</trackback:ping>
    </item>
    <item>
      <title>CorpsCon 6 - C# - DLLImport</title>
      <description>I needed to convert points from different Geographic, State Plane, Universal Transverse Mercator (UTM) and US National Grid systems. There isn't much out there but the military does have a nice program called &lt;A href="http://crunch.tec.army.mil/software/corpscon/corpscon.html"&gt;CorpsCon &lt;/A&gt;which you can use to do bulk transformations. You can also use the corpscon dll in your code if you know how to wrap it using DLLImport. I was able to successfully implement it.

&lt;br&gt;&lt;br&gt;&lt;p&gt;You'll need this - &lt;a href="http://crunch.tec.army.mil/software/corpscon/using_the_corpscon_dll.pdf"&gt;using_the_corpscon_dll.pdf&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;You'll need to create a new class that incorporates all of this. Drop the corpscon.dll file into your bin folder.  
&lt;br&gt;&lt;br&gt;&lt;p&gt;In your class in order to link in the corpscon6.dll file you use System.Runtime.InteropServices and [DllImport] to do this. The dll is written in C so you'll have a tough time sorting out what datatypes to pass for your wrapper. The toughest will be the char* types. I used a System.Text.StringBuilder for it. I only needed this to grab the error message. You'll want to wrap everything specified in the algorithm function that the PDF tells you to use. Like i did in convertNJPoint.
&lt;br&gt;&lt;br&gt;
&lt;p&gt;Feel free to reuse this code. No guarantees that it'll even do anything. Any suggestions are definitely welcome. I know DllImport is dangerous with how it handles memory and i'm probably letting the GC do too much for me.

&lt;p&gt;Here's how i call it in my project
&lt;pre&gt;
	GIS.CorpsCon cc = new GIS.CorpsCon();
	double[] dblarr = cc.convertNJPoint(Double.Parse(txtN.Text), Double.Parse(txtE.Text));
	txtLat.Text = dblarr[0].ToString();
	txtLon.Text = '-' + dblarr[1].ToString();
&lt;/pre&gt;
&lt;br&gt;
Here's the Class

&lt;pre&gt;
using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Collections.Generic;

namespace GIS
{
    public class CorpsCon
    {
        public int InUnits
        {
            get { return GetInUnits(); }
            set { SetInUnits(value); }
        }

        public CorpsCon()
        {

        }

        public static string getErrorMessage(int error_code)
        {
            StringBuilder msg = new StringBuilder();
            msg.Length = 2000; //This is not right. Will error if returned values is more than 2000 characters.
            GetErrorMessage(error_code, msg);
            corpscon_clean_up();
            return msg.ToString();
         }

        public double[] convertNJPoint(double Northing, double Easting)
        {
            double[] dblResults = new double[3];
            corpscon_default_config();
            SetNadconPath("c:\\program files\\Corpscon6x\\Nadcon\\".ToCharArray());
            SetVertconPath("c:\\program files\\Corpscon6x\\vertcon\\".ToCharArray());
            SetGeoidPath("c:\\program files\\Corpscon6x\\Geoid\\".ToCharArray());
            
            SetInSystem(2); 
            SetInDatum(1983);
            SetInUnits(1);
            SetInZone(2900);

            SetOutSystem(1);
            SetOutDatum(1983);
            SetOutUnits(3);
            SetOutZone(18);

            corpscon_initialize_convert();

            SetXIn(Easting);
            SetYIn(Northing);
            int result = corpscon_convert();

            dblResults[0] = GetYOut();
            dblResults[1] = GetXOut();
            dblResults[2] = result;
            corpscon_clean_up();
            return dblResults;
        }

        [DllImport("corpscon_v6.dll")]
        static extern int corpscon_default_config();

        [DllImport("corpscon_v6.dll")]
        static extern int SetInSystem(int val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetOutSystem(int val);

        [DllImport("corpscon_v6.dll")]
        static extern int SetInDatum(int val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetOutDatum(int val);

        [DllImport("corpscon_v6.dll")]
        static extern int SetInUnits(int val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetOutUnits(int val);

        [DllImport("corpscon_v6.dll")]
        static extern int SetInZone(int val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetOutZone(int val);

        [DllImport("corpscon_v6.dll")]
        static extern int SetInVDatum(int val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetOutVDatum(int val);

        [DllImport("corpscon_v6.dll")]
        static extern int SetInVUnits(int val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetOutVUnits(int val);

        [DllImport("corpscon_v6.dll")]
        static extern int SetOutUSNGDigits(int val);

        [DllImport("corpscon_v6.dll")]
        static extern int SetNadconPath(char[] path);

        [DllImport("corpscon_v6.dll")]
        static extern int SetInHPGNArea(char[] area);
        [DllImport("corpscon_v6.dll")]
        static extern int SetOutHPGNArea(char[] area);

        [DllImport("corpscon_v6.dll")]
        static extern int SetVertconPath(char[] path);

        [DllImport("corpscon_v6.dll")]
        static extern int SetUseVertconCustomAreas(int opt);

        [DllImport("corpscon_v6.dll")]
        static extern int SetVertconCustomAreaListFile(char[] file);

        [DllImport("corpscon_v6.dll")]
        static extern int SetGeoidPath(char[] path);
        [DllImport("corpscon_v6.dll")]
        static extern int SetGeoidCodeBase(int val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetUseGeoidCustomAreas(int opt);
        [DllImport("corpscon_v6.dll")]
        static extern int SetGeoidCustomAreaListFile(char[] file);
        [DllImport("corpscon_v6.dll")]
        static extern int corpscon_initialize_convert();
        [DllImport("corpscon_v6.dll")]

        static extern int SetXIn(double val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetYIn(double val);
        [DllImport("corpscon_v6.dll")]
        static extern int SetZIn(double val);

        [DllImport("corpscon_v6.dll")]
        static extern int SetUSNGIn(char[] val);
        [DllImport("corpscon_v6.dll")]
        static extern int corpscon_convert();
        [DllImport("corpscon_v6.dll", CharSet = CharSet.Ansi, SetLastError = true)]
        static extern int GetErrorMessage(int err_code, StringBuilder msg);
        [DllImport("corpscon_v6.dll")]

        static extern double GetXOut();
        [DllImport("corpscon_v6.dll")]
        static extern double GetYOut();
        [DllImport("corpscon_v6.dll")]
        static extern double GetZOut();

        [DllImport("corpscon_v6.dll")]
        static extern int GetUSNGOut(char[] val);
        [DllImport("corpscon_v6.dll")]
        static extern int GetCorpsconValue(int code, double[] val);
        [DllImport("corpscon_v6.dll")]
        static extern int corpscon_clean_up();

        
        [DllImport("corpscon_v6.dll")]
        static extern int GetInSystem();
        [DllImport("corpscon_v6.dll")]
                static extern int GetOutSystem();
        [DllImport("corpscon_v6.dll")]
                static extern int GetInDatum();
        [DllImport("corpscon_v6.dll")]
                static extern int GetOutDatum();
        [DllImport("corpscon_v6.dll")]
                static extern int GetInUnits();
        [DllImport("corpscon_v6.dll")]
                static extern int GetOutUnits();
        [DllImport("corpscon_v6.dll")]
                static extern int GetInZone();
        [DllImport("corpscon_v6.dll")]
                static extern int GetOutZone();
        [DllImport("corpscon_v6.dll")]
                static extern int GetInVDatum();
        [DllImport("corpscon_v6.dll")]
                static extern int GetInVUnits();
        [DllImport("corpscon_v6.dll")]
                static extern int GetOutVUnits();
        [DllImport("corpscon_v6.dll")]
                static extern int GetOutUSNGDigits();
        [DllImport("corpscon_v6.dll")]
                static extern int GetNadconPath(char[] path);
        [DllImport("corpscon_v6.dll")]
                static extern int GetInHPGNArea(char[] area);
        [DllImport("corpscon_v6.dll")]
                static extern int GetOutHPGNArea(char[] area);
        [DllImport("corpscon_v6.dll")]
                static extern int GetVertconPath(char[] path);
        [DllImport("corpscon_v6.dll")]
                static extern int GetVertconCustomAreaListFile(char[] filename);
        [DllImport("corpscon_v6.dll")]
                static extern int GetUseVertconCustomAreas();
        [DllImport("corpscon_v6.dll")]
                static extern int GetGeoidCodeBase();
        [DllImport("corpscon_v6.dll")]
                static extern int GetGeoidPath(char[] path);
        [DllImport("corpscon_v6.dll")]
                static extern int GetGeoidCustomAreaListFile(char[] filename);
        [DllImport("corpscon_v6.dll")]
                static extern int GetUseGeoidCustomAreas();

    }
}
&lt;/pre&gt;</description>
      <pubDate>Wed, 30 Jan 2008 13:21:00 CST</pubDate>
      <guid>http://elberon5.com/typo/articles/2008/01/30/corpscon-6-c-dllimport</guid>
      <link>http://elberon5.com/typo/articles/2008/01/30/corpscon-6-c-dllimport</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/28</trackback:ping>
    </item>
    <item>
      <title>Searching Entire Solution In Visual Studio 2005</title>
      <description>There's a great feature and shortcut in vs.net 2k5 to search all files. Ctrl+Shift+F will open the Find dialog. Double click the line in the results window on the bottom to navigate to the specific line found in the results. 

&lt;p&gt;You can also do Ctrl+Shift+H for a global replace.

&lt;p&gt;Whatever you do don't build your project while this is searching. It wont ever stop searching, and it will never find anything. Hit the 'Stop background find' button in the 'Find Results' dialog to cancel a long running search. </description>
      <pubDate>Thu, 20 Dec 2007 16:01:00 CST</pubDate>
      <guid>http://elberon5.com/typo/articles/2007/12/20/searching-entire-solution-in-visual-studio-2005</guid>
      <link>http://elberon5.com/typo/articles/2007/12/20/searching-entire-solution-in-visual-studio-2005</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/27</trackback:ping>
    </item>
    <item>
      <title>Stolen Blogs</title>
      <description>Ok. I've had my blog hijacked. I'm guessing this post will get hijacked to. 
&lt;br&gt;&lt;br&gt;
&lt;a href="http://bloginside.cn/read.php/76774.htm"&gt;My Post on their site, with links to more of my posts and others&lt;/A&gt;
&lt;br&gt;&lt;br&gt;


&lt;a href="http://www.whois.net/whois_new.cgi?d=bloginside&amp;tld=cn"&gt;The Thieves&lt;/a&gt;
&lt;br&gt;
Is there no justice!

elberon5.com

my site - elberon5, not bloginside's grrrr. wtf.</description>
      <pubDate>Tue, 23 Oct 2007 18:35:00 CDT</pubDate>
      <guid>http://elberon5.com/typo/articles/2007/10/23/stolen-blogs</guid>
      <link>http://elberon5.com/typo/articles/2007/10/23/stolen-blogs</link>
      <trackback:ping>http://elberon5.com/typo/articles/trackback/26</trackback:ping>
    </item>
  </channel>
</rss>
