How to create enum file dynamically from the database (or any other Data source)

יום שלישי, אוקטובר 30, 2012

Hey. While we all wait for all the news from 2012 build, I thought about sharing something I did in one of my previews projects. In this project we had two sources for the same enum, from the database and from a constants in the application. Each time you wanted to add an enum entry, you had to change it in two places, both in the code and the database. This is, of course an example of bad design and we thought about a solution that will not change the entire application but remove the...
אין תגובות

Guidelines for better code writing

יום שני, ספטמבר 24, 2012

Hey. In the last few weeks I have seen code written by many developers, each one have it’s own style and almost the same code can be written in different ways by different developers. some asked me what are my guidelines for writing code, without further ado, here it is, divided in categories: Goals: Robust – The code you write shouldn’t fail unexpectedly and stop, only when you intend it to stop it will do so. Only what you...
3 תגובות

How to test generic methods using Microsoft.Fakes

יום חמישי, אוגוסט 9, 2012

I have started using the Microsoft.Fakes, one of the new testing future in VS2012, some time ago and I found this tool to be very very powerful and many of my new test are written with the help of Stubs and Shims. If you don’t know what I am talking about you can read about Stubs in here, about Shims in here and you can watch the a very good lecture about it (and more new futures on testing in VS2012) in here. At some point I wanted to detour using Shims a generic method, but I couldn’t...
תגובה אחת

Different types of data blocks in TPL dataflow (TDF) part 1

יום שני, יוני 11, 2012

HeyWith the new release of the release candidate of visual studio 11 (now known as visual studio 12), I would like to explain the difference of the TPL dataflow (TDF) built in data blocks and give a short description about them. In TPL dataflow library there are 3 groups of building blocks. In this part I will talk about the first group which contains 3 unique blocks and the most commons ones: The execution blocks.The thing that combines all those blocks together as a group is that each time a massage in inserted to one of those blocks a delegate will be executed on...
אין תגובות

Visual Studio new look

יום שני, מרץ 12, 2012

I have been playing with the new visual studio, VS11, since the release of the beta I like most of new features, but the really dislike the new color themes. The gray theme look really boring and not attractive. At the release of the beta only 2 theme included the Light theme which is the default and the dark theme. To change to dark go to tools –> Options  and under Environment –> Color theme, you can change the theme to Dark. Dark theme is much better in my opinion, but again after some time it  really hurts your...
40 תגובות