Tracing Not Working

This was a really annoying error. Again the lack of installed entity framework inside the project caused the service to be unusable. All the services worked in VS but not after deployment. I've added tracing to my application. Guess what? It didn't work. I had no idea what was happening. After researching it turned out...

My Obsession with Testing

Over the past few days I dived into testing. Those Air Crash Investigations were one of the most useful source of inspiration. The conclusion was to test everything as thoroughly as possible to avoid surprises. OK, this does make sense, but there are two questions really that need answering: When to stop testing? i.e. at...

Bootstrap Tabs and Google Charts

Today I've encountered an interesting problem. It seems that when an object is hidden, it breaks the properties of width and height. Very annoying. Using Bootstrap I had a set of tabs. Each tab contained a graph of some sort. The chart on the initial tab was being displayed just fine. However for all the...

"using", the safe keyword

It is interesting how Microsoft helps you ease the amount of work. What to do with objects when an exception is thrown? Well... In Java you have a try-catch-finally. The same thing you have in C#. Microsoft however took it a step further. Sometimes we don't care what the exception is we just want to...

Getting rid of nullable type Linq

This was quite annoying. I was trying to convert the output from the database into an array. Everything was great null it started throwing an error that the conversion is a nullable type int?[] In order to get rid of it there was a nice and simple trick:

Getting Midnight Time for DateTime

Presumably easy thing to do. How to get only date for DateTime? DateTime.Now! Well... Not Quite, because it returns the time as well. Fortunately, we don't have to design any algorithms to do do it for us. It turns out that DateTime struct also contains Today attribute which returns current day without returning the current...