locked
Why you should not learn VB! RRS feed

  • General discussion

  •  

    Learning a new programming language is as hard as learning a new language. Most aspects of learning a new language could be point of simile when it comes to learning a new programming language.


    Indeed before the brain starts making the necessary connections between its different parts it will take a while, however, a programming language like VB is much more simpler to learn because the language is some form of written English which large number of people know. This is one of the most important aspects of VB which makes is ideal for students. This is not a random fact as during the 1960s Basic (Visual Basic is some sort of Basic) was created to be the programming language that students learn and hence it took advantage of the fact that most English speaking students would already know the language which in turn makes learning a programming language with English as its infrastructure more simple

    .

    But why should we learn VB? Or should we not? Of course as discussed above learning VB is simpler than most other programming languages, however, is it capable of performing all the actions that one could perform with other languages? Well the answer to this question is not as straight forward as one might think, but if the language is easy to learn why do other people learn other languages? I think the reason for this is that other languages could provide a better efficiency and performance with some advanced features. So when some advanced coding skills is required VB comes to a dead end at the present time.


    I’ll give you a simple example from my personal experience. I coded two identical programs in VB and C#, so both were based on .NET 3.0 and compiled with Visual Studio 2008 beta 2. Then I created a .dll of both codes and linked them to one other code which was able to use the code in the .dll. I then calculated process speed for both codes the results are staggering (They are average results):


    VB .NET:       520 KB/s

    C# .NET:       934 KB/s


    I have to say that the .dll only plays a small part in the program. So when the above data is analysed we could conclude that the .dll produces by VB runs slower than the one produced by C#. So “why learn VB at all?”. I don’t mean that one should not learn VB but I am trying to say is “what is the point of learning VB?” While the same time could be spend learning a language like C or even better C++; which in turn would virtually work on any operating system!


    If you are planning to learn VB “DON’T”. Because as you develop new coding skills you would find that VB is limiting your abilities. At this time you will be looking for a new language and indeed you need to start learning from scratch. This means all the time spend becoming fluent in VB was nothing but waste of time. This is only my personal opinion about the language. The first language that I have leant was VB. And I have to mention that I truly respect everyone that codes in VB and everyone else who doesn’t.



    I welcome any critisism, spelling mistakes or any other type of comments and I would like to think why I might be biased towards this isuee.



    Thanks you



    Sunday, October 28, 2007 11:07 PM

All replies

  •  

    Evoluator,

     

    I love our discussions but this post is patently absurb. All languages have their tradeoffs and there's no doubt about that. I have worked professionally in many languages many of them much more complicated than vb and I still like vb.

     

    The two most functionally similar languages in the world are C# and VB because they both use the CLR and the same CLR classes. There have been claims the C# is faster but it close scrutiny has shown that the claims did not bear themselves out.

     

    You are learning VB. I've been writing vb for about a decade now and I'm still learning VB. But we are in different places in our learning and I don't believe you've had time to fully embrace the fundamentals in order to really critique vb. You're questions here have been at a pretty basic level as far as architecture and practice is concerned. There have been questions on Buffering both single and double, etc, etc, etc.

     

    There is a lot that your post leaves in the question. Perhaps your post should be called, "Why I should have learned VB before I wrote a large project?"

     

    "Then I created a .dll of both codes and linked them to one other code which was able to use the code in the .dll."

     

    This should be re-stated as:

     

    "Then I created a .dll of both pieces of code and linked them to other code which was able to call the code in the  respective .dlls.

    Sunday, October 28, 2007 11:26 PM

  •  

    "This should be re-stated as:

     

    "Then I created a .dll of both pieces of code and linked them to other code which was able to call the code in the  respective .dlls."


    Indeed I have had made an implicit assumption that this is the only procedure which I would have been able to use the .dll.


    But my main concern is I have noticed great speed increase when the code is written in any C or C++, although it is much harder to code in C++, but my cryptography code which was written from scratch in VB is hoplessly slow that I couldn't even bother encrypting files larger than 1MB. But the same code only "translated" increased the speed twise!


    I re-emphesize on "translated" because I didn't make any modification to the code. And if you argue there is better way of writtin the code in VB I will tell you that I have optomised the code in a way that most functions could not be stireped down further (not in bluck of code but rather the processes required). I challenge you to optomise the code further, if you are at all interested. You write the code in VB and I'll use C#, and see which code would be the fastest. Deal?






    Monday, October 29, 2007 12:41 AM
  •  

    "But my main concern is I have noticed great speed increase when the code is written in any C or C++"

     

    Of course you have. They are (usually in the case of C++) native mode code. But C and C++ are do not use the clr. They are not managed and are not particulary secure. They are also both very primitive. They may run faster.... but I can produce far more, more secure code in VB than you can in C++ and C.

    Monday, October 29, 2007 1:09 AM
  • I use VB because I can produce a working program in about 1/4 the time it would take me to code the same program in C.  If I need to speed up the program, I write the critical section in C.  Using C and Assembly, I can code critical sections to run up to 100 times faster than managed code.  I see no difference between coding in VB.Net and C#.  I'm just more comfortable coding in VB.  I can convert the VB code to C# using the Tangible Software Solutions translators.  When I time VB.Net and C# code of the same function, I get approximately the same time to run the function in either language.

    Monday, October 29, 2007 4:26 AM
  •  

    I agree with everything John said. I've written thousands and thousands of lines in assembler, on mainframes. I don't like the Intel instruction set. But in my experience, I've noticed that if you have a DLL interface, to that fast code, the interface and context switching will slow you way down. So if you are going to do something in a DLL, design it so that do most of your repitive processing in the dll. Because calling a DLL over and over again will slow you down.

     

    For the last thirty years there has been a debate as to whether humans can write faster code than a good optimizing compiler. I believe in the long run we can't and that we will lose out to a good compiler. At DEC our high level system implementation language had a seven pass compiler. It produced rather incredible optimized code. I understand that that the Microsoft compilers are two pass compliers and the claim is that you can get all the optimization you need in two passes. I remain in the question about that.

    Monday, October 29, 2007 4:40 AM
  • Indeed,

    John;

    I have never critisised the VB programmers but VB learners. Since VB is extreamly simple in comparison to other languages, it gives you lazy habits which in turn could potential reduce the quality of the code produced. I have to mention C# as an example, but my main point revolves arround C++. Although it is harder to code but it is faster and more efficinet. Also with languages like C++ one could be more creative than VB.

    ReneeC;

    That is the point, I have actually maid some mistakes in my first thread here. The C# code used a .dll, while the VB was embeded code. This means that the C# code would have been even faster than the VB. This actually is the point I am trying to make: "Why learn a language that is slower than other languages? Why not learn C++ from scratch?"

    As I said I don't disagree with people who actually code in VB, but the learners would learn a language and when they want to extend their abilities they need to learn a new one.

    Am I making sence?

    Monday, October 29, 2007 9:41 AM
  •  

    No you aren't making sense. No one but you is claiming that VB is slower than C#.

     

    Why learn a case sensitive language? Why learn a meat and potatoes language. I've ways thought C# should be outlawed.

    Monday, October 29, 2007 11:44 AM
  • The code speed has nothing to do with the language - it is the implementation, which counts. The language, which is slow today, may be fast tomorrow. For example, I have compiled exactly the same code in Turbo Pascal and Free Pascal and the Free Pascal code runs approximately three times faster!

     

    Also, it is not a law of nature that VB is always managed. This is just the way Microsoft has chosen to do it. You can find almost the same VB syntax in Fortran 95 and can actually use Fortran 95 as a replacement for C++ for native applications. Intel has a very good Fortran 95 compiler, which integrates directly in the .NET IDE, and can be used for that (according to Intel). I will probably try this for programming drivers in the future.

     

    I think that it is important to choose a language, which is as easy to overlook as possible, because the limiting factor is the human brain. Even the most cryptic language may be compiled, but if you cannot overlook what you are doing, there may be dozens of logical errors in the program meaning low reliability. Just look at Windows XP and Vista. They are programmed in C#. Are you impressed by the safety and speed? I am not! Maybe a language with better readability could have reduced the number of safety holes?

     

    It is only if you want to be a professional programmer that you should consider C - simply because there are many more C applications than VB or Fortran 95.

     

    Let me suggest the following to the VB team: Why not make it possible to use both VB and Fortran 95 syntax in the next version of the compiler? The difference is so small that this ought to be quite easy and together we are much stronger and can make a real alternative to the terrible C style languages. Alone, VB will probably never be anything than a pure Microsoft language.

    Monday, October 29, 2007 12:52 PM
  •  

    " Intel has a very good Fortran 95 compiler, which integrates directly in the .NET IDE, and can be used for that (according to Intel). I will probably try this for programming drivers in the future."

     

    WOW !!!!!!!!!!!!!!! I used to LOVE fortran but then I got into BLISS. Does this compiler cost anything?

     

    I'd never use Fortran for a driver... and then again, I'd never use C either. I have a hard imagining Fortran in OOP though. How do they deal with Fortran common?  Most people don't realize that member variables are the exact same thing.

     

    Monday, October 29, 2007 1:46 PM
  • http://www.intel.com/cd/software/products/asmo-na/eng/278834.htm

     

    Unfortunately, it is not free - $280 to $1600 depending on version, but I have seen a benchmark of Fortran compilers and the Intel one (Visual Fortran 9) generated the fastest code (very optimized) and version 10 is probably not worse.

    Monday, October 29, 2007 2:46 PM
  •  

    That is really cool.

     

    Did you know there is also a Cil compiler so you can actually write in the Clr Intermeditate language:

     

    "The .NET SDK includes an assembler program for CIL named ilasm.exe. Programs written directly in CIL are just as managed and just as portable as programs written in C#. Of course, most .NET programmers don‘t know any CIL at all, and even fewer know enough CIL to be able to actually code in it. However, it is sometimes instructive and revealing to examine the CIL that the C# com-piler emits, and in this book I‘ll occasionally call your attention to it. "

     

    Charles Petzold.

     

    http://www.charlespetzold.com/dotnet/DotNetBookZero11.pdf

    Monday, October 29, 2007 2:50 PM
  • ReneeC

     

    Thanks for the information and the book link.

     

    It as actually a pity that there has never been any development in the assembler language. It is still Move A, B although you could easily write A = B (Intel) or B = A (Motorola) and still generate equally optimized code. When I program in assembler, all comments are in pseudo high level language and the program is fully structured with e.g. IF-Else-EndIf constructions. I will try to look at ilasm the next time I am going to do something very time critical.

    Monday, October 29, 2007 3:20 PM
  •  

    I have done assembler on the intel platform but I really didn't like. The VAX architecture was so vastly ahead of the 8086. It was not an acumulator architecture. You could do math from all registers and from memory and all registers could address memory. There were 400 instructions in the instruction set, (including a Polynomial F and packed decimal instruction as well as cotext switching instructions. Not only that there were movc3 and movc5 instructions capable of moving large numbers a characters in a single instruction. I've always felt vey limited programming in intel assembler.
    Monday, October 29, 2007 3:26 PM
  • Me too. The Intel architecture is absolutely awful. That's one of the reasons why I prefer e.g. the Motorola microprocessor family like 68000, ColdFire etc., which also have a general usable register set without accumulator and paged addressing, but it could easily be even more optimized and the assembler language is still very old fashioned.

    Monday, October 29, 2007 3:44 PM
  •  

    what do you mean by old fashioned?

     

    You know back in the seventies DEC had assembler macros and the ability to interpret them which provided keywords for structured programming.

    Monday, October 29, 2007 3:48 PM
  •          JNZ Reg0, Label1

             Move A, B

             Jmp Label2

    Label1:

             Move B, A

    Label2:

     

    Is old fashioned compared to:

     

    If Reg0 = 0 Then

        A = B

    Else

        B = A

    End If

     

    In case of simple constructions like this, the second syntax could generate exactly the same machine code as the first one. For example, an Else statement can be replaced with a jump statement followed by a label, and the End If statement can be replaced with a label. This is actually the way I write assembler programs.

     

     

     

     

     

    Monday, October 29, 2007 4:19 PM
  •  

    UGH.......

     

    UGH......

     

    I just realized how much I don't like doing that to assembler.

     

    If Reg0 = 0 Then

        A = B

    Else

        B = A

    End If

     

     

        Testl R0

         Bneq 15$

         MovL R2,R1

         Brb 30$

    15$:

        Movl R1,R2

    30$:

     

     

     

    Now that's assembler !!!!!!!!!!!!!!!!!! Big Smile

    Monday, October 29, 2007 4:35 PM
  • Hi there.

     

    I´m new in VB and I have no idea how to code in C# or C++ but after reading what you guys/girls have been saying about these programs I do have a bit better understanding of these programs.

     

    And here is my understanding;

     

    Lets say VB is person (A) and C# is person (B).  Person (A) and (B) are friends and they both got theirs first bikes for christmas.  Person (A) uses extra wheels so he would not fall and hurt him self, person (B) doesn´t uses extra wheels and is always falling and hurting her self.  But, after some time both (A) and (B) can ride theirs bikes perfectly eventhough they sometimes fall down and get hurt.  But who can say that person (A) is not as good biker than person (B) ? Or what more is; who can say that person (A) CAN´T become better biker than person (B) just because (A) recived some help learning how to bike?

     

    People can´t assert that learnig a program language is a waist of time, what is waist of time is when people don´t use their programming skills to make something usefull after spending huge ammount of time learning a language.

     

    Monday, October 29, 2007 5:01 PM
  •  

    Hjortur_27,

     

    I couldn't agree with you more.  I didn't begin with VB. I began with a flock of much more complex languages, none of which were case-sensitive. I don't like the terseness of C and I don't think I've ever seen a piece of C that I would consider pretty.

     

    But I did you what you had to say.  I like Evoluator, but he doesn't listen to me and that's been demonstrated many times. C# useds the same framework that VB does. One is not daster than than another.


    Monday, October 29, 2007 5:39 PM
  • Okee

    I have to say something to about this . . . C++   ugh

     

    First you should no that i have bin trying out the various language availleble and i find your so beloved C++ nothing else then most annoying / annoyance sofar.

    it already started at the begin i download Visual C++ 2005 Express then

    i can't start because C++ won't let me before i have downloaded

     

    http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en

     

    then i have to modify this o so good C++ (seams like it is not so good)

     

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1995837&SiteID=1

     

    And for someone who never used a visual language this is simply not funny so most people

    use visual basic / C# where you don't have to go tru this nonsens.

     

    Then the help for VB and C# is there butt mostly for VB so basicly the

    starter need help so they choose VB not C++ with 8 video's and a quick tour.

    that is not verry helpfull compaired what VB and C# offer.

     

    If this language is so good why do i need to download so much else ?

     

    Or why is there no tier for it ?

     

    No to get started i think Visual Basic is a good choise to start.

    then continue on from a strong base.

    i find this topic insulting to Visual Basic.

     

    Nightblade

     

    this comes when you're doing maths, algorithms and array manipulation (including memory arrays).

    You just need that extra speed. Visual Basic is and always will be the easier and more fun language to write

    the same game written in C++ is much harder, much less friendly to read and will take longer.

    VB with the power of directX behind it has become a serious contender for making games

    It's just several small things that limit your creativity, and these are the things that

    C++ developers enjoy the ability of using.

     

    Without a doubt C++ and assembler can wipe the floor with VB's array and mathematics functions.

    There is a way however to keep the bulk of your code in VB and use another (faster) language to

    the time-critical maths functions.

     

    The easiest way is to write a simple C++ DLL and link your VB project to it.

    Monday, October 29, 2007 5:42 PM
  • Yanno,

     

    I think this is one of the best C vs VB discussions I've ever seen.

    Monday, October 29, 2007 6:00 PM
  • I think that everyone should know both C# and VB if they are going to be .Net programmers.  Knowing both and being able to translate between them gives one a greater understanding of the foundations.  If you think about how large a factor .Net plays with C# and VB you will likely realize that you will end up spending more energy and time understanding and mastering .Net than you will learning how to translate between C# and VB.

     

    Why use C#?

    It is in my opinion the "first child" of the CRL and some interesting MS projects like XNA are only offered in C#.

    It is also lot like Java (and similar to C) and that gives you a good head start into understanding those languages.

     

    Why use VB?

    VB is the "first child" of the MS centric business community.  There are more VB programmers and code examples out there than all the other CLR languages combined.  There are more VB jobs and more lines of existing VB code.  This gives you a leg up with employability.

    Monday, October 29, 2007 6:22 PM
  • Evoluator,

     

    is there any way that you can provide the source that you used in your tests. My immediate reaction is that there is either something wrong in your performance tests, or you are using some language construct in VB that is really expensive.

    Performance would *not* be on my list of things to consider if I was asked to choose between C# and VB.NET.

     

    Best regards,

    Johan Stenberg

    Monday, October 29, 2007 8:28 PM
  •  

    Hey Johan!

     

    It's nice to see you here. I had a feeling an MSFT may appear.

     

    I know Evoluator. He has been working on something that is personally top secret and I will predict that he will say he can never show the code. I have surmised the same thing you have.

     

     

    Monday, October 29, 2007 8:53 PM
  • Im not evn gonna read the replys...

     

     

    simple if you want a fast and unlimited application then learn C++ *hands down*.

    VB is for beginners just learning to code , creating fast simple apps, and just trying to understand how apps works...

    C# is ofcoarse a great choice its almost as linear as C++ but about as easy as VB...

     

    Monday, October 29, 2007 8:53 PM
  • If you're a touch typist you probably prefer VB.  If you're a hunt and peck typist you probably prefer C#.  I think that is the main difference in choosing one language over the other.

    Monday, October 29, 2007 9:03 PM
  •  

    Of course you don't want to read the replys, you might learn something. There's nothing particularly hard about c++ unless of course you are talking about all the incompatible classes and all the silliness around character I/O.

     

     

    "simple if you want a fast and unlimited application then learn C++ *hands down*."

     

    This is true. I used to write viruses for a computer security company. C++ is a natural for a virus because it's unmanaged.

    But C++ is for doing primitive things - laboriously.

    Monday, October 29, 2007 9:03 PM
  • Im not evn gonna read the replys...

     

    Why don't got the anwsers ?

     

     

    Monday, October 29, 2007 9:11 PM
  • Don't jump the gun and assume that your C++ application will beat managed code hands down.

     

    I agree that the theoretical max performance of an application developed in C++ (or assembly language for that matter) is better than for a managed application. In real life, however, the question is more about how much effort you have to spend before you have an application that performs well enough.

     

    Check out http://blogs.msdn.com/ricom/archive/2005/05/10/416151.aspx for an interesting discussion.

     

    Best regards,

    Johan Stenberg

     

     

     

     

    Tuesday, October 30, 2007 12:19 AM
  •  

    From Johan's pointer, I managed to find this:

     

    http://creators.xna.com/Headlines/presentations/archive/2007/08/25/Gamefest-2007_3A00_-The-Costs-of-Managed-Code_3A00_-The-Avoidable-and-the-Unavoidable.aspx

     

    It's a one hour video on VS2005 performance considerations and it was well done. The presenter looked and sounded like Radar OReilly on MASH. One of the things that this talk does is to enunciate all of the things .Net is doing behind the scenes. The things .Net does behind the scenes are the things you don't have to do in your own code that you have to do in native languages such as C++.

     

    But Johan, I find that board in general very difficult to navigate and although I saw the definition of the problem, I never really saw the outcome although I looked for a while. Could you recapitulate the findings a bit?

     

     

    Tuesday, October 30, 2007 3:18 AM
  • Hi all,

    Although ReneeC has mentioned that the program is secret, and it is for most parts. However, the code which I required is a VB Implementation of Blowfish and MARS cipher.



    A quick outline on how the code works. Ther are two Public sub. One is Initialise which would required the user to have inputed a key of byte arrays and also a boolean value to see if the key should be hashed before use.

    This would initialise the class and makes it ready for use. Then the other public sub accepts two parameters. Input data to be ciphered and a boolean value to show if the data should be encrypted or decrypted.

    All the other private functions are called accordingly.

    ''THE PREVIOUS CODE SHOULD HAVE BEEN DELETED DUE TO SECURITY REASONS"
    Tuesday, October 30, 2007 4:12 PM
  • Do you happen to have the C# implementation that you are comparing with available as well?

     

    Best regards,

    Johan Stenberg

    Wednesday, October 31, 2007 3:29 AM
  • Yes

    "CODE HERE SHOULD HAVE BEEN DELETED FOR SECURITY REASONS"
    Wednesday, October 31, 2007 10:17 PM
  •  Evoluator wrote:
    Yes

    "CODE HERE SHOULD HAVE BEEN DELETED FOR SECURITY REASONS"

     

    That's a big help.......

    Thursday, November 1, 2007 12:45 AM
  • I had too keep it on the net for less than 3 hours, it was there before. But after 3 hours I had to delete the file.
    I would be able to do the same 3 hour period, but I don't want to display it to no one this time!

    C Y SOOONN :X
    Thursday, November 1, 2007 3:22 AM
  •  

    Toodles,

     

    But I'm not forgetting that there is no way for you to support your statement about relative performance.

    Thursday, November 1, 2007 3:45 AM
  • Look at this ReneeC,

    I re written the application is C#. It was much faster, so I thought if I but the VB compiler to strict mode I would make all the emplicit conversions explicit. So I did and the VB application improved in the speed conciderably. But not as fast as the C# compiler.

    All I am saying is that Visual Studio team should make the compiler better than what it is. But this is simple to say, making the compiler faster would be much harder. The reason for this is the language used in VB, because it makes the life of the compiler so hard, for example: How does the compiler knows that the end of the statment is reached, in C# ";" is used for this pourpose?

    VB is heaven for programmers but hell for compiler developers, because of all the emplicit assumptions and the language could not easily discriminate between statments. But as I allways thought this is to be changed if the Visual Studio team write a great compiler, with much faster code.

    All the argument is that although the language is easy to code, for now the compilers which support the language are not fast and efficient.





    Thursday, November 1, 2007 11:38 AM
  •  

    "The reason for this is the language used in VB, because it makes the life of the compiler so hard, for example: How does the compiler knows that the end of the statment is reached, in C# ";" is used for this pourpose?"

     

    You can be so insistent on things that you just don't know about. This seems like a copy of your file system converstaion where you ignored what people were telling you for months.

     

    The vb compiler can recognize the end of a statement is at the end of the line. But there is a much more funcdamental error because you are not distinguishing between the cimpilation phase where CIL code is produced and runtime where the the JIT compiler converts CIL in executable code so there are actually two compilers not one as you suppose.

     

    Please evoluator learn what .Net and the system is doing before you make statements like these.

    Thursday, November 1, 2007 12:01 PM
  • You are missing the point completely. You are using adhoc arguments here. This classification of critical thinking would not be helpful in this kind of contents at all. The other point that you are missing is I am 17 years old, to the contrary all of you are 2-3 times older than me in most cases, so indeeed you should have more knowledge than i have in particular areas.

    And about the file streams I was right. When I wrote the application it all looked fine, but when I shredded 1000 files with all sorts of formats and recovered them, one was fully recovered. Although the margin of error is increadably small, but it is far from secure.

    I also calculated the secound derevative of the margianl error, it shows that there is an increasing function forming a modulus of a prabolic function. So I need to change the entire code to make the shredding secure, I also have to write it is C++ to access the capabilities that is required for shredding.
    Thursday, November 1, 2007 12:19 PM
  •  

    "You are missing the point completely. "

     

    Surprise Really? What's the point and what am I missing?

    Thursday, November 1, 2007 12:53 PM
  • All Ad-Hoc, nothing else ... I don't even know what to say further than ad-hoc
    Thursday, November 1, 2007 1:03 PM
  • Evoluator

     

    "All I am saying is that Visual Studio team should make the compiler better than what it is. But this is simple to say, making the compiler faster would be much harder. The reason for this is the language used in VB, because it makes the life of the compiler so hard, for example: How does the compiler knows that the end of the statment is reached, in C# ";" is used for this pourpose?

    VB is heaven for programmers but hell for compiler developers, because of all the emplicit assumptions and the language could not easily discriminate between statments. But as I allways thought this is to be changed if the Visual Studio team write a great compiler, with much faster code."

     

    I agree with ReneeC (also in this case). You are completely wrong here. Brackets like {} in C, Begin/End in Pascal and Delphi and Do/End in PLM are much harder to handle for a compiler than the If-Else-EndIf constructions used in VB and Fortran 95. "Else" may simply be translated to a branch followed by a label and "End If" or "Next" may just be replaced with a label. You cannot substitude a bracket construction with anything.

     

    Many years ago (yes, I am yet another one of the old ones) there was a programming language called Forth based on Inversed Polish Notation (IPN). The code was very fast to write and due to IPN the compiler didn't have to bother with brackets, but could generate extremely efficient code directly. There was just one "minor" problem - the code was absolutely impossible to read and understand afterwards! However, Adobe PostScript and PDF are also based on IPN because the lack of brackets makes things much easier to handle in an efficient way.

     

    That said, I agree with you that C# is slightly faster than VB although VB people like me don't like to admit it. This is because the VB compiler has to deal with some backwards compatibility and some explicit data conversions. It may also be so that Microsoft has spend more resources on the C# compiler than VB, because they needed the C# compiler for writing the CLR, but this doesn't change the fact that VB is more readable and therefore will generate more reliable code with less logical errors. The human brain recognizes pictures better than text and text better than symbols, so the ideal programming language is graphical (I use that for IC design) followed by English test languages like VB and Fortran 95 and the worst is C style. C code executes fast, but also crashes fast! What do you prefer?


    Thursday, November 1, 2007 2:04 PM
  •  

    "I agree with ReneeC (also in this case). You are completely wrong here. Brackets like {} in C, Begin/End in Pascal and Delphi and Do/End in PLM are much harder to handle for a compiler than the If-Else-EndIf constructions used in VB and Fortran 95. "Else" may simply be translated to a branch followed by a label and "End If" or "Next" may just be replaced with a label. You cannot substitude a bracket construction with anything."

     

    I don't think either one of you is distinguishing between the compilation phase whose output is CIL, a kind of .Net pseudocode. At execution time, this platform independent code is converted by the runtime JIT compiler into code executable by a given hardware platform.

     

    Language structures are irrelvant at exectution time. That's the hole in these arguments.

    Thursday, November 1, 2007 2:11 PM
  • If speed is your concern, have you run NGEN agaist both versions to see what improvement that makes?

     

    Thursday, November 1, 2007 2:23 PM
  • Ok, then ReneeC;

     

    As you are saying (I am taking your word for it) my VB,C# and C++ compiler would only write a .NET pesudocode and JIT would form executable from it. Ok fare enought but pesudocodes could be written in different ways, fast, reliable or slow, or even inefficient. So if the .NET pesudocode is written in an inefficient way the JIT would execute an inefficient code.

     

    The more I think about it the more I am convinced that your argument; although sound, doesn't falasify both of our arguments. I give you an example:

     

    Statments which their truth is unquestionable:

    * Today is Thursday

     

    Argument 1:

    Today in Wednesday, therefore today is not Friday.

    Argument 2:

    Today is friday, so tomorrow is not sunday.

     

    Close observation of the above examples shows, despit the premisses provided are false, but the conclusion drawn from both of the arguments is sound and classfies as a True statment.

     

    So although there must be a little mistake in an argument but this sololy on its own does not falasify the entire argument. Therefore ad-hoc arguments are a way to distract the argument from its core contents.

     

    Don't make ad-hoc arguments it is just not helpfull to anyone.

    Thursday, November 1, 2007 2:26 PM
  • ReneeC

     

    I just made a comment on how hard it is for the compiler to handle a language. I completely agree with you that even if the compiler should spend one minute on each code line this has absolutely nothing to do with the execution time.

     

    I am fully aware of the CIL, but if two compilers generate exactly the same CIL, the code will of course be equal fast, so the difference in speed is due to the first part - VB contra C# - not the JIT compilation. 

    Thursday, November 1, 2007 2:29 PM
  • As Carsten said, and I have mentioned on my previous post, the JIT would not alter the speed of the code, it is the VB C# compilers that do this.

     

    HELLO WORLD [VB]-->  ABD [JIT]--> #$  *! @C L N* $# M C@*#

    HELLO WORKD [C#]--> ABD [JIT]--> #$  *! @C L N* $# M C@*#

     

    IF the out put ABD is the same there would be the same out come.

     

    HELLO WORLD [C#]--> NCv [JIT]--> "Takes a different path, although the out come might be the same"

     

    Just remmeber the second law of thermodynamics, and you see my point. David Halidays [Principle Physics is a good source]

    Thursday, November 1, 2007 2:32 PM
  •  

    I always Ngen my production code...BUT

     

    You'll find that NGenning only produces a quicker startup time because the JIT compiler is pretty and once the compiled machine code is in memory... it's there to stay.

    Thursday, November 1, 2007 2:59 PM
  • Please note that while I do work on the VB team, I'm not on the compiler team itself, but:

     

    the JIT:er is no different than other compilers. It takes the MSIL, runs optimizations, and generate code appropriate for the current execution environment.

     

    The VB compiler generates MSIL. The C# compiler generates MSIL. To the best of my knowledge, neither compiler do any optimizations (in fact, having the compiler optimize the code may make the job of the JIT:er harder, eventually resulting in *slower* code).

     

    Also, the JIT compiler evolves over time, so even if you've carefully examined how well it can optimize a specific code pattern today and modeled your MSIL generating compiler after that, the next version of the JITer may very well break that assumption.

     

    As such, any blanket statements that say language X is faster than language Y, or MSIL code generated by compiler A is faster than code generated by compiler B are, at best, less than useful, and, more likely, simply not true.

     

    When it comes to performance you have to measure and analyze. My suspicion, in this case, is that the compiler settings were different between your C# and VB tests (more specifically, integer overflow checks were on for the VB code and off for C#) but I can only speculate since I don't have all the information to tell for sure.

     

    If you have a real example of where your C# code is faster than VB, you can send it my way and I'll see if I can't get one of our compiler devs to take a quick peek...

     

    Best regards,

    Johan Stenberg

    Thursday, November 1, 2007 3:31 PM
  • "Argument 1:

    Today in Wednesday, therefore today is not Friday.

    Argument 2:

    Today is friday, so tomorrow is not sunday.

     

    Close observation of the above examples shows, despit the premisses provided are false, but the conclusion drawn from both of the arguments is sound and classfies as a True statment.

     

    So although there must be a little mistake in an argument but this sololy on its own does not falasify the entire argument. Therefore ad-hoc arguments are a way to distract the argument from its core contents.

     

    Don't make ad-hoc arguments it is just not helpfull to anyone."

     

     

    You may stop the defensive ***, evoluator and enter into the conversation. I'm not one to be manhandled in such a sophmoric fashion.This is an exact replay of the filesystem discussion. You maode incorrect assertions because of a lack of fundamental knowled ge and you've insisted the opposite of what people have been telling you until about six people tell you the same thing.

     

    Perhaps the important thing to know is why the VB and C# compilers don't do any optimizations. Those compilers do not have any knowledge of the eventual platform upon which the code is going to execute. The JIT compilers will be platform specific and whatever optimizations are to be done must be done at that locale, not at the level of the VB or C# compiler.

     

    But from what I am reading here, Carsten and I would do well to apply many of our own optizations because the JIT compiler will be optimizing for a given hardware platform. Not so much the logic of the program itself.

     

    Thursday, November 1, 2007 4:55 PM
  • Catchy subject title will get alot of views for this post..

    On a point of VB.NET I read somewhere thats microsoft developers actually use the product themselves to develop some parts of office and other major microsoft products....
    Thursday, November 1, 2007 7:05 PM
  •  

    Hi Dj,

     

    They may use it for wizards and independent components but I doubt they use it in the main body of Office products because most of Office is COM and the two don't mix exquisitely well.

    Thursday, November 1, 2007 7:49 PM
  • In case you count Visual Studio as a major Microsoft Product, then yes, parts of Visual Studio is indeed written in Visual Basic.

     

    I only use C# if there is an existing assembly that I need to modify. Anyting new will be in Visual Basic.

     

    Best regards,

    Johan Stenberg

    Thursday, November 1, 2007 8:27 PM
  • Wow....what a thread.

     

    There is no reason to "Not learn VB"  Each language has its strong points/weak points and in some situations one language might be better than the other.  As my own personal preference, I like the whole C# language a lot better, I think it's easier for me to understand, but that just depends on who it is.  Different people like different stuff! Smile

     

    paoloTheCool

     

    Thursday, November 1, 2007 9:02 PM
  • Dear ReneeC,

    I shall not care about the quantitative qualities in this argument. Here non of you have provided any evidence for your conclusions, except you have said I was wrong.

    I have all the data and my own analysis of the isuee, I have VB code I also have the translated C# code of the same algorithm. C# runs twis as fast as VB on my computer. This is an emperical generalisation that I have been taught in the academia, by accademitions. I have data supporting my arguments, and I have made no assertions what so ever.

    My VB codes runs slower than my C# codes. This could only be true on my platfrom. But since I don't have any further data I could not make biased statistical judjments about the issue, this is because I could not judge about the data which does not exists. I would almost certainly get ObjectRefference exception!

    Unfourtunately I could not extrapolate further on my data.
    Thursday, November 1, 2007 9:06 PM
  • I wanted to say a couple of things relating to this thread.

     

    First, I am really impressed how Evoluator knows so much being only 17.

    How long have you been programming?  I imagine you read a lot on the subject.

     

    Next, I am nowhere near an expert on anything dealing with programming but i do believe that maybe bigger issues are quality and accuracy and not so much speed.  I have seen others talk about creating faster code and i think that is necessary in many cases when you have a lot of code to run.  But i think from the developer side of it being able to adapt and change existing code quickly and accurately, VB can give you that.  In today's fast changing business world, being able to change and adapt applications quickly and accurately is probably just as important as how fast your code is.  If you were to really know the other languages well then i guess it's about the same.  But VB language is written so that we can understand it based on what we have been learning all our lives, (Reading and Writing English).  From what i have seen others say and from what i have seen in the code that i write versus what i have seen in C# i think the best language seems to be VB.net for many reasons.

     

    Whether or not the same code will run faster in one language versus the other is beyond me but as far as not learning VB because it is not as fast doesn't seem like the best reason to discard it. 

     

    And i did want to say that many government agencies use VB for their applications and i have seen many companies advertising for vb.net developers.

     

     

    Thursday, November 1, 2007 9:15 PM
  •  MSFT Johan Stenberg wrote:
    In case you count Visual Studio as a major Microsoft Product, then yes, parts of Visual Studio is indeed written in Visual Basic.

     

    I only use C# if there is an existing assembly that I need to modify. Anyting new will be in Visual Basic.

     

    Best regards,

    Johan Stenberg



    Proof is in the pudding, VB.NET is more powerfull then alot of people think...
    and Hi Renee hows tricks Smile
    Thursday, November 1, 2007 9:22 PM
  • indeed js06,

    VB is a good way of programming an application or two, and make money out of it. but if ones intention revolves arround how computers could be improved and how programming could be improved VB and .NET might not be the perfect choice.
    I have talked to few computer scientists at Oxford University and they have told me I have waisted time learning VB because VB is a business way and it is only for Microsofts purposes and I could not run my applications on other OS. I also could hardly invent any thing new because in .NET development you would only learn how to use the .NET functions. your function would be a deravative of .NET, so it could never be an invention.

    Now that I am saying it I shall finish it. .NET is a business approch I shall say no more. I am sure we all agree on the fact that coding in .NET is much easier than in any other languages. But why does Microsoft spend such large amount of money on .NET and distributes free Express editions of Visual Studio as well as providing extensive learning resources on VB and C#?
    Also there is virtually no C++ learning resources (C++ could be a great cross platform language). But Why?

    Doesn't this all cost lots of money? Surely it does costs a lot of money but there must have been covered by the benefits comming from this. But what are the benefits?

    Well first one is the easier programming Microsoft applications become the more Microsoft based applications would be produced, hence Microsoft becomes a stronger busines company. So .NET developers are helping microsoft and microsoft helps them! We are all happy.

    I will leave the final conclusion to the reader.


    I forgot to answer your question! I have been programming for about 3.5 months.

    Thursday, November 1, 2007 9:41 PM
  •  

    Inevitably you are going to end up beleiving what you want to believe. You have a demonstrated proclivity to a.) not to listen to people and b.) to make cognitively rigid decisions without indepth information. You are not prepared to offer a meaningful benchmark.

     

    As to VB, I think JS06 has seen the kinds of things that he does and the kind of things that I do, to know that I am in no way a business programmeer. I have been a systems programmer for thirty years now and was a hardware designer prior to that.

     

    There has always been religiosity around both programming languages and operating systems. For some reason C people seem to be zealots. I am almost equally zealous in my disdain for C, although I can write code in it. I despise case sensitivity in languages. I think it's an enormous was of time and C is way too terse for me. I think it's pretty ugly. Further more as far as I'm concerned there are only two operating systems as far as I'm concerned. There's VMS and windows. So the fact that whatever code I write will only run on WIndows is a plus as far as I'm concerned.

     

    So there is no doubt that if you walk into a room full of C programmers and yell out, "How bout that VB", they will uber predicatably say all the things that you heard about vb. It's so uniform  and predictable that it's almost like a sales script.

     

    Unfortunately I agree with you a bit, .Net and all Microsoft products tend to pander to the business segment and I think that's most unfortunate because in a very real way it "bends" computing. This is so clear to me in the nature of the controls and their relationship with databases and it's especially apparent with bindings. But JS06 will tell you that I have cruscaded to people not to forgo the fundamentals. Jeff is coming into an understanding and appreciation of what I've been saying. So many times evoluator, I've said the same to you.

     

    As far as I'm concerned, you could rename this thread, "Why not to listen to Evaluator, because at this time, you don't have the fundamental skills and knowledge to make the critique you are making. You don't have to ability to recognize another C cult when you see one. You do however, make a fine parrot.

    Thursday, November 1, 2007 10:45 PM
  • I like the way all this is going.

    This rather intellectual argument is turning into a dilemat between you and me. Despite all your direct insults at me I didn't say a thing to your opinions.

    "Unfortunately I agree with you a bit,"  This sentence is just outrageous dear isn't it? I mean I would have not expected a tender women like you say something like this! I am astound. >:0

    The other is about the same thing that you have tried to say to me. Unfourtuntely as I have read the threads I did not find they were pointing to the same point. So maybe you could express your recursive point clearer.

    With all respects Evo!

    Thursday, November 1, 2007 10:54 PM
  •  

    "Unfortunately I agree with you a bit,"  This sentence is just outrageous dear isn't it?

     

    I don't appreciate being called dear by someone 1/4 my age.

    The "unfortunate" was not pointed at you. it was  pointed at Microsoft and it's impact on the computing industry.
    Friday, November 2, 2007 12:10 AM
  • VB and .Net are more about accessibility and productivity than about speed and efficiency.

    Learning any programming language will introduce you to the basic structures found in all modern programming languages.  Anyone who tells you that you are wasting your time is selling some alternate solution.  Pascal is not a widely used language, yet it is often used as an introduction to programming.  I don’t think anyone would be wasting their time learning the basic structures and rigor of programming using Pascal or Java or VB for that manner.  All are accessible.

    C++ and classic C are not accessible.  If you are careful, they can be rather portable and performant, but they are anything but productive and accessible.

    In the general case, I think a stronger argument can be made for time invested into mastering the archaic elements of C++ as being wasted rather than VB or .Net.

    Microsoft had to create C# and the CLR as an answer to the rapid adoption of Java and the Java runtime.  Having done so, it was only natural to migrate their flagship business programming tool (vb) to the CRL as well.  Does Microsoft want as many people as possible using .Net and the CLR?  Sure, just as Sun wants them using Java and EJBs.

    The question is, What is the most appropriate tool to use when solving any particular problem.  If you want to write a first person shooter or a device driver then VB is not the tool for you on the other hand, if you want to solve a real word business problem then VB or Java or C# are likely to be the right solution where C++ and C are not.

    Friday, November 2, 2007 1:50 AM
  •  

    What's a shooter, jgalley?

     

    I agree re drivers. But I just finished on of the only native wrappers for the Vista native wireless API. If you have Vista and are interested in wireless, I'd be happy to share it with you.

     

    My point is that MS says the API was intended for C++.  VB did it very well. C++ will be faster because that API is COM and C++ is as comfortable or more comforatable in COM than it is in managed environments. VB did really well... and I did somethings that required a lot of processing because it is ONE Wierd API. VB continues to be very under rated.

    Friday, November 2, 2007 1:57 AM
  • Unfortunately, this thread (and some others) has become a discussion of whom is not listening to whom. I have also been accused of not listening when I didn't agree (maybe ReneeC remembers my discussions with SJW and the discussion in the Sleep() thread). As an inventor, I also don't like arguments like "This cannot be done" or "I am much older and more experienced than you". Mozart wrote his first compositions when he was only 6 and like js06, I am quite impressed of the knowledge of Evoluator at an age of only 17 although I think that you should not fly so high that you cannot reach the ground. What has the second law of thermodynamics etc. to do with compiler speed (actually my daughter study physics at the university)?

     

    Shouldn't we keep it technical and face the fact? Evoluator has a program, which runs two times faster if it is written in C# than VB. Unfortunately, he cannot publish the program, but why don't believe him? I think that it is well known that C# is slightly faster than VB although the difference is usually not a factor 2. Maybe there are VB constructions, which should be avoided due to very low efficiency (like e.g. string manipulations in .NET)? Why not be constructive and find these? This thread http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2292195&SiteID=1 is a very good example of inefficient standard methods and what can be done with optimization. 173 seconds for the "true teaching" compared to 4 seconds for an optimized solution - and both in VB.

     

    It is also a fact that .NET and managed code has certainly not made things faster, but this is the price to pay for more easy programming and better safety. Actually, why should we learn C#? If you want a fast execution, native C++ or assembler is the solution. If you want readability, reliability and productivity, use VB or Visual Fortran 95, so why learn C#?

     

    Friday, November 2, 2007 8:34 AM
  •  

    "Shouldn't we keep it technical and face the fact? Evoluator has a program, which runs two times faster if it is written in C# than VB. Unfortunately, he cannot publish the program, but why don't believe him? "

     

    Because c# is not twice as fast as vb.

    Friday, November 2, 2007 12:16 PM

  • Thanks for your conclusion Carsten, I shall learn C++ instead of C# but the fact is I am already trying to learn C++. But as C# and C++ are similar in places I have started to prefer C# over VB. But I think you are completely right; for readability VB is the best available solution while when it comes to speed we should think about C++.

    I think it is quiet impresive how optomized code could increase the speed in this case 432 % in impresive figure.

    Also about the "Law of Thermodynamics":
    The summary of second law of thermodynamics which I was trying to point out is, there is no difference in the "wrok" done when the starting point and the finish point is the same irespective of the path traveled (it is a bit more comlex than this but this understanding is enough for our pourposes). So that if the compiler is producing the same code with a faster speed that compiler is "Better" compiler, and if an other language is producing a faster code with the same out put that languages is a "Better" language.


    There is no question about the fact that ReneeC is more experienced than me, i thinkg this is a fact which everyone would agree on. But despite my age, I have written a code which Bruce Scheiner (One of the leading cryptography experts) has accepted to post on his website in the next week or so, I have to mention that there are only 7 available now (Mine would be 8th  ).

    (I have to thanks jgallery and Carsten in for all their efforts leading me to this conclustion)

    So maybe the conclusion could be summarised in this form:

    Evo has an application written in C# which executes twise as fast as the equivalent application written in VB. Therefore you might also be able to increase the speed of your code by writting it in C#. You could also write your code in C++ which would increase the speed of your application further more, the draw back is the time you will spent coding your application.
    But if one wants a readable code which could be read by most programmers VB could be the best solution.


    The follwing was my point in the first thread. If you are going to create an application which the source code is not available to anyone and is copy right protected Why should you chose VB as the language? It would be slower than if it was written in C++ and guess what who cares about its readability, because the code would not be available to be read! It is like a well written book which is burnt so no one could read the book (Just like most Archemedies books which were burnt when Romans invaded Greece).

    Also if the code is less readable it makes it harder for other developers to copy the code from your application. So you could keep your application well protected from copyright violation by writting it in C++.


    So I shall conclude if you want to produce top class applications that run fast: try C++ as your main language (I am sure Mr.Stroustrup will be very happy about this conclusion).




    Friday, November 2, 2007 2:37 PM
  • Evo,

     

    you are drawing (in my opinion) incorrect conclusions (or at least conclusions based on incomplete facts). In almost all cases, the main factors in performance are things like high level design and choice of algorithms, not the compiler/language you use.

     

    My, probably flawed, analogy would be that you observed two cars at a traffic light, and when the light turned green, one car accelerated faster. From that, you drew the conclusion that the faster car's tires have better traction, and those tires should be used when you want a fast car.

     

    If you look at http://blogs.msdn.com/ricom/archive/2005/05/19/420158.aspx, you will see that it took *significant* effort to create a C++ application that was as fast as the simplest managed application. 

     

    In the performance analyzis that you presented, you did not dig deep enough into the problem to determine what the problem was.

     

    I still contend that the most likely explanation for the performance gap is that you did not use the correct compiler settings for the VB implementation to make it an apples-to-apples comparison. More specifically, I believe that you used integer overflow checks for the VB implementation and didn't do so in the C# implementation.

     

    You also didn't even start to look at memory allocation patterns (something that was crucial to get the last drops of juice out of the C++ implementation used above.

     

    Having said all this, I definately think that learning C++ is beneficial if you want to pursue a career as a professional developer. Personally, I would start with C, though (yeah, Renee, I know you don't like C ) 'cause (again, in my opinion) C is a better learning tool than C++. The C++ language is inifinately more complicated than C, and if you want to learn how to program, C++ can get in your way...

     

    Best regards,

    Johan Stenberg

    Friday, November 2, 2007 3:34 PM
  • I think there are too many things that can affect whether one language is faster than another.

     

    When i think about this sort of thing i remember something i saw here in the forum that said "Follow the one who looks for the answer.  Question the one that finds it."  And it seems these days that everyone has "an answer".  So that means everyone here is right.

     

    With that being said, I have taken in all that has been written in this thread and i think i have come to the conclusion that the real answer to this question of why you should not learn VB is that you should not learn VB if you are going to make an application exactly like Evo's.

     

    At this point that seems to be the best reason to me.

     

     

    I hope this makes sense and does not offend anyone.  Just my thoughts

     

    Jeff

    Friday, November 2, 2007 3:53 PM
  • Your conclusion is my conclusion in short. But the other premise that I provided in the conclusion was Carsten said C++ is surely faster than VB and C# (I maid an implicit assumption that what Carsten said is true), hence therefore I concluded that if one is trying to write an efficient application they should try to learn C++ and write it in C++. Now if someone starts learning VB so he/she could have a better understanding of programming so be it! No problem what so ever, but what I am trying to say is if you want to produce something entirely different, say Google Search engine, you can't do it in VB as Google did it in C++, and Java in some point (but java is a variant of C++ is some ways).

    I could also asure you that you are very inteligient and all you have said made perfect sence.


    I have neaver claimed on the basis of my data one should not learn VB and try C++ instead. I also didn't look at two cars accelerate and make a jusgment, I saw to cars taking off and crossing the finish line. The one which was the fastest was C#, so then I concluded for this track C# is more efficient than is VB. I am not saying for every track (code) C# would be fastest.





    Friday, November 2, 2007 4:13 PM
  • You should choose the tool that you feel is best suited to solving your problem.

     

    You have several times now suggested that it is not possible to create something "new" or "entirely different" in VB.  This could not be more false.

     

    Any argument that you could make about solutions in VB being derivative could just as easily by made about solutions in C++ as it is an extension of C and C of B and B of Algol.

     

    Google may have chosen C++ as a development platform but anything they have done could conceptually have been created in VB.  Would a VB solution have met the busnisss requirements of the Google transaction load?  Probably not and hence their selection of C++

    Friday, November 2, 2007 4:55 PM
  • exactly, if it was VB it would have been hopelessly slow in comparison to C++ which is exceptionally fast.

    For example, I don't know what Windows Live search uses, but by the way things are looking it might have been coded in VB or C#, either way the search engine is slowwwww. It takes Live about 1-3 seconds or more for a seach query while google goes into 0.1 - 0.5 seconds which this is much faster.

    You could make all the logical procedures in most languages no doubt, but indeed current C++ compilers produce faster codes than current VB and C# compilers.
    Friday, November 2, 2007 5:06 PM
  • " have neaver claimed on the basis of my data one should not learn VB "

     

    That's exactly what you have claimed.

     

    I agree with Johann and that's why I wanted to see the code. Let's look at what's being purported here:

     

    "I have the same piece of code written in VB and C#. The C# code runs faster than the VB. But I am not going to show them to you."[paraphrasing]

     

    That's all we have and my thinking has been along the lines of what Jeff has said and I've been saying all along. I do not believe you have taken all the variables into count. Furthermore I don't believe you know what all the varaibles are.

     

    But, why not give you an opportunity to make your point? If you feel VB is slower, surely you can produce both VB and C# code which you can make public and demonstrate that.

     

    Johann, I agree with you that C++ is something that everyone should know ...because it's closer to the machine. I don't think anyone can learn about machines or computing from VB. I have written code in C++ in both VS6 and VS2005. I seems much easier in vs2005. I really did not like the way in c++ that you could be using a file class in c++ and get half way through a program, only to find that you needed a different file class to do what you needed to do. There were several in vs6 and the dragged string management function along with them. WHat I do not like about C++ in it's current form is all of the casting that goes on between Tchars and Wchars etc. I want to write code and not have to worry about a basic character set.

     

    The trouble I have with your data evoluator, is that you are the only one reporting it. Don't you think that's a little strange. Imagine how many C cult people would like to demonstrate what you are reporting but they jut have not been able to do that.

     

    C++ is not particulary "exceptionally fast". Instructions execute at the same speed. .Net is doing a lot more that you cannot see. It is looking at App domains, as well as system security. It is also doing resource allocation and deallocation through garbage collection which you have to do manually in c++ native mode  code. You can do trivial things very fast. C++. C++ is not particularly good at doing complex things that we do. It requires a much larger volume of code than

    .Net does which creates manageability and maintainability issues. If there were extensive C++ programming today, the most frequently written pharse you'd see would be "memory leak". You don't see that any longer in .Net and there's a reason for that.

    Friday, November 2, 2007 5:10 PM
  • The follwing was my point in the first thread. If you are going to create an application which the source code is not available to anyone and is copy right protected Why should you chose VB as the language? It would be slower than if it was written in C++ and guess what who cares about its readability, because the code would not be available to be read!

     

    Have you ever opened up a project that you wrote a long time ago?  I recently took a look at some code I wrote in the late 80s, I had a heck of a time trying to figure out what I did back then.   Readability is always important.

    Friday, November 2, 2007 5:46 PM
  •  

    Hi Plinko,

     

    The statement that C++ is much faster is not correct. C++ is "much faster" because it is not secure and it's unmanaged. What he is missing is what you say, readability, plus security, plus oject management. By the time you write C++ that will do what vb does, you will have spent far more time, have less reliable and maintable code AND it won't be any faster.

     

    It's true that C++ can do pointer manipulation and that technique is often faster and I have often wished that had been built into VB. But these blanket statements that C++ is faster are misleading.

    Friday, November 2, 2007 6:28 PM
  • agreed.    Even in situations where you have absolute control and ownership of a piece of code, it is still important to make readable code.   Time has a way of messing with one's memory. Smile

     

     

    Friday, November 2, 2007 6:36 PM
  •  

    I couldn't agree with you more. Few things are more confusing than yesterdays "brilliant code."
    Friday, November 2, 2007 6:41 PM
  • The language you choose depends purely on the task you wish to accomplish. What kind of programmer would only learn vb, or only learn c++? I don't see any point in this thread.

    Sorry for my name, never intended on posting but someone had to say it.
    Friday, November 2, 2007 9:35 PM
  • I think this is strange. All of you are talking about speed. But, how many of the programmers all around the world need a "really fast" applications?
    Many of us, make programs for using databases, local calculations (Civil engineering, architecture, etc), calendar programations, etc. Not everybody creates Word processors, Spreadsheets, planetary orbit calculators, weather predictors, etc. If the program you are making depends from others (SQL Servers, or other database management, graphics not directly controled by the programer, -DirectX-, intensive access to IO using internet or an internal net, etc.) your program could be as fast as light, but it must 'wait' for the 'others' to supply data. And when you make an account of the time wasted, 80% or more was inverted bay the 'others'. I ask: why you need a 'very fast' program?

    On the other hand, at this time computers are a very, very, very fast machines. 3.5 Ghz + 2 GB RAM + 7500 rpm SATA hard disk or more are not expensive. If your code is not 'a perfect code' is not really important (unless you need a weather predictor or Google or Yahoo engines). And if you don't see a real difference between a VB compiled program or C, C++ one, because the 'others' or your very fast machine, 
    Why do not you use the easy developer system?  Why you will use C or C++ to have the same result but in a harder way?

    I used a VB competitor for 1 - 2 years. It produces code 2 - 3 times slower than VB or C#. I left this developer system not for the speed, but because it has some problems in other areas (string conversions, macro utilites, etc). The speed of the compiled programs is good enough for my needs. Maybe when it fills a Combobox with data from a SQL server, it spents 1 1-1/2 seconds more than VB for a 3000 items list. Is this a problem??.

    At this time I am translating all my programs to VB because I thing it is easy, look-well-finished-applications, has good controls, syntax, etc. But NEVER for speed in execution. 

    Many of my friends agree with me in this. Speed is only important for a very few projects.
    Saturday, November 3, 2007 5:07 AM
  • Well, I am a pure novice, we all know this.

    I have written one of the most extencive DLL in cryptography in C++. It is by far faster than my other codes, but the difference would be that I had to work my *** off before I could have got the result that I wanted. It was hard to code, not a gr8 forum and not a lot of people know how to code in it. This puts one off from learning the language.

    I could see why most of you think C++ is not a gr8 language as it would make one old before the first compilation becomes sucessful, and for simple applications it is not worth it at all ! Sad

    But Gerval, if everyone was determined to write all their codes extreamly fast and efficinet when it comes to using the resources, this would reduce the bottle necks in system, internet and etc, hence increasing the global execution speed. But I have to admit C++ made me so tired ....






    Saturday, November 3, 2007 10:27 PM
  •  

    First of all, if you are going to be a programmer, learn that CODE is always spoken of in the singular, never plural. It is never "codes" nor is it ever "a code", it's just code.

     

    There are good times and places for c++ if and when you need to do fast in memory work where pointers are indicated.

    It will do managed or unmanaged code. It is pretty horrible with strings.

     

    My encryption program for windows was written in c++. When ever I want to learn a new language, I usually write an encryption/decryption program because it involves bit twidding, and File I/O. As a matter of fact, you can even write direct inline assembler in c++ and I did that in my encryption program.

     

    I find that c++ is OK and I can write faily rapidly in it. But between the case sensitivity and its string handling deficiencies (yes I know it has a string class that for some reason people refuse to use....) - I just really get tired of the LPCSTRs and all of that stuff when all I want to do is something simple with a string.

     

    "this would reduce the bottle necks in system, internet and etc, hence increasing the global execution speed. But I have to admit C++ made me so tired .... "

     

    A problem in this entire conversation and others, is that you do not show much of an understanding of what happens at the systems level as far as security and domain control is understood. It is difficult to have a conversation with someone who does not know what they do not know.  You seem to forget that C++ was here a long time before managed code arrived. You seem totally unaware of what managed code manages. Only in the absense of that kind of knowledge, could you make the above statement.

    Saturday, November 3, 2007 10:44 PM
  • Thanks for the English lesson, I do appreciate it.
    But as a mathematician I like to define things the way I like them so if I may I like to define "codes" = "CODE", it just feels a little better.

    About your encryption program, I have to say it is an ECB cipher, it is not secure as I have already cracked the algorithm, so it might not be secure enough for very sencitive data. But it is good enough for learning purposes.

    When I was reading your thread I thought it could have been more helpful if you actually said something more cunstructive than reminding me of the gap in my knowledge. Because the people who read this are not necessarily me. I would just like to point out that you need to spend your time more constructive than making ad-hoc arguments, because you are only attacking me not the argument!

    I also like to point out that I have not started this thread willi nily, I have done the research.The BASIC (Beginner's All-pourpose Symbolic Instruction Code) was just a simple program for "BASIC" purposes, then VB started to develop a more suffisticated form a BASIC, but before this QBASIC became a very popular programming language (Steve the author of QBASIC has a very good e-book on C++) and etc. Forget the history now, C++ would be able to produce managed code as simple as changing a parametere from Fasle -> True in most compilers. So I don't see the point why you say it came before managed code arrived?

    Monday, November 5, 2007 9:51 PM
  •  

    "Thanks for the English lesson, I do appreciate it."

     

    Sarcasm noted.

     


    "But as a mathematician I like to define things the way I like them so if I may I like to define "codes" = "CODE", it just feels a little better."

     

    I'm not here to make you feel better. I am interested in people not mislearning which is why I corrected you.


    "When I was reading your thread I thought it could have been more helpful if you actually said something more cunstructive than reminding me of the gap in my knowledge."

     

    I'm glad it helped you but that was not why I said what I said. You tend to talk about things that you don't know. You tend to ignore what much more learned people tell you and overlook things that you don't know about and sometimes make absurd statements like the premise of this thread. That needs to be addressed.

     

    " Because the people who read this are not necessarily me. I would just like to point out that you need to spend your time more constructive than making ad-hoc arguments, because you are only attacking me not the argument!"

     

    The problem is that you don't know as much as you purport. I'm not going to invest much time in "arguing".

     

    "C++ would be able to produce managed code as simple as changing a parametere from Fasle -> True in most compilers. So I don't see the point why you say it came before managed code arrived?"

     

    This is an example of you talking about things that you don't know. The first CLR (framework) emerged around 2001. C++ was around long before that.

     

    I'm tired of these discussions. I really do not like arguing with seventeen year olds. You have a lot to learn before you have such discussion.

    Tuesday, November 6, 2007 12:04 AM
  • Hi Renee,

     

    Good day!!!

     

    I would like to know how DLL's function. If possible may I please ask you to tell me about the same.

     

    Awaiting for your reply.

     

    Thanks,

    Srini.

    Tuesday, November 6, 2007 2:03 PM
  • I say this in an article from techrepublic today and i thought it fit this thread.

     

    Evo, i mean no disrespect here, it's just that when i read this the first thing i thought of was this thread.

    Hope you don't take it the wrong way.

     

    Actually sometimes i think this goes for quite a few people in the forum

     

    http://blogs.techrepublic.com.com/10things/?p=262

     

     

    10 types of programmers you will encounter in the field

     

    #6: The Theoretician

    The Theoretician knows everything there is to know about programming. He or she can spend four hours lecturing about the history of an obscure programming language or providing a proof of how the code you wrote is less than perfectly optimal and may take an extra three nanoseconds to run. The problem is, The Theoretician does not know a thing about software development. When The Theoretician writes code, it is so “elegant” that mere mortals cannot make sense of it. His or her favorite technique is recursion, and every block of code is tweaked to the max, at the expense of timelines and readability.

    The Theoretician is also easily distracted. A simple task that should take an hour takes Theoreticians three months, since they decide that the existing tools are not sufficient and they must build new tools to build new libraries to build a whole new system that meets their high standards. The Theoretician can be turned into one of your best players, if you can get him or her to play within the boundaries of the project itself and stop spending time working on The Ultimate Sorting Algorithm.

    Tuesday, November 6, 2007 2:15 PM
  • This is a nice, one!

    I like it a lot. It is just my personality, I have developed many new algorithms that do the same thing only a little faster, but I have spent long times playing arround with the code.

    I think this is a good approch if ones concern is not about money or progress through the project! Big Smile

    Tuesday, November 6, 2007 6:00 PM
  •  

    Speaking of recursion.  I wrote this about six months ago and had to put the code away.  It's from an application thats creates a fairly complete file system in an Access database.

     

        Private Function GetAllDirectories(ByRef Table As DataTable, _

                                           ByVal ParentGuid As Guid, _

                                           ByRef AL As ArrayList) As ArrayList

            For Each row As DataRow In Table.Rows ' THREE COLUMN TABLE

                If (row("ParentID") = ParentGuid And (row("RecordType") = _
                                      RecordType.csSubCategory)) Then

                    If Not IDIsInList(row("EntityID"), AL) Then

                        AL.Add(row("EntityID"))

                        GetAllDirectories(Table, row("EntityID"), AL)

                    End If

                End If

            Next

            Return AL

        End Function

     

     

     

    It's not overly remarkable until I looked at the call to it.

     

    Dim DirList As ArrayList = GetAllDirectories(s, ParentGuid, New ArrayList)

     

    When I saw the last argument, I said... good grief... what on earth is that?

     

    Then I read the code and realized that the method is recursive. The argument is not about passing an object. It's consistent context. It is to be passed from recursive level after recursive level. After recursing through all the directories, that same variable is return as the result.  When I see a piece of like this, I really feel inferior and thnk, "Gee, I could never write anything like that."   The frightening thing is that I did write it.

     

    I've never seen anything like that and was amazed. What's even more startling is that I don't remember writing it. 

     

     

     

     

     

     

     

     

     

    Tuesday, November 6, 2007 7:30 PM
  • lolz reneeC,

    That hasn't happen to me on VB yet, but I have had the same experience on C++ !

    By the way when creating a DLL, on C++ if i add 'extern "C"' would it be sufficient to allow my VB application calling the DLL?


    Tuesday, November 6, 2007 11:11 PM
  •  

    You know I've done C++ DLLs... I think it's the calling standard. Is there not a dll wizard?
    Wednesday, November 7, 2007 12:42 AM
  • Well when it comes to DLL I have as much knowledge than a coked potatoe.

    I really don't know, I have started a new thread for this matter, so it could be used by others with the same isuee,. So maybe we could continue on there.

    Wednesday, November 7, 2007 1:17 AM
  • Today, I found a really interesting 2003 discussion on the Web on VB vs C# performance

     

    http://weblogs.asp.net/james_crowley/archive/2004/02/17/74928.aspx

     

    There are some salient points made in that article that is highly pertinent to this discussion.

     

    Cryptography compilation is heavily dependent on computation in arrays.

     

    Salient to this discussion, VB by default has array boundary checking turned on where C# has it turned off.

     

    From that that thread the following performance related references were also provided:

     

    Paul Vick explains what 'enable optimizations' actually does...
    http://addressof.com/blog/posts/357.aspx

    VB.NET Performance Optimizations
    http://addressof.com/blog/posts/339.aspx

    VB.NET Performance Related Compiler Options
    http://addressof.com/blog/posts/340.aspx

    More on Remove Integer Overflow Checks
    http://addressof.com/blog/posts/341.aspx

     

     

    Comments on C++ remain germane. It's can produce native mode code that is not dependent upon the framework.

    Very fast, as well as very poor C++ code can be written.
    Monday, February 18, 2008 8:19 PM
  • Well it has been a long time since I started this post. I was surprised to see you post a new one!

    The idea is that C++ does not make many checks and when you initialise an array you just initialise xx of datatype y on the memory but, clearly this is not the case in .NET since you get many different attributes i.e. Length and etc initialised as well. This could be usefull at most of the times but when you need a fast code and the boundries of the arrays are known, it is completely irrelevant process ! You could write few lines of codes which tells the compiler that you have new defenitions for arrays and tell the compiler to initialise Length of the array everytime it is initialised, but
    you could also say don't initialise it for certain part of the code, this is programming resilience.


    When .NET is clearly examined you start to think that .NET is a clone of Java (or otherway round) with the exception that .NET is only designed for Windows while Jave is cross platform emultion layer. I think if one want managed code it should be written in Java becuase of it's platform portabilities. But for unmanaged codes C++ is a great language tool kit.

    I said language toolkit since C++ is not entirely a language, it is a "thing" which allows you to even specify the oporators, and many more yourself making it ideal for large projects (the original intention of the language).

    Since I have gained more experience in the world of coding I think .NET is not entirely a good layer for coding. Don't get me wrong it is extreamly efficient when you want to code programs, but the problem is say you would like to have a server which acctually works, you are most probably going to get a Linux based server. in this case you don't have .NET becuase .NET is exclusive to Windows, but you have Java which may not be as ellegant as .NET but it is there! So I think Microsoft could lose out on the battle and help Jave to become more dominant than it already is. Well here is the example, most of the accademic institutions ( England ) teach Java as default language because of its platform portibility! This makes is by far more popular than .NET.


    There is no final verdic to this thread! It is obvious that people like their English to be part of their programing, so VB would remain popular, but since VB is not designed for "high-end" programmers it does not allow you to take care of memory pointers and etc when you need to, if it allowed you to do both it would be an ideal language. Sham that it doesn't.

    C++ generates faster codes in general, but it is hard to master. C# is another form of VB , but Java is very similar to C# with the exception that it allows you to write codes which are platform portable.

    It is the users choice to see which language would be better for their application, but indeed C++ / Java are the best! I say this not only from my own experience but from the fact tha Google is written in C++ and only recently in Java    Smile )



    Tuesday, February 19, 2008 1:14 AM
  • Ive read about c# and it has alot of origins of pascal..
    vb.net is racing up in the TPCI Languages, while c++ is declining!

    but you saying vb will be a underdog to java I dont see that.. a few points.

    1. whats the worlds most used os?

    2. future versions of windows have dotnet incorporated (inc vista) so no framework installs needed!

    3. will microsoft ever have java incorporated into future versions of its os (I dont think so lol) - java runtime needed!




    Tuesday, February 19, 2008 1:30 AM
  •  

    Evoluator,

     

    I am always amazed at the conviction and authority you have, when you are wrong.

     

    I just do not think you have the depth yet to understand the nature of your errors.

     

    For example:

     

    "This could be usefull at most of the times but when you need a fast code and the boundries of the arrays are known, it is completely irrelevant process !"

     

    And it can easily be turned off in project properties and optimizations can be turned on.

     

    See what I mean, there's a maelstrom in the teapot. I don't think you have the faintest grasp yet of why managed code is a good thing and why what you are talking about would set the world of programming back about fifteen years.

     

    Btw, you can make up and alter operators in VB also.

     

     

     

    Tuesday, February 19, 2008 2:04 AM
  • Well I think the point is being missed here, I am not saying Microsoft is not the most popular OS, nor am I saying Bill Gates was not a cleaver guy, but the thing is if you are a larger corporate company and you want to code your idea,  if you use Java you could have it running in Max OS, Linux, Sun Solaris and Windows. So you increase your market, so more profit could be made. With the same code, not even a seperate compilation is required!

    And your 3rd point is completely valid, Microsoft has a monopoly winin the Global market, and indeed it makes it very hard to compete with, and probably in few years time Microsoft would come up with a new platform which ensures Java could not run on! : ) )
    Tuesday, February 19, 2008 2:58 PM
  • ReneeC,

    I am also amazed how much you love VB.

    If one learns C++ they could write Managed/Unmanaged code according to their needs.

    I understand you are very tallented in what you do, and of course you share it with all of us in the forums.
    But in this case I don't think you have followed the argument. If you are telling me VB .NET is such a great language if I ask you to write a Driver for a hardware could you do it using .NET or VB? ..... ??

    Tuesday, February 19, 2008 3:03 PM
  •  

    I can write in C++. I do not like C languages period. I'd write the driver in C++ bcause as you know you want drivers to be in native mode code.

     

    My point evoluator, in your post before last, you were wrong in ways that you aren't even aware of yet.

    Tuesday, February 19, 2008 3:14 PM
  • If i were to guess, I'd say evoulator is 16 yrs old.   Reminds me of a mark twain quote:

     

    When I was a boy of 14, my father was so ignorant I could hardly
    stand to have the old man around.  But when I got be 21, I was
    astonished in how much the old man had learned in seven years.
    Tuesday, February 19, 2008 4:51 PM
  •  

    I like evoluator a lot. He develops logic-tight foundations and formulates very firm opinions where he does not have any experience.

     

    Evoluator is seventeen (I think).

    Tuesday, February 19, 2008 4:59 PM
  • Hi to all,

    I am trying to learn in this thread as much as possible. ReneeC i haven't said you can't program in C++, since I have seen your C++ application, the point of this thread was not there to decide between Managed or Unmanaged codes, the previous have had made this discussion before and the conclusion was managed code it the "better" way.

    The point of this thread from the beggining was, VB/C# are high level programming languages which are intended to be used for programers whom are willing to programs that are there to be sold for commertial use, but for someone who might want to make a significant change in the world of computing VB and C# is not enough!

    But on the other hand the discussion was originally converned with C# or VB? the answer is C#, becuase if someone learns the syntaxes used in C# they automatically become familiar with syntaxes of other languages which makes the language ideal for a learner, the learner then could decide to chose from many of the different languages available to the person.

    And most importantly if one has C++ Java on their CV, regardless of anything else that person would have the edge regardless of the other cirsumtances.

    ReneeC, this Managed/ Unmanaged thing is like high end languages and asmeblers, asmebler is faster in general.
    But you have failed to tell me what is this manages/unmanaged thing that you are saying that I am not aware of, and you are refusing to tell me anything about it?

    According to:
     http://en.wikipedia.org/wiki/MySQL#Programming_Languages
    Most of MySQL is implemented in ANSI C/C++, but after speculations now I undrestand what is being said here.
    And I now undrestand what you were saying and what I intended to say.
    Tuesday, February 19, 2008 7:09 PM
  •  

    One of the things I have been saying is that speed isn't everything. If it was, we'd be coding in assembler and actually C++ is just an advanced assembler. That's how primitive it is.

     

    Managed vs unmanaged cuts across many dimensions. It feels as if you don't understand the distintction.

     

    Programs need memory for lots of things. Memory is needed fo code, it's needed for data and often data is transformed so there needs to be space memory output.

     

    You can statically allocate that memory in a buffer, which you see a lot in c++ or a language like c++ can requeest unmanaged memory from the system. That memory is now reserved and is no longer available to the system. If that memory is not returned to the system, it's gone until the next reboot. This is called a memory leak and it was a major problem in code that used c++ because complex code is convoluted and there were often paths that omitted deallocation. Such code cause unreliability on a systemic basis. Memory leaks can cause entire systems to fail because eventually a memory leak done repetively will bring a system down and memory leaks are difficult to find.

     

    One of the salient characteristics of managed code is that it's almost all dynamic. For the most part, if I create an object in a method, memory is automatically allocated then the lifetime of that memory allocation is  the same as the life time of that method.

     

    Where there is a framework like .Net there are two pools of memory. One is the normal windows unmanged pool used unmanaged c++. The other pool is managed memory. In managed c++ you will see object declarations that look like

     

     g^ Name Classname;

     

    The g^  (pronounced gee-hat) mean garbage collection. Managed code uses a different memory pool and transferring data from unmanaged memory to managed memory is a chore. A difference between the two is the framework does memory management for you for most framework classes greatly redusing memory leaks.

     

    With managed memory,  deallocation is done for you by garbage collection often on a deferred basis. It's much better code as far as maintainability some that never seems to occur to you. In the Software Development lifetime Cycle development is actually a very small part of the total cost of software. You seem oblivious to that.

     

    .Net has gone far to decrease development time and reduce maintability costs. These are the things that are important in industry not just how fast something will run all of which is transparent in your discussion.

     

    Your arguments are uni-dimensional and do not take the larger issues into account. If the world was the way you see it, we'd all be writing in assembler and/or unmanaged c++. That's not happening. The use of C++ is in decline.

     

    C++ is a bear. I don't have any trouble writing the program. Where I have trouble is getting information our to the user because c++ is obsessed with chars, tchars and wchars. They aren't the least interchangeable and where I spend my time is in the conversion - not coding  but just trying to write to the screen.

     

     

     

     

     

     

     

    Wednesday, February 20, 2008 3:39 PM
  •  Evoluator wrote:
    Well I think the point is being missed here, I am not saying Microsoft is not the most popular OS, nor am I saying Bill Gates was not a cleaver guy, but the thing is if you are a larger corporate company and you want to code your idea,  if you use Java you could have it running in Max OS, Linux, Sun Solaris and Windows. So you increase your market, so more profit could be made. With the same code, not even a seperate compilation is required!

    And your 3rd point is completely valid, Microsoft has a monopoly winin the Global market, and indeed it makes it very hard to compete with, and probably in few years time Microsoft would come up with a new platform which ensures Java could not run on! : ) )


    Completely irrelevent and off topic for a mo, but it is about Microsoft. Evo's post made me think of it.

    A friend of mine recently bought a laptop with Vista and a 90-day Office 2007 trial on it. It is his first computer, and he only has a passing knowledge of how to use them. He can create a Word document for example, but can only save it as a .doc file because he doesn't really know how to change it.

    Now, imagine my surprise (I don't have Office 2007) when he came to me and asked if I could change some files for him into .rtf files. No matter how hard I tried, I could not open them in my version of Office. Why? Because Microsoft had created an entirely new file type to save Word documents as - .docx - which is not compatible with earlier versions of Office. This was the first time I'd heard of this file type, but I've seen adverts for Office 2007 OEM 90-day trials being shipped with new PCs for months.

    For me, it was quite easy to figure out what happened, but for the average computer user, who really doesn't know too much about how computers work, this could cause a nightmare, since it means that they will need to pay some £300+ for the new version of Office, just so they can use documents created during a 'free' trial.

    Is it any wonder Microsoft has a monopoly?
    Wednesday, February 20, 2008 4:13 PM
  •  

    "but can only save it as a .doc file because he doesn't really know how to change it."

     

    I think you meant .docx and it is off topic.

    Wednesday, February 20, 2008 4:20 PM
  • I did say it was completely off topic and irrelevent. Smile

    And, yes I meant a .docx file (or .doc as it would have been in earlier versions of Word).
    Wednesday, February 20, 2008 4:39 PM
  •  

    By the way, you spoke of MS having a monopoly. The DOCx is an xml based document and is a standard across vendors. It is the opposite of a monopoly.
    Wednesday, February 20, 2008 4:57 PM
  • Have you seen Mono which is a version of the .net framework that runs on Linux.  Also silverlight a new .net web techonology allows you to write vb code which works on the mac.
    Wednesday, February 20, 2008 6:45 PM
  • I don't know what could be off topic on this thread.  I found the Office 2007 comments interesting.  Why did Microsoft abandon proprietary formats for their office products in favor of open standard xml formats.  There is an interesting thread here:  http://forums.microsoft.com/msdn/showpost.aspx?postid=2740883&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=4

    comparing the speed of unmanaged C++ code to managed C# code.

    Wednesday, February 20, 2008 8:48 PM
  •  

    "I found the Office 2007 comments interesting.  Why did Microsoft abandon proprietary formats for their office products in favor of open standard xml formats. "

     

    This is only speculation on my part, John.

     

    Going to an XML format make all documents whether Excel, Access or word "datacentric". They can be dealt with relationally using SQL and XML datareaders. There's a lot of formatting noise in these documents. But they can be dealt with datacentrically.

     

    Also, I think there's been a lot of criticism of MS because of it's proprietary formats. So open standards have been proposed and implimented but you'd better believe Microsoft had a lot of input into the final specification.

     

     

    Wednesday, February 20, 2008 9:12 PM
  •  

    After reading through this rather long thread it seems to me that perhaps there may be a hidden agenda in Evo’s comments.  The anti-Microsoft issue seems to keep coming up with slurs like 'VB is a business language' and 'academics use C++' or 'why not write code that can run on other platforms.'    Since specifics are not offered in the argument to come to a definitive conclusion about Evo’s code (which may or may not say anything about the languages in general even if they are proven correct) the only recurring theme seems to be emotional.  I may have this wrong so I would be interested in hearing from Evo if this is really about Mac vs Microsoft?  I have seen an almost "cultish" following after Mac that seems to be content in repeating the mantra Mac is all and Microsoft is profane.  I think the marketing folks at Microsoft should try to figure out how these proselytes are indoctrinated.  It seems to start with academics and schools.  In any case, the argument seems to breed emotions (look at the age bias in Apple’s new series of commercials) rather than evidence, benchmarks and proof.  I guess if you are young and cool there is no need to prove anything – just groove in your perfection.  I do think Microsoft’s marketing folks could benefit from how all this plays out in threads such as this. I actually worked with a lady not long ago that used IMacs and thought it was an insult to even think about booting it up with Windows.  She told me that even if there was an app that Mac did not have and Windows did have (and there are lots) she would never use it because it was Microsoft (said with a wide eyed look of disdain and satisfaction).  If Microsoft could bottle that elixir...

    Mark

     

    Monday, May 12, 2008 8:10 PM
  • Mark,

    I appreciate your comments fully, however, I am not a big fan of Mac or Linux, because at the moment you could not get the job done. So Microsoft remains to be the best service provider for operating systems. I am currently triple-booting, Vista, XP and Linux, none of which is a Mac!
    However, the problem is Microsoft or "MSDOS" rather, was designed specifically for home users, it was Bill Gates dream to provide every house with a computer. But in the larger scopes the world evolved however, cost of re-writing MSDOS was too high to evolve with it, so for a long period of time Windows "sucked". This is not applicable as much since the NT system has almost entirely replaced MSDOS however, NT has inherited from MSDOS, and this inheritance is like inheriting objects of classes, if the base class is “dodgy” the derived class would inherit that as well.


    However, this thread was not about Microsoft at all, I do have a lot of respect for the organization. The thread was about VB. At the end of the day, one must acquire the tools necessary to "do" the job in hand. But learning VB does not help. Such that by learning VB you would never learn any part of other languages.

    For example if you know C, it is really easy to use Objective-C, C++, C#, Java and many more. So in a sense despite learning one of the above languages one would expand their capabilities in coding considerably, in contrast to learning VB.

    For instance let’s give you an example:
    I want a "thing" which could copy any "chunks" of memory for me and allow me to access them. Well in fact I want this "thing" to act like a stack. Thus this "thing" obeys the FILO protocol. If I use C\C++ it would be exceptionally fast, and also I could even change the implementation of the compiler files. This allows me to optimize the system fully, and take advantage of every cycle. Of course such optimization is not necessary for a simple project, however, if one is writing a kernel or a database system it is almost a necessity. This “thing” of mine should surely be implemented using unmanaged code, since managed code makes this component which is probably the heart of the system slow.


    This could be done in VC++ you could have a managed class and unmanaged classes and you could easily link them together without much of hassle. This optimization is never available in VB and to some degree never available in .NET.

    I shall write two 3 codes, the same code translated in VC++, C# and VB, and I shall put the code in public domain. The speed analysis of these codes would determine if I was ever right at all!

    I am open to the contents of these codes, so I welcom any comments.


    The code would be something like the following:

        File Read/Write              [IO]
        Windows GUI                 [Managed code]
        Encryption/Decryption     [fast memory access]
        Some Graphics              [fast memory access]
        Large Memory Allocation [efficient memory managment]




    Monday, May 12, 2008 8:41 PM
  • I just wanted to give a different point of view on this.

     

    I remember the first time i looked at C# code.  It was really foreign to me.  VB on the other hand was easy to pick up and less confusing.  And as a result of learning VB i now can look at C# code and can understand the structure better.  I have not begun coding in C# yet but the examples that i see make sense to me now. 

     

    So i guess my point is that it is a good idea to learn vb if it will help you understand better how to move to a new language.  VB can be a good stepping stone.  I plan on utilizing both VB and C# for my projects in the near future as each has value in certain areas.  And i also plan on doing some game development with XNA later on.

    Monday, May 12, 2008 9:19 PM
  • Well that is a good point, I do agree with "everyone" that VB does not ailinenate a rookie (well that is where I started from)
    Monday, May 12, 2008 10:56 PM
  • I think it's funny how everyone thinks that VB is easier to understand than C#, because for me, it's totally the opposite.  C# is just so clear and organized.  I think all the punctation actually helps make it easier (eg the ";" at the end of the line and the "{ }").  Maybe C# is easier because I learned actionscript (Flash) basics when I was about 12, and I learned C# when I was 14, and they are both very similar and basically in the javascript family.  Now I'm 15 and C# is definitely my favorite...so far...

     

    paoloTheCool

    Tuesday, May 13, 2008 12:37 AM
  •  

    Well here we are in the religion wars again.

     

    I can code in C# and in C++. I've been writing code now for 38 years and I am a former operatings systems and driver developer. I've spent many years writing in assembler and in a huge variety of languages. For me my affinity for vb has nothing to do with learning about computing. There are few languages that I dislike as much as c-based languages. There just isn't a cult around Macs. I don't know how anyone could miss the Unix/linux cult and what is their language? It's C.

     

    VB isn't perfect but I would hardly call it a business language and I find it difficult to fathom why people here are spending time being lectured to about languages from a seventeen year old who has yet to demonstrate that he understands the big picture.

     

    Lastly evo... if you don't like VB fine. Don't use it. Don't use it and find your C-people to hang out with. But for god's sake stop the proselytizing to people who really do have a great disdain for C.

     

     

    Tuesday, May 13, 2008 1:07 AM
  • I think you just have to go on on with new technology developments, In my eyes Microsoft want Managed code to be the future of all programming and VB does a very good job.

    Sooner or later I can see a bigger debabe in the future when people wont be able to run unmanaged c++ code on a microsoft operating system.

    at the end of the day vb.net and c# run through the same CLR.
    Tuesday, May 13, 2008 2:04 AM
  •  

    I don't know that I see that, Stu. The C++ image is a basic COFF image and all managed applicatations are started by a unmanaged starting procedure. Eventually managed code calls unmanaged code if there I/O or graphics. So I don't see us getting rid of COFF images anytime soon. People like adobe do not write .Net applications, I am pretty sure. So i think the old stuff will be around for a while.
    Tuesday, May 13, 2008 3:54 AM
  • I completely agree with RenneC, it is clear that the code must start from some where, without being managed.
    For example all of the API used within the operating system are unmanaged, because the Kernel itself could not be managed code! So unmanaged code will be there untill there is a break through...!
    Tuesday, May 13, 2008 5:41 PM
  •  

    A kernel can indeed be managed, although Windows does not. Windows will not be around forever. There are models in the works such as Singularity which is managed. I don't necessarily like everything about it, but it is an interesting prototype.
    Tuesday, May 13, 2008 6:29 PM
  • I bet you have not even written any reliable unmanaged code or would even know how to Evo. and c# wow in my eyes is just a descendent of object pascal.

    Tuesday, May 13, 2008 10:02 PM
  • This speed difference – are we talking milliseconds, seconds, minutes or hours?

    My guess is that the difference is in milliseconds in which case the argument is irrelevant.

    Most programmes rely on some sort of user input / reaction / interaction / use of keyboard etc – therefore the user is the slowest link in the "chain" – the speed of this user interaction means any programme speed difference won’t be noticeable on the monitor!!!

    Plus, is it so important to save a few teensy weensy milliseconds?!?!?!?!?!

     

    As a beginner, I enjoy Vb for its' clarity, simple syntax, it's huge library (as I understand, it has the biggest library of all the Studio languages), simple to pick up(mostly!!!), and tha fact that it is the most popular language means it must be the overall best language!! there are always tradeoffs with everything in life  - I can live with a few milliseconds!!!!

    Speed difference – what an absurd argument - it's probably still quicker than the time it takes for you to blink!!!!

     

    Steve

     

    Wednesday, May 14, 2008 5:29 PM
  • Well I wish there was some money involved in this bet, since I have written a kernel, not sophisticated, but enought to boot, and executed assembly code or the specific kernel language which acts like a JIT compiler. The core of the kernel is not managed, but it manages the additional modules which could loaded.
    Most of the codes that I have written is unmanaged C\C++ so I know how hard it is to write unmanaged code when you start, but after a while I have leanrt that when writting the code I need to visualise the memory of the program in my head and in a way achieve the memory mangment in my head.
    Saturday, May 17, 2008 9:35 AM
  • Steve,
    The speed difference is not on the in milliseconds, the differences are (I will provide all of the other info in later times):

    VC++:       ~20  MB\s
    C#:            ~3   MB\s
    VB:           ~1.5 MB\s


    The VC++ code is linked to an unmanaged class, so it is clear why it is faster.
    Saturday, May 17, 2008 9:40 AM
  • ReneeC said:

     

    Well here we are in the religion wars again.

     

    I can code in C# and in C++. I've been writing code now for 38 years and I am a former operatings systems and driver developer. I've spent many years writing in assembler and in a huge variety of languages. For me my affinity for vb has nothing to do with learning about computing. There are few languages that I dislike as much as c-based languages. There just isn't a cult around Macs. I don't know how anyone could miss the Unix/linux cult and what is their language? It's C.

     

    VB isn't perfect but I would hardly call it a business language and I find it difficult to fathom why people here are spending time being lectured to about languages from a seventeen year old who has yet to demonstrate that he understands the big picture.

     

    Lastly evo... if you don't like VB fine. Don't use it. Don't use it and find your C-people to hang out with. But for god's sake stop the proselytizing to people who really do have a great disdain for C.

     

     



    I'd say LINUX is C++/PERL, not C.

    my first language was BASIC. then a little PASCAL, 8086 ASM.
    then Visual Studio C++.

    recently i have learned RISC assembly (microcontroller), and C.
    the C++ is just a way of having a pointer to program code inside a structure record.

    I also use new VB 2008, and it is a good language.
    I have recently used it to implement a serial RS232 terminal for microcontroller, and programming time was just a few days!

    the good thing about VB (managed code) is you do not worry about memory allocation, and system crash, and you do not implement string routines, and memory copy routines, and all that.

    to convert HEX text into array data, yes, it helps to know assembly language, a lot actually.

    I would say, VB is absolutely a professional language, and even if it is possible to implement small games, and utilities, it is meant to be a business language. THEY do not want to worry about hardware-near aspects, such as memory allocation, string routines, and direct graphics hardware programming.

    and yes C, i disliked it for a long time. actually, it can be a better way to write assembly, once you know assembly.

    what's really bad (in my opinion) is to let students begin learning C++ --> open source, GNU, LINUX and all that.

    I do not regret GWBASIC/BASICA being my first languages. It was possible to use VB nearly instantly (true i also tried QB (Quick Basic) now and then a little: 
    http://picsystems.multiply.com/journal/item/35/on_request-_QBASIC_sorting_points
    Tuesday, March 24, 2009 4:09 PM
  • This has been discussed a million times and is always heated. IMHO, It is not about functionality as it is about culture.

    http://www.codeproject.com/KB/dotnet/CSharpVersusVB.aspx
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Tuesday, March 24, 2009 4:38 PM
  • JohnGrove said:

    This has been discussed a million times and is always heated. IMHO, It is not about functionality as it is about culture.

    http://www.codeproject.com/KB/dotnet/CSharpVersusVB.aspx


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com



    BASIC was never designed with assembly-language-type capabilities. C was.
    BASIC is more portable than C.

    by the way, good article, I've learned about how C# was found, by Chief programmer from Borland.
    I'd say back then in the late 1980s, they've been quite clever guys.

    I'd also say, you can read a VB program with less thinking than the C# counterpart,
    to some degree this may depend how good the program author really is*

    there are a lot of object-orientated approaches added to the new VB 2008.
    it is unfair to reference to older versions.

    *i have seen a few cryptic C sources, and also a few poorly coded BASIC programs,
    indeed, it is more easy to get along with old-fashion interpreted BASIC, than with old-fashion C compiler.

    I must admit, i do not really know C#, one time I've recompiled a C# program source supplied with a commercial hardware. For DIRECT-X/DIRECT-3D, C++ must be used right now. It could be done using nearly any language.
    Tuesday, March 24, 2009 5:04 PM
  • tetsu-jp said:

    JohnGrove said:

    This has been discussed a million times and is always heated. IMHO, It is not about functionality as it is about culture.

    http://www.codeproject.com/KB/dotnet/CSharpVersusVB.aspx


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com



    BASIC was never designed with assembly-language-type capabilities. C was.
    BASIC is more portable than C.

    by the way, good article, I've learned about how C# was found, by Chief programmer from Borland.
    I'd say back then in the late 1980s, they've been quite clever guys.

    I'd also say, you can read a VB program with less thinking than the C# counterpart,
    to some degree this may depend how good the program author really is*

    there are a lot of object-orientated approaches added to the new VB 2008.
    it is unfair to reference to older versions.

    *i have seen a few cryptic C sources, and also a few poorly coded BASIC programs,
    indeed, it is more easy to get along with old-fashion interpreted BASIC, than with old-fashion C compiler.

    I must admit, i do not really know C#, one time I've recompiled a C# program source supplied with a commercial hardware. For DIRECT-X/DIRECT-3D, C++ must be used right now. It could be done using nearly any language.



    That is true my friend, but the mindset remains. That is the thrust of the article I sent you. The "Culture". Because the language is lax not strict like C#, and subsequently by virtue produces a culture of users that use, rely upon the laxness and it encourages it.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Tuesday, March 24, 2009 5:11 PM
  • yes, C-type language is more strict.

     

    i was just thinking: there is a programming-language-type approach called "Windows".

    first time i used VS i had to learn the messaging system, and it was not so easy, took me about six months,
    back then it was called MFC (Microsoft Foundation Classes).

    if you write Windows code, you can use C++, C#, or VB, it does not really make a difference, only subtle cultural nuances.

    the approach of the message-handler system was quite useful for RISC assembly,
    I've implemented key testing in a similar way (a small state machine is called periodically).
    Tuesday, March 24, 2009 5:21 PM
  • All these arguments are just for the sake of argument for me, difference between vb6 and c++ was huge but its getting narrowed and narrowed with the advent of visual basic .net and with its similarity to c#
    VB.net provides mostly everything that c# provides (not yield :(  ). Optional parameters are coming in 4.0 in c#, Auto Properties are getting implemented in 4.0 in vb, so they are getting almost close to each other. c# is case sensitive but I have not got any advantage since unique name is enough and easy for me.

    Coding is lot faster in vb and there are option strict on, infer off etc etc which is always turned on or off by good programmar based on the requirement (LINQ(thats why var is there in c#) , Interop etc.


    Dim list as new List (of string) from {"This", "That"} 'Anything wrong here?

    or
    Dim Coords= {({1,2}),{{1,2}), ({1,2})} and  if that is always correctely inferred as jagged array then thats fine to me.

    Inheritance, polymorphism, interface, strongly typed dataset all exist in vb, whatever language you type in, the end result from Compiler is identical IL instructions and metadata. 

    So I dont care much about languages used and depending on the team I am working sometime I have to go with c# but mostly I use vb.



    Arjun Paudel
    Tuesday, March 24, 2009 6:51 PM
  • I wondered what was going on with the resurrecting of these old religous threads.  It's Easter!
    Tuesday, March 24, 2009 9:13 PM
  • I don't think there is much religion in this. I fight for VB and Fortran95 because I hate the alternative!

    To me, there is only one purpose of C style languages - to obfuscate things in such a way that "ordinary mortals" are left far behind and in this way create a distance to "real programmers".
    • You cannot pronounce C code. You have to translate &&, ! and all the other stupid shortenings to english before you can say the code. In the same way, you have to translate your thought to "machine code" to write them down.
    • You have to remember to terminate all statements with ";". If you forget a single ";" it may lead to unpredictable results - and hours of debugging.
    • It is case sensitive.
    • When it comes to delegates and event handling, which is the heart of .Net, the syntax is based on an absolutely stupid name convention (instead of ... Handles, AddHandler, RemoveHandler etc.), which means that a subroutine cannot handle more events (at least at complilation time) because the name should then be a combination between all events and has to change every time you add or remove a subroutine from the invocation list of an event delegate.
    • When you raise an event, you have to check if the invocation list is empty.
    Unfortunately, VB is still considered a "toy" language for beginners and will probably never be more than a Microsoft language - unless it is united with Fortran95! The syntax of these two languages are so similar that it would be easy to make a universal compiler, which understands both and it could be the world's first real strong alternative to C. This is what I fight for - call it religion if you like.

    Everything should be made as simple as possible, but not simpler.
    Wednesday, March 25, 2009 9:02 AM
  • VB is similar to Fortran95?  I did not know that.
    I'd love to see an example. Could you show an example?




    I think English is better than Mandarin; I can understand English.


    www.dsmyth.net | www.dsmyth.net/wiki
    Wednesday, March 25, 2009 11:42 AM
  • Carsten Kanstrup said:

    I don't think there is much religion in this. I fight for VB and Fortran95 because I hate the alternative!

    To me, there is only one purpose of C style languages - to obfuscate things in such a way that "ordinary mortals" are left far behind and in this way create a distance to "real programmers".

    • You cannot pronounce C code. You have to translate &&, ! and all the other stupid shortenings to english before you can say the code. In the same way, you have to translate your thought to "machine code" to write them down.
    • You have to remember to terminate all statements with ";". If you forget a single ";" it may lead to unpredictable results - and hours of debugging.
    • It is case sensitive.
    • When it comes to delegates and event handling, which is the heart of .Net, the syntax is based on an absolutely stupid name convention (instead of ... Handles, AddHandler, RemoveHandler etc.), which means that a subroutine cannot handle more events (at least at complilation time) because the name should then be a combination between all events and has to change every time you add or remove a subroutine from the invocation list of an event delegate.
    • When you raise an event, you have to check if the invocation list is empty.
    Unfortunately, VB is still considered a "toy" language for beginners and will probably never be more than a Microsoft language - unless it is united with Fortran95! The syntax of these two languages are so similar that it would be easy to make a universal compiler, which understands both and it could be the world's first real strong alternative to C. This is what I fight for - call it religion if you like.

    Everything should be made as simple as possible, but not simpler.



    This is what I meant when I said people like the laxness of VB and before long come to rely on it. And as the article pointed out produces a particular culture.

    Carsten, you point is that you find it difficult to "pronounce" therefore it requires the extra step of translation. To a C# developer this is not the case because one already thinks and understands in C#, so I don't think that point holds any weight.

    Your also say a misplaced semicolon can lead to hours of debugging. I have been developing in C# for 5 years, I never spent more then a few seconds on that very subject as I know those who work in C# do not have this issue. Another straw man.

    Case Senstive. To me personally, case senstive is a blessing, not a curse. For those who use VB have to name fields and their property's with different names. In C#, we use the same names, except the property has a capital clearly distinguishing the two.

    Carsten, you think .NET delegate event handling in C# is stupid? This is the epitomy of the "Culture" of the article I displayed previously. C# is not only used for the BCL in 99.9% of he times [NOT VB.NET] but in "Practical Guidelines and Best Practices for Microsoft Visual C# and Visual Basic Developers" it encourages developers to stick to the way C# does events telling VB developers to avoid using "WithEvents". By the way, any event can be handled by any number of callers.

    VB, under the hood checks if the invocation list is empty so why would you use that as an argument against C#? If this speaks of anything, it demonstrates C# developers are more knowledgable and feel quite natural about going under the hood whereas a VB Developer is clearly not and uses ignorance as means of discussing things in which they know very little. If an event has no subsribers, it is incumbent upon the developer writing code to check if there are any subscibers before firing an event, else who who get the event? This is in line with best practice.

    Most of the language difference between C# and VB.NET clearly show that these are two different types of developers. One is designed to have a large appeal to a wide audience of inexperienced developers, whereas the other is designed for someone who is serious about learning OOP. The language is strict because it enforces good OO skills and ensures the mindset "thinks" that way, whereas in VB, you can play fast and loose, call forms up without instantiating them, violate encapsulation, and before long, this becomes a habit, and then you have a plethora of developers who are inexperienced, lack good programming skills and have trouble when they see advanced code that uses Design Patterns, Anonomous Delegates, interface based programming. This is a fact. Undisbuted facts.




    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Wednesday, March 25, 2009 1:18 PM `
    Wednesday, March 25, 2009 1:18 PM
  • In all fairness, though I disagree wth some of the VB defenders, I think the title of this thread is a joke. I know great programmers who work in VB and this forum has a bunch of them.

    Derek, Dave, Renee, Tall Dude, JohnWein, etc......

    Being dogmatic in saying someone shouldn't learn VB is as Renee has said "Absurd".
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Wednesday, March 25, 2009 2:17 PM `
    Wednesday, March 25, 2009 2:08 PM
  • John Grove

    "Carsten, you point is that you find it difficult to "pronounce" therefore it requires the extra step of translation. To a C# developer this is not the case because one already thinks and understands in C#, so I don't think that point holds any weight."

    You can even learn to program i Russian or Greek with a completely different alphabet, but do you really think that it is an advantage that you have to learn to think differently before you can program? Our brain is superior for graphical processing. Therefore, the best way to program is graphical. I do that when I design logic for FPGA's. The next fastest way is to use a well known spoken language and I think that even the most experienced C# programmer reads English much faster than C.

    "Carsten, you think .NET delegate event handling in C# is stupid? This is the epitomy of the "Culture" of the article I displayed previously."

    A strange way to argue. It is stupid with that name convention. What will you call a subroutine, which subscribe to more events and what will you call a routine, which may be added and/or removed from the event dynamically? VB utilize the way events works with multicast delegates. C# does not! C# is based on the old "singlecast" delegates, which is outdated.

    "... but in "Practical Guidelines and Best Practices for Microsoft Visual C# and Visual Basic Developers" it encourages developers to stick to the way C# does events telling VB developers to avoid using "WithEvents"."

    Why? I don't care for C# best practice. I care for programming best practice and that is something completely different! To my opinion, the best language is the one, which gives you the best overview and the best efficiency.

    ".. VB, under the hood checks if the invocation list is empty so why would you use that as an argument against C#? If this speaks of anything, it demonstrates C# developers are more knowledgable and feel quite natural about going under the hood whereas a VB Developer is clearly not and uses ignorance as means of discussing things in which they know very little. If an event has no subsribers, it is incumbent upon the developer writing code to check if there are any subscibers before firing an event, else who who get the event? This is in line with best practice."

    An event is nothing but a delegate. You can add and remove handlers during compilation or do it dynamical. Therefore the routine, which raise the event, may not know if there are any subscribers. All the OnXXX methods like OnPaint, OnClick etc. are examples of this. The last thing they do is to raise the event. Therefore it is natural that the language does the check. The less code you should write the better because it gives a better program overview and with that less errors. This is what it is all about - to make the code as readable as possible because it is the key to reliable programming. I can assure you that assembler programmers know what they are doing, but do you really think that it is an advantage to code that way if you are not forced by some reason to do it?

    "Most of the language difference between C# and VB.NET clearly show that these are two different types of developers. One is designed to have a large appeal to a wide audience of inexperienced developers, whereas the other is designed for someone who is serious about learning OOP. The language is strict because it enforces good OO skills and ensures the mindset "thinks" that way, whereas in VB, you can play fast and loose, call forms up without instantiating them, violate encapsulation, and before long, this becomes a habit, and then you have a plethora of developers who are inexperienced, lack good programming skills and have trouble when they see advanced code that uses Design Patterns, Anonomous Delegates, interface based programming. This is a fact. Undisbuted facts."

    No, this is not a fact! Just because a language is easy to understand and therefore is also used by beginners does not mean that it lead to bad programming among professionals. Fortran95 has a syntax almost identical to VB, but many of the worlds most demanding applications like space applications etc. have been written in Fortran. A good programmer makes good programs no matter what language he or she uses. The numerous safety updates in Windows and IE clearly shows that at least somebody has lost the overview of what they are doing! It is quite obvious that they use C# :-)

    Everything should be made as simple as possible, but not simpler.
    Wednesday, March 25, 2009 2:47 PM
  • Carsten

    "the best way to program is graphical"
    Everyone learns different, some prefer graphical, some prefer code. That is why textbooks will show UML, while others show simply code. No one learns exactly the same way, besides, this is not a point for you, this is merely your opinion.

    "I think that even the most experienced C# programmer reads English much faster than C."
    Writing code is telling a computer to do something, it is not meant to be read as a novel. You have to think, deliberate, use your brain to make it into an intelligent program. Sometimes complexity is inserted to make a program more extensible which may not add immediate benefit, thereby adding a layer of sophistication that may be confusing to a new developer. The thrust of refactoring introduces more indirection into a program but the goal is of course to make it as readable as we can. Martin Fowler wrote "Any fool can write code that a computer can understand. Good programmers write code that humans understand"

    I don't care for C# best practice. I care for programming best practice
    Notice what I quoted to you was from the book "Practical Guidelines and Best Practices for Visual C# and Visual Basic Developers. So, don't quote me out of context. All I stated is that what C# does naturally by default, it is forced and unnatural in VB. This was an admonition more to VB developers then to C# developers. 

    Therefore the routine, which raise the event, may not know if there are any subscribers
    I already quoted to you that the method that fires the event should "know" if there are any subscribers, for that is good practice and that is what is recommended in the book I quoted. You are arguing against best practices, not against me.

    Just because a language is easy to understand and therefore is also used by beginners does not mean that it lead to bad programming among professionals
    You couldn't be more wrong, as it is very very clear you did not take the time to read the article I posted. And by the way, I occasionally answer VB questions and the caliber of questions I see and the way they are answered proves this to me on an almost daily basis.

    A good programmer makes good programs no matter what language he or she uses.
    I agree with you on that.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Wednesday, March 25, 2009 3:17 PM typo
    Wednesday, March 25, 2009 3:13 PM
  • "Everyone learns different, some prefer graphical, some prefer code."

    No, our brain is much better for understanding graphics than text. A child is able to recognize objects long time before it is able to talk. Our brain can recognize objects much better than any computer, but hardly nobody can multiply two two-digit numbers in the head. This shows the tremendous difference between the way we and a computer "thinks".

    "Any fool can write code that a computer can understand. Good programmers write code that humans understand"

    That is exactly my point and VB is better than C# when it comes to that.

    I already quoted to you that the method that fires the event should "know" if there are any subscribers, for that is good practice and that is what is recommended in the book I quoted.

    What about OnClick, OnPaint etc. Is this bad programming practice? As I wrote, all OnXXX methods raise events without knowing if there are any subscribers and since you are able to add and remove subscribers dynamically, you can never know!

    You couldn't be more wrong, as it is very very clear you did not take the time to read the article I posted. And by the way, I occasionally answer VB questions and the caliber of questions I see and the way they are answered proves this to me on an almost daily basis.

    What kind of questions would you expect from beginners? When I try to dig down in .Net and ask below-the-hood questions in this and the base class forum, almost nobody knows. One pit deep and the knowledge is virtually zero even among so-called experts. I have even seen very experienced programmers with 5 stars (before the medals) on their shoulders not knowing the difference between Sleep() and Application.DoEvents. VB is popular among beginners. This is why there are so many beginners questions in this forum, but that has absolutely nothing to do with professional use of VB or Fortran95.

    "Any fool can write code that a computer can understand. Good programmers write code that humans understand". This is why I use VB.

     


    Everything should be made as simple as possible, but not simpler.
    Wednesday, March 25, 2009 3:55 PM
  • You are entitled to your opinion my friend, and I for one won't try to persuade you any different. You are arguing not on any factual evidence but from your opinion. By asserting VB is better then C# because you seem to find it easier to me is not factual. Someone can argue, and have in fact have argued that VB is way too verbose and C# is much more cleaner. I agree with that.

    But we are arguing opinions on both, and you are defending your opinion based upon your experience. I happen to know VB.NET, but program in C#. So my experience and opinion should count for something. Those who do not know C#, but argue in defense of VB over C# are not worth debating or discussing anything rationally. [I do not know your background, so this is not at you personally, but in general].

    I am glad you enjoy programming and the the VB forum is fortunate to have someone as passionate as you in this forum helping users. We can agree to disagree.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Wednesday, March 25, 2009 4:11 PM `
    Wednesday, March 25, 2009 4:08 PM
  • "You are arguing not on any factual edivence but from your opinion."

    We all are because there is no factual evidence! In programming there is no right or wrong and just because somebody has written a "Best Practices" it doesn't mean that it cannot be done in a better way. In fact, finding better ways is what I do for a living. I run an inventor company with speciallity in highly demanding industrial control and electronic development and I can assure you that if a process control system was as unstable as most of today's PC software, you would have the customer in the phone 24 hours a day!
    Everything should be made as simple as possible, but not simpler.
    Wednesday, March 25, 2009 4:27 PM
  • "Any fool can write code that a computer can understand. Good programmers write code that humans understand".

    A quote from a great mind. I'd love a beard like that.

    Thing is the language isn't important or at least it isn't when VB.NET or C# is concerned.  C# has some shortcuts; VB.NET has some shortcuts. If you (or someone else) can read what you write (6 months later) then who gives a ____ what language you do it in.

    Any developer worth their salt can read both programming languages.

    The programming language you use dictates your abilities to solve problems. If you always think in Objects then your only ever going to solve problems using Objects. In this repect there is no difference between VB.NET and C#.

    I grew up on VB but changed to C#. Why? I can do more with less code.

    Does less code mean less readable; no. Less is more in my book. It makes it more readable. Just the facts; right there.


    www.dsmyth.net | www.dsmyth.net/wiki
    Wednesday, March 25, 2009 5:51 PM
  • Thanks Derek, well put. I agree with that.

    Let me add the conclusion section of the article I keep alluding to, which I know few have read:

    "Conventional arguments between Visual Basic and C# focus on the functionality differences. Since these differences are minimal, it is argued that the choice of VB or C# should remain a matter of personal preference.

    These arguments fail to take into account the deep cultural differences between the VB and C# camps.

    The truth is that while there are some exceptional VB teams that write exceptional quality code, this is the exception, not the rule. Most VB teams have trouble writing high quality code, and this trait is ingrained deeply into their culture by environmental factors beyond their control, and continues to be propagated by the VB syntax and semantics in Microsoft .NET.

    Therefore:

    • If an organization is content to write average quality software and has average VB developers, there may be no benefit in switching to C#.
    • If an organization has an exceptional VB team and wants to continue to improve, there is a real danger in continuing in VB. The danger is that the programmers will leave for opportunities in C#. Once even one top developer does this, the polarization of the group towards the old VB culture may accelerate, thus accelerating the attrition.
    • An organization with an exceptional VB team should switch to C#. The exceptional VB team will have no problem learning the new syntax, so there is no danger. The team will then reap the benefits of the C# syntax, semantics and culture for years to come."

     


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, March 25, 2009 5:59 PM
  • I think C# sucks.  I can type VB code and think while I'm doing it.  In the C languages I have to stop, or a least pause and find  the punctuation marks.  I wonder how many C# coders are touch typists?  If I have to do something that can't be done in VB, I'll do it in native C and call it from  VB.
    Wednesday, March 25, 2009 6:43 PM
  • That is just because you are not used to it John. I recall when I first moved to C#, I cursed up and down because I wasn't used to that, but shortly it becomes embedded into your thinking.

    I hate the verbosity of VB. Literally, my stomach turns...
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, March 25, 2009 6:47 PM
  •  
    JohnGrove

    What is your typing speed?
    Wednesday, March 25, 2009 7:04 PM
  • I have never measured my typing speed.

    I can imagine, if you are used to typing fast without giving thought to what you are typing that this would be an issue. Personally, I like to think about the code I am writing in order to consider if the solution I am devising is in fact the best solution. I have noticed when you spend time thinking about what you are doing, you often get better ideas on how to abstract it out better. Which by the way is one of the tenets of eXtreme Programming. Test first then write code. I have found this methodology works for me.

    Recently, I was debugging an application for a young programmer who is going to school and he was using VB.NET, and every time I had my cursor over a variable in the debugger, it would not show me the value of the variable. It has been awhile since I worked in VB, and for some reason would not show me the value, I had to add a watch just so I can see its value. That was quite irritating as you can imagine. Is this normal VB behavior?
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, March 25, 2009 7:15 PM
  • The truth is that while there are some exceptional VB teams that write exceptional quality code, this is the exception, not the rule. Most VB teams have trouble writing high quality code, and this trait is ingrained deeply into their culture by environmental factors beyond their control, and continues to be propagated by the VB syntax and semantics in Microsoft .NET.

    I have read that nonsense (and the rest of the article). How can anybody say that without the slightest documentation and why is it more likely that excellent VB programmers leave for better C# opportunities than excellent C# programmers? Also I cannot see any reason why a company should change a winning (VB) team and face all the problems with reuse of old software, learning period and sour employees, who are forced to use a language they don't like. Pure nonsense. There may be reasons why a company choose to change to C, for example to make it easier to port the code to various platforms and get qualified programmers, but not any of the reasons mentioned in the article.

    In my vildest imagination I cannot cannot think of any professional programming team, which is able to make more than 200 serious safety holes in one product - except for Microsoft. It is certainly not all C# teams, which are good and know what they are doing! It seems that some teams simply hope for the best and let the hackers do the test. That said, Windows 7 looks very promissing. Finally they seem to have learned a little about efficiency, but there is still a long way to go before the users can surf and use the internet as safe as reading a newspaper or watching TV without the slightest risk of virus, spyware or hackers.


    Everything should be made as simple as possible, but not simpler.
    Wednesday, March 25, 2009 7:16 PM
  • A touch typist can devote all thought to the task at hand rather than thinking about the words being typed.  The intellisense for VB is superior to that for C#.  I hardly ever have to use any of the debuging windows other than the output window.  Have no idea how your protege managed to screw it up.
    Wednesday, March 25, 2009 7:33 PM
  • I think the intellisense issue is debatable, but the fact you do not use any of the debugging tools only enforces what I have suspected about the culture of VB. I use most of the debugging tools as do most of C# developers.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, March 25, 2009 7:38 PM
  • When the C# intellisense catches up to VB's, you won't have to use those windows nearly as frequently.  Compare debugging in C# to C++.  The difference is similar to the difference between VB and C#.  The VB IDE is just more advanced than the C# IDE.  Actually, it's almost like comparing the VB.NET IDE to the VBA IDEs.
    Wednesday, March 25, 2009 7:46 PM
  • John, you amuse me at times. C# IDE is vastly superior to VB's by any stretch of the imagination. You even admit, and you are an "advanced" VB guy that you do not use the Debugging tools at your disposal.  You should leverage them, you will discover your programming will soar. Learn how to also use "Marcos". VB doesn't even have the Refactoring tools by default that C# has in their IDE. Do you ever refactor?
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, March 25, 2009 7:55 PM
  • I'm really not a coder.  I write programs to perform tasks.  I don't want to get bogged down in the technical aspects of the code.  To me programming is a tool, a means to an end.  I can let coders write formatted code.  I left technical writers write English.  I guess the technical writers of today are C# programmers.
    Wednesday, March 25, 2009 8:25 PM
  • Very true John; C# IDE, esp the refactoring tools, was also a big factor in choosing to code in C#. Rename refactoring... awww... suits me sir... If you don't have ReSharper John it's worth the money; a great IDE enhancement for C#.


    One of the things that annoyed me with VB was the fact my old boss, with no formal software development training, used to believe he was a better programmer than me due to a programming technique he discovered called Copy and Paste which he combined wonderfully with a very useful way to declare variables called Global variables.  

    Yeah many a fustrating day was spent trying to convince him code != software development. He's no longer my boss and this goes out to all ma hommies out there who'll need to unravel those bowls of spaghetti.




    VB made programmers of those who really shouldn't have been programmers until they had at least some sort of training. This is why VB.NET is better than VB6, it's sort of still backwards compatable but you know now it's fully object orientated so VB.NET is just complex enough to hinder the spaghetti kid coders.

    VB is a good language, it paid my bills for many years, and I owe it a lot and take nothing away from those who code in it and live by it; but personnally speaking C# for me, is better.

    www.dsmyth.net | www.dsmyth.net/wiki
    Wednesday, March 25, 2009 8:44 PM
  • Agreed Derek. I have worked on several projects that were in VB.NET. If one is well grounded in OOP, they can make the most out of any language that supports it. And developers such as yourself whom I consider to be quite excellent eventually may have started there, but move on.

    Our main division does our logistic stuff in VB.NET, while we in EI (Electronic Information) use C#. Occasionally, I have to help them with stuff.

    VB.NET has improved a lot. When I create single instance applications in C# that accept command line data, I sometimes use the ApplicationFramework of VB to accomplish that rather then trying to create some Remoting or WCF solution [Which would probably be better]

    //Example
    http://69.10.233.10/KB/cs/CSSIApp.aspx

    nobugz showed me this which turned out to be a time saver.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, March 25, 2009 8:56 PM
  • I have to reverse myself and chime in with john on the last go round. What john doesn't see is that VB and C# are both an artifact of their production. Given what's been  produced is therefore an artifact of the language. Given whats been been written i'll give the top score to c++ BUT thats by artifact.
    Thursday, March 26, 2009 1:14 AM
  • Hey Renee, hope you are well. How are you recovering? I hope well.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Thursday, March 26, 2009 1:19 AM
  • Well, Im recovered as much as Im going to. I've had a TBI (traumatic brain in jury).  I'm still in the hospital taking care of myself until the government gets it together to do step xxx out of 687 and get me out of here. I am working in the gym halftime as a contribution. Unfortunately few of the people with TBI's are ever vebal again. I was lucky.

    I am on a borrowed Inspiron 9100 running XP. I have only the big rig left which is running vista SP1 but i've forgotten the passwod as part of the TBI. So I have to purchase a package to go figure out my password so I can log on.

    -Renee
    Thursday, March 26, 2009 1:39 AM
  • So whats going on with c# now??
    Is it really getting envious of dynamic languages?
    Read this interesting article, featured in technet flash..


    Summary

    As languages mature they tend to develop to meet every need and requirement. C# is in very real danger of becoming an over-stuffed language in which it is possible to program in any style, including no style at all. Looked at individually it is difficult to be too critical of any new feature. After all, who now would be without generics and even extension methods. However, a language shouldn’t just be a pragmatic collection of features – it should embody a vision of how things are to be done. Currently C# seems to be moving towards VB.NET – let’s hope it doesn’t overshoot and turn into VB 6 with classes.

    Arjun Paudel
    Thursday, March 26, 2009 7:26 AM
  • Hi Renee,

    I have been waiting for you. I thought that you couldn't resist this thread in the long run and I was right :-)

    Nice to see that you are getting much better. I remember your first posts and mails after the accident and I must admit that I had my own thoughts about TBI, but now I will soon need an English dictionary again to understand your posts. Nice to have the good old (cryptical) Renee back :-) This forum is not the same without you.


    To the moderators

    I know that Renee is against stars and medals, but please sum the points of ReneeC, ReneeCC, ReneeCCC and Renee Culver and give her her medals back. She really deserve to be honored for her great contribution to this forum over so many years.


    To John Grove and Arjun Paudel

    Please note that my thought about VB and C# only apply to the language syntax - not the compiler. I fully agree that in many cases, the VB compiler (and maybe C# 4) tries to be much too intelligent and guess what the programmer has meant. This leads to poor constructions, which should have been captured at compilation time. You can switch Option Stick On, but there are example where fully legal and correct constructions gives errors with that enabled. The best compromise is probably to allow combination of tightly related types like bytes, words and integers and like chars and strings, but not a mix between unrelated types like integers and strings.

    VB is not perfect. There are many examples where the syntax is not 100% consistent and there is a little too much writing, but what really counts is the ability to overlook what you and especially other programmers have done and when it comes to that I think that VB is better than C style. Good programming is 80% overview and understanding of the system and only 20% programming! There is nothing so difficult and time consuming than to try to overlook the programs of other programmers - except perhaps to understand ones own very clever constructions just ½ year ago :-)


    Everything should be made as simple as possible, but not simpler.
    Thursday, March 26, 2009 10:08 AM
  • I agree Carsten, but member points is not possible to merge with user accounts, I red it somewhere in suggestion and feedback forum, best thing will be to help Renee to reset her password of her live account so that she can use her old account.


    Arjun Paudel
    Thursday, March 26, 2009 10:18 AM
  • Why is it not a big surprise to me that some of the worlds best programming brains in the worlds biggest software company are not able to change a single parameter in a data base? We must find a 15 years old hacker to do it :-)


    Everything should be made as simple as possible, but not simpler.
    • Edited by Carsten Kanstrup Thursday, March 26, 2009 10:46 AM That d..... edit don't work
    Thursday, March 26, 2009 10:40 AM
  • I want to thank all of you, Carsten, Arjun and, John and, John and Jeff for your welcome. It'll be an unknown number of months before I am able to resume. My examples are on the machine with the hopefully temporary locks on it. Once again thankyou.


    I don't know whether it's the tbi or not but the Basic argument seems so funny these days when one remembers that it could all change in a release which "redid things". On one hand I'm on the side of C until I look at it  and notice that it is full of methods for dealing with itself then I come back to Basic.

    -Renee
    Thursday, March 26, 2009 12:40 PM
  • Renee, one thing, if your vista is locked up then this tool might be handy




    Arjun Paudel
    Thursday, March 26, 2009 12:45 PM
  • At least Renee has "MVP", she deserves that.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Thursday, March 26, 2009 1:29 PM
  • So, if you write "VB.NET", you mean "VB 2008"?

    I think there is even a class statement (now).

    is it useful to label everything with "class", and praise OOP?

    it can be restrictive to think in C++ type OOP- naturally everything is an object,
    and even if programmers do not know, they think in objects.

    however, OOP is combining data&executeable code, protecting data from being accessed, all of this can be very useful,
    but it is nothing than to introduce a complex rulework and a certain way of doing things, label it "class" all the time,
    and say, "this is OOP".

    you can have "objects" in QBASIC if you want, or machine language (means, to maintain arrays with functional records: text lines, points, graphics).

    Also i must say, yes, OOP can support this approach (even if it is not always useful to duplicate the executeable code as well).

    i have read in a help file, C++ is not much more than structure records (STRUCT) having pointers to executeable code added.

    beginners should not learn C/C++/C# (the pointer arithmetic), or machine language (abstraction requirement, and danger of bad code) as their first language! they should start with BASIC!

    and yes i use C++, C, and have C# installed. if it is not neccessary to do excessive pointer arithmetic, or to do it extraordinary fast, I can use the VB, and the built-in ARRAY LIST (yes i think it is not optimal for instance to process realtime 3D).

    rather, programming languages should be compared to certain types of vehicles.
    • eventually BASIC could be thought of to resemble a TRACTOR which is a little rusty (if you have VB 2008, imagine it smelling of fresh paint).
    • MACHINE LANGUAGE is an exotic motorcycle, the manufacturer's emblem some type of japanese language.
    • old fashion C compiler (nowadays) resembles a used car which is 15 years old- quite useful in the city to do shopping.
    • RISC assembly might become a 1:16 propulsion turbine aircraft: http://www.grc.nasa.gov/WWW/K-12/airplane/turbine.html
    • scripting languages generally resembly bicycles!

    of course this has nothing to do with reality. but the idea is, tractors are more robust than motorcycles, whatever argumentation you will come up in addition.

    think, all programming system have to cope with individuals who are angaged in malicious coding- so BASIC does not hone them to be clever and intelligent (to use OOP), but has no shame calling them ret*rded and I*iots.
    It is more clumsy than in other languages, to use BASIC for malicious software (even if it might be possible a little).
    so the restriction has good sides, too.

    but as explained in a previous reply, modern C# and VB 2008 are not very different, most things can be done in either one or the other language, especially when using the WINDOWS subsystem.
    yes, pointer arithmetic naturally suits C a little better, while ARRAYS are also native to BASIC (yes it can use multi-dimension).

    so you could think a few minutes, which level of pointer arithmetic is required, and if you need high-speed performance.
    still, any C is better than machine laguage (when you know how to use machine language).
    simply it can be written much faster. http://picsystems.multiply.com/photos/album/11#14

    I'd say, without knowledge of machine language, C is horror, cryptic, useless, and a pain.
    It only makes sense when you use it to spell machine language: source code size only 25%, easier to read, portable,

    did someone mention COBOL? http://picsystems.multiply.com/photos/album/11/this_software_has_bugs#1

    the one-line version: people are encouraged to begin with BASIC as their first language (and then eventually decide if they like programming or not).

    or: it depends how you code, not what language you use.

    Thursday, March 26, 2009 1:44 PM
  • Arjun Paudel said:

    So whats going on with c# now??

    Is it really getting envious of dynamic languages?
    Read this interesting article, featured in technet flash..


    Summary

    As languages mature they tend to develop to meet every need and requirement. C# is in very real danger of becoming an over-stuffed language in which it is possible to program in any style, including no style at all. Looked at individually it is difficult to be too critical of any new feature. After all, who now would be without generics and even extension methods. However, a language shouldn’t just be a pragmatic collection of features – it should embody a vision of how things are to be done. Currently C# seems to be moving towards VB.NET – let’s hope it doesn’t overshoot and turn into VB 6 with classes.

    Arjun Paudel



    Arjun,
    Interesting article, thanks for that. A couple of statements in there jump to my mind.

    "The only downside for the migrating VB programmer is that C# isn’t as easy to use. It’s a bit too logical and a lot too restrictive. It tends to insist on doing things “right”. You can’t duck out of object-oriented programming in C# and doing this right is a big learning task."

    I agree with that since it VB doesn't insist in doing things "right".

    "This ease of use not only derives from the language structure but from the simplicity of the Framework and the IDE (i.e. Visual Studio)."

    One minute its hard, the next it is easy?

    The author confuses the dynamic features of C# with features that do things for you in VB.NET. So the analogy is not correct and I do not think the author of that article was attempting to be literal in that statement but rather he seemed to be using sarcasm or irony to try to make what he construed as a exaggerated comparison. You know a "shocking" comparison to draw analogies from. The features he mentions do not even exist in VB.NET to my knowledge, or if they do now, they didn't.

    The extension methods, Lambda expressions, LINQ, anonymous delegates and functionality of that nature do not make C# closer to VB.NET but I think are merely the reactions of some to technology moving so fast and becoming so hard for some to catch up that he seems to be sounding a horn of a position of extremism that language is evolving in to something that doesn't look like it did when it began.

    My opinion is that what do you expect? Technology is ever moving forward, should it wait until you grasp it before it can proceed? Of course not, that's ridiculouos. This author is no doubt a VB'er who fears the changes he sees.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Thursday, March 26, 2009 2:04 PM
  •  This author is no doubt a VB'er who fears the changes he sees.

    I like your analogy (the last sentence), Mike writes in c#!!

    Thanks for reading and sorry for confusion, probably not good article for you, I am only interested in new features coming with .net 4 and got that article there, thought it makes some sense. I am very exicited to with c# 4.0 and visual basic 2010. Loads of improvements in lanuage features. I think all of us who are discussing here use both c# and vb and they are interoperable. Its all about personal choice, if something is not possible in vb.net then c# is there and only my point is if we do not write the code the way they should be, then we get problem. That time neither vb nor c# saves us and we are not bound to follow the religion set by visual basic 6 if we are coding in visual basic.net, and If you are good visual basic.net developer then you can easily port your skill to c#. 





    Arjun Paudel
    Thursday, March 26, 2009 2:47 PM
  • He let the cat out of the bag with analogies which display the mindset of a VB'er which indicates he does not write in C# by virtue of what he has written.

    Thanks again Arjun. I certainly agree that a good developer with OOP skills can easily make the move to C#. Derek is proof of that.

    There are lots of people who "claim" to use C# but it is evident from the C# community that they do not. Robert Martin published his book on C# which is nothing more then his other book in Java ported to be in C#. He didn't leverage anything of C# but merely wanted to make a few bucks on the success of C# since it has become more and more popular.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Thursday, March 26, 2009 3:04 PM typo
    Thursday, March 26, 2009 2:52 PM
  • And a special note for Carsten,

    I've always enjoyed talking to you. I'm only mildly in line with what you say, operating sytems are different too but I enjoy the ____ out of you....and I hope you don't forget that.
    Renee
    Thursday, March 26, 2009 8:49 PM
  • I'm really not a coder.  I write programs to perform tasks.  I don't want to get bogged down in the technical aspects of the code.  To me programming is a tool, a means to an end.  I can let coders write formatted code.  I left technical writers write English.  I guess the technical writers of today are C# programmers.

    Me, too. 
    I'm an engineer, not a doctor.  I mean, not a developer.

    Programming is just another tool in my toolbox.
    But, it is the most fun tool.
    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 4, 2009 1:09 PM
  • John, you amuse me at times. C# IDE is vastly superior to VB's by any stretch of the imagination. You even admit, and you are an "advanced" VB guy that you do not use the Debugging tools at your disposal.  You should leverage them, you will discover your programming will soar. Learn how to also use "Marcos". VB doesn't even have the Refactoring tools by default that C# has in their IDE. Do you ever refactor?
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com

    Grove, Wein makes a good point about the VB IDE. 

    I don't use VB too much, except with VB Express.   The VB IDE in VS Standard and higher are smart.  The one in VB Express doesn't do 1/4 the stuff.  The VBE IDE is pretty hostile IMHO.  It lacks a Locals Window.  How do you Debug?
    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 4, 2009 1:12 PM
  • That is all nice talk, friends.

    But, you maybe don't know the fact, I have learned C++, and also native C (which is faster to spell than machine language).

    So i would be able to use C++ in certain ways that would be alienating to the majority of people!

    I do not even need templates or Lambda expression (what i certainly like is TRY CATCH FINALLY).

    for instance this (it can compile, and execute in ways that make sense):

    it's a little pervert way of overloading operators, and if you look, you get the idea "things went wrong when designing C++"

    in VB such a construct would be a little more difficult...sure you can store some sort of token code into arrays, and work it on tiny state machines!

    most professional programmers come to a point, once, after 20 years, when they could any language, really.

    it's just a flavour sometimes! and don't assume "we" or "us" or "someone" would be incapable to use C-type languages.

    it is just...i read a long HTML (500k) about "Stallmannism", and think, hey wait, is this an "object"?
    and, things without the label "class" are not objects?

    nodelib

    OK a direct reply to the last thread update

    C code to rotate brick

    you could argue, in C, it can be spelled more compact, thanks to the pointer arithmetic.
    yes. if you need extensive pointer arithmetics, C is good, because it offers "assembly-language-type capabilities".

    but, i have seen some japanese guys (on blogs) talking about C++ features, and personally, they did not behave very social.

    so, high-tech, but lo-touch. the intellectual knowledge clearly did not make them better humans! all the C++ efforts.

    finally think a little BASIC-type stupidity and classical array-type thinking are often more appreciate.

    last, modern VB2008 is offering classes, among other ways of OOP. there is little what C can do, and VB2008 would not be able to do.

    I have to deal with so-called "C++" sources, because of DIRECT-X, but think of it as a way of spelling assembly (machine language), which i have learned for different CPUs.

    C was designed in the 1970s and it is nothing new!

    but also the good news is, that C# is a new concept that originates from Borland.
    I would say, it is OK to use C#, or even C++, if you need pointer arithmetic.

    however, if possible, use VB, for the purpose of read-ability, and clarity.
    BASIC is, to some degree, more plain english than C-type language (which, if you know machine language, can resemble machine language).
    for people who just start- C-type can be a nightmare, traditionally resulting in numerous reboot events!

    yes C# does not reboot all the time anymore (it hardly occurs).

    what I do not understand is why you praise C-type, blamish BASIC, but ignore that there are people who have learned numerous languages.
    If they say, "i have started off with BASIC, and it was good, I do not regret it", would you trust it?
    or would you favour a LINUX bootcamp, and exhibit obscure textual instructions to "recompile the kernel" (actually this does not involve any source code edits, or a real understanding of C-type language, but sounds nicely).

    to someone who started off with interpreted BASIC this sounds somehow abhorrent (yes back then BASIC beginners did not have the knowledge to recompile the OS kernel).

    by the way, the obscure C++ example was never extended into a real working software package (but certainly some test programs did run quite well).
    it was about the time when i switched to VB!

    so because of the snobbyness of a few people who talk about RUBY, lambda, and templates, this project did find an early end.
    indeed, back then I designed it only for the purpose to have smt. to talk about (not for the purpose to obfuscate).
    Monday, May 4, 2009 1:31 PM
  •   How do you Debug?

    How do you Debug?  I use Console.WriteLine and I don't mask errors with Try ... Catch.  SingleStepping and observing variables really doesn't work very well with threaded, multicore systems.  I use VBE 2008 and it is much quicker at incorporating changes than VC#E 2008.  In some cases you must build a C# app to get the changes.  In both cases the 2008 express editions are superior to the  2005 standard editions.
    Monday, May 4, 2009 1:32 PM
  • I'm not doing threaded, multicore stuff.  I'm simply modeling physical systems and need to solve thousands of equations.  I just need to step through the code to check the computations before I put them to use.  Too many variables to write out to Console or Output Windows.  I just want to observe a few dozen variables/collections as they get put through the wringer.
    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 4, 2009 2:00 PM
  • John,
    Do you ever use the following:

    1.) Advanced customizable Breakpoints
    2.) Variable Watches (Locals, Autos, Watch)
    3.) Macro's, Macro Explorer
    4.) Refactoring?
    • Extract Method
    • Change Method Signature
    • Decompose Conditional
    • Extract Variable (Introduce Explaining Variable)
    • Extract Superclass
    • Extract Interface
    • Copy Class
    • Push Up Members
    • Rename Type
    • Rename Member
    • Rename Parameter
    • Rename Local Variable
    • Encapsulate Field
    5.) Commands available in Break Mode
    • Step Into
    • Step Over
    • Step Out
    • Contunie
    • Run to Cursor
    • Set Next Statement
    • Show Next Statement

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Monday, May 4, 2009 2:08 PM
    Monday, May 4, 2009 2:02 PM
  • John,
    Do you ever use the following:

    1.) Advanced customizable Breakpoints
    2.) Variable Watches (Locals, Autos, Watch)
    3.) Macro's, Macro Explorer
    4.) Refactoring?
    • Extract Method
    • Change Method Signature
    • Decompose Conditional
    • Extract Variable (Introduce Explaining Variable)
    • Extract Superclass
    • Extract Interface
    • Copy Class
    • Push Up Members
    • Rename Type
    • Rename Member
    • Rename Parameter
    • Rename Local Variable
    • Encapsulate Field
    5.) Commands available in Break Mode
    • Step Into
    • Step Over
    • Step Out
    • Contunie
    • Run to Cursor
    • Set Next Statement
    • Show Next Statement

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com

    I'm getting the Debugger figured out, even in the Express version.  There is a Watch Window, but I have yet to find the Locals Window in VBE.  Set a breakpoint.  When execution stops right-click on a variable and select "Add Watch".  Not as good as the Locals Window, but pretty effective. 

    You can also do everything that you listed in "5".  There isn't a Refactoring tool like C#, but the VB compiler behaves as if it still has some of its' BASIC Interpreter roots.  Meaning it behaves as if it performs pre-processing on the current file being edited.  Make a mistake, and wizard opens to help you out.
    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 4, 2009 3:21 PM
  • I'm not doing threaded, multicore stuff.  I'm simply modeling physical systems and need to solve thousands of equations.  I just need to step through the code to check the computations before I put them to use.  Too many variables to write out to Console or Output Windows.  I just want to observe a few dozen variables/collections as they get put through the wringer.
    Stepping through the code is just too slow for me.  I analyze the variables in Excel after formatting them in csv format in WriteLine statments.  As I said, I'm not a coder.  I'll let a coder/editor rewrite my code in standard format.
    Monday, May 4, 2009 8:45 PM
  • I started writing code in 1987 while attending college.  Everything was DOS based.  It was a hard transition to the GUI style, but I made it.  What we have now is far superior.  One person mentions all the debugging capabilities and that is so valuable.  Try looking through hundreds, or even thousands, of lines of code for an error with no idea what to look for.  That's the way it used to be.

    Why should you not learn VB?   I see no valid reason to not learn.

    Tuesday, May 5, 2009 10:52 PM
  • I started writing code in 1987 while attending college.  Everything was DOS based. 
    Nice to hear from a youngster.  Not everything.  The Mac was alive and well.
    Tuesday, May 5, 2009 11:00 PM
  • In 1987 I was big wave riding. Now anything bigger then 5-6 feet to me is big.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Tuesday, May 5, 2009 11:03 PM
  • Fantastic John. Unfortunately in 86 I interviewed with Cutler out in Decwest after having invented host based shadowing on the VAX in roughly 1983. Decwest was still intact at that time. !986 was the year of Chernobyl, also. Why did you all dig up this thread. I knew a lot then. I get to relearn some of the microsoft part. Of the DEC, I dont have to learn a lot. I'm one of the few who remembers the Purdy Encyption Algorith from VMS. Could I talk to Evo the way I used to? I doubt it to be honest, but today I would ask him why he was trying to control the argument? It take me a couple of years to get back to where I was if anyone cares. I will try but there's one more wait list in have to go through - which is waiting for an apartment here. I'll look forward to this stay in the hospital being over. God, will I look forward to it. A couple of phased pentiums wouldn't hurt either.
    Wednesday, May 6, 2009 1:28 AM
  • When I think of C++, I think of a laguague with lots of arcanities to it. So now I'll ask the same, why learn c++? The answer is there's  no good reason  because c++ doesn't use cogent code. It just allows you to get by. You have to know the language intimately to get the result that you want. That's the difference right there. In other words the objective of C++ is to achieve a result. The objective of c# and later vb are to poduce the result that they do,
    but logically. There's a difference. Learning c++ is learning to control a compiler. I still agree with Casten, C had their handles. VB needs cleaning up in the delegate area.
    Wednesday, May 6, 2009 2:22 AM
  • "It take me a couple of years to get back to where I was if anyone cares."

    We all cares Renee. As I wrote before, you have improved considerably since the accident and we look forward to have you back at full strength. In my last post in the thread "Why is WithEvents / Handles implemented so cryptical http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/fed70bb3-a19a-4d81-bee1-ef54a15cbbca , I have even digged up one of your old threads:  N-tier Design for the New Developer http://social.msdn.microsoft.com/Forums/pt-BR/Vsexpressvb/thread/a93c8247-9454-4342-9ca1-0ac764e5537f . Now there is a chance to continue where you left.
    Everything should be made as simple as possible, but not simpler.
    Wednesday, May 6, 2009 7:16 AM
  • @Renee, don't you dare. We all care! Consider yourself told off.  ;)

    A programming language allows you to take a concept and put it into terms that the computer can understand. In other words most languages force the developer to think in the constructs and syntax of the language rather than in the domain or process the software is meant to simplify.

    It's a translation process from the problem domain to object orientated concepts to a programming language.

    In terms of getting the developer to think in the problem domain then all languages are flawed. In terms of getting a problem domain expert to think in a programming language then all languages are flawed. Every language adds computer related concepts and 'syntax noise' to the translation process.

    This is why I believe Domain Specific Languages and Language Orientated Programming are going to be the next big thing for the industry. In short !WRITE YOUR OWN MINI LANGUAGE! to solve the problem at hand!

    I was 10 in '86.


    www.dsmyth.net | www.dsmyth.net/wiki
    Wednesday, May 6, 2009 9:10 AM
  • Thank you Carsten and Derek. Yes Renee, it is very good to see you in here again and we all can see you are coming to your old self again thank goodness.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, May 6, 2009 12:56 PM
  • Hi All,

    I have been out of pocket for some time now with the forums while focusing on some other things in life.  Although i have been watching the forums to see what is happening.  Something that has caught my attention here and with the ideas many hold in this world of programming is the technicalities.  Of course this is a technical world but there is a point in taking it too far.  To each their own on that point.  What i really have not understood is why such a focus on not doing something based on certain things such as the language.  I understand the idea that you may not have the ability to do something in one language versus another or possibly it is easier in one.  If you really want to get to the heart of it all, you need to look at the purpose of what you are doing and not necessarily how you are doing it.  if you write a program that say controls a prosthetic limb and gives someone the ability to walk again, does it really matter what language it is written in.  And does it really matter how many lines of code it takes or the exact code.  Granted it needs to work properly but noone cares how it works.  they just see what it can do for someone.  And i use my software, although not perfectly coded by any means, to help generate donations for the homeless.  But what i find interesting is that ever since i started publisizing my charity program, the donations have stopped.  What we have become is slaves to is the competition of doing something better than someone else, giving the consumer gimmicks they consider more important than the functioinality.  you give someone a piece of junk with some options to customize it and it's a best seller.  give them something plain that does what it is supposed to and it sits in the dust.  Why do you see a 1980's "whatever" car with the used car dealer plate in the back glass broke down on the side of the road when it has $1000 worth of rims and tires on it.  You already know the answer to that.  It didn't matter to them the car smoked and ran terrible.  A relative of mine recently bought an Infinity SUV.  used of course because he can't afford a new one.  But the only reason he bought it is because he lives in Las Vegas and it has the name of Infinity on it.  The car is really a piece of junk but it looks nice.  All the while his young son lives several hundred miles away while dad tries to pick up as many young girls as he can in his pretty piece of junk.  You ask me why not to learn a language.  Don't learn a language if you are going to use it to give people junk that looks pretty.  Pick any language you want but use it for something good.  It doesn't have to work perfect and it doesn't have to be fast.  it just needs to do something good besides generate profits for those who care nothing about others well being. 

    Happy coding all
    Jeff


    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Wednesday, May 6, 2009 3:14 PM
  • "And does it really matter how many lines of code it takes or the exact code.  Granted it needs to work properly but noone cares how it works.  they just see what it can do for someone."

    Yes it does. What if you have to quickly debug the thing? Having an elegant, object oriented program will shorten maintenence and updates while having a slip shotty program will drive maintenence into an unaffortable and unmanagable feat.

    The difference in methodologies is one wants to make it work. the other wants to make it work right. One considers the future of the application and anitcipates changes to the application and thus prepares for that, the other mentality doesn't necessarily care as long as it works in the here and now. 
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Wednesday, May 6, 2009 3:41 PM
    Wednesday, May 6, 2009 3:20 PM
  • Ok, but what are the reasons you need to debug it so quickly.  Probably because of a time limit and lost profits.  you might lose your job.  Nothing is unmanageable.  it just takes longer.  I'm not suggesting to write poor code, but even poorly written anything can be handled with good notes.  I am all for writing good code.  The point is the lengths of which the competition goes.  I see time and time again the discussion on why mine is better than yours sort of thing but i also see time and time again how developers have trouble debugging because of poorly commented code.  and more often because of no commented code.  Even the best code in a large program is hard to debug without good comments if you don't know it intimately.  i'm sure you know developers that don't comment code.

    I am just suggesting to look at the purpose of a program.  and i don't mean the purpose of making money.  That is not a purpose.  There a number of reasons to program a certain way versus another but it does not change the end result of the program performing a purpose.  Forget about milliseconds and the fact your boss expects you to debug it before lunch so he can say he/she's on track to the big boys and go play golf.  Make something you are proud of and will do some good.  if it takes you an extra hour to debug it who really cares. (besides your masters)

    The sad fact is that money is the big determining factor in what we do.  Hobbiests have it good.  Make something you care about.  Hobbiests, I envy you.

    Jeff


    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Wednesday, May 6, 2009 3:50 PM
  • "Nothing is unmanageable".

    When I took over the projects that I do at my current employment I was taking over for a retiring self taught VB6 programmer. I tried to maintain his code for a period of months till I finally was resolved to trash the entire thing and start from scratch.

     Now, what used to take literally almost years can be done in a few days.

    BTW Jeff, I do agree with what you say but was merely saying that as a counterpoint. I was the one who suggested to you [and you are an experienced developer] to use the parameter classes. After a little persuasion, I see you now telling others. This pleases me because it shows you are eager to learn new concepts and adapt when we need to.

    I have been corrected countless times by nobugz. I accept it because he is an expert. And I mean expert! Others with zero stars come in and simply amaze me with their acumen.


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, May 6, 2009 4:11 PM
  • i remember the first time we spoke about parameters.  and i mentioned in my tutorial, which i already had on my site before then, i was already using parameters.  And this goes along with the same here.  My suggestion was not to avoid or not use parameters it was merely the idea that you are not required to use them.  i suggest parameters now more because i see many who have problems when they try to concat strings when using certain datatype fields.  in my opinion i would say it is best to use parameters but that is just my preference.  Good for datatypes, injection, etc...  But i would still use concatenation occassionally.  If it works then it works

    i am curious though, were the projects you took over well commeted?  I imagine the developer you took over for was able to maintain his code though.  And i understand the frustration when working with vb6.  i know some programmers who were programming for 20+ years that did not know much about classes.  And i can see that those who start learning in vb.net have much of an advantage in proper coding than in vb6.  And the ones who code in vba have a different mind set all together in many cases.  But that is a different matter.  I have been playing with some vba lately because of projects i am bidding on and the way they code seems so strange.  i call them macro-er's.


    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Wednesday, May 6, 2009 4:59 PM
  • John Grove

    We do not always agree, but this time we do.


    "And does it really matter how many lines of code it takes or the exact code.  Granted it needs to work properly but noone cares how it works.  they just see what it can do for someone."

    Yes it does. What if you have to quickly debug the thing? Having an elegant, object oriented program will shorten maintenence and updates while having a slip shotty program will drive maintenence into an unaffortable and unmanagable feat.

    The difference in methodologies is one wants to make it work. the other wants to make it work right. One considers the future of the application and anitcipates changes to the application and thus prepares for that, the other mentality doesn't necessarily care as long as it works in the here and now. 


    These could be my words.


    Jeff

    If you have done process control for a factory or power plant, which may cost $100.000 each time you get a stop or have to restart the program, you will learn how important reliability is and this is only achived by code, which is very easy to overview and maintain. If you loose the overview, you may as well move in on the plant!

    Everything should be made as simple as possible, but not simpler.
    Wednesday, May 6, 2009 5:01 PM
  • No Jeff, it was not well documented and it wasn't good code. There was a lot of orphaned code. Lots of variables declared as just "Dim" which I later learned was "Variant" which is not strongly typed.

    The code was not maintainable, even for him. If there was a problem, it took months for him to find a work-a-around or palettable solution. Looking at that code was nightmarish. It took me months before I came to my decision to just trash it because refactoring just wasn't working for me.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, May 6, 2009 5:22 PM
  • Carsten,

    I see so many times the response to all this is about the money.  Renee had it right long ago about capitalizm.  Your 100,000 stop is no different than my clients being shut down and costing them a few dollars other than the amount.  my clients however are not completely reliant upon automation because it is not completely reliable.  Keep in mind anything i say has nothing to do with anyone here on a personal level.  But i could care less if these companies lose hundreds of thousands or even millions of dollars.  Efficiency for business is all about the profit.  And it's ok if they lose the money, they can have layoffs and cutbacks and still have money for the important things like bonuses for higher ups and trips to the bahamas.  Besides the insurance will help cushion the blows.

    It's ok though Carsten i know what you are saying.  I have just lost respect for the ideals of our industry being used to generate profits.  Speed, efficiency, maintainablilty, etc are all good but they have become tools for telling people what they do is wrong and for creating profits.  But on the other hand Carsten, if you work in an industry that creates something good and keeps honest people with food on the table then your coding in one of the best environments.  If it's about creating something that lasts and has pride in it, it's all good. 



    John,

    I can understand your pain there.  Believe me i hate to look at others "junk".  Time is something we have though, that business doesn't.  Atleast they think they don't.


    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Wednesday, May 6, 2009 5:53 PM
  • Hey folks,

    The choice of programming language you use to solve a problem is extremely important!

    I wouldn't write a program that controls a prosthetic limb in C#, think of the hard drive space the limb would need to host the framework on big fat Windows!! I'd maybe use Ada for that. The military used Ada because of it's real time applications and also because of the way you design Ada software. Erlang as another example it is extremely concurrent so its ideal and is used by the telecommunication industry to control the millions of phone calls happening right now. I'd use Lisp/Prolog to create expert systems and (don't tell anyone) perhaps dirty myself with FORTRAN for heavy number crunching.

    Thats what I would do but business don't think like that they want code that can be picked up by anyone else. Thats why C#, VB, Java are all mainstream. Business believes coders are all born equal. Business believes developers are replaceable cogs in a software manufacturing line; if (a) can code in (b) then so can (c). Thats not the case. **its also down to investment, business have become dependent on the software they run and the data formats used. If no-one can pick up then code and run with it then it's a lost investment and expensive, hence mainstream languages**

    Big balls of mud are common and it's not the business need for making money that causes them. It's partly because of the software development process and partly because some developers just don't care (the dot com'rs) about how they program; easy money.

    http://en.wikipedia.org/wiki/Big_ball_of_mud

    Improve the development process and you improve the softwares quality; think Agile.

    Debugging is dead my friends... long live unit testing. Actually my nickname in work is D-Bug and it's not very appropriate as I spend very little time debugging these days largely because of test driven development. Unexpected things very rarely happen with TDD and when they do a unit test proving the bug finds the parts involved. Yeah I have more important things to do than spending great amounts of energy debugging.

    :D


    www.dsmyth.net | www.dsmyth.net/wiki
    Wednesday, May 6, 2009 8:55 PM
  • That's true Derek, but I fear that had I mentioned that I would have taken slack for it being the elitist C# guy I am.

    :-)

    "Agile" or eXtreme .NET is done by very few in VB I suspect. VS2008 in C#, you can run test directly from the IDE rather then using say NUnit.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, May 6, 2009 9:03 PM
  • Just to say a big thank you to the gurus for all the technical exchanges. I marvel at your expertise and grasp of programming even in languages that I have never heard of before! I am learning with VB and without taking sides (I feel too unworthy of taking sides in a technical discuss of this magnitude) my immediate goal is to master VB well enough to produce fairly robust applications. Until I achieve that, I  may never bother with which language is faster or more efficient.

    Big up to Evo, the youngster that started this discuss.

    Enjoy, All...!
    Only performance counts!
    Wednesday, May 6, 2009 10:25 PM
  • Sylva,
    Never fear asking a " dumb" question on these forums.

    "Dumb questions are the questions that you do not ask."

    Any party who chastises you for asking a question will be handled.  Ask away.

    While the back and forth in this thread may appear that folks hate one another, that is not the case.  At least not for me.  I find intellectual discussion stimulating.  I will always be the first to admit enlightenment. 

    Happy Coding.

    Rudedog  =8^D
    Mark the best replies as answers. "Fooling computers since 1971."
    Wednesday, May 6, 2009 10:33 PM
  • John,
    No one here is responsible for this hospital so I use the ubitiquitous "they". Anyone with a brain here wants to leave. This place sucks and I've been here ten months. Rumour has it that i'll leave in two months but I wouldn't bet on it.

    Derek,
    You know, I've been writing a long time and that that involved testing. We didn't have any thing as formal as we have today and I'm glad! It sort of takes the joy out of software. We got the sotware out and it worked and it was systems software. There was none of this windows stuff. I figure that they have programmers do work and the exec doesn't do much for you. The exec did plenty for us. I continue to look at the execs and at how much work they do.

    I've seen ADA, run on a DEC machine. I was quite impressed with it. It found a bug in my shadowing code.

    Jeff,
    I'm not sure but I think I agree with you. Then again, I may not. We'll have to see.
    -Renee
    Thursday, May 7, 2009 12:54 AM
  • Personally I like running tests, but I have seen others that are anal about it. It is a tool, which is nice to get into the habit of running on any completed method and class, but it is only a tool.

    Renee,
    10 months, my goodness, you poor thing. A few years ago I almost died from a rare Lymphoma and I was in the hospital getting chemo everyday for months. My story is similar to Lance Armstrong, except I am not a pro bike rider :-)

    Hang in there kiddo.

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Thursday, May 7, 2009 1:01 AM
  • At DEC, there was aways one guy who could break my code. He ended up going to work for Microsoft. He originally worked for Digital. He didn't start outthere working for Microsoft but that was where he and Cutler ended up.

    Thursday, May 7, 2009 1:17 AM
  • @Sylva - I'm glad someone is reading and taking something from all our ramblings. VB.NET is a good language and although you are writting VB syntax to get the application done what your also doing, all be it indirectly at the moment, is your learning the .NET Framework class library. Learning the class library is what .NET is all about and once you have that knowledge you will be able to eventually code in many of the .NET languages.


    @John - We use SCRUM (or trying to) for Agile Project Management and bits of XP (or trying to) during each sprint. It works very well in comparison to the waterfall model because the customer sits a few desks away; difficult to tell how well Agile would work with off site customers. The two of the biggest improvements we've noticed is with the quality of testing and the flexability of our requirements gathering. It works very well but it's difficult to get people to buy into it because it looks like controlled chaos compared to waterfall.


    @Renee - You know unit testing doesn't really take the fun out of development. I do understand where your coming from though. The detective problem solving investigations of debugging. Something is afoot Watson. Really though unit testing is like a safety net that the developer can fall into if needed when improving code, thats it's advantage. It's saved my hide many many times. Debugging can be a lot of work for very little in return.

    I used Ada once to develop a traffic light control system and I liked it. It was during Uni and without a doubt it was the first piece of software I wrote that worked without bugs. It was down to the programming language and it's complimentry design diagrams. Pulled an all nighter with some uni guys and helped rewrite the application twice more. I wrote the same program three different ways and each one worked. I liked Ada. *nods*


    @Rudedog2 - This has been a very good thread. Interesting how we all have different opinons but the fact they are all voiced by common posters really does make the express forums much more richer that the other forums on MS. Good to see us all getting involved.
    www.dsmyth.net | www.dsmyth.net/wiki
    Thursday, May 7, 2009 12:23 PM
  • Ache, Ache

    Jeff has come a long, long way. Capitalism versus our profession. Should I say I hadn't thought of it? Maybe in terms of our profession I haven't. But today I was listening to a physical therapist talking about medicare and the same thoughts came to mind. I know I'm not in this for the money but to learn from it. But money people are always asking themselves about profit and loss and about structured code for maintenaince and the next version towards supportability. Is this way you want to see our profession go? Think about it.....  I liked it better when there was "magic" to it.
    -Renee

     

    Friday, May 8, 2009 2:13 AM
  • I think that the "magic" goes away when a technology becomes mature. I have been a radio amateur since I was a child. In the beginning, you made your own equipment and got very excited when you got a connection. Nowadays, you just spend a awfull lot of money and buy some equipment, put it all together according to the instruction manual, plug it into the power outlet and you can make connections to any part of the world.

    If you want to feel the magic again, you must explore new fields. Find new ways to do things. Make your own OS or programming language.


    Everything should be made as simple as possible, but not simpler.
    Friday, May 8, 2009 6:46 AM
  • Join my company, we are breaking new ground in fields where there are few competitors. We are taking paper schematics for trucks, tanks, aircraft, submarines, tractors, etc.. and creating a troubleshooting/training program that essentially makes examining schematics a breeze. Lighting up functional traces, drilling down to components, simiulating pneumatics and hydraulics, providing theory, links to others pieces of software, providing pictures of every reference designators, etc..

    It is becoming the standard for the military and now the civilian sector is interested.

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Friday, May 8, 2009 1:08 PM
  • Carsten,
    I knew there was a reason I liked you. I have been a ham since the sixties and an extra since the eigthies. In the 2000s
    I let it run out since the technology had matured. I like em immature where there is room for creativity, not, how much chrome looks good.

    John,
    I have a long way to go since I have a brain injury too. I have to put myself in some rough situations and see how
    I do. My social services worker has found what is normally an easy computer engineering job but I have my hands full of relearning to do. This'll have the some database work to do and it ought to be fun - at least if every I think is true remains true.

    Among my strenghts are approaches in debugging and just general coding. It used to be drivers too, but those were the VMS days.

    -Renee
    Friday, May 8, 2009 2:35 PM
  • By the way Evo, although you.ve been trying...you stiill haven't told us why we shouldn't be learning VB.

    -Renee
    Friday, May 8, 2009 5:03 PM
  • Yes he did, there is a numerical comparison, and VC would be faster.

    it is mentioned somewhere in the MSDN documentation, if you only skip long enough...i can remember it.

    so what he writes is not completely made up (If execution speed would be the only significant consideration).

    however, I have also been a little creative, mining (let us, for some reason, not over-use that word "digging") the cyberspace for old C-compilers!

    there are some still available commercially, or, available again!

    but the choice of the right C-type language environment can be difficult:

    -most people choose Microsoft Visual Studio, and since the introduction of Express edition, it is an easy way to go.
    -some students maybe think it's cool or especially intellectual to try the GCC!

    but, as you will encounter now, that's not everything! you maybe think "MAC", but...there are others!

    http://www.popfly.com/users/tetsu-jp/AMIGA%20game%20console

    so the arguments which C-type language you choose should be considered carefully.

    yet there is really strange stuff, all C-type. PERL, PHP, PYTON, but as a non-user, I'd not be able to create a "fan-page" about these scripting tools.

    you could even say, old C compiler environments have general capabilites, while past-1990 approaches like PERL and PHP are narrowed down, tied, and limited to a small subset (considerably, using strange extensions, they can do nearly everything. but these extensions are virtually unavailable as source code, and virtually impossible to understand, they might be java byte code for instance).

    yet for the "web" generation it looks naturally, normal, but for people who experienced computers before the mid-1990s, they think "what is going on", take a look at 20, 30, 40 specialized scripting environments!

    so indeed you can criticize C-type over 100s of pages, if you really wanted to, while the advice

    "you should not learn C-type" is no good advice, because C-type is very wide spread, and often it is the only available interface.

    if there is BASIC, you should be happy...in the old days BASIC was ten or twenty times slower, but people prefered it in favour of machine language, or horribly expensive C-compilers ($500 was the usual price tag).
    Friday, May 8, 2009 11:53 PM
  • I think anyone who does not wish to learn other languages is a fool.  Especially if the stated reason is they have no wish to use any other language.  Learning is a life long experience.  Grounding oneself in one ideology is great for theologians.  Pure ignorance for programmers.
    Mark the best replies as answers. "Fooling computers since 1971."
    Saturday, May 9, 2009 12:09 AM
  • Carsten,
    I knew there was a reason I liked you. I have been a ham since the sixties and an extra since the eigthies. In the 2000s
    I let it run out since the technology had matured. I like em immature where there is room for creativity, not, how much chrome looks good.

    John,
    I have a long way to go since I have a brain injury too. I have to put myself in some rough situations and see how
    I do. My social services worker has found what is normally an easy computer engineering job but I have my hands full of relearning to do. This'll have the some database work to do and it ought to be fun - at least if every I think is true remains true.

    Among my strenghts are approaches in debugging and just general coding. It used to be drivers too, but those were the VMS days.

    -Renee

    Renee,
    You should revisit your own tutorials you have created to get back up to speed.

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Saturday, May 9, 2009 4:08 PM
  • John.
    My labeling errors are difficult to predict. In all cases old memories are the most stable. Like I have no trouble remembering John. George, Paul and Ringo. I also have some trouble remembering the Peducy encryption algorithm
    from VMS. The trouble is whats lost is easily forgettale. I don't think I'll ever foget anything that I've written so that I've written as much as I have is a good thing...however what I've not learned about 2008 such as headers is another story. I think a rembered background helps so I suspect the background will help. The things I'm likely to forget are control-x and control-Y because of the non-verbality. I'm really anxious to find out and frightened.

    Thats why this project is perfect. Its simple BUT it will also require "close" coding.

    -Renee
    Sunday, May 10, 2009 2:00 AM
    • This thread was created 1.5 years ago! The compilers and the JIT may have improved.
    • VB uses checked integer operations by default. That may cause an important speed difference.
    • The code may contain many modulus or division operations between constants that are not power of 2. Often C++ compilers convert them into multiplications, bitshifts and subtractions. C#/VB compilers + JIT don't.
    Sunday, May 10, 2009 2:06 PM
  • #2 is the really important one. It does cause a speed difference.
    -Renee
    Sunday, May 10, 2009 5:31 PM
  • The following is my opinion. I will not claim that it is necessarily fact, I will only provide my view on a very complex issue.

    I notice that even after 1.5 years, nobody has managed to provide a reason that completely supports either argument. Half of the posts just say that the other argument is wrong for one reason or another. Here is my (probably flawed) analogy:

    To answer the question, "is it a sunny afternoon?"

    Known facts: It is not a rainy morning.

    Argument 1: It is not morning, so the answer is true.

    Argument 2: It is not raining, so the answer is true.

    Each argument is drawing a conclusion, yet it is based upon only some of the factors. The original question was "Should we be using VB, or another language?", or, in other words, "Which language is better: VB, C#, C++, C?". Yes, C and C++ produce faster code. C# sometimes does too. Yet some people find C# and VB easier to read that C and C++. VB also has an IDE that many people find helpful, both for its ability to provide typing suggestions, and for its (usually) helpful error messages (though I did once get an error message essentially telling me "Nothing's wrong"). There are reasons why each is better. Which one you use depends on personal preference. I prefer VB because I am not familiar with all of the parts of the .Net framework, so the IDE helps me figure out when I am doing something wrong, and it cuts down on the amount of typing that I am required to do. My applications do not need to be particulary fast, so speed is not an issue for me.

    However, people who are writing code that must execute quickly will likely prefer C and C++, even if it proves to be more confusing. In my opinion, VB and C# are equally fast, as the factors that affect execution speed can be changed in the settings.

    There are also those who prefer C-like languages because of their similarity to many other languages, such as C++, C#, Java, Javascript, JScript, and ActionScript. This is useful in some respects, as the formatting is very similar, but because the functions differ from language to language, it could potentially be difficult to keep track of which functions are in which language.

    VB is also the least portable of any of the languages, as it is pretty much restricted to Windows. C and C++ can be used for programming in Windows, Mac, and Unix. People who want to write applications for multiple operating systems will probably prefer one of these languages.

    Each language has its advantages and disadvantages, and none of these factors are set in stone. For example, an IDE similar to that of VB could be added to VC# or VC++, or a VB compiler that makes much faster code could be released. I do not believe there is any way definitive reason that any language is better than any other. A programmer should learn whichever language suits his programming needs best.

    Monday, May 11, 2009 1:01 AM
  • The only issue I have with VB is it's laxness can and does produce a specific culture and that "culture" is encouraged. I would say, "Yes, learn VB, just not first". And this is just my humble opinion. And as the article points out:

    "Once this cycle of self-reinforcement begins, the cultural habits quickly become entrenched and widespread, and are extremely resistant to change. Minds tend to gravitate to like minds. User groups tend to attract homogenous followings. Visual Basic instructors tend to propagate what their instructors taught them. "
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 1:09 AM
  • I agree, VB does tend to cause some apathy towards the quality of the code. I started programming with languages such as JavaScript, C, C++, and ActionScript, and I do still try to use efficient code whenever possible, but it has caused me to think along the lines of "I don't want to have to type every letter out. I'm don't want to have to figure out whether to use '*' or '^', or to use '.' or '->'." I still think that just comes back to my original point that the IDE is, in some ways, more helpful.
    • Edited by Luc 284 Monday, May 11, 2009 1:39 PM
    Monday, May 11, 2009 1:22 AM
  • If I told students to Learn C before leaning C++, the "culture" of C would in my opinion damage them and they would have to re-learn what they have learned, else they would not be leveraging the power of C++ but merely bringing over C habits into C++.

    From Sam's Teach Yourself C++ in 21 Days, Third Edition, Page 11
    "Should I Learn C First:
    The question inevitably arises: Because C++ is a superset of C, should you learn C first? Stroustrup and most other C++ programmers agree that not only is it unnessessary to learn C first, it may be advantageous not to do so.
    "

    VB.NET is practically as powerful as C#. I say practically because C# can still do things that VB.NET cannot. So using VB.NET an advanced user can do what anybody can do in C#. So it is not about functionality, it is it is about culture.

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 1:27 AM
  • When I start, I know the quality is going to be OK so I can concentrate on 'design', a seldom heard word around here. VB doesn't effect us one way or the other and allows a shift in focus. I don't have to worry about if I shall suceed or not because I know I shall. So vb frees me to do design ' that's d-e-s-i-g-n.
    -Renee

    ,
    Monday, May 11, 2009 1:57 AM
  • I agree completely that it is much easier, at least for me, to design an application that works well and makes sense when I am not worrying about whether or not my code will work.

    John, by the "culture" of VB, do you mean the tendency to focus more on what gets done and less on how it is done? For example, apathy towards memory usage as long as the program works? This is certainly a valid point, but I think that if someone wanted to become a serious programmer, he or she would probably learn to use "better" programming techniques. IMHO, VB simply gives those people who are not serious programmers the ability to write programs anyway.

    I think I understand what you mean, though, in that if you learn VB first, then when you learn other languages you might not learn to take advantage of their strengths. However, each programming language has different strengths and weaknesses, and the same could happen in reverse; you could learn C#, then learn VB but not take advantage of its strengths.

    Monday, May 11, 2009 1:38 PM
  • Read the article I hyperlinked for the definition of what I meant.

    The strengths of VB.NET and C# is their OO support. When that is leveraged, then the language is leveraged. The language is not leveraged by bad coding techniques which can be acquired in VB.NET like calling up forms without instantiating them [thus violating encapsulation], the heavy use of goto statements, VB6 mindset ported to .NET, the wide use of "Modules". Heavy insistence of the Microsoft.VisualBasic namespace. These are merely hangovers of VB6 for backward compatibility which most users still cling to religiously.

    This is the culture I am referring to. I, in no way, imply in this that there are not some VB developers who are not exceptional. This is an an excerpt of a keypoint of the article.

    Syntax, semantics and cultural persistence

    "We've seen that the cultures of VB and C# are very different. And we've seen that this is no fault of the programmers who use them. Rather this is a product of the combination of factors that collectively could be called their upbringing. Business environment, target market, integrity and background of the original language developers, and a myriad other factors.

    One factor, however, that seems to have a greater effect on the culture than others, is the syntax and semantics of the language.

    To what extent do syntax and semantics play a part in the culture that builds up around a language and to what extent, vice versa, do the syntax and semantics depend on the culture in which the language was created?

    The truth is, both. Just as spoken languages both grow out of culture and influence culture. For instance, in the far north the language syntax has evolved several words for the different types of snow. Interactions then use the language to express nuances of snow, creating a more snow-centric culture.

    So in Visual Basic, the decision to include in the syntax and semantics the ability to assign numbers directly to strings and vice versa was a result of the designers. Desire to attract a broad base of developers who would probably not understand the notions of strongly typed variables. Once the syntax permitted it, such assignment became widespread, reinforcing the designers original premise.

    Once this cycle of self-reinforcement begins, the cultural habits quickly become entrenched and widespread, and are extremely resistant to change. Minds tend to gravitate to like minds. User groups tend to attract homogenous followings. Visual Basic instructors tend to propagate what their instructors taught them.

    This awareness of the immense inertia of embedded culture is precisely the brilliant insight that caused Microsoft to keep Visual Basic and to make it nearly 100% backward compatible at the syntax level. They recognized that trying to get legions of developers to abandon their old cultural norms and adopt new ways was foolhardy.

    The brilliant insight Microsoft had was not to support multiple languages. If this was the case then surely it would not have bothered with J#, which is syntactically so close to C# that support for language's sake alone would be ridiculous. The insight Microsoft had was to support multiple cultures.
    "

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 1:59 PM
  • The only clear cut, undeniable advantages that VB has over C# is the My namespace and the legacy functions for Math and String.  The make for quick and easy coding of stuff, not necessarily the fastest or most efficient, but certainly you can get it up and working a bit faster.
    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 2:07 PM
  • But Rudedog, again, these were added to reinforce the culture.

    "The[y] make for quick and easy coding of stuff, not necessarily the fastest or most efficient.. "

    You made my point for me.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 2:10 PM
  • I agree completely that it is much easier, at least for me, to design an application that works well and makes sense when I am not worrying about whether or not my code will work.

    John, by the "culture" of VB, do you mean the tendency to focus more on what gets done and less on how it is done? For example, apathy towards memory usage as long as the program works? This is certainly a valid point, but I think that if someone wanted to become a serious programmer, he or she would probably learn to use "better" programming techniques. IMHO, VB simply gives those people who are not serious programmers the ability to write programs anyway.

    I think I understand what you mean, though, in that if you learn VB first, then when you learn other languages you might not learn to take advantage of their strengths. However, each programming language has different strengths and weaknesses, and the same could happen in reverse; you could learn C#, then learn VB but not take advantage of its strengths.Aside


    What strengths does VB have that set it apart?

    The only "strengths" that I see are built-in fucntions and keywords that make complex stuff easy.  And even those "strengths" have well defined limits, and are regarded as "limiting."
    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 2:19 PM
  • Well, I must admit that I am with you on the language learning buisiness, since I learned real languages befire I learned VB. Learning other languages still demanded that I split my concentartion between the design and the language itself. Learning VB allowed me not to focus on the language.

    I do have one thing to say and that is that VB writers too have to focus on design, it's just that the languge itself never get's in the way in the way like C++ does.

    I never got "fast" with c++ since it was about my fourth language and I didn't like C as much as I did others.

    -Renee
    Monday, May 11, 2009 2:23 PM
  • I agree completely that it is much easier, at least for me, to design an application that works well and makes sense when I am not worrying about whether or not my code will work.

    John, by the "culture" of VB, do you mean the tendency to focus more on what gets done and less on how it is done? For example, apathy towards memory usage as long as the program works? This is certainly a valid point, but I think that if someone wanted to become a serious programmer, he or she would probably learn to use "better" programming techniques . IMHO, VB simply gives those people who are not serious programmers the ability to write programs anyway.

    I think I understand what you mean, though, in that if you learn VB first, then when you learn other languages you might not learn to take advantage of their strengths. However, each programming language has different strengths and weaknesses, and the same could happen in reverse ; you could learn C#, then learn VB but not take advantage of its strengths.

    I agree with what you say in bold with the exception of the last bold statement. In C#, the culture reinforces doing things the OO way, and "insists on doing things right" [to quote the article that Arjun had me read].

    Moving from C# to VB.NET, not a problem at all. Moving from VB.NET to C#, could prove difficult for many.

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 2:27 PM
  • Well, I must admit that I am with you on the language learning buisiness, since I learned real languages befire I learned VB. Learning other languages still demanded that I split my concentartion between the design and the language itself. Learning VB allowed me not to focus on the language.

    I do have one thing to say and that is that VB writers too have to focus on design, it's just that the languge itself never get's in the way in the way like C++ does.

    I never got "fast" with c++ since it was about my fourth language and I didn't like C as much as I did others.

    -Renee
    The language of C++ only gets in the way when it is not understood and leveraged. For C++ when understood and leveraged out powers C# and VB.NET.


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Monday, May 11, 2009 2:33 PM
    Monday, May 11, 2009 2:30 PM
  • What strengths does VB have that set it apart?

    A longer and different legacy.  Interactive basic has been around much longer than C and its derivatives.  Basic was originally a variant of Fortran for interactive use on terminals.  Basic was an interpretive language, while C was a compiled language.  I can still feel the difference in the IDE. 
    Monday, May 11, 2009 2:36 PM
  • What strengths does VB have that set it apart?

    A longer and different legacy.  Interactive basic has been around much longer than C and its derivatives.  Basic was originally a variant of Fortran for interactive use on terminals.  Basic was an interpretive language, while C was a compiled language.  I can still feel the difference in the IDE. 

    Well, if you know VB, you can leverage VBA in Excel and Access. You can also easily understand SQL because a lot of the methods are VB methods, Mid, Trim, etc......

    I have seen aweseome things done with spreadsheets with VBA.

    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 2:39 PM
  • There will always be "cultures" that affect what you do.  C#'ers are no different because they code in environments that vb'ers do as well.  meaning they have bosses, and deadlines and goals to meet.

    My goal today is to write some horrible code and make something work.  and then i will learn to write some horrible code in c#.  and then have a debate with myself whether i like the way the syntax looks in one language better than the other.  then i will start a thread in the c forum as to why you should not learn c#.

    The whole idea here is that there is no good reason to not learn vb.  and there is no good reason to not learn any other language.  You use what you use for a reason.  It really doesn't matter what language you use or what code, etc... there is always someone out there who will say they do it better and can give a whole list of why it is so.
    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Monday, May 11, 2009 2:48 PM

  • Notice what Dijkstra says about Basic:

    Dijkstra gives a list of uncomfortable "truths", including his opinion of several programming languages of the time. Although BASIC is one of his targets ("It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration"), it receives no worse treatment in the piece than PL/I, COBOL or APL.

    http://en.wikipedia.org/wiki/BASIC_programming_language
    http://www.cs.virginia.edu/~evans/cs655/readings/ewd498.html
    See notes at the bottom.



    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Monday, May 11, 2009 3:00 PM
    Monday, May 11, 2009 2:49 PM

  • Notice what Dijkstra says about Basic:

    Dijkstra gives a list of uncomfortable "truths", including his opinion of several programming languages of the time. Although BASIC is one of his targets ("It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration"), it receives no worse treatment in the piece than PL/I, COBOL or APL.

    http://en.wikipedia.org/wiki/BASIC_programming_language

    See notes at the bottom.



    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com

    Grove, I believe that folks should work withing their comfort zone.  It tends to bring out the best in them.  If that zone happens to be VB, let them VB.  If the problem cannot be done with VB, then another language is called for.  Perhaps even a different developer.

    But, as for the learning process.  We learn by association.  Most everything that has been said here is pretty much consistent with that psychology theory.  New ideas are conciously and subconciously compared to our prior experiences, and a new link in the learning chain is added to the whole.
    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 2:58 PM
  • i personally started learning vb because my uncle was a programmer for the veterans administration and he always talked about vb.  when i was using excel for construction estimating and job reports i started learning vba.  vb was in my head for a long time.  it was natural and probably subcontious to start with vb.  and i am not so sure i would have been so eager with c#.  i really don't care for all syntax differences.  but now having been in vb for a few years i have an interest in c# and a better understanding of the code when i look at it.  And the truth is that i don't have any interest in purposly writing bad code just to make something work.  i enjoy improving on things but i am definetely not worried about it being perfect right now.  there is plenty of time to improve.  i get more satisfaction in seeing that what i created does what it was intended to do.  even if it has some flaws.  it only makes me want to do better next time.  and i have patience for the future of what i do.
    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Monday, May 11, 2009 3:06 PM
  • This discussion was not meant for anyone to apologize for using VB as their choice of language Jeff. The fact that you come here and contribute clearly demonstrates you are here to learn and help out as are most that come here.

    No one is perfect, not C++ developers, not C# developers, no one. All we can do is try to be the best we can be, as programmers, and as human beings, ethically and morally.



    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 3:11 PM
  • js06,
    The roots of my background are very similar to Renee's.  DEC and BASIC.  From there we diverge drastically.  Both learned more languages, and got exposed to C as the 4th or 5th high level language to learn.  But, from there I went to micro-coding custom languages on bread boarded CPUs.  And even more custom stuff involving PLCs and other types of industrial controllers and backplanes.  I was more into the hardware.  The software was nothing more than a set of keys to an auto mechanic.


    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 3:20 PM
  • John,  that is a statement i can appreciate.  ethics and morals are something that our industry should focus on.  i personally have turned down some highly paid positions because of the company and what they do and represent.  Business seems to be about profit but i don't think it was really started with the idea of making money.  it used to be about making things for people with a need that you could be proud to help them get.  our idea of need has been turned into a want now.  i really can't think of anything in this world that can't be packaged for commercial distribution.  heck, we even buy dirt and water.  i really hope vehicles make the full transition to take advantage of wind, solar and magnetism.  those are things that cannot be controlled by man.  yet.  i am amazed at what our industry can do for us.  i think we can make it work with mother nature and really find a good purpose for us to program in.  speaking of which.  tonight there is a show "doing da vinci" where they will reproduce a self propelled cart/vehicle.  i would love to see something like it with some more natural power, a controller and some good or bad coded software behind it. 


    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Monday, May 11, 2009 3:27 PM
  • Rudedog,

    robotics and automated machines are something i have always been fascinated with.  cnc machines are neat.  i am eager to see some of the things we will have in the future. 
    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Monday, May 11, 2009 3:32 PM
  • Let's talk about 'comfort zones" and 'cultures'.

    Do I pickup a "culture" from the the VB crowd? I'd have to say no because I had thirty years of experience in other languages and had produced commercial grade code for decades before I came to Basic. I don't pick "culture" from basic users because of the culture, which include resources that they have not even thought about. Yes, the culture does want to create the impression that you are the only one running on a machine. I come from a culture where 4 MB is considired a large machine, large enough for 30 people doing program development. You didn't act like you we're the only programmer on those machines at all. And yet those machines were gigantic compared to the 32 kw machines I came from.

    "Comfort Zones"? I'm uncomfortabe around people who code as if they have unlimited space and resources because they do not. Im uncomfortable with people who have no idea of time sharing. I find that very few vbers ever talk about these things.
    -Renee
    Monday, May 11, 2009 3:33 PM
  • Sounds like you would have felt right at home doing what I was doing.  Cramming  4 kb of science into a spacecraft payload.


    For me at least, that was a comfort zone at the time.  I look back on it and shake my head at the pressure we were under.



    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 4:05 PM
  • 68000 computer

    something I've built- a single board computer! It may look "home-built", but is revolutionary, since it has a small microcontroller to load opcodes into the RAM (traditionally EPROMs have been used for that purpose)**

    4K byte only...

    yes my first language was BASIC, and I do not feel limited, later I've learned machine language. these are my two favourite languages.

    I've also seen numerous uncommented or poorly commented sources, some of them have explanation for each line, but no "OOP" comments, means explanation of the concept.

    you can do amazing things in QBASIC, sorting points via QUICKSORT, for instance. but you'll see without any concept of classes, operator precendencies, or take care of CAPITALIZATION.

    yet such a language might be better for beginners, if they work on a large project, C# might be more useful (because outlining "the right way to do things"). Exceptionally good programmers, or even good programmers, would always be in the search for "the right way to do things".



    Q-BASIC sorting points

    it is insofar a bad source code because it is not commented. It is clear to me what it does, while it is unknown if other people can understand the principle.

    yet traditional C introduces pointers, then the C++ classes, so first you have to master these technologies, before you can understand foreign sources. in BASIC you do not automatically have to be a master of technology.

    Managers would eventually prefer VBA/Excel to C++/C#, because initially they are not programmers, the tasks are not always complex, might be simple reporting and statistics. thye just want to get things done, where performance is not very important. **so you say, my creativity, and potential is limited, because my first language was BASIC?
    Monday, May 11, 2009 4:41 PM
  • Good point tetsu-jp, and that is specifically the reason BASIC was created in the first place.

    Beginner's All Purpose Symbolic Instruction Code

    To get people productive very quickly.

    EDIT:
    "so you say, my creativity, and potential is limited, because my first language was BASIC?"

    Who said that?
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Monday, May 11, 2009 4:48 PM
    Monday, May 11, 2009 4:46 PM
  • All we said is the culture is different and the syntax is lax which can and does produce undisiplined developers. I didn't say all developers that work in VB become this way.

    Do not put words in my mouth.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 4:51 PM
  • No one said you are limited.  I admitted to starting off with BASIC up there somewhere, and I turned out okay.

    =%^D 

    Look ma, I'm a comic.


    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 4:59 PM
  • Well I never had 4kb of workspace...it really was about 28 kw and we could have overlayed if we needed to on an 11/35 with 28kw of memory. I get what you are talking about pressure. It didn't seem like pressure at the time but I can cetainly see now that it was. But I do feel as if I would be a home. (The darker colored type has been put in by the system. I didn't have anything to do with it.)
    -Renee
    Monday, May 11, 2009 5:08 PM
  • I was never a professional software developer writing production code.  Software was just another tool in the toolbox.  Yup, the most fun tool.  Writing one of a kind, single use applications.  That's my current comfort zone.  Design some electrical circuits, model them in software, then build it in the field.


    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 5:46 PM
  • Rudedog,
    You would probably appreciate the software I create. We take OEM engineering schematic diagrams, convert them to a CGM Level-4 intelligent graphic format, interface it with a relational database and make it interactive to the user called p2Trace.

    p2Trace is a software tool designed to help troubleshoot anything mechanical that is described with a schematic. Whether its electrical, hydraulic or pneumatic, p2Trace quickly gives uses the ability to navigate to any component or signal. It also allows them to highlight functional traces and follow their continuity across multiple schematics.

    I have given demo's of it in many countries and nearly every state. I also particpate in trade-shows and give techical briefings.

    Haven't traveled much these days as our Marketeers handle most of it nowadays.


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Monday, May 11, 2009 5:55 PM
    Monday, May 11, 2009 5:53 PM
  • That does sound neat.  I would call it a Tricorder.

    I design fairly simple low voltage circuits.  The problem is that I have to deal with hundreds or even thousands of them on a given project.  Gotta run voltage drops and current flow calcs on everything.  That's about as much as I can say here. 

    It's lot safer and far less hazardous than what I used to do when I was out in the field.  Now I drive a desk.


    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 6:25 PM
  • sorry it was not my intention to help formulate someone's speak, or to be suggestive. I have just read the codebase article (again).

    both design history of C, and of BASIC, can be found on the internet, i think "history of C" is a sufficient search term, or you could use "BCPL" (for search), which indeed, exists as interpreter. they have a program (for instance) for a chess problem called "queens".

    personally i do not play, or understand all rules, but i have a generalized idea/understanding how this game works.

    once you have an algorithm for the queens problem, you can use many languages (however, the required efforts to make meaningful modifications may vary, for instance, if lambda operators are used, or templates, at first, you'd have to learn about these techniques).

    http://search.live.com/results.aspx?q=history+of+c&form=QBLH&filt=all

    what i mean is, at first, you'd have to understand how the interpreter for BCPL can be started, and then the basics about BCPL. if you have problems just to start up the thing, your plans to improve the algorithm itself are secondary...for instance GCC, which does not include examples, and the IDE can not install correctly, because the install script is incorrect, or some stuff is missing. this left bad impression, really.

    if you may excuse, "UNIX is popular among students, but never was intend for consumers", eventually the cryptic interface was even built on purpose. you could say, UNIX (and LINUX) are C language culture.

    would you say, how LINUX works, is the natural way, the best way, or the only way?

    for a commercial product, it is up to the consumer, to buy the one or the other product, that is the culture of capitalism. yet i am not sure if LINUX is a commercial product.

    on the other hand there was this danish guy from Borland (can't spell his name correctly), and he designed C#. i think it's good stuff. in the past, i have read this C++ guy sometimes (also can't spell his name, smt. with Strou...)
    never had the feeling he is harassing me with all the suggestions how to implement OOP (but interestingly, mentioning "C++" or "OOP" can generate a negative touch, too intellectual, or otherwise undesireable, so it is not a guarantee for a good welcome).

    other than to start off a general discussion, the original topic is questionable.

    if you want my opinion in just one line "don't rely on C-type OOP as naturally or superior".
    Monday, May 11, 2009 6:50 PM
  • You are enititled to opinion as we all have been expressing ours.

    C# was Object Oriented from the get go. C++ was made to accommodate OO, while VB has also been made to accommodate OO as it was not OO from its inception.

    It is true that VB is now Object Oriented now, but those that have moved over to it usually do not leverage it as such, which is due to the persisted culture and the plain looseness of the language itself.

    "don't rely on C-type OOP as naturally or superior" is too vague to answer. But let's take the FCL of .NET.

    99.9% is created in C#, not VB.

    Why is that? I think we know why.
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    • Edited by JohnGrove Monday, May 11, 2009 7:15 PM
    Monday, May 11, 2009 7:13 PM
  • OK the truth is I decided to pick up BASIC, again, when evealuting VS2008. it is easier to learn .NET using VB than using C# (yet I just starteed to use new things such as array list, the VB system offered me what i needed).

    otherwise the discussion (for microcontroller) is rather machine language, or C.

    there is one claim in a booklet, "professional programmers say, a program that takes 14 days in assembly, takes 2 or 3 days in C".

    I do not say i am pro, or just home user. whatshowever, i could fully verify this statement!

    if i want to try an algorithm, or an idea for buffering, I use BASIC, or lately, old C++ compiler.

    If i want to implement user interface, I use Visual Studio, don't mind VB or C#, it does not make a fundamental difference for me.

    If i use DIRECT-X, yet i have to use C++, and C++ insists on type casts, you'd have to use them all the time, or, alternativaly, read Stroustrup, and implement a class design.

    and yet my microcontroller programs did not break the 4K border (one or two of my largest programs use 3.5K memory).

    you see i use all the languages, I'd never insist to use or not to use one language.

    I have also experience people (online), who claim they use microcontroller with 32bits, 512K flash, 100 pins or more, USB and all that, but the personality of the individuals can be nero at times (for instance I'd gamble the source code comments contain at least 2 jokes, and 3 funny references).

    so it's no guarantee for a nice personality, all the C++, OOP, and unlimited memories.

    if you want another opinion, for me, personality of the programmer is what really counts, the character of an implementation.

    take a look all the MSDN and the .NET system, it has some touch of made in India, and people sooner or later have to learn to live with that.

    large VB programs- if you read a source of 1MB, assembly language/machine language, you'd say that's rather exeptionally, and it is not a good language for large projects. indeed few present time project of that size use machine language. it is not really a discussion (I mean, I'd not start to argue machine language would be the better choice).

    yet numerous commercial softwares include or require VB-related DLLs, so indeed, it seems that mixed language programming really occurs commercially, via COM/DLL.

    on microcontroller it can be problematic to start off using C, and in real world, some beginners programs are terrible. using machine language to learn the basics, and many of the questions never would arise. personally i started with basic model, 16F543/16F57, which do not have pheripherals, so I never had problems doing the complicated initialization (of serial port for instance) via C language.

    most of the questions that C users ask, never have been relevant for me.

    I think it is hard to teach C with good results, and more demanding for students (than BASIC). then, according to the linked article (one of the above replies), one day people must stop using BASIC, because C# has advantages for large project (and numerous other reasons).

    It is OK, but not an argument to abandon BASIC as such.
    Monday, May 11, 2009 7:51 PM
  • Maybe this thread needs to be changed to "why you should learn multiple languages"
    FREE DEVELOPER TOOLS, CODE & PROJECTS at www.srsoft.us Database Code Generator and Tutorial
    Monday, May 11, 2009 7:57 PM
  • Funny, Jeff, I was just going to suggest that to tetsu:

    Learn C#, VB.NET and C++


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Monday, May 11, 2009 8:00 PM
  • tetsu-jp,
    I thought it was easier to learn the .NET FCL by learning C#, and I come from a VBA and BASIC background.  I found the IDE to be much friendlier in the Express versions.  I emphasize that I wasn't trying to learn programming, nor was my goal to learn a new language.  I wanted to learn about the FCL and found the going much easier with C#.

    Rudedog   =8^D
    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, May 11, 2009 8:15 PM