Click here to Skip to main content
15,881,715 members
Articles / Programming Languages / C#

How to Become a Rumorous C# Developer

Rate me:
Please Sign up or sign in to vote.
4.73/5 (112 votes)
14 Jan 2010CPOL2 min read 104.5K   54   75
Steps to become famous C# developer.

Introduction

This ultimate how-to guide will teach you how to become the most popular person among your colleagues. You will be the hero of their conversations during cigarette breaks or in the office kitchen. It is even possible that this guide will help you work less — you will often be offered generous help by your co-workers wanting to do your tasks instead of you. This will be your fame!

Steps for Success

Here are the tricky steps for your recognition boost.

  1. Naming variables could show your full creativity potential. Don't burden yourself with any notations, guidelines, etc. — they all limit your inspiration. Also, you will get credit if you use an unknown naming scheme — your co-workers will respect you.

    Example:

    C#
    bool rAgeaggainStmaShine = false;
    int dd44 = 12;
    bool dude = true;
  2. Be genius and intriguing in method and parameters naming.

    Example:

    C#
    public int ViriableInflationModusOperandi(int variable, int inflator)
    {
    	return variable * inflator;
    }
  3. Comment your code. This is a professional attitude to work. Comments help to understand your code right, not "left".

    Example:

    C#
    // This variable is named after my mom. Wyburga-Thomasia Flandrina. Remember it!
    long wtf = 1;
  4. Don't write too many comments in your code. Excessive comments make your colleagues feel nervous — do you think they can't understand? They will respect you if you give them a chance to think.

    Example:

    C#
    /// <summary>
    /// Perform image check.
    /// </summary>
    public static void ImageRoutine(Image image)
    {
        if ((image != null) && (imageInfoList != null))
        {
            bool isReaderLockHeld = rwImgListLock.IsReaderLockHeld;
            LockCookie lockCookie = new LockCookie();
            threadWriterLockWaitCount++;
            try
            {
                if (isReaderLockHeld)
                {
                    lockCookie = rwImgListLock.UpgradeToWriterLock(-1);
                }
                else
                {
                    rwImgListLock.AcquireWriterLock(-1);
                }
            }
            finally
            {
                threadWriterLockWaitCount--;
            }
            try
            {
                for (int i = 0; i < imageInfoList.Count; i++)
                {
                    ImageInfo item = imageInfoList[i];
                    if (image == item.Image)
                    {
                        return;
                    }
                }
            }
            finally
            {
                if (isReaderLockHeld)
                {
                    rwImgListLock.DowngradeFromWriterLock(ref lockCookie);
                }
                else
                {
                    rwImgListLock.ReleaseWriterLock();
                }
            }
        }
        //Everything is done. Return.
    }
  5. Use encapsulation. This is one of the crucial OOP principles.

    Compare these two examples:

    Example #1:

    C#
    public int AddTwo(int arg)
    {
    	return arg + 2;
    }
    
    public int AddOne(int arg)
    {
    	return arg + 1;
    }
    
    public void Main()
    {
    	int calc = AddOne(AddTwo(5));
    }

    Example #2:

    C#
    public void Main()
    {
    	int calc = 5 + 2 + 1;
    }

    Sure, example #1 looks more solid. It has more lines of code, everything is encapsulated, and the code looks impressive.

  6. Write less code. This leads to fewer errors, less time on support, and more time for fun.
    Consider the following architecture juice:

    common.js

    C#
    function deleteUser(userId)
    {
        $.get("sqlengine.ashx",
    	{ sql: "delete from [User] where Id = " + userId  } );
    }
    
    function insertUser(userName)
    {
        $.get("sqlengine.ashx",
    	{ sql: "insert into [User] values ('" + userName + "')" } );
    }

    sqlengine.ashx

    C#
    public void ProcessRequest(HttpContext context)
    {
    	var con = new SqlConnection("connectionString");
    	con.Open();
    	var cmd = new SqlCommand(context.Request.QueryString["sql"]);
    	cmd.Connection = con;
    	cmd.ExecuteNonQuery();
    	con.Close();
    }

    You get: AJAXified pages, rapid development, and multi-tier architecture.

  7. Write a genius code. Your colleagues will thank you for the insights.

    Write

    C#
    int year = 0x000007D9;

    instead of

    C#
    int year = 2009;

    Write

    C#
    var sb = new StringBuilder();
    sb.Append("Error:");
    sb.Append(2001);
    sb.Append(".");
    return sb.ToString();

    instead of

    C#
    return string.Format("Error: {0}.", 2001);

    Use

    C#
    /// <summary>
    /// Does mysterious transformation of TRUE to FALSE and vice versa.
    /// </summary>
    public static bool TheGreatLifeTransformation(bool valueToTransform)
    {
        if (valueToTransform == true)
        {
            return false;
        }
        if (valueToTransform == false)
        {
            return true;
        }
    
        throw new ArgumentOutOfRangeException();
    }

    instead of

    C#
    !value

Bonus Track

If you follow these simple steps, your name will soon be known by all of your co-workers. You will be a very popular person — your colleagues will come to you for advice, a chat and a handshake. Some of them may ask you about your professional secret. If this happens, you can give them the following answer (with the voice of a mentor):

"Writing code is a transcendental process of transformation of infinite chaos into finite reality with coherence, of course".

Disclaimer

Everything in this article should not be treated seriously. Any similarities with real code or real people are coincidental.

PS: What would you add to my how-to list? Write it in comments and I will be happy to expand my list.  

Updates

Thanks for great contribution to all of you! A lot of brilliant evidences of rumorous developers could be found in the comments.

Special thanks to:

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder EliteBrains
United States United States
Dmitry is a founder of EliteBrains which mission is to promote success through creativity and progressive thinking.

Comments and Discussions

 
GeneralMy vote of 5 Pin
Sperneder Patrick26-Nov-12 4:23
professionalSperneder Patrick26-Nov-12 4:23 
GeneralMy vote of 1 Pin
J4amieC30-Oct-12 1:33
J4amieC30-Oct-12 1:33 
GeneralMy vote of 5 Pin
Gun Gun Febrianza13-Oct-12 17:17
Gun Gun Febrianza13-Oct-12 17:17 
QuestionGreat Article Pin
ajafik11-Aug-12 7:05
ajafik11-Aug-12 7:05 
GeneralMy vote of 5 Pin
ganesh.dp25-Jul-12 1:00
ganesh.dp25-Jul-12 1:00 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey7-Jul-12 0:13
professionalManoj Kumar Choubey7-Jul-12 0:13 
Questionnice Pin
BillW3326-Jun-12 10:10
professionalBillW3326-Jun-12 10:10 
GeneralMy vote of 5 Pin
Mario Majčica14-Jun-12 3:24
professionalMario Majčica14-Jun-12 3:24 
GeneralMy vote of 5 Pin
Valery Possoz14-May-12 11:34
professionalValery Possoz14-May-12 11:34 
GeneralMy vote of 1 Pin
Andy Missico24-Mar-12 20:03
Andy Missico24-Mar-12 20:03 
GeneralMy vote of 5 Pin
megaadam15-Mar-12 20:00
professionalmegaadam15-Mar-12 20:00 
GeneralRe: My vote of 5 Pin
Opata Chibueze9-Aug-12 10:51
Opata Chibueze9-Aug-12 10:51 
SuggestionHow to Write Unmaintainable Code Pin
torial23-Feb-12 11:38
torial23-Feb-12 11:38 
GeneralMy vote of 5 Pin
FernandoUY31-Dec-11 11:34
professionalFernandoUY31-Dec-11 11:34 
QuestionVery funny Pin
zenwalker198521-Nov-11 17:53
zenwalker198521-Nov-11 17:53 
QuestionExtra Tip Pin
Dave Kerr24-Aug-11 0:10
mentorDave Kerr24-Aug-11 0:10 
GeneralMy vote of 5 Pin
Nickos_me10-May-11 3:27
Nickos_me10-May-11 3:27 
GeneralGlorious! Pin
FernandoUY18-Jan-11 3:45
professionalFernandoUY18-Jan-11 3:45 
GeneralGet over yourselves Pin
jim lahey22-Oct-10 5:09
jim lahey22-Oct-10 5:09 
GeneralMy vote of 1 Pin
R. Giskard Reventlov6-Jul-10 1:53
R. Giskard Reventlov6-Jul-10 1:53 
AnswerRe: My vote of 1 Pin
Eric Xue (brokensnow)6-Sep-10 13:19
Eric Xue (brokensnow)6-Sep-10 13:19 
GeneralNEVER HEARD OF YOU. Pin
je_gonzalez28-Apr-10 5:56
je_gonzalez28-Apr-10 5:56 
GeneralRe: NEVER HEARD OF YOU. Pin
Aleksander Sztwiertnia8-Jan-13 4:00
Aleksander Sztwiertnia8-Jan-13 4:00 
GeneralMy vote of 1 Pin
samsunvista19-Feb-10 10:19
samsunvista19-Feb-10 10:19 
Generalliked it..;) PinPopular
Omar Gameel Salem15-Feb-10 23:01
professionalOmar Gameel Salem15-Feb-10 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.