Sep
24
2013

How to access some bits in a byte?

"How to access some bits in a byte?" - someone suddenly asked me the question today, and frankly, at first, I have no idea. We all know .Net support some shift operator >>, << to move a number of bit, but that's it. Let's look at a byte, a byte contains 8 bits as: Byte:        1  1  1  1  1  1  1  1 Bit No:      8  7  6  5  4  3  2  1 For some memory o... [More]
Sep
16
2013

expected strange behavior for double

if you ever create a program like this   class Program { static void Main(string[] args) { double a = 0.1; double b = 0.2; double c = 0.3; double d = 0.6; Console.WriteLine(a + b + c == d); Console.WriteLine(b + c + a == d); Console.ReadKey(); } } Don't be surprised when the system sprints out  False True Wanna know more??? Visit http://msdn.m... [More]
Sep
15
2013
Fun

Fun jokes about software programming

  Q: "Whats the object-oriented way to become wealthy?" A: Inheritance   Programming is like sex: One mistake and you have to support it for the rest of your life.   To understand what recursion is, you must first understand recursion.   There are 10 types of people in the world. Those who understand binary and those who have regular sex.   Q: Why do programmers always ... [More]
Sep
14
2013

"Are you a serious developer?" series - what to do when you find a bug?

How many bugs are there in your system? How frequent a bug is re-opened in later build? How frustrated to fix one bug and create 2 others? Being a serious developer does not mean one will not create any bugs. Every developer creates bugs, yet some creates more bugs than others, and the types of bugs are also various, and different way to treat them. Let's see: 1. Miscellaneous UI bugs: spelling mistake, some controls do not align to other, the font size in this form is not correct.... These b... [More]

About the author

 

    

Month List

Page List