What happens when a Java coder decides to explain a Red Black Tree in C#?
-
Page 1 - good Page 2 - good Page 3 - I see at least 5 programming mistakes in the sample code... :wtf: http://www.devx.com/DevX/Article/36196/0/page/1[^] Not bad, but that last page really spoilt it for me :(
xacc.ide
IronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach." -
Page 1 - good Page 2 - good Page 3 - I see at least 5 programming mistakes in the sample code... :wtf: http://www.devx.com/DevX/Article/36196/0/page/1[^] Not bad, but that last page really spoilt it for me :(
xacc.ide
IronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."You'd think that he could have at least tried to compile the code. How hard could it be?
Deja View - the feeling that you've seen this post before.
-
Page 1 - good Page 2 - good Page 3 - I see at least 5 programming mistakes in the sample code... :wtf: http://www.devx.com/DevX/Article/36196/0/page/1[^] Not bad, but that last page really spoilt it for me :(
xacc.ide
IronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."nothing happens, C# is just as Java (i bet u can learn it with in 3 hrs :) excepts advance), and a programmer goes for concepts not the mistakes u done in syntax, of course if u compiled, it means u don't have syntax error. and also data structure/algorithm r independent to language, so conclusion = nothing happens:cool:
programming is just like poetry
-
nothing happens, C# is just as Java (i bet u can learn it with in 3 hrs :) excepts advance), and a programmer goes for concepts not the mistakes u done in syntax, of course if u compiled, it means u don't have syntax error. and also data structure/algorithm r independent to language, so conclusion = nothing happens:cool:
programming is just like poetry
Rizwan Yasin wrote:
C# is just as Java
If you are happy with comparing apples to pears, and coding like a absolute beginner, then thats up to you. Please note, I said mistakes, not errors.
Rizwan Yasin wrote:
and also data structure/algorithm r independent to language
Thats why I considered page 1 and 2 as good content.
xacc.ide
IronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach." -
Page 1 - good Page 2 - good Page 3 - I see at least 5 programming mistakes in the sample code... :wtf: http://www.devx.com/DevX/Article/36196/0/page/1[^] Not bad, but that last page really spoilt it for me :(
xacc.ide
IronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."I have to say I can't see that many problems. Discarding every other random number is a bit weird in the first example. Throughout there's a reliance on the low-precision system clock returned with
DateTime.Now
andTimeSpan.Milliseconds
returns the milliseconds part only, you should useTotalMilliseconds
if you want it to tell you how many seconds elapsed. For more accurate timing results use aSystem.Diagnostics.Stopwatch
. At this point any collection which doesn't support generics is pretty stupid, the whole thing should be parameterized on T with a restriction that T derives from IComparable<T> or allows you to supply an IComparer<T>. I'd like to see a comparison with inserting into a sorted ArrayList or List<T> and using BinarySearch. A lot of emphasis is put on the computational algorithmic complexity of data structures and algorithms, but these days practical algorithm performance is based on memory speed hierarchies, and cache locality is very important. Further, an array typically represents a lower load on the garbage collector than a deeply-linked data structure (fewer pointers to follow). There is a reason why Microsoft didn't and still don't supply linked list or binary tree structures with the .NET Framework.DoEvents: Generating unexpected recursion since 1991