Click to See Complete Forum and Search --> : Visual Basic, C++, or assembly


saimon00
06-27-2002, 11:43 PM
Hi there,

Forst and Foremost, forgive my pure ignorance as regards to programming. I appologise. And I would appreciate the time taken to read this thread. Thank-you.
Having been brought up with computers as a child I began Programming at a very early age on the ZX81 and then Commadore 64. I managed to finally create my own Drawing Program Capable Of drawing Circles and Triangles etc filling them in in colour etc etc.
:D
But then due to life's circumstances I abandoned computers for a long time.
Having Gotten back into Computers in the last few years I have gone past the stage of playing games and keep myself much more amused playing around with utilities and finding out how far into the windows system I can Dig and still understand whats going on and why things happen when they happen etc.
But As much as I understand where things are and why they do what they do, I Remain Fascinated as regards to the structure of the programs. For example A simple Alarm clock.....How do you compile such a program. And More to the point, May I emphasize at this point, I understand it will take years to Fully Get to Grips with only One Language, I would Liike to Debug Programs.
In the years That I have been Away, programming has moved on drastically from :- 10 cls
20 Print "I want to get back into it"
30 goto 20 ...... etc. (DO YOU GUYS REMEMBER??)

So to come to the end of my Question, Finally, Which language do I choose. Are they in anyway similar to The Old school Languages, back all that time ago.
Any Help I recieve Would Be Magic. Maybe Even some Links To usefull sites or Ebooks.
Cheers. ;)

biosx
06-27-2002, 11:52 PM
How old are you? Anyway, if you are going to learn a worth-while language, choose C (not C++). C is the perfect mix of low-level and higher level programming. It will teach you more than you can think without having to deal with all the hullabaloo of learning ASM (which can be tricky considering there isn't a real good model way of teaching ASM). People talk about C++ this and Java that. IMHO, they are just trigger words. Most of the people talking about them don't even take advantage of what those languages offer (no offense to those people who do know the in's and out's of OOP).

I chose to devote most of my time in the beginning to C and it has paid off well. From there I went on to PERL and C++.

So take some time to learn C and then move on from there.

Good luck

saimon00
06-28-2002, 12:17 AM
Im not as old as you may think. Half way Up the hill should we say.
Ok, so I started in Visual Basic and Managed to get A couple of proggys going. Very Simple Change form from grey to red to blue, shrink and expand form, hide and dissable command buttons and very simple arithmatic.
Where can I get started in this Area. I would Assume that C is not a visual language as is visual basic, hence the name.And Am I right in assuming that most of the utilities, applications etc are written in C.
How long could it take to achieve a basic standard in C, capable of having my own program albeit simple up and running, and knowing what the code means and does.
Does C work in the same way as assembly, ie. AE, AH, AX, PUSH, an all that stuff. Thanks in anticipation for any response.
:p

jkresh
06-28-2002, 02:01 AM
If you use Visual C++.net or C#, you will have the same "visual" features as visual basic as they all use windows forms. As to starting in C and going to object oriented later, I find that starting with oo programming works fine for most cases and the benefits of starting with C and then moving will be offset by the time consumed in learning the "old" way to do things with C. If you do go with a .net language msdn.microsoft.com, will give you a lot of hints and sample code, I believe they have the library up for free now (could be wrong) and for a windows programmer it is a great asset.

hu flung dung
06-28-2002, 03:11 PM
From what I hear, Visual Studio .NET is the best! It doesn't really matter what .NET language U learn, they all now have the same speed and functionality!

If you have Visual Studio 6, however, I'd suggest sticking to Visual Basic! Its the easiest to learn and use, and it can do everything you'll need it to do! Just be very careful to keep from getting bad programming habits! C++ is much harder to learn and use (although its faster and more functional).

EDIT: None of the languages we've mentioned thus far are even similar to ASM (assembler). Dont even be thinking about learning ASM! Its the hardest, ickiest, and worst language for anybody! Unless your writing an operating system or possibly device drivers (trust me, you won't be) any other language would be 100x better to use!

Zoma
06-28-2002, 04:46 PM
Differences of programming languages (and some history, too):

Assembly: Assembly code is a readable version of machine code. A single assembly instruction corresponds to one instruction by the CPU. For example, 'MOV AX, BX' would correspond to a number (not sure how many bits). The first n-bits of the number would represent the instruction, which is 'mov' in this case. The rest of the bits would tell the processor that the AX register and BX register are being used. There may be unsused bits, as well.

BASIC:
BASIC programs are not structured programs. GOTO statements are now looked down upon and very rarely, if ever, used in programs. BASIC programs are not compiled, they are interpreted. I'm not sure what goes on in a BASIC interpreter, but I think it gets converted to assembly. I'm guessing code doesn't get optimized very much, if at all. There are BASIC compilers that compile BASIC programs into binaries, though.

C:
C programs, like almost all modern programming langauges, is a strucuted programming language. This means that the flow of the program follows a logical sequence instead of using goto statements (although it supports goto statements). Statements are executed from left to right, top to bottom (this is called sequential exection). In order to accomplish things, there is also conditional execution (if-then-else and switch) and repeated exection (for and while loops). These allow you to control the flow of the program with using goto statements. The C language is compiled. This means that the code gets converted to machine language so the code is run directly by the processor (.exe and .com files on a Windows machine). A lot of statements in C directly correspond to assembly instructions (sometimes just one). C is highly optimized when it is compiled.

C++/Java:
Newer languages use what is called object oriend programming (OOP). OOP languages are also structured (at least the ones I have seen). Structured langauges are used because they are easier to read and program in than languages like BASIC, and supposedly OOP is better than structured languages for large projects (this is debateable, though). Basically, OOP has things called objects. And object has states and behaviors. Objects are supposed to be looked at like everyday objects, in a sense. For example, a car object would have certain states, like its color or how much gas it has. It would also have behaviors, like being able to accelerate. This won't make much sense until you learn more about it. OOP languages are generally less optimized than C, as objects take many lines of assembly to implement. BTW, Java is both compiled and interpreted. It gets compiled into byte code instead of machine language, and requires a virtual machine (VM) to run. Basically, a virtual machine is like an emulated processor running on your computer, and the byte code acts as the machine language for that processor. Obviously Java is much slower than C or even C++ for this reason.

I'd recommend learning a structured language for trying to learn an OOP langauge. C is a good place to start, but I'd recommend trying to learn a bit more about ASM and what goes on inside the PC before learning C. To me, it makes the concepts behind C easier.

btw, I forgot to mention VB. I hate it :) VB is basically a language to make simple Windows apps quickly. It looks nasty and a lot of programmers hate it. Windows apps are usually programmed in C with the Windows SDK or in C++ with MFC. Both of these obviously require knowledge of C/C++ and a good bit of knowledge to use the SDK/MFC. If you REALLY want to make Windows apps without having to learn the SDK or MFC, learn C and then C++ and try Borland C++ Builder. It works similarly to VB in how you design apps, but uses C++. Regardless, visual languages are a bit weird in how they are structured. That is, they usually store some parts of the source of the program in form files and just read differently than non-visual programs (Visual C++ is Microsoft's C++ compiler/environment, and is NOT a visual language).

hu flung dung
06-28-2002, 05:36 PM
Originally posted by Zoma
btw, I forgot to mention VB. I hate it :) VB is basically a language to make simple Windows apps quickly. It looks nasty and a lot of programmers hate it.

What is so nasty about Visual Basic? IMO, its a lot easier to learn and program with than C++!

biosx
06-28-2002, 06:09 PM
Originally posted by hu flung dung


What is so nasty about Visual Basic? IMO, its a lot easier to learn and program with than C++!

It is all a matter of opinion and what kind of coding you like to do. If you write small applications or need fast results, then VB is alright (I made a couple little serial gen's in VB). The thing about it is that you can't control everything. You can't take care of all the memory issues and tweakable GDI/GUI elements. To me, VB has always been a modern-age COBOL (ie built for business and business folk). Since business folk aren't that knowledgable with programming or computers, the language has to be easy.

I don't like VB myself, I rarely use it. I enjoy using the Win32 API because initially it taught me alot about Windows itself plus you have complete control of all the resource files and dll's you link in.

Go VB if you aren't that serious about programming. But if you are and maybe want to make a career or serious hobby out of it, learn C.

Good luck.

biosx
06-28-2002, 06:12 PM
Originally posted by Zoma
...and supposedly OOP is better than structured languages for large projects (this is debateable, though).

I don't see why this is debatable. Maybe you need to brush up on OOP and Polymorphism? OOP makes it so much easier to just add a component or feature into a program. Maybe you haven't learned OOP and are guessing (which is fine). But I just want to clear up that OOP makes larger applications easier to deal with and modify.

saimon00
06-29-2002, 12:47 AM
Back again.
I would just like to take the time to say thanks for all the replies to my question, but alas, I am no closer to finding an answer to my dreaded question.
With all due respect to all the programming geniuses out there I still want to know how I get get to grips with the debugging and understanding of how software works.
What Language are the majority of apps written in? I cant Believe that people sit and write an application with all the graphics etc in ASM. This seems such an *** about face way of writing anything.
So why when looking up how to reverse engineer a third party (Not Self Written)program people always refer to ASM as the answer. Is it not possible To read into the program by some other means. Oh yeah, excuse my ignorance yet agian, but is VB restricted to Always Using A square window form with controls inside it? I appreciate my complete and utter ignorance to the subject at hand, but the thing is that I do not want to waste valuable time on a language that will serve my purposes.
As said before I made some simple Programs already in basic, But It seems very limited as to its abilities. It seems Very good at making GUI's etc but as for reverse engineering not realy what the doctor ordered. Please feel free to add your opinions and guidance to this topic. All replies are very welcome.:rolleyes:

JabberJaw
06-29-2002, 01:32 AM
Originally posted by saimon00
I appreciate my complete and utter ignorance to the subject at hand, but the thing is that I do not want to waste valuable time on a language that will serve my purposes.
As said before I made some simple Programs already in basic, But It seems very limited as to its abilities. It seems Very good at making GUI's etc but as for reverse engineering not realy what the doctor ordered.
<edit>
um, sorry if this sounded rude but what exactly are your purposes, anyway? they seems kinda vague... did you want to reverse-engineer an application?

anyway, here's a few links that might be useful:

http://www.geocities.com/naif_2pac/cpp.htm
http://www.thefreecountry.com/developercity/ccompilers.shtml
http://www.vbworld.com/
http://msdn.microsoft.com/library/

hu flung dung
06-29-2002, 02:57 AM
Originally posted by saimon00
Back again.
I would just like to take the time to say thanks for all the replies to my question, but alas, I am no closer to finding an answer to my dreaded question.
With all due respect to all the programming geniuses out there I still want to know how I get get to grips with the debugging and understanding of how software works.
What Language are the majority of apps written in? I cant Believe that people sit and write an application with all the graphics etc in ASM. This seems such an *** about face way of writing anything.
So why when looking up how to reverse engineer a third party (Not Self Written)program people always refer to ASM as the answer. Is it not possible To read into the program by some other means. Oh yeah, excuse my ignorance yet agian, but is VB restricted to Always Using A square window form with controls inside it? I appreciate my complete and utter ignorance to the subject at hand, but the thing is that I do not want to waste valuable time on a language that will serve my purposes.
As said before I made some simple Programs already in basic, But It seems very limited as to its abilities. It seems Very good at making GUI's etc but as for reverse engineering not realy what the doctor ordered. Please feel free to add your opinions and guidance to this topic. All replies are very welcome.:rolleyes:

You want to reverse-engineer a program? Hmm, its very difficult to decompile an application to C++ or C, and probably impossible to Visual Basic. The only human-readable language you can decompile an exe or dll to is ASM. However, as I've said, ASM is NOT a good beginner programming language! Its not a good language for anyone unless you want to write something like an OS (or maybe make hacks and cracks?)

You also dont like being limited to square forms in Visual Basic? Thats more of a Windows thing than a Visual Basic thing, but its not a limitation! With a little Windows API programming, you can create forms in, I believe, any shape! However, I've never needed to do so! Just keep in mind that Visual Basic is far more advanced than it may seem at first (I've made DirectX and speech recognition apps before with it, and I'm almost finnished with a program similar to PCAnywhere).

Hmm, what exactly do you want to do though? Your being very vague!

EDIT:

Oh, and here's another link if your interested in Visual Basic programming:
www.vbforums.com

saimon00
06-29-2002, 10:12 AM
*YAAAAAWN* - Just Woken Up

What I would Like to do is to make my own programs or games, nothing too serious but in a language that is going to help me maybe understand about ASM, (ie by making my own programs and then applying Soft Ice and HIEW on them) to see what they do in machine code etc and this way slowly maybe I could Get to grips With ASM, But Going Back to my little programs, I dont really want to be stuck with little grey buttons 'from VB' all over my form if you know what I mean.
Could any body give me an example of any programs with animation ( not 3D) so that I can See What Visual Basic Is Capable of
And Then An Example OF a Program made in C or any of its variations, so that I can compare the Difference.:eek:

hu flung dung
06-29-2002, 01:29 PM
Originally posted by saimon00
*YAAAAAWN* - Just Woken Up

What I would Like to do is to make my own programs or games, nothing too serious but in a language that is going to help me maybe understand about ASM, (ie by making my own programs and then applying Soft Ice and HIEW on them) to see what they do in machine code etc and this way slowly maybe I could Get to grips With ASM, But Going Back to my little programs, I dont really want to be stuck with little grey buttons 'from VB' all over my form if you know what I mean.
Could any body give me an example of any programs with animation ( not 3D) so that I can See What Visual Basic Is Capable of
And Then An Example OF a Program made in C or any of its variations, so that I can compare the Difference.:eek:


*YAAAAAWN* - Just Woken Up too!

That isn't really the direction you should take if your new to computer programming, but if this is really what you want to do, I think C would be the best language for that purpose simply because of the way it works!

I think you should consider yourself 'new' to computer programming, considering that the last programming language you learned was C64 BASIC. If you really want to get into something lower-level, C++ would be good! Just be warned, for quite a while, all you'll be making with C++ are console applications and Forms with "little grey buttons all over them". Just use your imagination, and you can create some pretty impressive applications with those basic controls! You wont be exceeding VB's capabilities anytime soon! Do a search on Google for a program called PCAnywhere or GameCommander 2! I've made apps similar to those entirely in Visual Basic!

You didn't answer our previous question though, are you using Visual Studio 6 or Visual Studio .NET? In all my replies, I assume its version 6. If you are using .NET, then it doesn't matter what language you learn because they all have the same structure, speed, functionality, and they all compile the same way.

JabberJaw
06-29-2002, 03:27 PM
Originally posted by saimon00

Could any body give me an example of any programs with animation ( not 3D) so that I can See What Visual Basic Is Capable of
And Then An Example OF a Program made in C or any of its variations, so that I can compare the Difference.

If you write them yourself, you'll learn a lot more.

btw, what you're talking about is not reverse engineering, which is really more of a legal concept to get around patents. To reverse engineer something, you start by hiring a consultant (or team depending on the complexity of the target). They write a detailed engineering specification of the target application. Then, they are considered 'dirty', and are removed from the project. Then, your engineers design your product based on the detailed engineering specs.

!shira!
06-29-2002, 03:52 PM
C++

its the most usefull :D

hu flung dung
06-29-2002, 05:01 PM
Originally posted by !shira!
C++

its the most usefull :D

That depends!

In Visual Studio 6, yes! In Visual Studio .NET, all languages share the same functionality, speed, and their all compiled the same way!

!shira!
06-29-2002, 05:40 PM
Originally posted by hu flung dung


That depends!

In Visual Studio 6, yes! In Visual Studio .NET, all languages share the same functionality, speed, and their all compiled the same way!

I have VC++ 6.0 :D

Zoma
06-29-2002, 08:43 PM
I don't see why this is debatable. Maybe you need to brush up on OOP and Polymorphism? OOP makes it so much easier to just add a component or feature into a program. Maybe you haven't learned OOP and are guessing (which is fine). But I just want to clear up that OOP makes larger applications easier to deal with and modify.

While I agree that OOP can make it easier to add things to programs, it can also muck things up. There are a lot of bad programmers out there, and a poorly written OOP app tends to be harder to figure out than a poorly written structured program, IMO. Classes can make things easier, but are just too easily abused. A lot of really good programmers I know try to use C++ classes sparingly and stick mainly with structs and functions. I guess I'm really refering to C++ than OOP in general. The iostream libraries, reference params, namespaces, etc. are often just more annoying/confusing to use than the plain old C conventions. Obviously this is all subjective, but that's all I was getting at in the first place :)

Zoma
06-29-2002, 08:59 PM
I'd say the best language to learn at the moment would be C. It will help get you up to speed with how people program today, it is what probably almost every app on your computer is written in, and it is a lower level language than most others so you will learn a bit more about what is going on in your computer as you learn C.

You can "debug" C, in that you can trace through a program, line by line. But if you are refering to debugging like when a program asks you if you want to debug or when you see a memory dump, then you will need to learn assembly. Assembly can be tough to learn, but it will help you understand what is going on and learning it is a good thing.

e_dawg
07-04-2002, 11:16 AM
I agree with biosx, learn proper structured programming first -- it's worth the time, and it is very important that you know it.

Within objects there is structured code, it's just how it is, all programming is based on five structures and anything beyond that depends on those five structures.


If you want to go to C++, learn C first. Plus, knowing C is usually worth some money in the real world -- it's actually a fairly rare language since most C++ and Java programmers skip the basics (then I have to teach them later).