Ryan LanciauxNew Media Mercenary

Some tools for working with distributed teams

June 11, 2008 by ryan
Whether you're creating a project for fun or freelancing (etc.), working remotely as part of a team is becoming more and more common. Communication is still key to a successful project, however, it's much more difficult when your working with people in different locations and on different schedules. Although, you will not be able to achieve the same level of communication as face-to-face, there are some tools beyond E-mail, IMs and Remote Desktop that could make your life a little easier. Here are some of the tools I use when I'm not in the vicinity of as the team I'm working with.

Source Control
Obviously, source control is a must-have. This is a given for development projects; even if you're working by yourself. I use Subversion for all of my code because it's relatively easy to set up and, for the most part, pretty intuitive for newer users. When creating a source repository you need to choose to:
  1. Host your own
  2. Go through a third party
    • Assembla -Although there are many options in this arena, this is the host that I use for remote collaboration so it's the one I'm going to focus on. You can set up a Subversion repository simply by adding a new project to your workspace and specifying that you want to use subversion (in the setup configuration). From there you can add users or make your project open to the public. Apart from Subversion, there are many other features that may make Assembla a worthwhile site to check into.
Finally when running Subversion, you're either going to need an IDE that supports SVN, use the command line or download a client. I use Tortoise SVN and the command prompt, however, Visual SVN for Visual Studio looks nice (and when I'm using Eclipse, the SubVersion plugin is wonderful).


Screen capture software
It can be confusing trying to fix an issue based on a text description. Having a screenshot or video that explains how to reproduce a bug can be invaluable. Coupled with a bug tracking application, this can be an extremely effective way to quickly resolve issues. Camtasia is probably the ideal application for creating screen casts of a bug but for the price tag it might be overkill (especially if it's just for fun / open source). Currently, I usually use Wink by Debug mode for this sort of functionality. Although it's definitely not as feature rich as Camtasia, it gets the job done.

Also see: Jing

Real-Time Collaboration
Some situations require an extra level of involvement from team members. Vyew has been an awesome addition to the tool belt. With it, I can collaborate / share desktop / share files real time with someone else anywhere in the world in. Similar to the screen capture application, it really helps to communicate something that otherwise may be difficult to explain. Earlier in the week, for example, I was having some trouble with an Eclipse setting for a project I'm working on. Rather than sending e-mails back and forth trying to explain the issue, I used Vyew to share my desktop with a friend half way across the country. In a matter of minutes, he was able to diagnosis the problem and I was back in business. Vyew is free if you don't mind having ads on the page. Otherwise, it's $6.95/month for the Plus Package and $13.95/month the Professional version. For more information, vist the Vyew site or check-out Guy Kawasaki's synopsis of Vyew.

 

What tools do you use to stay connected with your team? 




Quick Tip - Visual Studio Keybindings

June 5, 2008 by ryan

This may be common knowledge but it was new to me. If you're ever hand mangling control position in a winforms designer you can setup keybindings for Bring to Front Send to Back options that are normally available on the controls context menu. This is really useful if you have layers of controls and you can't always get to the Context.

  1. Click on Tools -> Options
  2. Under Environment, Select the Keyboard menu
  3. Type "Format.BringtoFront" (or "Format.SendtoBack") in the "Show Commands Containing" box
  4. Choose your shortcut keys
  5. Press Assign




Thanks to my friend Ross for pointing this out.






Very Quick and Simple Dependency Injection with StructureMap

February 26, 2008 by ryan

There are a lot of resources on the web about dependency injection and using StructureMap, however, I wanted to write something that was an extremely simple example. This is basically the tip of the iceberg but hopefully it will help someone. 

We want to make our application very loosely coupled -- to achieve this 'loose coupling' we're going to have several projects in the solution. What this means if we need to change any part of this application later on (we wouldn't want to in this case since its a demo and all), we could do so without impacting everything else. Anyways, we're going to create three class libraries and a WinForms application.

Next we want to create our main inteface -- this will be under the DisplayMessage Project:

 

namespace DisplayMessage

{

    public interface IDisplayMessage

    {

        string message();

    }

}

The interface defines just one method that, when implemented, will return a string stating what class its coming from. Next, we want to create our two implementation classes (one under Implementation1, the other under Implementation2). Please keep in mind I'm not suggesting to have every class in it's own library -- it's just for the sake of example :)

Implementation1:

    public class MessageOne : IDisplayMessage

    {

        public string message()

        {

            return "This is a message from Implementation1";

        }

    }

 Implementation2:

    public class MessageTwo : IDisplayMessage

    {

        public string message()

        {

            return "This is a message from Implementation2";

        }

    }

Okay that was easy enough, now on to the Forms App.  We're first going to add a reference to StructureMap and the project DisplayMessage and create a file called StructureMap.config -- this config file is going to define all of our assemblies. We want to make sure we edit the properties of this file and set the Copy to Output Directory option to "Copy Always." StructureMap will use this file at runtime to get our object references. The config file looks like this: 

<?xml version="1.0" encoding="utf-8" ?>

<StructureMap>

  <Assembly Name="DisplayMessage" />

  <Assembly Name="Implementation1" />

  <Assembly Name="Implementation2" />

 

  <PluginFamily Type="DisplayMessage.IDisplayMessage"

                Assembly="DisplayMessage"

                DefaultKey="MessageOne">

    <Plugin Type="Implementation1.MessageOne"

            Assembly="Implementation1"         

            ConcreteKey="MessageOne" />

    <Plugin Type="Implementation2.MessageTwo"

                Assembly="Implementation2"

                ConcreteKey="MessageTwo" />   

  </PluginFamily>

</StructureMap>

Notice we define a PluginFamily for the IDisplayMessage interface and set the default implementation to be MessageOne (the DefaultKey of PluginFamily references the ConcreteKey of the Plugin). Other than that, this should be pretty straight-forward but if you have any confusion, please check out the StructureMap documentation. Only a couple more things to do before we can run this...

Ok, we're going to add 3 buttons to our form -- one for the default IDisplayMessage and one for each implementation.

 Now to add the code...

        //Default IDisplayMessage 

        private void btnDefault_Click(object sender, EventArgs e)

        {

            IDisplayMessage msg = StructureMap.ObjectFactory.GetInstance<IDisplayMessage>();

            System.Windows.Forms.MessageBox.Show(msg.message());

        }

 

        //Implementation1

        private void btnOne_Click(object sender, EventArgs e)

        {

            IDisplayMessage msg = StructureMap.ObjectFactory.GetNamedInstance<IDisplayMessage>("MessageOne");

            System.Windows.Forms.MessageBox.Show(msg.message());

        }

 

        //Implementation2

        private void btnTwo_Click(object sender, EventArgs e)

        {

            IDisplayMessage msg = StructureMap.ObjectFactory.GetNamedInstance<IDisplayMessage>("MessageTwo");

            System.Windows.Forms.MessageBox.Show(msg.message());

        } 

Lets parse this up a little bit...

  • IDisplayMessage msg = StructureMap.ObjectFactory.GetInstance<IDisplayMessage>();

    This statement gets the default IDisplayMessage object in the StructureMap.config file. Currently, it will get the same object as getting a named instance of "MessageOne"
  • IDisplayMessage msg = StructureMap.ObjectFactory.GetNamedInstance<IDisplayMessage>("MessageOne");

    This statement gets the object associated with the ConcreteKey "MessageOne"
  • IDisplayMessage msg = StructureMap.ObjectFactory.GetNamedInstance<IDisplayMessage>("MessageTwo");

    This statement gets the object associated with the ConcreteKey "MessageTwo"

Instead of simply hitting F5, we will need to build the application -- we want to copy the DLL files from Implementation1 and Implementation2 to the bin directory of the forms app and run the executable there.  For testing, however, we can add a reference to both projects (this completely defeats the purpose of dependency injection so be sure to remove the references later on) or adjust the output directory of the implementation class libraries to be the same as the Form application's bin directory. Running the application shows that everything is working as expected.

For more information please check out the following links:

kick it on DotNetKicks.com



Learning a new Language

February 24, 2008 by ryan

I'm currently in the process of getting to be more comfortable with Ruby on Rails and really just starting to learn F#. In both cases, simply reading a book or tutorials and following along has not been enough to really get my head around it.

First off, I've decided I have to have a project or something to work against. For RoR, there's a little site I'm working on (more on that some other time) -- For F#, I'm currently working thru the 99 Problems with my brother (you can see our solutions here).  When simply reading a book or tutorials you don't generally come accrossed the same kind of road blocks that you would find in a project. I think overcoming the road blocks is what helps me better understand a language.

All that being said, I think it's truly important to read as many books, tutorials and source code as you can. Authors read to become better writers ... as developers we should too (See Justice Gray's blog for more on this). I have this bad habit of thinking in C#/Java/C++; this is pretty much as bad as it would be for me to try and speak Japanese using a English to Japanese dictionary. Seeing how other people code helps me stay away from that. 

What are some steps that you take when you start learning a new language? 

kick it on DotNetKicks.com


Tags: , ,
Categories: Development
Actions: E-mail | Kick it! | Permalink | commentComments (6) | RSS comment feedComment RSS


Best VS Fonts / Colors EVER

January 30, 2008 by ryan

Okay the title is a bit over the top :)  Recently I was playing around with the vs settings after reading Scott Hanselman's article on black/white IDE colors and came up with this.  I am still using the Monaco font and a lot of the same ideas, however, I toned down the colors slightly.  Here are some screen shots of various languages in the .NET environment with the 'frickinsweet' settings file applied.

 

C# With the modified settings




VB.NET 




HTML (well... in the context of ASP.NET)

 

F# (I really need to learn this language)




I have put the file for download frickinsweet.vssettings (10.73 kb)

You should get the Monaco or Envy Code R font for best results :)

To install the new settings file:

  1. Click tools
  2. Import and Export Settings
  3. Choose 'Import Selected Environment Settings' and click Next
  4. Backup current settings and continue
  5. Browse to the download location and click Next
  6. The Next screen you can confirm that you're overwriting just the fonts and color and click Finish

Please let me know what you think. 

Update: Rob Conery has an alternative theme for Visual Studio available here.

 

  kick it on DotNetKicks.com

 

Disclaimer: Download this at your own risk.  Back up your current settings before adding the new one -- just to be safe.








© 2008 Ryan Lanciaux :: powered by BlogEngine.NET