TDD


http://codebetter.com/blogs/jeremy.miller/archive/2008/12/10/design-and-testability.aspx

Posted by elberon5 Wed, 10 Dec 2008 14:52:00 GMT

Foundations of Programming

If you're programming professionally you should be familiar with everything in this free ebook.

http://codebetter.com/blogs/karlseguin/archive/2008/06/24/foundations-of-programming-ebook.aspx

Posted by elberon5 Fri, 19 Sep 2008 16:01:00 GMT

Nifty SQL LINQ Tool

  • http://www.linqpad.net/

    Posted by elberon5 Wed, 10 Sep 2008 19:03:00 GMT

  • More MVP Unit Testing

  • http://www.jpboodhoo.com/publications.oo
  • http://www.polymorphicpodcast.com/shows/mv-patterns/

    Posted by elberon5 Wed, 10 Sep 2008 19:02:31 GMT

  • ASP.Net Links

    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.

    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.

    Here are the links.

    MVP Stuff

  • http://msdn.microsoft.com/en-us/library/cc304865.aspx
  • These three articles below are the best i've found. I don't think enough people are doing this with asp.net yet.
  • http://richnewman.wordpress.com/2008/02/23/model-view-controller-explained-introduction-to-cabscsf-part-22/
  • Windows Client Sample - http://mrrask.files.wordpress.com/2008/01/model-view-presenter.pdf

    Domain Driven Design
  • http://en.wikipedia.org/wiki/Domain-driven_design
  • http://www.infoq.com/minibooks/domain-driven-design-quickly
  • There is also a podcast from on this. It's a good listen, it might be on dotnetrocks, i don't remember.

    LinqToSQL - Architecting Applications.
  • 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.

    Unit Testing w/2008
  • http://odetocode.com/Blogs/scott/archive/2007/07/23/11123.aspx

    Posted by elberon5 Wed, 20 Aug 2008 18:34:00 GMT

  • Better IE

    http://www.ie7pro.com/

    Posted by elberon5 Wed, 30 Apr 2008 19:04:00 GMT

    Great Resource

    http://www.agiledata.org/

    Posted by elberon5 Thu, 10 Apr 2008 20:27:00 GMT

    CorpsCon 6 - C# - DLLImport

    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 CorpsCon 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.

    You'll need this - using_the_corpscon_dll.pdf

    You'll need to create a new class that incorporates all of this. Drop the corpscon.dll file into your bin folder.

    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.

    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.

    Here's how i call it in my project

    	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();
    

    Here's the Class
    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();
    
        }
    }
    

    Posted by elberon5 Wed, 30 Jan 2008 19:21:00 GMT

    Searching Entire Solution In Visual Studio 2005

    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.

    You can also do Ctrl+Shift+H for a global replace.

    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.

    Posted by elberon5 Thu, 20 Dec 2007 22:01:00 GMT

    Stolen Blogs

    Ok. I've had my blog hijacked. I'm guessing this post will get hijacked to.

    My Post on their site, with links to more of my posts and others

    The Thieves
    Is there no justice! elberon5.com my site - elberon5, not bloginside's grrrr. wtf.

    Posted by elberon5 Tue, 23 Oct 2007 23:35:00 GMT

    Older posts: 1 2 3 4