PDA

View Full Version : C++ vs Basic


delayjf
09-28-2004, 05:25 PM
Can anyone offer any advise as to which language I should attempt to learn. And whats the difference between basic or C++ and visual basic or visual C++?

hurrikane
09-28-2004, 07:54 PM
delay,
if you have no programming experience then go with the vb.
It's hard to say without knowing your programming skill level but some of the basic differences.

vb has many classes, components, activex tools etc already built in. If you are programming primarily in windows and looking at doing vb should suffice.

C++ is much more complex, takes much more development time. It is more flexible and will cross platforms to unix/linux. ONe other thiing to consider though is if you plan on doing any heavy duty web dev in the future you should know that java is a slimmed down version of C++ and that could come in handy later. On the web side you would likely only need java if you were doing some heavy db web work or shopping carts..which you can purchase precanned these days.

This is probabaly 10% of the info you need to make this decision but on a quick guess I would say vb.

BillW
09-28-2004, 07:58 PM
delay,

I'll add another 10% - if you have to ask advice, VB is likely to be your answer.

Bill

DJofSD
09-28-2004, 08:38 PM
Jeff,

If you're going to limit yourself to either VB or C++, go with the VB. You'll find it will be easier to develop programs and debug VB.

DJofSD

DJofSD
09-28-2004, 10:08 PM
One of the things in common between VB and C/C++ is neither language is strongly typed. That is, you can use a variable without first having to explicitly declare it and how it is to be used, i.e. is it a string or a number, etc.

This allows quicker development. And possible confusion during the execution when a cast or conversion of a variable from one type to another does not give you the expected result. This is much more of a problem in C/C++ than it is for VB.

One difference between the two is the use of pointers. You really don't have to know about pointers in VB. In C/C++ you better learn about pointers if you ever expect to use services provided by the OS or routines found in standard libraries.

Is VB better than C/C++? It depends. VB will likely provide you with all the functionality you need for a long time but with the price of execution being slower than the equivalent program in C/C++.

Start with VB. Then when you find you can't do everything you need to do then consider learning C/C++. BASIC was originally invented to provide a simple and elementary introduction to programming and fundamental concepts like looping and arrays. The time you spend in VB will not be wasted. If you ever do add C/C++ to your arsenal you'll be able to concentrate on just the new stuff -- you'll have the "basics" down pat by then.

DJofSD

BillW
09-28-2004, 10:48 PM
Originally posted by DJofSD
One of the things in common between VB and C/C++ is neither language is strongly typed. That is, you can use a variable without first having to explicitly declare it and how it is to be used, i.e. is it a string or a number, etc.

DJofSD

You're using an extremely old version of C. Variable definition/function prototyping has been a requirement of the language since the ANSI/ISO standard was released in 1989. The original stuff out of Bell Labs did not require storage typing, it defaulted to int.

Bill

hurrikane
09-28-2004, 11:18 PM
one thing to be careful of on the variable thing.
by not declaring it the sdk assigns it as a variant type of variable.
It's not like you didn't declare it..it is just done for you. Problem is a variant uses a lot of resources as it needs to handle being any number of variable types.

For most db/horse racing type software this may not be a problem. If you get into more complicated programming it will certainly be big problem.

Just a fyi thing...won't likely affect what you are doing.

One thing to add. Learn a structured programing system. I have see a lot of crap code over the years. If you learn how to structure you will have a much cleaner end product and when you have to come back to it a year from now it will be a lot easier on you.

DJofSD
09-29-2004, 01:05 AM
You're partially correct - it's not that my compilers are old or pre-ANSI 89. The fact of the matter is it has been about 10-12 years since I've done any programming in that language. I learned enought about C++ and OOP then discovered Delphi. Haven't looked back since.

Thanks for the correction.

DJofSD

Dan
09-29-2004, 12:00 PM
DJofSD,

Hope you don't mind but I have a couple of questions about Delphi.

What version are you using? The Architect, Enterprise, Professional, or Personal version?

Are you connecting to a database like SQL Server?

Are you doing calculations within the Delphi language or are you using Stored Procedures within a database?

How is Delphi compared to PowerBuilder or other 4GLs?

Was it quick to learn or were you able to relate it to C or other languages you already knew?

Thanks,

Dan

DJofSD
09-29-2004, 02:57 PM
No problems, they're all good questions.

I'm using Professional V7 and looking at leap frogging over V8 to the new pending release when it's available. Here's a link for a preview of some of the new features being touted: Diamondback (http://info.borland.com/media/shockwave/delphi2005/d2005sneak.html)

At present I do not connect to any data base via the client/server model, not even for Interbase. For various reasons I am looking at DB2 UDB V8.2 PE which would force me to do exactly that.

Any calculations are I'm doing I'm doing directly in my data bases, no calculated fields. No stored procedures are in use.

Never used Powerbuilder. I remember it was a big splash when it first came out then when projects got bigger and bigger some of the weaknesses became apparent and the bloom came off the rose.

Once you become familar with the IDE and unlearned anything you might think you know about OOP because
of C++, I found Delphi to be a joy. Certainly all the prior knowledge from other structured programming languages is generally applicable.

Hope I answered the Q's at least partially. Repost if you need more.

DJofSD

Dan
09-29-2004, 03:05 PM
DJofSD,

I really appreciate the information. I do have a couple of other questions but we're headed out the door right now and will post later.

Thanks,

Dan

delayjf
09-29-2004, 05:32 PM
First of all thanks for the advise. Reading your posts I can't help feel that you guys are so far over my head that I can smell your feet. I suppose I could count my blessing at my ignorance as If I were more advanced, I'd be smelling something else. (enjoy the visual:D :D ) However, I will take your advise and start with visual basic then perhaps move on to C++. Does one of these work better with Access?? Again, thanks to all.

Dan
09-29-2004, 11:02 PM
To DJofSD,

I looked at the preview about Version 8. Looks very interesting. I assume now their IDE is a combination of developing either Windows programs or Web applications?

I agree with what you said about PowerBuilder. I think most development packages had that problem with relational databases. Problems such as row or table locks, update in place, locking rows in a multiple user environment, etc.

I have an old Version 6.0 of PB. It's been a couple of years since I've used it so that's why I was looking at what the current front end software is out there.

It's amazing that it is hard to find old versions of software on the web. You would think with the continual new releases of development software that the old versions would be available at a discount price. There is some stuff on E-Bay but few discount software dealers.

I'm going to analyze and design what I'm attempting to do before looking at software. I'm also going to weigh cost, learning curve, 'will this software look good on the resume', etc.

Thanks Again for your comments.

Dan

Dan
09-29-2004, 11:27 PM
Delayjf,

As far as using Access with C++ or VB, I really don't know.

To save you time, money, or heartache you might want to go to the library and research the different languages and development packages first. That way you can get a feel of what you are getting into. <G>

I consider myself a pretty good programmer even though I was a DBA. But the older I get the less stress I want to put on the old brain learning a new software language.

If you want to learn a language in order to do programming for handicapping you might want to analyze and design on paper what you are trying to do. Then use that plan while you are researching the different languages.

Hope that helps.

Dan

sq764
09-30-2004, 02:19 PM
I am fairly well educated and half way through my MBA.. With that being said, I have never felt as dumb as I did when reading this thread..

It's amazing how some people at work admire you for good Excel skills, then you read this thread and realize it's all relative :-)

I'll leave the programming do you guys..

cj
09-30-2004, 02:33 PM
Originally posted by delayjf
First of all thanks for the advise. Reading your posts I can't help feel that you guys are so far over my head that I can smell your feet. I suppose I could count my blessing at my ignorance as If I were more advanced, I'd be smelling something else. (enjoy the visual:D :D ) However, I will take your advise and start with visual basic then perhaps move on to C++. Does one of these work better with Access?? Again, thanks to all.

Jeff,

I use C++ in combination with an Access base all the time. C is best at using text files, so I just export the files from Access and run the programs. There is probably a better way, as I'm just a self taught, amateur programmer, but it really isn't as difficult as you would think. I would honestly recommend taking a second level college course and you will be well on your way to learning what you need to know to program. Once you have the foundation, absolutely anything you want to find out how to do can be found on the web with some heavy use of Google!

Tom
09-30-2004, 08:47 PM
http://www.programmersheaven.com/


Found this today while trying to figure out what is out there and what to do with it all. I use dto program in basic back in the day, but not sure whre to go nowadays. This site seemed to have a lot of info and some other good links.
I think what I have to do is write a program in a text editor, then find a compiler to do someting to the file and then it will run?

Dan
09-30-2004, 10:38 PM
Tom,

Thanks for the information about the programmersheaven.com.

Here's a pretty good site that discusses programming, languages, Access, MS Office, etc.:

http://www.tek-tips.com/index.cfm

Dan

Tom
10-01-2004, 10:49 AM
Thanks, Dan.

hurrikane
10-04-2004, 09:06 AM
Delay,
if you have access you can start programming in vb right now using vba. This is the perfect place to start before you spend money on vb. you can get most of your programming skills here and then when you move to a full blown vb you will mostly be dealing with ado and some additional form controls.

There are lots of places on the web to get / learn code snippets for access. Just do search. here are some

planet-source-code.com

expertsexchange.com

techtips.com