surprises

Surprises Moving from C++ to C#

I am a C++ programmer moving into C#. I worked with the language for a month now and understand many concepts. What are some surprises i may get while moving from C++ to C#? i was warned about destructors not being executed as i intended. Recently i tried to do something with generics that would use T as the base class. That didnt work....

Why does uniq! return nil if there are no duplicates

I'm just starting with Ruby and I personally find the following to be a violation of the "principle of least surprise". And that is, quoting from the documentation, that uniq! "removes duplicate elements from self. Returns nil if no changes are made (that is, no duplicates are found)." Can anybody explain this, which seems completely c...

Unwanted ftp surprises

Sometimes, when I upload files to ftp, and then download them, I face with some "unwanted tricks" inside gotten files. Initial file: <ul> <li><a href="#">Home</a></li> <li><a href="#">Works</a></li> <li><a href="#">About</a></li> <li><a href="#">Docs</a></li> <li><a href="#">Blog</a></li> <li><a href="#">Forums</a></li> </ul> 2...