Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Delphi 5 or Visual Basic 6? | |
Pages: 1 2 3Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Which, in your opinion, is best?
Delphi 5
 
16.7%, 3 votes
Visual Basic 6
 
33.3%, 6 votes
Make up your own mind.
 
5.6%, 1 vote
Real programs are made with gcc
 
44.4%, 8 votes
Multi-voting is disabled.

User Post
Parasyte

Bullet Bill
Level: 35

Posts: 70/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 06-13-04 11:08 PM Link | Quote
What's good about VB:
-Very easy to read someone else's code, to see WTF it does.


Same can be said of all languages, given you know the language, and the variable and finction names are not screwed up. Comments help, but are not always required.


-CASE-INSENSITIVE! If you declare a variable named SomeVar and then type SOMEVAR later, not only will it work, the GUI will correct it. (This comes in very handy for checking spelling. Declare all variables with at least one capital, and when using them, type in lowercase. If you spell it right, it automatically gets changed to match the capitalization of the declaration.)

BAD! BAD! BAD! BAD! BAD!
I can't imagine why anyone would want to submit themselves to being such lazy asses. If you type "MyVar" once, you better have the ability to type it again and again. Subsequently typing "myvar" afterward is a VERY bad habit. Either type it one way and stick with it, or don't program at all.


-The IDE will warn you about bugs as they occurr in execution, so you know exactly what's wrong.

Oh yeah, I hated that. Usually the stupid message would show up while I was in the middle of typing a line, when I decided to go up and fix a previous line. Say I typed, "i =" and then used the up arrows (or the mouse) to get to another line in order to fix something before forgetting. "DONK!" says VB6 through my speakers, and up comes this stupid message saying "HEY IDIOT! You didn't finish typing this line!" And I'm all like, "NO SHIT! I am fully aware of this fact. Hey! Since you're so good at explaining the blatantly obvious, think you can tell me how I can disable you?"
So yeah, it's it was never able to answer my question, or help me even remotely. Pathetic.


-It's generally smart, IE it knows the difference between 'var = 4' and 'if var = 4'.

Programmers don't need smart compilers. Programmers need smart brains. If the programmer can't decern between 'var = 4' and 'if var = 4' then there is a major problem.
The thing about a 'single-equal' in a C if-statement is that it can be used for assignment within that if-statement. One of my favorite uses of this, for example:
u8 *buffer;
if (!(buffer = (u8*)malloc(1024))) {
printf("Unable to allocate 1024 bytes of memory!\n");
return 1;
}
buffer[0] = 1;

Something of that sort. It just saves me the trouble of placing the malloc() call on a previous line, THEN testing the return value in the 'buffer' pointer.




Bad stuff about VB:
-It's COM-based, which makes multithreading an INCREDIBLE pain!


Multi-threading processes in VB isn't so bad. What are you talking about? It's mostly the same process with all languages. You just tell windows to create a new thread, and WHAMO! A new thread is launched.




Bad stuff about C:

-It's a LOT harder to learn, especially Win32! (Creating a window = ARGH! )

No, C is not a lot harder to learn. The basics are just as easy to learn as with most any language. Using the language properly may be "tough" because everything is based around the same principles. And as neotransotaku stated, Win32 is just an API -- it's a part of Windows, not the C language.
You can use the Win32 API in Delphi or VB if you like. And in fact, there are some things you MUST use the API for in both languages.


-GUIs need to be generated from code, AFAIK.

Wrong again. You CAN create your Win32 user interfaces using code if you like, but generally it's not required. All Dialog-based apps use dialog resources, which can be built in a dialog editor, just like the one VB6 has. Window-based apps (Windows != Dialogs) will have to be put together through code, because of the way Windows OS works. This is not a limitation of C, but a direct "feature" of Windows OS.


-Often you need to either use a crappy compiler or an expensive one. Even if they have an IDE, your program is generally run separately, so debugging is a major pain.

I thoroughly disagree. GCC is not a crappy compiler. It is actually one of the best. Not only is it free, with a million different distributions to choose from, but it's also available ON and FOR many, many, many, many, MANY architectures. You can't build GBA ROMs using Microsoft Visual Studio or Borland's Compiler ... But with devkit advance, you can! Devkit advance is a gcc cross-compiler for ARM-based processors available on windows, linux, etc.
And if you can't live without an IDE, there are many Windows-based IDEa available just for people like you. Imagine that, you actually have a choice over which IDE you want to use.
(See below, regarding debugging C programs.)


-Working with strings and arrays can be a nightmare.

No, it's a blessing. Under C, a "string" and an array are exactly the same. As I said earlier, everything is based on the same principles. After you are able to comprehend this, it's not so bad working with strings in C. I do it on a daily basis, and wouldn't have it any other way. In this way, you're more in touch with the hardware as a programmer, rather than relying on the language to do EVERYTHING for you.


-There's generally a lot less debugging tools available.

Funny, the GNU Free Software Foundation's GDB is one of many debugging tools available for C\C++ -based programs. And I can't even count how many times it's saved my ass. I find bugs in my programs using it all the time. Not knowing how to use GDB, and not using it at all are two different things, and neither of those constitute to "not having any debugging tools."


-You need to do everything yourself, it's not just a matter of declaring something.

I almost agree with this! It's what makes C so great. If you understand the hardware you are working with, why not work a little bit closer to it? Take for example, strings... With VB, you define a string and set it to some crap. What the program actually does is allocate memory for the string, then it copies the string data to that memory. That is exactly what is done in C to create a string; allocate some memory: "char string[256];" Then copy the string data to it: "strcpy(string, "Hello World!");"
Of course, you need to understand that C (being based on the same principles through-out) handles strings as pointers. So "Hello World!" would be compiled as a pointer to that string data. That's just some more getting-in-touch with the hardware you are using.


-The code can be very hard to read at times, especially when done by messy programmers.

Same can be said of all languages. Well, unless the 'IDE' won't allow stupid use of whitespace and such.
I hate non-tabbed code as much as the next programmer, but it's really up to the programmer to write his code the way he likes. It's not a decision that you are I can make for him. And it's certainly not a decision that the damn IDE should make. Screw that.



Good stuff about ASM:
-It's the lowest level (besides raw hex) there is, so you can really optimize your code. If you're really good, you can do such crazy things as using instructions as data, or in some rare cases, even jumping partway into a multi-byte instruction, giving you a whole new series of instructions. (Example: On GB/Z80, the hex for 'ld hl,$23C3; ld bc,$0021' is '21 C3 23 01 21 00'. If you jump straight to the C3, you get 'jp $0123; ld bc,0' (but the second instruction doesn't get executed, because the first is a direct jump).)


Ah, yes. The good ol' disassembler-confusion code. Doing stupid things like that are really only applicable for software protection code. A good reverse engineer won't be fooled, but the silly hacker-wannabe's will.


-Generally, the syntax is very straightforward.

I would call it more 'strict' rather than straight-forward.


-Once you learn the basic instructions, it's very easy to use.

Again, same can be said of all languages!


-All you really need to write it are a hex editor and instruction sheet (or you can even just memorize the instruction set). I've done it like this on a Gameboy before (I used a Codebreaker's memory editor to write the code, and hooked into the game with a code to run it), somewhat entertaining.

Or do it the proper way and use an assembler.




There... And I mostly agree with the rest of what you said.
dan

Snap Dragon
Level: 43

Posts: 84/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 06-13-04 11:37 PM Link | Quote
It might be worth learning a .NET language. Microsoft are really pushing .NET and it will be closely integrated into their next operating system. There's even ports of the .NET runtime to other platforms (not by Microsoft though).

However, there's a few problems with it. First, it's by the big bad evil (aka Microsoft), but that doesn't seem to be a problem to you as you had VB as one of your choices. Secondly, the runtime might not be installed on your user's machines, and that's a 20 meg download. Thirdly, it's VM-based so it doesn't have particularly amazing performance. It's not slow, but it's not as fast as pure native code.

In my opinion though, it would be only worth learning it when the next Microsoft operating system comes out. So disregard all I said above.

Delphi rocks though.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 980/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 06-14-04 08:53 PM Link | Quote
[Said by Para]
What's good about VB:
-Very easy to read someone else's code, to see WTF it does.


Same can be said of all languages, given you know the language, and the variable and finction names are not screwed up. Comments help, but are not always required.
True, but in languages like C you can do such crazy things as writing an entire function on one line. It's very hard to read this way. You can do this in VB, but it's a little-known feature, so it's rarely used.


-CASE-INSENSITIVE! If you declare a variable named SomeVar and then type SOMEVAR later, not only will it work, the GUI will correct it. (This comes in very handy for checking spelling. Declare all variables with at least one capital, and when using them, type in lowercase. If you spell it right, it automatically gets changed to match the capitalization of the declaration.)

BAD! BAD! BAD! BAD! BAD!
I can't imagine why anyone would want to submit themselves to being such lazy asses. If you type "MyVar" once, you better have the ability to type it again and again. Subsequently typing "myvar" afterward is a VERY bad habit. Either type it one way and stick with it, or don't program at all.

What's so bad about not having to remember the capitalization of every variable and function you declare? Not to mention, you save some time by not having to press Shift a bunch of times. It's not much, but it adds up.


-The IDE will warn you about bugs as they occurr in execution, so you know exactly what's wrong.

Oh yeah, I hated that. Usually the stupid message would show up while I was in the middle of typing a line, when I decided to go up and fix a previous line. Say I typed, "i =" and then used the up arrows (or the mouse) to get to another line in order to fix something before forgetting. "DONK!" says VB6 through my speakers, and up comes this stupid message saying "HEY IDIOT! You didn't finish typing this line!" And I'm all like, "NO SHIT! I am fully aware of this fact. Hey! Since you're so good at explaining the blatantly obvious, think you can tell me how I can disable you?"
So yeah, it's it was never able to answer my question, or help me even remotely. Pathetic.

That is annoying, but I much prefer a "syntax error" message as soon as I make a mistake, then trying to track it down later when I don't even remember the code.


-It's generally smart, IE it knows the difference between 'var = 4' and 'if var = 4'.

Programmers don't need smart compilers. Programmers need smart brains. If the programmer can't decern between 'var = 4' and 'if var = 4' then there is a major problem.
The thing about a 'single-equal' in a C if-statement is that it can be used for assignment within that if-statement. One of my favorite uses of this, for example:
u8 *buffer;
if (!(buffer = (u8*)malloc(1024))) {
printf("Unable to allocate 1024 bytes of memory!\n");
return 1;
}
buffer[0] = 1;

Something of that sort. It just saves me the trouble of placing the malloc() call on a previous line, THEN testing the return value in the 'buffer' pointer.

True, but smart compilers make life easier. Isn't the point of computers to relieve us of repetitive difficult tasks? Why, then, shouldn't we let them in this case? (Even if it isn't exactly difficult. )




Bad stuff about VB:
-It's COM-based, which makes multithreading an INCREDIBLE pain!


Multi-threading processes in VB isn't so bad. What are you talking about? It's mostly the same process with all languages. You just tell windows to create a new thread, and WHAMO! A new thread is launched.
Uhm... Did you ever try it? You can't just tell a VB program to launch a new thread, it'll crash. You have to go through a series of things that boggle the mind to get it to even partially work.




Bad stuff about C:

-It's a LOT harder to learn, especially Win32! (Creating a window = ARGH! )

No, C is not a lot harder to learn. The basics are just as easy to learn as with most any language. Using the language properly may be "tough" because everything is based around the same principles. And as neotransotaku stated, Win32 is just an API -- it's a part of Windows, not the C language.
You can use the Win32 API in Delphi or VB if you like. And in fact, there are some things you MUST use the API for in both languages.

It may not be C's fault, but one way or another, you're going to need to do a lot of difficult API stuff you wouldn't need to do in VB or Delphi.


-GUIs need to be generated from code, AFAIK.

Wrong again. You CAN create your Win32 user interfaces using code if you like, but generally it's not required. All Dialog-based apps use dialog resources, which can be built in a dialog editor, just like the one VB6 has. Window-based apps (Windows != Dialogs) will have to be put together through code, because of the way Windows OS works. This is not a limitation of C, but a direct "feature" of Windows OS.
Well I didn't know that. I did say AFAIK.


-Often you need to either use a crappy compiler or an expensive one. Even if they have an IDE, your program is generally run separately, so debugging is a major pain.

I thoroughly disagree. GCC is not a crappy compiler. It is actually one of the best. Not only is it free, with a million different distributions to choose from, but it's also available ON and FOR many, many, many, many, MANY architectures. You can't build GBA ROMs using Microsoft Visual Studio or Borland's Compiler ... But with devkit advance, you can! Devkit advance is a gcc cross-compiler for ARM-based processors available on windows, linux, etc.
And if you can't live without an IDE, there are many Windows-based IDEa available just for people like you. Imagine that, you actually have a choice over which IDE you want to use.
(See below, regarding debugging C programs.)

Either I haven't come across it, or couldn't get it to work. Otherwise, I'd be using it.


-Working with strings and arrays can be a nightmare.

No, it's a blessing. Under C, a "string" and an array are exactly the same. As I said earlier, everything is based on the same principles. After you are able to comprehend this, it's not so bad working with strings in C. I do it on a daily basis, and wouldn't have it any other way. In this way, you're more in touch with the hardware as a programmer, rather than relying on the language to do EVERYTHING for you.
Because "strncopy(str1,str2,sizeOf(str1));" is SO much easier than "str1=str2", and worrying about buffer overflows is way fun.


-There's generally a lot less debugging tools available.

Funny, the GNU Free Software Foundation's GDB is one of many debugging tools available for C\C++ -based programs. And I can't even count how many times it's saved my ass. I find bugs in my programs using it all the time. Not knowing how to use GDB, and not using it at all are two different things, and neither of those constitute to "not having any debugging tools."
This is... *counts fingers* one program. Being good or bad doesn't change that.


-You need to do everything yourself, it's not just a matter of declaring something.

I almost agree with this! It's what makes C so great. If you understand the hardware you are working with, why not work a little bit closer to it? Take for example, strings... With VB, you define a string and set it to some crap. What the program actually does is allocate memory for the string, then it copies the string data to that memory. That is exactly what is done in C to create a string; allocate some memory: "char string[256];" Then copy the string data to it: "strcpy(string, "Hello World!");"
Of course, you need to understand that C (being based on the same principles through-out) handles strings as pointers. So "Hello World!" would be compiled as a pointer to that string data. That's just some more getting-in-touch with the hardware you are using.

But it also means more code to write and debug.


-The code can be very hard to read at times, especially when done by messy programmers.

Same can be said of all languages. Well, unless the 'IDE' won't allow stupid use of whitespace and such.
I hate non-tabbed code as much as the next programmer, but it's really up to the programmer to write his code the way he likes. It's not a decision that you are I can make for him. And it's certainly not a decision that the damn IDE should make. Screw that.

I've never had a problem reading other people's code in VB. The same most certainly can't be said for C.



Good stuff about ASM:
-It's the lowest level (besides raw hex) there is, so you can really optimize your code. If you're really good, you can do such crazy things as using instructions as data, or in some rare cases, even jumping partway into a multi-byte instruction, giving you a whole new series of instructions. (Example: On GB/Z80, the hex for 'ld hl,$23C3; ld bc,$0021' is '21 C3 23 01 21 00'. If you jump straight to the C3, you get 'jp $0123; ld bc,0' (but the second instruction doesn't get executed, because the first is a direct jump).)


Ah, yes. The good ol' disassembler-confusion code. Doing stupid things like that are really only applicable for software protection code. A good reverse engineer won't be fooled, but the silly hacker-wannabe's will.
I'm not talking about doing it for anti-hacking purposes so much as optimization. Sometimes you need to fit a lot of code in a very small space.


-Generally, the syntax is very straightforward.

I would call it more 'strict' rather than straight-forward.
I wouldn't. Unless you have a particularly stupid assembler, you can pretty much do it all however you want. Multiple instructions on a line, multiple lines per instruction, normal brackets, square brackets, $3F, 0x3F, 3Fh, even define instructions in hex.


-Once you learn the basic instructions, it's very easy to use.

Again, same can be said of all languages!
But moreso in ASM. All you need to know is the instructions and how to work the hardware.


-All you really need to write it are a hex editor and instruction sheet (or you can even just memorize the instruction set). I've done it like this on a Gameboy before (I used a Codebreaker's memory editor to write the code, and hooked into the game with a code to run it), somewhat entertaining.

Or do it the proper way and use an assembler.
But you don't have to do it that way is what I'm saying. Sometimes hex is the only way. Using the Gameboy example again, this is the only way I can run my own code on it (no flash cart ), at least until I get a GB-to-PC link made.


[Said by Neo]

Neo: You can't do that in C?
As far as I know, you can't. Or well, it is a pain in the arse to do. I know in VB importing a few OCX files will do the trick. But I haven't used VB that much and my friend did show me how to do it once.
It's really no different, except more code in C, which is true of nearly anything.

the GUI will correct it.
You mean the IDE will and that is only true for VB6 and before. WIth .NET, you could write your VB code in notepad and compile it from the command line
I was talking about VB6, mainly.

Don't like/can't afford M$'s IDE? Tough. (Kazaa can help with this, but M$ doesn't look too kindly on it. )
well...doesn't stop you from making VB programs since there is now a command line VB compiler...but you would be compiling VB.NET programs...
Stops you from making VB6 programs, though.

it is a lot harder to learn, especially Win32
Win32 is just an API. Meaning if Win32 didn't exist, C would still be C.
But it's harder to do basic Win32 stuff, because you have to do absolutely everything.

GUIs need to be generated from code, AFAIK.
And VB doesn't do that? VB still creates code, you just don't see that particular code. Microsoft Visual C++ is the same way--You do have a tool that will generate the code for you.
But you don't have to write this code.

or in some rare cases, even jumping partway into a multi-byte instruction
That is true if the instruction set does not enforce instruction alignment (requirement that an instruction must begin at a memory address that is a multiple of a certain number, typically 4), then you can have all the fun in the world.
I generally don't consider multi-byte instructions to really exist when every instruction is the same size. They may be multiple bytes but it's the same effect as single.

You need to do everything yourself, it's not just a matter of declaring something.
Please explain
How do you make a window in VB? Add a form. How do you make one in C? Declare a bunch of API functions, variables, structures, etc, fill them in, and call several functions.

It's the lowest level (besides raw hex) there is
raw hex and ASM are the same thing, just like '2' and the chinese character for 2 mean the same thing
Er, no they're not. Hex is machine code, as in 'CD3215'. ASM is the human-readable form of it, as in 'call $1532' or even 'call somefunction'.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 739/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 06-14-04 10:46 PM Link | Quote
What's good about VB:
-Very easy to read someone else's code, to see WTF it does.


Same can be said of all languages, given you know the language, and the variable and finction names are not screwed up. Comments help, but are not always required.
True, but in languages like C you can do such crazy things as writing an entire function on one line. It's very hard to read this way. You can do this in VB, but it's a little-known feature, so it's rarely used.
---
Then don't use that person's code...that person is probably an arrogant prick anyways for doing such a thing. This is one reason why not to cut and paste people's code into your own.

-The IDE will warn you about bugs as they occurr in execution, so you know exactly what's wrong.

Oh yeah, I hated that. Usually the stupid message would show up while I was in the middle of typing a line, when I decided to go up and fix a previous line. Say I typed, "i =" and then used the up arrows (or the mouse) to get to another line in order to fix something before forgetting. "DONK!" says VB6 through my speakers, and up comes this stupid message saying "HEY IDIOT! You didn't finish typing this line!" And I'm all like, "NO SHIT! I am fully aware of this fact. Hey! Since you're so good at explaining the blatantly obvious, think you can tell me how I can disable you?"
So yeah, it's it was never able to answer my question, or help me even remotely. Pathetic.

That is annoying, but I much prefer a "syntax error" message as soon as I make a mistake, then trying to track it down later when I don't even remember the code.
---
There is software or add-ons for C and other languages that will do syntax checking on the fly. So yeah, you can have this feature for C if you wanted.

-It's generally smart, IE it knows the difference between 'var = 4' and 'if var = 4'.

Programmers don't need smart compilers. Programmers need smart brains. If the programmer can't decern between 'var = 4' and 'if var = 4' then there is a major problem.
The thing about a 'single-equal' in a C if-statement is that it can be used for assignment within that if-statement. One of my favorite uses of this, for example:
u8 *buffer;
if (!(buffer = (u8*)malloc(1024))) {
printf("Unable to allocate 1024 bytes of memory!\n");
return 1;
}
buffer[0] = 1;

Something of that sort. It just saves me the trouble of placing the malloc() call on a previous line, THEN testing the return value in the 'buffer' pointer.

True, but smart compilers make life easier. Isn't the point of computers to relieve us of repetitive difficult tasks? Why, then, shouldn't we let them in this case? (Even if it isn't exactly difficult. )
---
Compilers has nothing to do with the allowance of certain things to happen in certain places. the var=4 and if var = 4 deficiency lies in the language itself, not the compiler. all the compiler does is check to see if your code fits within syntactic, semantic, and possibly operational guidelines of the language--it doesn't check to see whether what you are doing is logical.

Bad stuff about C:

-It's a LOT harder to learn, especially Win32! (Creating a window = ARGH! )

No, C is not a lot harder to learn. The basics are just as easy to learn as with most any language. Using the language properly may be "tough" because everything is based around the same principles. And as neotransotaku stated, Win32 is just an API -- it's a part of Windows, not the C language.
You can use the Win32 API in Delphi or VB if you like. And in fact, there are some things you MUST use the API for in both languages.

It may not be C's fault, but one way or another, you're going to need to do a lot of difficult API stuff you wouldn't need to do in VB or Delphi.
---
VB/Delphi just masks it all, which means they take away some power you have. So, this will all boil down to how much control you really want in the end.

-Working with strings and arrays can be a nightmare.

No, it's a blessing. Under C, a "string" and an array are exactly the same. As I said earlier, everything is based on the same principles. After you are able to comprehend this, it's not so bad working with strings in C. I do it on a daily basis, and wouldn't have it any other way. In this way, you're more in touch with the hardware as a programmer, rather than relying on the language to do EVERYTHING for you.
Because "strncopy(str1,str2,sizeOf(str1));" is SO much easier than "str1=str2", and worrying about buffer overflows is way fun.
---
once again, this boils down to how much power you want...

-You need to do everything yourself, it's not just a matter of declaring something.

I almost agree with this! It's what makes C so great. If you understand the hardware you are working with, why not work a little bit closer to it? Take for example, strings... With VB, you define a string and set it to some crap. What the program actually does is allocate memory for the string, then it copies the string data to that memory. That is exactly what is done in C to create a string; allocate some memory: "char string[256];" Then copy the string data to it: "strcpy(string, "Hello World!");"
Of course, you need to understand that C (being based on the same principles through-out) handles strings as pointers. So "Hello World!" would be compiled as a pointer to that string data. That's just some more getting-in-touch with the hardware you are using.

But it also means more code to write and debug.
---
not taking any sides, but that programming example is trivial. the real power of a language is the ease at which you solve a non-trivial problem using the language--like writing an emulator or a compiler. for some problems, you need all the power that C gives you. For others, then VB may be the better solution.

-The code can be very hard to read at times, especially when done by messy programmers.

Same can be said of all languages. Well, unless the 'IDE' won't allow stupid use of whitespace and such.
I hate non-tabbed code as much as the next programmer, but it's really up to the programmer to write his code the way he likes. It's not a decision that you are I can make for him. And it's certainly not a decision that the damn IDE should make. Screw that.

I've never had a problem reading other people's code in VB. The same most certainly can't be said for C.
---
Then the people who are relying on are arrogant and look down at newbies to C. Since that is the case, take a course on C, learn the syntax and concepts of the language, and screw those people.

Good stuff about ASM:
-It's the lowest level (besides raw hex) there is, so you can really optimize your code. If you're really good, you can do such crazy things as using instructions as data, or in some rare cases, even jumping partway into a multi-byte instruction, giving you a whole new series of instructions. (Example: On GB/Z80, the hex for 'ld hl,$23C3; ld bc,$0021' is '21 C3 23 01 21 00'. If you jump straight to the C3, you get 'jp $0123; ld bc,0' (but the second instruction doesn't get executed, because the first is a direct jump).)


Ah, yes. The good ol' disassembler-confusion code. Doing stupid things like that are really only applicable for software protection code. A good reverse engineer won't be fooled, but the silly hacker-wannabe's will.
I'm not talking about doing it for anti-hacking purposes so much as optimization. Sometimes you need to fit a lot of code in a very small space.
---
not to mention, there are only a few things that can be done only in assembly that can't be done at a higher level language since the compiler will reject the the equivalent program

it is a lot harder to learn, especially Win32
Win32 is just an API. Meaning if Win32 didn't exist, C would still be C.
But it's harder to do basic Win32 stuff, because you have to do absolutely everything.
---
If you don't want to do Win32, jump up a step and use MFC or its new reincarnation, Window Forms. But then, we would be leaving C but then C++ is still close to C...

It's the lowest level (besides raw hex) there is
raw hex and ASM are the same thing, just like '2' and the chinese character for 2 mean the same thing
Er, no they're not. Hex is machine code, as in 'CD3215'. ASM is the human-readable form of it, as in 'call $1532' or even 'call somefunction'.
---
I guess it depends on how you look at it. I used to be an individual outhere who says that the lowest level is machine then the next level is ASM. I wonder why I changed though, probably because the fact that raw hex doesn't have to be converted since it is already 1's and 0's while assembly has to be converted into the hex representation.

Which makes me wonder: the process of converting ASM to hex, is that translating or compiling? I guess the answer to that question would determine whether you deam ASM as a seperate level from hex/machine code or not.
RavenX

Red Paragoomba
Level: 13

Posts: 13/57
EXP: 9533
For next: 734

Since: 06-29-04
From: Rhode Island

Since last post: 486 days
Last activity: 339 days
Posted on 06-29-04 09:30 PM Link | Quote
i'm not gonna even pretend to know as much as you all...but i like using VB6 because it's easy to be self taught it...because that's how i learn programming ^^;
FreeDOS

Lava Lotus
Wannabe-Mod :<
Level: 59

Posts: 541/1657
EXP: 1648646
For next: 24482

Since: 03-15-04
From: Seattle

Since last post: 6 hours
Last activity: 4 hours
Posted on 06-30-04 04:10 PM Link | Quote
I've been experimenting... I like C a lot better than Delphi or VB6. I just do...

VB6 doesn't seem all that powerful. Delphi is too much of a drag and drop thing. You actually do stuff in C. You can control stuff in C.

I'll pick C!
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 946/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 06-30-04 10:08 PM Link | Quote
Heh...my friend is going to like you

with C, you can do a lot of stuff...just a matter of how much power you want. I think most people who are turned off to C do not like the power you get. Well, once you get C, then C++ and Java should come as easy, then C# just then will rely on your C and Java strength.
Parasyte

Bullet Bill
Level: 35

Posts: 100/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 07-02-04 10:19 AM Link | Quote
Ew, Java... Double ew, C#...
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 959/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 07-02-04 12:11 PM Link | Quote
Want a programming job? You need to know both to give you a better chances in finding one

If you just program as an amateur--then forget you...
Parasyte

Bullet Bill
Level: 35

Posts: 101/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 07-03-04 07:32 AM Link | Quote
Hah! You mean if I want a lame programming job. Java and C# are more like scripting languages than programming languages. (Java especially; any executable that can be decompiled into readable, usable source code is not much of a programming language. Native code is -and always will be- much better.)

I took up a programming project a while back and made $9,000 USD using C\C++\MFC. I spent less than 80 hours total writing the software. Just a little FYI.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 961/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 07-03-04 09:43 AM Link | Quote
Since when can Java or C# be disassembled into usable source? You've just stumbled into the holy grail of computer programming. Or well, show me a place that says it can be done...
FreeDOS

Lava Lotus
Wannabe-Mod :<
Level: 59

Posts: 549/1657
EXP: 1648646
For next: 24482

Since: 03-15-04
From: Seattle

Since last post: 6 hours
Last activity: 4 hours
Posted on 07-03-04 10:03 AM Link | Quote
DJ Java Decompiler
C# / C++ Decompiler

Decompilers exist for just about every language there is, you know.


(edited by FreeDOS on 07-03-04 01:04 AM)
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 966/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 07-03-04 12:08 PM Link | Quote
what the hell... hmm...i don't think it will work for every class but i guess i'll have to run the java thing on my own classes and see how accurate it gets them...

if anyone can find a C decompiler...if so, then windows can be decompiled

with these kinds of programs...then nothing is safe anymore...i wonder if companies migrating to .NET are making a good move...
FreeDOS

Lava Lotus
Wannabe-Mod :<
Level: 59

Posts: 550/1657
EXP: 1648646
For next: 24482

Since: 03-15-04
From: Seattle

Since last post: 6 hours
Last activity: 4 hours
Posted on 07-03-04 12:33 PM Link | Quote
There are C compilers, of course. It's one of the most widely used languages.

Windows is coded in a propietary, secret version of C by Microsoft. Unless someone figures it out based on the small leaked portion of the Windows2000/IE6 source, I don't think people'll get farther than dessembling Windows. (It was Paint, IIRC, that was dessembled, optimised, and re-assembled about 2000% smaller than it came with Windows )
Parasyte

Bullet Bill
Level: 35

Posts: 102/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 07-03-04 01:53 PM Link | Quote
FreeDOS: Your last two posts contain falacious information.
The C# / C++ decompiler works only on .NET programs and that stuff. .NET programs contain a LOT of scripting-oriented content, such as XML.
There have been many discussions about decompilers and the myths surrounding them. One of the most common misunderstandings is that a decompiler can be written for any language. In reality, a seperate decompiler would be needed to match every available compiler for a specific language. When you take into account the fact that compilers generally offer a WIDE range of optimization features and such, (which WILL change the resulting code to the point that it becomes no longer recognizable by a decompiler) the number of features required in a decompiler become staggering. And even then, with some mid-\low-level languages, you will lose a LOT of information between the original source and decompiled source. For one thing, you lose the aspect of seperate source files\object files under a language like C or C++. Also, variable and function names are sent to oblivion during the linking process. Of course, comments and whitespace will be 100% wiped. Macros and inline functions will be reduced to something more like a preprocessor would output. And finally, inline assembly routines will completely DESTROY the decompiled source, as the decompiler tries to make sense of the routine(s). In short, the decompiled source will be utter hell to read and understand.

Second, there is no "secret version of C" which Microsoft used for creating Windows. Of course, I cannot prove this, but inventing a language just for one piece of software (no matter the size of said software) is a terrible idea. Especially from a business stand-point, where you would have to invest far too much money into re-inventing the wheel.
I suspect Windows is written in C\C++ with maybe a bit of inline assembly. Or maybe a lot of inline assembly ... who knows. The kernel could benefit from it. Definitely in the thread switching code and things like that.


neotransotaku, Java is not compiled into machine code. It's more of a pseudo-code, thus giving Java programs the ability to run on every machine\OS with Java installed. This is what makes it more of a scripting language. I have not bothered looking into C#, because it sounds like a ripoff of Java anyway. So it would not surprise me if C# programs where simple pseudo-code applications as well. (Maybe so Microsoft can allow developers cross-platform capability between PC and Palm running a Microsoft OS, or something of that sort.)



So just to clear up any remaining confusion: Decompilers for "real" programming languages will not exist in usable form. Ever. Decompilers for scripting languages, on the other hand... Those can show up over night.
dan

Snap Dragon
Level: 43

Posts: 92/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 07-03-04 03:53 PM Link | Quote
Originally posted by Parasyte
neotransotaku, Java is not compiled into machine code.


Technically, it is. The files that are generated by the compiler use the Java byte code format, but when they are run through a Java interpreter that has Hotspot (i.e. the majority of the newest versions of Java), the code gets profiled, and the slowest parts of the code are translated into native machine code, for a speed boost. It's quite nifty actually.

.NET languages compile to a byte code like Java. However there are programs (for .NET) available that obfuscate the byte code making it pretty much impossible to get anything meaningful out.
Parasyte

Bullet Bill
Level: 35

Posts: 103/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 07-04-04 06:02 AM Link | Quote
I'll agree with that.
I see Java about the same way I see Macromedia Flash, with it's LINGO language. The code may be compiled, but it's not machine code. A dynamic recompiler is a bit different from a standard executable. Well, of course you know all of this. I'm just trying to pin-point how Java byte-code could be considered "technically machine code."
dan

Snap Dragon
Level: 43

Posts: 93/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 07-04-04 04:29 PM Link | Quote
I didn't say that Java byte code was technically machine code. I said that Java is technically compiled into machine code (through a dynamic recompiler, Hotspot). There is a difference.
Parasyte

Bullet Bill
Level: 35

Posts: 106/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 07-05-04 12:48 AM Link | Quote
OK, if you insist!
Nap

Goomba
Level: 9

Posts: 4/24
EXP: 2544
For next: 618

Since: 07-22-04
From: Wichita, KS

Since last post: 140 days
Last activity: 111 days
Posted on 07-22-04 02:11 PM Link | Quote
What about Delphi 7 ? I dont know anything about Delphi, but i know about VB, and I guess the latest Delphi is 7..so whats up in it?
Pages: 1 2 3Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Delphi 5 or Visual Basic 6? | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.017 seconds.