Taking a Pole on Programming

New Member
Joined
Nov 24, 2001
Messages
692
Best answers
0
MyStIc~ShAdOw said:
hmmmm Harsens....you are dutch are u? didnt u tell about one very good dutch C++ learning book a time ago? do u know what the title is again >< lol
I don't know the title, but it's written by Leen Ammeraal. It's kinda outdated though (doesn't cover templates) but it's still a great book to get started with.

Don't bother learning C if you're planning to learn C++, you will only pick up bad habits. Once you know C++ you can do C stuff too. Also don't underestimate C#, I wouldn't be surprised if that will become another widely used language soon.
 
New Member
Joined
Nov 24, 2001
Messages
645
Best answers
0
I've always wondered how you get into Coding and such... last year we did a few months of programming (it wasn't anything complicated, it was really just to give us a basic idea of how computers and programs work) in school and I enjoyed it. I always wanted to take it further but... I never really knew where to start. The school doesn't really offer much more on the subject as far as I'm aware.

Meh.
 
Lost in space
Banned
💻 Oldtimer
Joined
Dec 1, 2002
Messages
2,725
Best answers
0
I've been playing video games for as long as I can remember. I joke I learned to read by playing video games, but now I don't doubt that they helped. I guess once I got a computer and began understanding them I just knew I was going to make games for them. I didn't even consider it as a choice, I just knew I had to.
The first chance I got to take a programming course in school was a Visual Basic class at my old Junior High. Their programming department wasn't great, so I got used to looking up and discovering things on my own, and that's usually the best way to learn new things.
If you're interested in C++, I can suggest a good book. Look around for Bjarne Stroustrup's (the designer of the C++ language) The C++ Programming Language. The latest is the 3rd edition I believe. I've read a few other books on C++, but I found that one the most useful.
 
Lost in space
Banned
Joined
May 8, 2003
Messages
840
Best answers
0
I dont think that flash is for coding

c is much more into it!
didnt knew dx3d is a way of coding... (?)

so I choose C++! }P-) like most do! lol
(not by peer presure thought... lol)
 
Coder - Harsens sidekick
💻 Oldtimer
Joined
Nov 24, 2001
Messages
1,981
Best answers
0
harSens said:
Uhm... no... you don't.
Um.. yes you do? If you do something like
class whatever
{
public int m_iSomevarible;

public void SetVarible( int a ) { this.m_iSomevarible = a; }
public int GetVarible( ) { return this.m_iSomevarible; }
}

Dont you have to use the "this." pointer if the varible is not 'static'? Hell if i know though, I havnt really programed enough java to even think about proving you wrong.. Heh, I havnt coded enough c++ to prove you wrong either :\ Damn old people -_-

harSens said:
Bleh, why use arrays if you have a whole set of Collections at your disposel :p
I dont know what "collections" are, and i have no intentions of learning ^_^

harSens said:
I prefer old-skool sub-routine for a 'void' function :p Everything that returns a value is a function as far as I'm concerned.
I'll just act like i understand what a "sub-routine for a 'void' function" is and completly agree with you, functions pwn ^_^
 
New Member
Joined
Nov 29, 2002
Messages
538
Best answers
0
I think you'll find joe, that that is kind of a "better" way of doing it. you know, like the way you're taught to print letters when you want to write neat. This code works just fine for example.

public class AeroplaneLeg
{
public static final int MINUTES_PER_HOUR = 60;

private String flightNo;
private Time startTime;
private Time finishTime;

/**
* Constructors for objects of class Aeroplane
*/
public AeroplaneLeg()
{
flightNo = null;
startTime = null;
finishTime = null;
}

public AeroplaneLeg (String fn, Time st, Time ft)
{
flightNo = fn;
startTime = st;
finishTime = ft;
}

/**
* Set instance variable startTime
*
* @param sst a Time parameter
*/
public void setStartTime (Time sst)
{
startTime = sst;
}


etc, etc, etc...

And if you're at all interested in what a collection is, the best place to start is usually the SDK.
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html

And as far as I know, a function is usually reserved for talking about something that takes care of a calculation that you will use again and again. For example

A function that calculates the simple linear regression for a set of data.
You set it up so you just have to plug in the input and get the output (usually some kind of number for a function).

A method is anything that you can call from a class. So you could say that a function is a type of method.

BUT that's all just pedantics. I don't think it really matters that much, since it's just terminology.
 
New Member
Joined
Apr 27, 2004
Messages
10
Best answers
0
)V(ajin Mole said:
which one is better for programmming

Flash
C++
Java
C
DirectX3D
or anything
Flash
Flash really isn't what i'd call a language.. It's more of a script.. for it's position in the use of web-based graphics and even graphics run on your system through the use of the flash standalone player, it's worthy of praise imo. It's not too practical because you can't really do much more than that in it.

C++
Honestly i'd have to say C++ is the only real language here... it and c are one in the same with differences in capabilities, C++ leaning more towards OOP with classes and whatever. I personally use C++ for most things, and i would agree it is by far the best.

JAVA
Java is trivial to those who dont understand it. Java is not a programming language as you may think. It is simply a VM ( Virtual Machine ) or basically a processor emulator that has a common low-level interface with the machine that is re-written on each supporting platform. It's more towards a scripting language but is a very good one at that. You can't perform low-level operations without linking C code to it, but all in all it is capable of some very neat stuff and a HUGE benefit is that it is virtually platform independant.

C
C++ without OOP :)

DirectX3D
DirectX9 is a package of different apis and interfaces for use with user input ( DirectInput ), 3d graphical display ( Direct3d ), sound ( DirectSound ), 2D raster operations ( DirectDraw ), and internet communications ( DirectConnect ). There are some other packages but they aren't at the top of my list. Essentially, DirectX9 is a large group of packages that are becoming more and more popular with people due to their ease of use and more and more graphics cards are leaning heavily towards the D3d9 coding style, meaning most newer games will take full advantage of it. It's not a coding language, however you can code shaders for it and you can program the pixel pipeline ( essentially what D3D does! ) so it's more of a utility for making graphical applications.


:\ my vote: C++
 

IN

New Member
Joined
Feb 13, 2004
Messages
41
Best answers
0
Internet Comunications (LAN playing and...) is DirectPlay :D You forgot DirectMusic for Music playing (without 3D sound stuff).
And anything - Pascal is nice too. Delphi is Pascal for Windows and makes a lot of things easier to do ;) Well there's VisualBasic (QuickBasic for Wins), but I don't like it, so I don't suggest learning it, but it's still one of the easiest languages ever.
Assembly language is the first programming language and it's still alive. But it has very complicated sysntax (if you can call it so) and you need to know a lot of things about PC architecture to be a good asm programmer, so it's not very widly used...


My vote: Assembler (You know asm - you know everything)! :yes:
 
New Member
Joined
Apr 27, 2004
Messages
10
Best answers
0
NOT A CHOICE!!!!! :) I know ASM... in fact im writing a VirtualMachine myself for my scripting language in my dx9 engine :)
 
New Member
Joined
Apr 27, 2004
Messages
10
Best answers
0
.data
myVote db "Asm and c++ !!! HAHA",0
myTitle db "VOTE!",0
.code

main proc
push eax
push ebx
lea eax,myVote
lea ebx,myTitle
push MB_OK
push myTitle
push myVote
push 0h
call MessageBox
pop ebx
pop eax
push eax
call ExitProcess
main endp

OH NOES!!!!! TEH ASM IS COMING!~!! AHHAH! RUN!!!

LoL ;)
 
New Member
Joined
Nov 24, 2001
Messages
692
Best answers
0
just2n said:
JAVA
Java is trivial to those who dont understand it. Java is not a programming language as you may think. It is simply a VM ( Virtual Machine ) or basically a processor emulator that has a common low-level interface with the machine that is re-written on each supporting platform. It's more towards a scripting language but is a very good one at that. You can't perform low-level operations without linking C code to it, but all in all it is capable of some very neat stuff and a HUGE benefit is that it is virtually platform independant.
Uhm... So if something is intepreted it's not a programming language? I'd say everything with flow control (let's say, at least an if and a goto) is a programminglanguage. Other then that, Java is compiled into bytecode, then the bytecode is run on the virtual machine. A C program is compiled to machinecode, then the machinecode is run on a OS. I don't see why this would make Java less of a programming language then C.

The huge benefit of Java besides being platform independant, is, as I mentioned before, that it does the memory managment for you, preventing tons of potential bugs.

just2n said:
C++
Honestly i'd have to say C++ is the only real language here... it and c are one in the same with differences in capabilities, C++ leaning more towards OOP with classes and whatever. I personally use C++ for most things, and i would agree it is by far the best.
That depends. Java is awesome in doing webbased stuff, and it's as fast as C++, unless you do tons of array operations. Visual Basic seems to be awesome for quickly programmed simple user interfaces. Programmers using C# or Java are usually more efficient then programmers using C++ (again, memory managment done for you). C++ is the most hacked OO language available.

IN said:
My vote: Assembler (You know asm - you know everything)!
If you code in asm, you constantly feel like you want to shoot yourself in the head, but first you have to re-invent the gun and the bullet (not my qoute btw). Seriously, asm is only usefull if you want to do lowlevel OS stuff, code hardware, or optimize frequently called code. Using asm to open a message box is just a waste of time.
 
New Member
Joined
Nov 29, 2002
Messages
538
Best answers
0
Yeah, you find lots of professionals (who use Access in particular) use VBA a lot.
 
New Member
Joined
Apr 27, 2004
Messages
10
Best answers
0
Uhm... So if something is intepreted it's not a programming language? I'd say everything with flow control (let's say, at least an if and a goto) is a programminglanguage. Other then that, Java is compiled into bytecode, then the bytecode is run on the virtual machine. A C program is compiled to machinecode, then the machinecode is run on a OS. I don't see why this would make Java less of a programming language then C.

The huge benefit of Java besides being platform independant, is, as I mentioned before, that it does the memory managment for you, preventing tons of potential bugs.
First of all You dont know what a virtual machine is do you? Java is compiled into bytecode sure, what is bytecode? do you know?

Basically a virtual machine pretends to be a processor. It has it's own version of the registers, and a function to handle each operation. It does not at all have to match the architecture on the target running machine, which is what makes java so platform independant. Basically the VM interpreter module reads each byte and executes it, simulating closely the x86 architecture. The x86 does not handle memory management, it simply does not allow for low-level hardware access, so anything that could possibly lead to a memory bug is impossible to do through the VM itself.

The VM itself is a program in machine code that goes through and reads the instructions the bytecode has been assimilated to tell. It is nothing more than a script language as any game on this earth has. Look at unreal tournament. UScript ( unreal script ) uses the VM technology to do the same thing. Why is it then called a script and java a programming language?
The answer is, both are scripts. The reason that C++ and C are languages and these are scripts is because machine language is executed by the processor directly. If the language generates a file that is not a PE file and cannot be used by windows directly without aid of something to translate it or execute the code for the os, then it is not a language. If i can't send you the compiled file of my language and you be able to run it, then it is not really an application, and was not made from a real language rather a scripting interface. The engine im making uses VM technology as well and it is a bit more advanced than Java and i still call it script language.

BTW ASM is not hard. you can make object files just as you can in c++. You can code a load of functions into objects and use them in different apps. You can also include windows API's... it's not much harder than C++ once you know it.
 
New Member
Joined
Nov 24, 2001
Messages
692
Best answers
0
I know what a VM is, thank you. Lemme explain intepreted (or however you spell that) for you. Intepreted basicly means that an extra process is needed to understand the language and it has to be translated in machine language line by line in runtime (actually Java gets partly compiled runtime so it's not completely intepreted). So my question was, would such a language be a programming language. I'd say, yes.
[edit]
webopedia agrees with me:
http://www.webopedia.com/TERM/P/programming_language.html
You don't agree, but I guess that's just a matter of definition. You can ask yourself this: what if an OS has build-in support for running class files, or what if you'd have a Java OS? Or what if someone created a compiler that creates machine code out of .java files? Would Java then suddenly become a programming language? I'd say, wether something is a programming language is a property of the language itself, not of the output format of a compiler for that language.

And a script language in a game that's more advanced than Java? Define advanced? The Java language itself has features that make it more advanced than C++ (like reflection and garbage collection). It has support for low-level acces that is available on almost every OS (like reading/writing files, writing to the screen, etc) btw. There are also add-on libraries for other kinds of other low-level acces (Java3D, JMF). Ofcourse those are written in platform dependend languages, since such low level acces is platform dependend.

I know asm, and I've written my share of asm programs http://home.student.utwente.nl/h.vanwelbergen/oldsite/index.html
It has it's uses for getting the last 10-20% of speed boost out of heavily used code, create small programs (by example to use in hardware) or to do some low-level stuff. However, asm is not a C++ replacement. It just takes longer to develop something in asm then it would in C++, and there is a higher change on errors, simply because you'd have to write more lines of code to accomplish the same.
 
New Member
Joined
Apr 27, 2004
Messages
10
Best answers
0
Java is a scripting languages, that's all there is to it.
 
New Member
Joined
Nov 24, 2001
Messages
692
Best answers
0
just2n said:
Java is a scripting languages, that's all there is to it.
I guess it's true... Never argue on the internet.
Anyways, would you care to add some arguments to that? Or respond to any other points I brought up? I'm actually kinda curious about your 'more advanced than Java' scripting language.
 
New Member
Joined
Apr 27, 2004
Messages
10
Best answers
0
Basically my scripting system is a processor emulator, literally. It's the closest thing i've ever seen to the exact replication of the x86 family processor architecture. Basically things like java which aren't really incredibly well designed for speed or power but more for .. portability and their fame for rarely every crashing or causing the system to bug in some way, aren't up to the standards that this puts out. In fact if you wanted to, you could code a complete windows application in this scripting language and it would only run at about .001 times slower than it's c++ counterpart. How the system works is not by emulating C++ style of code or Java style of code, where you create bytecode which tells the system how to set up code that resembles c++ code in memory then execute that or to execute the bytecode itself using an emulator that's not designed for replication of the duties of ia-32. It runs off of it's own variation of machine code that when run through a translator can actually be changed from binary form to windows executable which will run on windows. By doing so, there has to be excessive code to convert the java syntax like script code into the vmcode and the code used to scan for open modules and look for exported and imported materials such as images, models, sounds, and other miscible data that may be useful. Perhaps 1 module may not contain any code at all but only objects, say it may contain 1000 or so textures.. these textures are to coexist with a certain map. The class that will control the map in the game will import the textures needed from this package by using the PE controller on the VM itself. The VM has it's very own very complex PE system which allows it to map to memory very accurately, emulating windows nearly exactly. This allows the virtual processor to run at near perfect emulation of the real processor as well, along with supporting every register that the real one does as well as debug registers which allow you to debug these applications with modified debuggers. In addition to being a near exact replica of the system it executes on also supports mutative opcodes and encryption to keep data nearly 100% inconspicous from people who would like to reverse it. Each opcode random stage has a seed ranging from 0 to 2^31 in size. The sourcecode itself may have a hidden field known as 'dwSeedForOpcodeTranslation' and one for 'dwSeedForDecryption' which will allow it's decryption and translation on the machine, and since each of these values is generated in a random place each time it is loaded, it adds even more security.

=\... i put a lot of time and effort into this and hopefully it will bring more power to my engine ;p
 
Live free or die by the sword
Retired Forum Staff
✔️ HL Verified
💻 Oldtimer
Joined
Dec 1, 2001
Messages
7,416
Best answers
0
Location
North East Pennsylvania
The only real difference between scripting and coding, IMO is when and where the high level language is interpreted into low level language. They are still both fully functional as a language, and "scripting" as a term is overrated.
 
New Member
Joined
Nov 24, 2001
Messages
692
Best answers
0
@just2n
Sounds ambitious for a scripting language in an engine, good luck.

Let's get back to the topic again now :)
 

Users who are viewing this thread

Top Bottom