|
|
|
Migration from VB to C
|
Original Message
|
Name: davour
Date: October 31, 2003 at 07:13:28 Pacific
Subject: Migration from VB to C OS: um its windows something CPU/Ram: yup/yup
|
Comment: :) Hi there I am thinking of the logical progression from VB to C, whilst I am no expert with VB I am wondering if it is something that is going to be worth it for me. If possible can someone answer the following questions: 1.) What advantages/disadvantages does C have over VB 2.) What changes would i have to make to structure of programs with C? 3.) Does C work in the same kind of format to VB (forms, modules etc) and if not how And anything else you think i may need to learn with C. My experience with what i believe to be C is limited to Neverwinter Nights scripting but im not sure... im self taught when it comes to computing and programming so any help is not going to an exam grade just to my knowledge and self understanding and and all help appreciated
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: J. David Taylor
Date: October 31, 2003 at 08:23:14 Pacific
Subject: Migration from VB to C
|
Reply: (edit)I have studied C to an extent, and let me tell you, migrating to it would be a very good choice. For one thing, Visual Basic is an interpreted language, therefore making it considerably slower than say, a C program. For another thing, nearly all commercial applications are written in C/C++. For another thing, C is the fastest language around, except for assembly. For another thing, to put it bluntly, Basic is: "Beginner's All-purpose Symbolic Instruction Code] A programming language, originally designed for Dartmouth's experimental timesharing system in the early 1960s, which has since become the leading cause of brain-damage in proto-hackers. Edsger Dijkstra observed in "Selected Writings on Computing: A Personal Perspective" that "It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.". This is another case (like Pascal) of the cascading lossage that happens when a language deliberately designed as an educational toy gets taken too seriously. A novice can write short BASIC programs (on the order of 10--20 lines) very easily; writing anything longer is (a) very painful, and (b) encourages bad habits that will make it harder to use more powerful languages well. This wouldn't be so bad if historical accidents hadn't made BASIC so common on low-end micros. As it is, it ruins thousands of potential wizards a year." (taken from the New Hacker's dictionary note: when the term hacker is used, it does NOT mean "computer security breaker", or anything like that. If you want the true definition, read the new hacker's dictionary. Anyway, Basic, visual or quick, is not good. Another good thing about C is that Java is C-like, which makes Java much easier to learn, which is good, since Java is increasingly important in Networking applications and briding one Operating system to another. Believe me, definitely take C over Visual Basic!
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: anonproxy
Date: October 31, 2003 at 11:07:10 Pacific
Subject: Migration from VB to C |
Reply: (edit)"I am wondering if it is something that is going to be worth it for me." Some would term this an evolutionary step. C-like languages currently dominated programming and system developement. You will have to rewrite most any code you want in C. C does not work the same as VB. First off, you compile executables in machine code. Also there is no Object-Oriented Programming out-of-the-box (that is what C++ was intended to provide). Let's not bother with the similarities. They will become very confusing. VB is for scripting and it's approach is tied to an OS, certain objects, and GUI design. C is designed to build data structures, methods, interfaces, calculate, etc. C is basically procedural programming, meaning you create the instructions and logic by which they are run. Visual Basic is event-driven, where you script instructions around programmed objects (Object-Oriented events, tied to specific programs and the Windows OS in particular). C has more overhead in developement and understanding on your part - which does lead to more bugs in reality. However, C gives complete control over the system in question - you can create an entire system. Operating system kernels, drivers, and compilers for example, are written in C. C allows you to directly access the hardware, specifically memory with the use of pointers (an object of some sort that contains the address or points to another object; usually a memory address that holds another memory address - ex. stack pointer). VB does this behind your back (if at all). C is strongly typed. That is, C data types are distinct and declared explicitly. Of incredible importance when you have thousands of lines of code. Visual Basic is weakly typed, though an option in VB.NET allows strong typing. Now there are some individuals who won't even agree upon what strongly typed means (these people make languages like ADA). In reference to VB, C is strongly typed. C requires memory management on the part of the programmer. This means, you have to put things in memory and you have to delete them (not including defining their size, among other things). There is no automatic checking of bounds in data structurs like arrays (meaning, you can easily have buffer overflows). There is no garbage collection, or automated memory recycling implemented by a runtime interpreter. In C, you are the memory manager. There are libariries to help of course. Neverwinter Nights uses C++ in its scripting. C++ makes use of objects (variables and functions organized together), similar but not the same as VB objects. Start here with C. Or for C++, here. Information on strong vs. weak typing, for those interested, here.
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: Stuart
Date: October 31, 2003 at 18:14:43 Pacific
Subject: Migration from VB to C |
Reply: (edit)J David Taylor You description if BASIC would have been accurate about six years ago, but things have moved on a bit since then, not least of all because we are talking about Visual Basic which is not the same thing as BASIC. Saying Visual Basic is the same as BASIC is like saying Delphi is the same as Pascal. Visual Basic is compiled language and since V6 has the ability to compile to native code, just like C. Not as flexible as C I grant you, but considerably better than the intrpreted BASIC of Dartmouth Collage. From a users point of view, you cannot tell the difference as far as speed goes. You would be suprised just how many Visual Basic programmes there are in the commercial world, especially in the field of data processing. Stuart
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: davour
Date: November 1, 2003 at 01:59:51 Pacific
Subject: Migration from VB to C
|
Reply: (edit)Thanks a lot for all the feedback i've gotten - Personaly i like the plug and play aspect of Visual basic - Whilst im not a programmer who has an aversion to inputing miles and miles of code I do like a lot that C has to offer. I found C++ similar to VB a lot, mainly because of the format is not too different.. Well it is defintely something to look into, Last Questions: When programming in C or C++ is there any Programing products i am going to need.. I.E do i need to buy CD's or can i simply just download a compiler and go from there? Secondly, and lastly - are there any beginners guides to C or C++ that anyone could recommend? Thanks in advance
Report Offensive Follow Up For Removal
|
|
Response Number 5
|
Name: Infinite Recursion
Date: November 1, 2003 at 07:31:21 Pacific
Subject: Migration from VB to C |
Reply: (edit)"When programming in C or C++ is there any Programing products i am going to need.. " Yes, just go to http://www.bloodshet.net and download the DevC++ compiler. I prefer it over Visual C++ 6.0. There is no reason to buy a compiler when you have free ones in the public domain. If you are running Linux, look into GCC (comes with Linux), the Anjuta IDE (http://anjuta.sourceforge.net/) is nice also, I use it under KDE3.0 in Gentoo Linux. For guides to C/C++ programming... go here: http://www.cs.umanitoba.ca/~michaelw/clink.html There will be more C/C++ programming tutorials than you want to look at. By the way, I agree that there is a demand for Visual Basic programmers. I prefer to write code in C++ because it is more portable, obviously, than Microsoft Visual Basic. Plus, the demand in the industry is currently for C++ and Java, VB sprouts up every now and then. IR
Report Offensive Follow Up For Removal
|
|
Response Number 6
|
Name: J. David Taylor
Date: November 3, 2003 at 05:00:14 Pacific
Subject: Migration from VB to C
|
Reply: (edit)C is portable. It is better, period. Look. Sadly, I have programmed in QBasic (bad move on my part...) and have studied, in part, the syntax and usage of Visual Basic, and they are quite similar--more similar than C and VB! If you want OOP, then use Java! It is my opinion that anyone who thinks Visual Basic is better in any way than Java or C needs to do a bit of thinking about it. How could anyone say that?! I mean, Visual Basic?! Why don't you learn a real programming language?! I can't see why anyone would use VB for anything, except for script kiddies. I mean, hey, I was seriously considering VB at one time, but a very influential person (who told me of its evils) convinced me not to, so I didn't. Besides, VB is totally M$. Give me C or Java over VB any day. I love Nethack!
Report Offensive Follow Up For Removal
|
|
Response Number 7
|
Name: Stuart
Date: November 3, 2003 at 05:38:00 Pacific
Subject: Migration from VB to C |
Reply: (edit)JDT By you own admission you know little about Visual Basic, yet you condem it based mainly on what somebody, probably as equally predjudiced as you, told you. If you think the usage of QBasic and Visual Basic is similare you really need to learn something about VB before you start condeming it out of hand. I dont recall anyone saying that Visual Basic is better than Java or C. But it is better at certain tasks. Every programming lanuage has its strenths and weaknesses, including C++. It just needs a bit of in depth knowledge to pick the best tool for the job and there are many applications where Visual Basic is the tool for the job - and dont get confuded with Visual Basic Scrip (VBS) or Visual Basic for Aplications (VBA). They are different things again. Imagime somebody wants a database for storing clieet information. Names, address, anount spent, where and when, how much they owe, etc. You do yours in C++ and I'll do mine in Visual Basic. I guarantee I would be picking up my pay cheque while you are still struggaling with the BASICs Stuart
Report Offensive Follow Up For Removal
|
|
Response Number 8
|
Name: retrogamer
Date: November 3, 2003 at 06:28:10 Pacific
Subject: Migration from VB to C |
Reply: (edit)Time for some serious Flamefesting!!! You are the one struggling with the Basics of spelling, thou usurper! Wasting the time to learn Visual Basic to make some lame address book thing as about as useful as hiring a servant to move your kids plastic slide off of your lawn. Visual Basic is for script kiddies. I am not saying it is a scripting language. It is true that I am not very well versed on its syntax and such. I have never used it, but what I have, as I thought, learned, may be wrong. I studied all of this in some book from our local library, and I don't know what Visual Basic evil it was addressing in there. But, I know that Visual Basic is a toy, not a tool. You don't use a kids' play kitchen set to prepare your dinner, do you? Portability is another issue. VB is totally targeted at the ignorant, or unwilling to change M$ crowd. C is a portable language. Java, even more so. Visual Basic won't help you learn anything but the ways of Visual Basic. C helps you learn every good language. I am right, you are wrong. I rest my case since I have made my point. I will leave you ignoramus's alone if you want me to. I have been shunned from place to place. I know that truth is not welcome here. Farewell.
Report Offensive Follow Up For Removal
|
|
Response Number 9
|
Name: Infinite Recursion
Date: November 3, 2003 at 06:51:56 Pacific
Subject: Migration from VB to C |
Reply: (edit)I could not have said it better myself... "Every programming lanuage has its strenths and weaknesses, including C++. It just needs a bit of in depth knowledge to pick the best tool for the job." The job market is requesting all kinds of programmers, Visual Basic, C/C++, etc... Depending on your employer depends on how much you know and how much they need it. The key is flexibility, if you go in all gun-ho about C++ and they want something in Visual Basic, it is your responsibility to meet the deadline. More often than not, you get to pick the tool for each project, weigh their pros and cons and choose soley at your discretion. I write code in several languages, I have my preferences... but like he said above, no one programming language can do it all, and some are better at certain tasks than others. In my personal opinion, Visual Basic is the easiest out of the bunch, and the reason people shun it, is simply because the IDE is intelligent to the point to where it will help the programmer with syntax, etc. Probably the name "basic" scares off hardcore programmers, but truth be told, its a bad ass language... especially for web spiders and client/server applications. ;) IR
Report Offensive Follow Up For Removal
|
|
Response Number 10
|
Name: BaBa
Date: November 4, 2003 at 18:56:52 Pacific
Subject: Migration from VB to C
|
Reply: (edit)Hi, Retrogamer, I see where you are coming from, but you are very, very, very wrong. Visual Basic is not for kids. Read what the experts said. Visual C++ is an imitation of Visual basic, Delphi as well. As far as portability, it is only a matter of time. It is not surprising that the next version of Visual Basic is portable, Then what! I Want to say this, as far as windows is concerned I would choose VB over any other language. I went over this discussion before; I don't want go over it again. If you want, I can give you simple logics in VB that would make C Programmers go crazy. VB is simple and efficient, C is complicated inefficient. Computers are getting faster and faster the difference in speed Between C and VB is almost insignificant. Who can tell the difference between one microsecond and ten microseconds? Baba,
Report Offensive Follow Up For Removal
|
|
Response Number 11
|
Name: anonproxy
Date: November 4, 2003 at 22:19:46 Pacific
Subject: Migration from VB to C |
Reply: (edit)"VB is totally targeted at the ignorant" Let's not be talking about ignorance so lightly without some self-reflection. VB is targeted for business. Business means lots of things - good and bad. "Visual C++ is an imitation of Visual basic, Delphi as well." A little simplistic overall, but there is some truth in that. MS would definitely like VC++ to be as popular as VB, but anything C++ is only imitating VB to an extent. "VB is simple and efficient, C is complicated inefficient." That really depends on what you see as efficiency. "As far as portability, it is only a matter of time." Well, maybe when a certain discarnate underworld happens upon a gelid climate. How many parts of VB are tied into Windows (even Office alone)? Now true, there are core components that can be emulated and recompiled on other systems, but an overwhelming number of extensions and features would be broken or simply have no context. Right now emulation is probably the best (only, really) option, as many existing extensions and codebases of VB are dependent on Windows & Friends and some are not properly encapsulated. VB.NET is another story, though it is not VB.NET that is portable, but the .NET CLR. And MS does not seem inclined to make this portable. There is a not-so-old joke that asks,"What sort of portability issues does Visual Basic have?" The answer being either two things (depending on the joke teller): The first (not so funny but fairly true) is screen resolutions (ex. PocketPC). The second answer? - Windows. "If you want, I can give you simple logics in VB that would make C Programmers go crazy." I think the reverse could be said as well. For example, implementing a compiler in VB. "as far as windows is concerned I would choose VB over any other language." Well, that is your choice there. But I am not sure why you would choose it over "any other language." Surely the "tool for the job" principle has some merit. http://www.geocities.com/antivisualbasic/thirteen.html When all is said and done, VB can get you a paycheck and perform tasks. It has its place, where ever you believe that is.
Report Offensive Follow Up For Removal
|
|
Response Number 12
|
Name: tonyjeffs
Date: November 22, 2003 at 05:06:38 Pacific
Subject: Migration from VB to C
|
Reply: (edit) I've nearly finished my database prog in vb, and I'm frustrated because I can't put a totally portable freestanding demo on cd. I think C++ would have a big advantage here? Apart from getting my head round the grammar, at the level I'm doing it, controls on a form, logic and loops, I think it shouldn't be too much of a transition. And I know a bit of C...
That's the theory! Is there a Data control in C++ that I can use the same way as in VB? And a DBGrid? Cant see them! Tony
Report Offensive Follow Up For Removal
|
Use following form to reply to current message:
|
|

|