May 2010 - Posts

Do you iterate through long for loops or while loops? Tired of pressing F8 or F5 just until you meet a certain condition while debugging in Visual Studio? I didn't  know that this was possible (haven't tried in Eclipse) until a colleague told me How To Set a Breakpoint Condition in Visual Studio.

How To Set a Breakpoint Condition in Visual Studio

Let's assume that you have the following set of code... The code below does nothing but to print names from an array of string.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.Collections.Generic;
using System.Text;

namespace BreakpointIfTest
{
    class Program
    {
        private static string[] names = { "Tim", "Gerald", "Keith", "Cruizer", "Rolvin", "Jared", "Chris", "Jops", "Devpinoy" };

        static void Main(string[] args)
        {
            foreach (string s in names)
            {
                Console.WriteLine(s);
            }
        }
    }
}

 

Suppose we set a break point at the line... Console.WriteLine(s);

 

Visual Studio Debugging - Set a Breakpoint

 

and we want the breakpoint only to HIT when the value of  the variable "s" is "Keith". What you do is right click on the breakpoint (the red circle) and choose "condition".

 

Visual Studio Debugging - Make a Breakpoint Condition

 

A window will pop up prompting for a breakpoint condition, enter s == "Keith"

 

Visual Studio Debugging - Set a Breakpoint Condition

 

Now run and debug your application and you will see that the breakpoint will only hit if the value of "s" is Keith". ;)

 

Visual Studio Debugging - Run and Debug

 

Tell me if it helps you. I hope this saves you some time debugging!

Posted by lamia | 3 comment(s)
Filed under: ,

I was working on my video game blog together with a graphic artist and I was trying to integrate the Favicon I asked of him. I had the basic code for the favicon which is


<link href='http://myimagehost/myfavicon.png' rel='shortcut icon'/>
<link href='http://myimagehost/myfavicon.png'' rel='icon'/>

It appeared for a little while and then the old Blogger favicon re-appeared. I tried experimenting by putting my favicon code just before the closing header (i.e. </head>)

 

It worked!

 

I didn't know why until I found this in the HTML source code...

 

<link href='http://www.blogger.com/favicon.ico' rel='icon' type='image/vnd.microsoft.icon'/>


Now I have a nice looking favicon for Game Rumble. :)

Posted by lamia | with no comments
Filed under: ,

Here I list 5 Common IT Outsourcing Mistakes Companies Make and some ideas on how to prevent them. Theoretically, this can be applied on either end whether you're onshore or offshore.  These mistakes commonly result into software projects not being completed, projects being delayed or employees resigning due to misunderstanding. The following list doesn’t necessarily follow any order of importance.

1. Misaligned Expectations

Expectations should be set from the start. The scope of work must be clearly defined such that would the developers on the offshore team be doing design work, is it only coding, would it involve testing or all of them? It is also important to define the corporate hierarchy equivalent of the offshore team members. For example, if the developer is a mid-level on the offshore end is he also expected to be a mid-level developer on the onshore end?

Another thing is to properly layout the employee’s career path. What will he be after he completes a certain project? What will he be after spending 5 years of loyal service?


2. Treating each team (offshore/onshore) as a Separate Team

Both teams should be treated as an extension of each team. If one team feels like they're being looked down upon, or another end feels superior over the other then you have a serious flaw in your system. Why? Because communication happens when both ends feel safe (I forgot where I picked that line from)

3. Irregular Status Meetings

It is important to have a regular status meeting so that outstanding issues can be acknowledged and dealt with at the earliest possible time. Some nationalities have this communication barrier where they tend to keep to themselves the problems they have instead of asking someone else who might know something about the problem.


4. Closed Communication Lines

Make use of the technology that we have today. Skype, e-mail, phones, everything that you could use to bring the message to the other end is important. This assures visibility on both ends and it is important to know what is happening on either end. You might also want to invest on knowledge base tools like Confluence which is a wiki-sort of application and JIRA which is a bug tracking tool. This encourages collaboration across the entire team and could somehow minimize the barrier across time zone differences. Encourage offshore and onshore employees to use not only all the brains that they have, but also all that they can borrow.

5. Very Limited Access to Infrastructure

Last but not the least is limited access to infrastructure. Yes, you want to make your servers as secure as possible. But if it keeps people away, far enough that they could not do their jobs then your servers are not performing their jobs. You might want to consider stuff like temporary access to log files that could at least help a developer determine what went wrong in production if it’s a production issue. If you don’t want the offshore team to have access to production data, you might want to create a mirror that hosts dummy data that closely mimics the one in production… Things like that...

 

If these things are present in your company then they must be addressed as soon as possible. These are keys to make the outsourcing model work for both parties.

Posted by lamia | 1 comment(s)