Wednesday, August 31, 2011

Boolean parameters

It's not fun to look at a method call that sends more than 0 boolean parameters.

Code Snippet
  1. SetBinding(false, false, comboBox);

There is 100% guarantee that you will look for the documentation about this parameters and it'll slow your code reading speed.

Here is a nice way to avoid the unreadable code and keep on using this meaningless Boolean.


Code Snippet
  1. SetBinding(/* auto resolve= */ false, /* two way binding? = */ false, comboBox);


This is not my idea though, it's from Microsoft pdb's, and I think its awesome.

Thursday, August 4, 2011

If you're searching for a good place to grow

http://crossrider.com/pages/jobs

I know this guys and worked with them a little, very recommended for any developer.

Tuesday, August 2, 2011

Dont return and linq on the same line

Just a little tip for writing a friendlier code.
If you're method returns an expression, first assign it to a variable and then return him.
It'll be much easier to debug inside this method and fetch all results when watching this variable.

That's it !