Thursday 25 September 2014

Thinking is drug


Thanks to Guz Alexander, i finally find myself why i'm weird! Great.
"When someone mentions addiction there is always something negative about it. But I think not every kind of addiction deserve to be censured, moreover possessing some particular psychological addiction is almost necessary for a programmer. I'm talking about thinking.
Yes, it may sound strange because thinking is the same part of out lives as, for example, breathing or eating. Though pay attention to the fact that almost in every programmer's vacancy there is an item in requirements list "desire to learn new things, constant developing", but no one mentions that you have to like to breathe or to eat. Or did I miss something?
This point (about desire) to my opinion is not necessary at all. Why not? Try to ask any programmer why he became "this weird silent guy". May be he will tell you something like "I want a lot of money and a cool car", but this is not surprising at all - we're already considered to be a little strange, no need to make it worse and tell the truth. And the truth is simple: permanent process of thinking, solving difficult tasks, learning new things is the best remedy for boredom. We are addicted to thinking. And I like it."

Thursday 18 September 2014

XOR

Today, i get a question about RAID 4 from my friend. Interesting point is how to recover data from 1 death disk? 
From here => http://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_4
I figure out the way it works.

example, we had: 
A x B x C x D = E
problem: A was lost, how to recover A?
solve:
i had: 
A x A = 0
# x 0 = #
# x 1 = !#
so:

A x B x C x D x B x C x D = E x B x C x D
<=> A = E x B x C x D

we got A.


Wednesday 17 September 2014

Understand SELinux in easy way

Thanks to Daniel J Walsh, I got the overview of SELinux. http://opensource.com/business/13/11/selinux-policy-guide