Abstract Confusions

Complexity is not a cause of confusion. It is a result of it.

Tag Archives: Python

Dynamic Typing – New Feature in C# 4.0

Microsoft has released a new version of its flagship product .NET. Visual Studio is highly productive environment for professional to develop and deploy .NET frame work applications. But it still lacked few features which if present would have been better. One of those features is ‘dynamic programming or dynamic typing’. A new version Visual Studio 2010 is released recently. C# 4.0 has this feature.

Dynamic Typing / Dynamic Programming

Dynamic typing as it is known famously has more advantages over static typing. More often people note that, in a statically typed language, a variable – the name, is bound to an object and also bound to a data type. The data type a variable takes needs to be known at the compile time itself. It is true in Java, C and C++.

In a dynamically typed language, the variable, the name is bound to only object. The data type is not declared up front. All happens in runtime. Pretty much true with programming language Python. Now, with Visual studio 2010 release, we will have C# 4.0. C# 4.0 also has dynamic typing feature now. Read more of this post


Interesting Interview Question: Check if a String is Rotated

Found an interesting interview question at Stackoverflow.

How will you find a string ‘a’ is a rotated string of some string ‘b’ (say, or some other reference string, but known)?

a= ‘stackoverflow’, b = ‘overflowstack’, then ‘a’ is rotated string of ‘b’.

a= ‘stackoverflow’, b= ‘flowrevostack’, then ‘a’ is NOT rotated string of ‘b’.

What makes this interview question interesting is seemingly difficult question (check Jon Skeet’s answer, he admitted the actual answer is simple and elegant).

Read more of this post