Miscellaneous Ideas!

How to start a Task in C# which takes parameters:

Task.Factory.StartNew(() => Method(arg1, arg2, ...));

How to handle ambiguity in code:

You may have a situation where you need to add a parameter to a method in the code which is called from 1000 places. And you do it, and you look at a calling method and realize that you have no idea about what value to pass for the new parameter. What you do in this case, is to add the new parameter as a parameter to the calling method as well. Keep on adding the parameter in the caller method until you reach a point where it makes sense to provide a value, or the user is entering the value. You will always reach a point where you will be able to provide a proper value, as long as what you are doing made sense to begin with.

How to handle a crying toddler who does not want to you to brush his teeth:

Give him your toothbrush and let him brush your teeth while you brush his. He will be having fun while you get the work done!

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

Enable Visual Studio to use more than 2GB of memory