Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

JonasE

JonasE JonasE

Niner since 2004

Stockholm
  • Amanda Silver - Getting into Visual Basic.NET

    The discussion on when using what language makes me think of this one ...

    http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html

    Maybe a new category should be added for old VB6 programmers:

    OO wannabie

    using System;

    class MyString
    {
       string _myString;
       
       public MyString(string myString)
       {
          _myString = myString;
       }

       public static implicit operator string(MyString s)
       {
          return s.ToString();
       }

       public override string ToString()
       {
          return _myString;
       }
    }

    class Class1
    {
       [STAThread]
       static void Main(string[] args)
       {
          MyString s = new MyString("Hello World");
          Console.WriteLine(s);
       }
    }

  • Don Box - final part of Indigo team tour

    Only one girl on the team!?! Hurray for quota systems ...
  • Gary Daniels and Evan Goldring - Mock whiteboard problem

    Implementing IsPalindrome with a call to _IsPalindrome is not a solution to the problem. Neither are implementations where reverse is used or split-string-in-two-for-comparison. I am talking about the problem those interviewers had (i.e. to find a skilled programmer).

    Higher level languages need another problem domain. Here's a problem to a C# developer that should match IsPalindrome in C/C++.

    - Implement a fund trading system!

    Or this one ... What's the output from this program (copied from Essential .NET):

    public interface ICommon {

             void DoIt();

    }

     

    public class Base : ICommon {

             void ICommon.DoIt() { Debug.Write (“A”); }

             public virtual void DoIt() { Debug.Write (“B”); }

    }

     

    public class Derived : Base, ICommon {

             void ICommon.DoIt() { Debug.Write (“C”); }

             public new virtual void DoIt() { Debug.Write (“D”); }

    }

     

    public class ReallyDerived : Derived, ICommon {

             public override void DoIt() { Debug.Write (“E”); }

    }

     

    static void Main() {

             ReallyDerived r1 = new ReallyDerived();

             Derived r2 = r1;

             Base r3 = r1;

             ICommon r4 = r1;

     

             r1.DoIt();

             r2.DoIt();

             r3.DoIt();

             r4.DoIt();

    }

  • Gary Daniels and Evan Goldring - Mock whiteboard problem

    bool IsPalindrome(TCHAR *s) {

       TCHAR *e, *p = s;

       if (p == 0 || *p == 0) return false;

       e = p + _tcslen(p) - 1;

       while (*e == *p && e != p && e != s) { e--; p++; }

       return e == p || e == s;

    }

    printf("%s=%d\n", "ABBA", IsPalindrome("ABBA"));
    printf("%s=%d\n", "ABXBA", IsPalindrome("ABXBA"));

    ABBA=1
    ABXBA=1

  • Pat Helland - Sings Bye Bye to Mr CIO Guy

    Laugh or cry, geekiest or weirdest ...

    You haven't seen nothing, if you missed The Nerd, the Suit and The Fortune Teller at TechEd in Amsterdam. That session was unbelievable ...