Posted By: scobleizer | Sep 16th, 2005 @ 2:10 PM | 156,737 Views | 33 Comments
Paul and Erik talk about what they presented this week at the PDC: Dynamic Programming in Visual Basic.
Media Downloads:
Rating:
0
0
If i understand this correctly...it will allow you to write something like this:


messagebox.show(person.(Form1.textbox.text))

(this assumes you a have a person, and a form1 with a textbox)

In other words you can incorporate runtime results back into sourcecode - effectively eliminating the need for things like a select case block(in certain situations).  Of course you would have to validate, or limit the value of, the textbox.text to insure the existence of that member in the calling type.

am i making sense?


The changes they have made to VB.NET allow you to take advantage of dynamic programming without having to write a ton of System.Reflection code and turning Option Strict On or having to turn Option Strict Off.

Writing System.Reflection code and turning Option Strict On to do dynamic programming in VB.NET requires writing a lot of code every time you want to do something dynamic.

Turning Option Strict Off lets you do dynamic programming, but you lose the benefits of compilation, taking performance hits (runtime type resolution) and reducing the ability of the compiler to detect coding errors.

Oh and trying not to be rude here, but maybe next time have someone familiar with dynamic programming and VB.NET do the interview.  That way, you can spend more time in the interview actually showing what improvements they made to the new version of VB.NET to enable better dynamic programming and not spend so much time educating the interviewer on why it is important.

Unless that was the intention, in which case, ignore my advice.  I guess I was expecting a 300/400- level video, not a 100/200- level one.

Much of this looks pretty "old hat" to even a halfway experienced VB 5 or 6 programmer - but I think that's the idea.  A lot of what .Net does is introduce C programmers (if only through C#) to many things they've missed in the past that Classic VB had.

I doubt turning off Strict eliminates strong typing, I believe that point was made.  What it does is allow late-bound operations in addition to early-bound ones.  This would actually improve the productivity of the programmer, because using the bulky explicit reflection approach requires a great deal more source code to be written and debugged in cases where dynamic object use is desired.

Clearly late binding has costs, including performance penalties.  That's why one doesn't use it except where warranted.  A sort costs resources too though, but you don't forego sorting just for that reason.  Instead you avoid sorting lists that are properly ordered to begin with.  Perhaps an oversimplification but the same concept, more or less.

It is good to see how .Net is working to integrate the best things from both programming worlds, as well as extending some of these concepts even further.
Hi JChung2006. I was the interviewer (Ken Levy, VS Data Product Manager) and I have many years of experience with dynamic programming and know in depth what it is all about. But for the interview, the goal was to educate views on what dynamic programming is, what the benefits are, and why developers should care - all in the context of Visual Basic today and tomorrow. So yes, it was totally designed to be a 100/200 level video/interview/demo and not an advanced one. We can consider doing an advanced dynamic programming Ch9 interview in the future. Feel free to list what features (examples) you would like to see demos of, what questions you would like asked, etc.
I have a web based internet game. I need someone to build me a random dice roller to add to it. If your a programmer and know how to build a simple random dice roller, send me a email and I'll send you all the details. You can check my game out at; http://www.fantasytrucking.com  my email address is; novaexpress@qwest.net  I'm not looking for a freebie! I'll pay the right person.
 
Thanks, Greg

Ken, thanks for the reply.

I guess the funny looks Paul and Erik shot you at some of your questions at the beginning of the interview gave me the impression that they thought the talk was going to be an advanced talk, too.  Once you guys got on the same page though, the interview went better.  I viewed the video before the downloadable version was available so I couldn't skip ahead to the parts that interested me.  That's no one's fault.

b_e
b_e
Please, do not allow the person who conducted this interview to ever interview anyone again. Never. Thank you.
CRPietschmann
CRPietschmann
Chris Pietschmann
Interesting. It's too bad all this stuff isn't going to be in VB.NET 2005.
I don't know how others feel - but to me this interview was embarrassing (almost painful) to watch.  Between Paul Vick fumbling around basic reflection code and the terrible interview questions that needed to be re-routed by the interviewees, what should have been a pretty straightforward feature demo came unglued several times.

Unfortunately, this probably served to perpetuate the stereotype that VBers are not the sharpest knives in the drawer.  (Compare this video to the recent Anders/LINQ interview, for instance.)

As someone who uses VB & VB.NET (as well as C#) for a living, here's hoping that we'll see a better representation of VB in future Channel9 videos!  Although I guess it's hard to complain - this content is free after all…


Microsoft Communities