Archive for November, 2007

Understanding Your 10 Days Vacation

This article is based on Canadian vacation laws.

It seems that most people don’t understand that by law we get 4% vacation.  So where does this number of 2 weeks come from?

Well If you calculate 50 weeks * 4%, you will end up with 2 weeks, what that means is in 1 year, you get 2 weeks paid vacation and 50 weeks of work.  So if your employer prorates your vacation for the first year, meaning that after 3 months they give you 3/12 of 10 days (i.e. 2.5 days or 25% of your total) but you need to take off 2 weeks and they refuse to give it to you, you shouldn’t worry about because either it means at the end of the year thats all you took (2.5 days paid), and by law they will pay you for the other 7.5 days or 3.75% of your total salary at the end of the year (or whenever they reconcile their accounts which could be a few months later)

The other case is that you will still get 7.5 days vacation after those 2.5 paid days, so in that case you didn’t lose anything and you ended up getting about 2 weeks extra unpaid vacation. 

So make a decision, and enjoy your vacation!

How To Debug Inside The Code Of Your 3rd Party Libraries

Let’s say you are using a 3rd Party Library like ELMAH in your web site project to handle unhandled exceptions and it’s throwing an exception and you don’t know why.  Since the code is open source, you would LOVE to see what line its crashing on and then submit your changes to the project so that others can benefit from the fix you made.  It gives you that good feeling, right?

Well, unfortunately, you put the compiled DLL in the bin folder and when it crashes, it just crashes and burns.

How can you see the source code?  Simple!  Compile the source code on your machine, and copy the PDB ("Debugging Database") file to your bin folder along with the DLL, and then your web site crashes while in debug mode, it will go to the exact folder on your file system where the DLL was compiled from and show you the exact line of the error.

This was my recent experience with Elmah that it was crashing due to the fact that XMLWriter was misbehaving and throwing an exception when it was supposed to actually replace invalid entities in the XML automatically (at least, according to the MSDN documentation).

Take a look at Issue 43 on Elmah Site for more details.

 

Optimization WordPress Plugins & Solutions by W3 EDGE