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

Anders Hejlsberg - More C# Talk from C#'s Architect (Happy Birthday Video #3)

Download

Right click “Save as…”

Anders Hejlsberg is going to TechED in Orlando, FL on June 5-10, so we got Charles Torre to go over and talk with Anders about all the latest stuff happening in C# as a preview of what he'll talk about at TechED.

Generics. Iterators. Partial classes.
What's that generic mug again?

Don't know who Anders is? Go read about him on Wikipedia. He led the teams that developed Borland's Turbo Pascal and Delphi and now C# at Microsoft.

Follow the Discussion

  • Stevan VeselinovicSteve411 Me, all suited up!
    Custom error pages are simple to create in Visual Studio 7.0 as well. I handle all my asp.net errors in the Global.asax file.

    protected void Application_Error(Object sender, EventArgs e)
    {
    Exception x = new Exception();
    Server.Transfer("Error.aspx?ErrNum="+x.Message+"&ErrMessage="+x.Message);
    }

    The I pass it on the error.aspx page, which reads the request url.

    private void Page_Load(object sender, System.EventArgs e)
    {
    if(Page.IsPostBack)
    {
    setError("No error to display");
    setErrorNumber("No error number");
    }
    else
    {
    string errorMessage = Request.QueryString["ErrMessage"];
    string errorCode = Request.QueryString["ErrNum"];
    setError(errorMessage);
    setErrorNumber(errorCode);
    }
    }
    public void setError(string error)
    {
    if(error == "Exception of type System.Exception was thrown.")
    {
    lblError.Text = "The page, file, download, image, software program,
    or user you are looking for does not exists, give it another try!";
    }
    else
    {
    lblError.Text = error;
    }
    }
    public void setErrorNumber(string number)
    {
    if(number == "Exception of type System.Exception was thrown.")
    {
    lblErrorCode.Text = "00 - Server Error";
    }
    else
    {
    lblErrorCode.Text = number;
    }
    }
  • William Staceystaceyw Before C# there was darkness...
    Great.  Always good to hear Anders.  Looking forward to the c# Data concepts.  Will that be talked about at TechEd?
  • MikeSMikeS MikeS
    It's always great to listen to Anders, but when are we going to be able to SEE HIM!!! Isn't it about time we had Anders# instead of Background#? Not only is he blurry and you can read his book titles fine, but in a lot of the shots by the whiteboard - sorry grayboard - Anders is actually BLACK! Smiley

    When are you guys going to learn how to use your video camera? Come on! Go get "Video Cameras for Dummies" and figure out how to press a couple of buttons to lock the exposure and focus.

    It's really not that hard! Smiley
  • scobleizerscobleizer I'm the video guy
    Actually, it is hard. Especially when you're a developer trying to keep up with Anders' big brain.

    We'll try to do better, though. Charles shot that himself without any help.
  • That was an awesome video of Anders.
    Keep it up Ch9...great work.
  • staceyw wrote:
    Great.  Always good to hear Anders.  Looking forward to the c# Data concepts.  Will that be talked about at TechEd?

    TechEd uses to be more about the present then the future. PDC is more about the future, so my guess is that some plans for C# v3 will be discussed at PDC'05.
  • CharlesCharles Welcome Change
    MikeS wrote:
    It's always great to listen to Anders, but when are we going to be able to SEE HIM!!! Isn't it about time we had Anders# instead of Background#? Not only is he blurry and you can read his book titles fine, but in a lot of the shots by the whiteboard - sorry grayboard - Anders is actually BLACK! Smiley

    When are you guys going to learn how to use your video camera? Come on! Go get "Video Cameras for Dummies" and figure out how to press a couple of buttons to lock the exposure and focus.

    It's really not that hard! Smiley


    Is is really that bad? Seems relatively fine to me. Anyway, I'm not a camera guy, sorry.


    C
  • Strange, for me the worst thing about the birthday videos is that for some reason they are very very blocky. Has something changed with the encoding or something else that could affect the image quality? WMP says the bitrate is 291 K bits/second. How about having some 1000+ Kbit/s version of the Bill Hill hike video?

  • MinhMinh WOOH!  WOOH!
    Wait a minute. Why would Anders Hejlsberg have C# books on his shelves? Wah?
  • MikeSMikeS MikeS
    scobleizer wrote:
    Actually, it is hard. Especially when you're a developer trying to keep up with Anders' big brain.

    We'll try to do better, though. Charles shot that himself without any help.


    Switching off auto exposure isn't hard, no matter what Anders' big brain does Smiley It's the number one thing any camcorder user should do.

    Since many of the videos I've seen on Channel9 are taken in offices with big windows (not Windows Smiley ) in the background, this will be a big improvement.

    HowTo: before you start, just point the camera at the wall inside the room, with no window or light source in the frame and no white board either - and switch the exposure to manual. That'll lock it at that setting and you can pan around without everything going dark every time you go near the window.

    How hard is that?
  • MikeSMikeS MikeS
    Charles wrote:
    MikeS wrote: It's always great to listen to Anders, but when are we going to be able to SEE HIM!!! Isn't it about time we had Anders# instead of Background#? Not only is he blurry and you can read his book titles fine, but in a lot of the shots by the whiteboard - sorry grayboard - Anders is actually BLACK! Smiley

    When are you guys going to learn how to use your video camera? Come on! Go get "Video Cameras for Dummies" and figure out how to press a couple of buttons to lock the exposure and focus.

    It's really not that hard! Smiley


    Is is really that bad? Seems relatively fine to me. Anyway, I'm not a camera guy, sorry.


    C


    No of course it's not THAT bad, and neither is DOS but I bet you use Windows Smiley

    If a reasonable improvement is very easy to implement and it'll work every time, then it's worth doing IMHO. Just about every video I see here suffers from drastic brightness fluctuations. The solution is simply to switch off auto exposure before you start.
  • scobleizerscobleizer I'm the video guy
    Androidi: what OS are you on? What version of Media Player are you on? The videos are 320x240 so shouldn't be blocky if played at that size. If you are seeing blocky video, then it's using one of the lower bandwidth versions (each video has three streams: 300/100/43 kbps).

    Unfortunately higher bandwidth versions aren't feasable for us yet.
  • scobleizerscobleizer I'm the video guy
    Mike S: I am looking at my Panasonic camcorder and can't find a way to lock the exposure. I'll get the manual and try to figure that out.
  • Skewtzsc00ter Always in motion the future is..
    Yup, again, an excellent video Smiley Always love seeing Anders.. 

    I've got two monitors set up.  One at 1152x864 (main) and another to my right at 640x400.  C9 videos are a lot better on the 640x400 than viewing them on the main screen (fullscreen).   Yes, there is a little blocking.  I watch all these videos on full screen.. the 320xXXX to me is a little small when viewed in windowed mode. Sad  perhaps encoding them to 640x480 might be a bit better?

    For the bitrates.. I get the 291kbps version.  The idea of bumping up the bitrate would be a good idea.  I bet a lot of others here on C9 would agree there too.  1000 would be overkill (would be nice).  Maybe 700?

    Anyways.. keep the excellent videos coming. Smiley


  • I must get a cup<T> mug!!! Very geeky!

    It's like the old joke:

    There 10 types of people in this world, those who understand binary and those who don't.
  • scobleizer wrote:
    Androidi: what OS are you on? What version of Media Player are you on? The videos are 320x240 so shouldn't be blocky if played at that size.


    SP2,10 etc. I did try changing some WMP settings too, like putting on the high quality mode. 

    I looked the new videos and older videos more closely. I guess the quality goes like : The more light in the scene (outdoor) the worse the picture. I am no expert on exposures etc so it could be that the previous posters are right and when the lighting keeps changing in the scene the WM codec uses more bandwidth in the scene background and so on. The Bill Hill hike video seems to suffer the most and if you expect it to be very popular, making better quality version available would not be such bad mode for this special case. Of course H.264 could be helpful but I guess thats still behind the doors for a couple days until A gets their new OS update out.

    I was going to bring up the limited use of peer to peer here, but my stance is that using peer to peer distribution to circumvent Internet providers high fees and/or bad service is not acceptable as the technology just creates additional overhead traffic if the total generated traffic is used as a measure. The right solution is to arrange some competition around what company provides much faster than current bandwidth for cheaper to MS. And have this competition atleast yearly..

    PS. I am not entirely certain what your argument is. Is it that MS can't afford or that there's no demand? Where there is broadband availability, its going to average on 2 Mbit/s pretty soon. And where there's not - well for that segment of people even the 300 Kbit is too much*. So there's hardly argument against going higher from the point of demand. I can pull some study data to back up these claims of course if necessary Smiley

    * That is unless you expect a huge amount of people to view these videos on their 3G connections. 3G is coming. I mean it has been coming for past 5 years atleast. And I believe around 1000 people have it here. And I am being very optimistic here!
  • sc00ter wrote:
    perhaps encoding them to 640x480 might be a bit better?


    I doubt that (with the 300 Kbit..). 320x240 can look surprisingly good. There is just so many other factors here. Perhaps Scoble would be cool and put a 1 minute clip of the Bill Hill hiking video in its original capture quality and format available somewhere. It would be interesting to try compress it to H.264 and try some other stuff.
  • CharlesCharles Welcome Change
    MikeS: Thank you for the advice. I will look on my camera and see if I can adjust the required setting. I'd love to not have interviewees go dark, but at least you can still hear them!

    C
  • scobleizerscobleizer I'm the video guy
    Part of it is my workflow. It's already pretty difficult to deal with the size of the videos the way they are. Making them larger makes the time I have to deal with them more complex. I'm playing around, though.
  • Deactivated UserDeactivated User

    Comment removed at user's request.

  • guegue

    Dear Scobelizer et al.,

    First of all: Thanks to you all for your service to the community!!!

    What I would VERY much appreciate though is lower bandwidth video versions, or, - like with Dave Probert in the first three parts - you could have easily spared the video portion at all and provided one loRes picture! Only the fourth one included some major whiteboarding which needed the picture.

    Currently I´m consuming three quarters of my 2GB download allowance to listen to the shows and see shaky camera faces I don´t wanna see.

    Please take Franklins.net as an example.

    Thanks again and no offense, please!

    G

  • guegue
    Oops,
    just opened the Probert video in Media Stream Editor and it shows that I DOWNLOAD THREE streams (every time)!

    PLEASE, PLEASE, PLEASE, let us d/l whatever stream we want seperately!!!

    THANKS
    G
  • I wonder if the 'generic' cups came from here:

    http://www.cafepress.com/dotnetinfo

    ???
  • Weird thing with this video is that I feel like a freshman in college (although he's a better teacher than most).  This is quite basic C++ templating under a different name, something I've missed on occasion in C#.  However, the C# conversion between int/string/etc. is much easier than C++ (and even Java) was.

    Of course the big reason I use the ArrayList vs. Array is the fact that ArrayList is growable and Array is not.  But there are doubtless performance gains here.
  • rhmrhm
    dantheman82 wrote:
    Weird thing with this video is that I feel like a freshman in college (although he's a better teacher than most).  This is quite basic C++ templating under a different name, something I've missed on occasion in C#.  However, the C# conversion between int/string/etc. is much easier than C++ (and even Java) was.


    Actually .NET Generics are a lot different from C++ templates - in some ways much better and in some ways not so good. The main difference is that C++ templates are just a compiler front-end feature whereas with C# generics the class meta-data retains information about the generics at all levels. So when you use a templated class in C++ the compiler generates a concrete implementation of it for every combination of parameters at compile time. C# does all the type checking at compile time but just compiles the one representation of the generic class into the assembly. The .NET CLR generates whatever code it needs on a method by method basis at runtime.

    Another big difference is that with C++ templates everything is matched by name so a template method can for example work on any class that has a length() member. In C# generics the template parameters are checked against specific base classes or interfaces. OO fanatics would prefer the way C# works by the C++ method is more flexible (and you can still do the same checking C# does if you want to).

    A third difference is that the C++ template mechanism is a full (though obscure) functional programming language that is executed at compile time. This allows for what's called "template meta-programming" (google for it). C# doesn't support anything like that.
  • rhmrhm
    On the subject of this video: Doesn't Anders get bored explaining the absolte basics of generics to people all the time? I mean this stuff was added to C# literally years ago (long before Whidbey was even heard of) in a MSR project. Anders must be working on stuff far more advanced by now. It's like getting Tiger Woods on to explain the setup basics.
  • Yes, I have to agree that I too was hoping for more talk about the other cool features coming up in the new version of C#, rather than a gentle stroll down the well-trodden path of Generics.

    I guess I'll have to Google to satisfy my curiosity about "Nullable Types" and "Partial Classes".
  • About partial classes (and anonymous iterators), ISBN 0321154916 (The C# Programming Language) is a good and complete source. About nullable types, the best source I've found, and a good one, indeed, is the help file from any of the Whidbey betas.
  • String myString = "BootGuy";
    Customer customer = new Customer();
    Lawnmower lawnmower = new Lawnmower();

    ArrayList arrayList = new ArrayList();
    arrayList.Add(myString);
    arrayList.Add(customer);
    arrayList.Add(lawnmower);

    // Strings, Customers, and Lawnmowers, oh My!
    // That was pretty funny from Anders!
  • CharlesCharles Welcome Change
    Only had Homing of his time... Sorry we didn't get into everything. s We should do more around the one exciting enhancements. Agreed. E
  • "list.Add(42)" Tongue Out

    I listened to the first 2 seconds of the video like 5 times so I could figure out how to pronounce his name.

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.