How To Write A Program
#1
Posted 19 March 2005 - 07:55 AM
In all, Im asking if there is a basic program where a 'new guy' like me can learn how to write out program scripts, and then execute them.
Hopefully Id like to learn flash etc, but one step at a time.
#2
Posted 19 March 2005 - 02:29 PM
With Flash, you might just want to buy a program or get some shareware/freeware off the internet.
#3
Posted 19 March 2005 - 06:32 PM
If you want to program, go with either C++ (which can compile C programs as well) or VisualBasic.NET. Both are among the most common and powerful languages in the industry so far. You might also want to try D, a small project designed to create the successor to C++ (though why they don't call it E is beyond me).
I wouldn't recommend Java. It's a programming language that combines the best features of C++ and Scheme. Unfortunately, it's hideously complex when you reach the more advanced features.
Another option is Assembler, the mother of all high-level programming languages. It's a mere step above native machine code. If you intend to be a programmer, it will force you into a strict dicipline of polishing your code until it shines, and being proficient in ASM looks excellent on a resumé. It's so simple, that your code needs to be incredibly complex. Heck, there are even different versions for different platforms and different processors. Only go with it if you have the will and motivation to sharpen your skills to the molecule, metaphorically speaking.
Anyway, before you can do anything at all, you need a complier for any given language.
#4
Posted 19 March 2005 - 06:37 PM
You may want to start with Object oriented programming to see how a program works, however, a good place to start is C.
Max will tell you/reccomend some good things for you to learn.
#5
Posted 19 March 2005 - 07:07 PM
Tachyon360, on Mar 19 2005, 06:32 PM, said:
Err....well, my Dad does have a huge booklet for VisualBasic.NET (he does alot of programming).
Well, I also do have a computer program that my mom bought that is called Instant.EXE. It can teach how to do PC programming. I don't use it too much, but if I begin using it more often soon, maybe I can show some examples of programming in this very topic. (The problem is that some people use programming language, specificly VisualBasic.NET, to create viruses and such.)
#6
Posted 19 March 2005 - 07:48 PM
Perl is NOT an easy language, it is one of the most complex and cryptic scripting languages there is. It's not really a programming language anyways, it's in the same class as PHP as a web scripting language.
C/C++ and Java are the current "big-name" programming languages. They are both object oriented, which simply denotes the style of programming. The other style would be "procedural", which means it just runs through commands in order, much like how TI-BASIC works. Nevertheless, almost all languages are or have an aspect of object orientation.
If you want to get started with computer programming, you'd be smart to start off with C or Java if you are serious, or Visual Basic (6 or .NET) if you just want to have fun and make relatively simple things (though VB has the potential to do some really complex things as well).
If you have any more specific questions just post and I'll do my best to answer them.
#7
Posted 19 March 2005 - 08:20 PM
How do you make/view .DLL files? Iv always wondering how they encrypt them.. XD They just show up in some weird ASCII symbols whenever I open them up in Notepad..
#8
Posted 19 March 2005 - 10:06 PM
That still doesn't explain Flash. If I can do something besides get a $100 program for it, I'd be willing to start working with it becuase its mostly for creating animation. Max, do you know anything about it?
#9
Posted 19 March 2005 - 10:12 PM
#10
Posted 20 March 2005 - 09:15 AM
(Have I heard.. O_o)
I agree with Max, Java would be the best place to start..
Or PHP, php and java is very simular..
But is C OO? I think C is not...?
#11
Posted 20 March 2005 - 11:10 AM
Quote
C is action-oriented, and C++ is an upgraded version of C with robust and powerful object-oriented features. Most versions of BASIC I've seen are almost purely action-oriented, though I believe Microsoft added some decent object-oriented features with VB.
I don't have any experience with VisualBasic, but it sounds to me like you're describing some sort of system that Microsoft came up with to simplify the process of making a VB app. I do know for certain, however, that VB still uses a set of commands that must be inputted into the compiler in one way or another, just like any high-level programming language.
Moving on, Java is also object-oriented, but it's in the grey area between a scripting language and fully-fledged programming language. Rather than compiling to native machine code, it compiles to a generic byte code, which is then interpreted by interpreters compilied in native machine code for their respective platforms. For the sake of security and platform-independence, many features were restricted or omitted. As a result, you'd be hard-pressed to make anything particularly elaborate in Java, and the performance of your apps likely won't match that of languages compiled to native machine code. As I've said before, it's quite complex, with many commands to learn, so I wouldn't recommend it until you'd at least get a feel for C++ or SCHEME.
And Max, I've seen VB do some pretty impressive things. If Microsoft is putting so much behind it, there's gotta be something to it, wouldn't you say? BASIC is simple to grasp, but VB has some real potential. Correct me if I'm wrong, but as far as different versions of BASIC go, isn't VB the industry leader?
#12
Posted 20 March 2005 - 01:18 PM
#13
Posted 22 March 2005 - 03:27 AM
I understood some of them posts.
To tell the truth, I'd really like to learn Java, as it is quite widely used etc; but as many have said: Its complex.
What program should I get to start off with it? If there is one.
#14
Posted 22 March 2005 - 04:17 AM
Here is a tut..
You might want to download eclipse to..
http://www.eclipse.o...loads/index.php
Java is a good choice!
#15
Posted 22 March 2005 - 02:36 PM
I suggest C++. It's what I started with, and it's simple enough. Just get a decent textbook, and not one of those bookstore "Teach yourself C++" books. The book has to be informative, clear, focused, and the style of writing can't be boring. You also need to watch out that you don't get a book outlining the old standard.
How to tell? Look for the first few lines of code the book provides. If it's the old standard, it would look something like this:
#include <iostream.h> void main () { cout << "Hello world."; }
The new ANSI standard would look something like this:
#inculde <iostream> using namespace std; void main () { cout << "Hello world."; }
Or like this:
#include<iostream> void main () { std::cout << "Hello world."; }
The differences aren't dramatic for simple code, but it does allow for vastly better organization for more complex projects.
#16
Posted 23 March 2005 - 06:58 AM
BTW: Isn't Assembly awful hard to learn..?
#17
Posted 23 March 2005 - 07:18 AM
And I never said anything about learning PHP. I said C++. There's a huge difference there.
#18
Posted 23 March 2005 - 11:55 AM
Tachyon360, on Mar 23 2005, 08:18 AM, said:
Well, actually, if you look at PHP and C++, there isnt much as a difference other than C++ isnt made for the web while PHP is.
#19
Posted 23 March 2005 - 06:01 PM
#20
Posted 24 March 2005 - 08:29 AM
Tachyon360, on Mar 23 2005, 01:18 PM, said:
I know.. I said it.. :angry:
Didn't you sugest Assembly in you're first poste?
#21
Posted 24 March 2005 - 08:54 PM
And I only listed Assmbler as a possibility, not a suggestion.
#22
Posted 25 March 2005 - 05:15 AM
To start learning Assembly as your first program language, should not be an option..
I'm sorry if I didn't make my self clear enough.. :o
#23
Posted 25 March 2005 - 05:47 AM
Max, on Mar 23 2005, 07:01 PM, said:
Ah. XD Well I only thought that becuase my PHP Book (Programming PHP) said that alot of functions were based on some C++ functions... ^^; Too bad I cant understand that darn 'Write Your own C++ Extensions' chapter. XD
#24
Posted 25 March 2005 - 09:11 AM
Kubjelle, on Mar 25 2005, 06:15 AM, said:
Assembler is always an option as is just about anything else. What, are you suggesting that it should be banned from people that don't know other programming languages? Try telling that to the people that had to use Assembler before any high-level languages came along.
I'll say it again: it's a possibility, not a suggestion. Furthermore, Assembler in and of itself is not difficult. In fact, it's probably the simplest language out there. It's difficult because of its simplicity. The code gets disproportionately more complex with the complexity of the program.
#25
Posted 25 March 2005 - 10:15 AM
What I mean with learning PHP first is that it's simpler then Java, and isn't very diffrent. So to first learn PHP and then make the next step and move on to Java.
So I said that you've probably right, that he shouldn't start with Java, so I suggested he started with PHP.
Then you missunderstood me and said that you never said he should start with PHP. Then I said that I know that you didn't say it, I said it.
Assembly is an option but it should not be an option to one that wants to learn how to program.
So I don't understand why you mentioned Assembly in your post. There is so many options, Ruby, Pascal, Phyton and many more. It's okey that Assembly is a option, I've never dissagreed with that. But there is so many options.. :D
Have I made myself clear enough?(No harsh voice here)
#26
Posted 25 March 2005 - 06:20 PM
For those who don't follow what is going on, Assembly (which has heretofore been semi-incorrectly referred to as Assembler) is the name given to the language which is just above machine code (1's and 0's) and is extremely difficult for the uninitiated. If Assembly is something you might be interested in, go buy one of Knuth's classic computer science algorithm books.
Again, PHP is a web based scripting language, not a programming language. It is a bad idea to start with PHP because it will engrain many bad programming practices. You may have seen C++ mentioned with PHP because PHP is written in C++, and thus uses many of its functions. However, they are very different in terms of structure and tasks they are good for.
Finally, like has been previously stated, your best bet is to start with Java or C++ (or C, which is best IMO, but people think is too hard). These two are the two most common languages these days, and so you can find the most help if you have problems or trouble.
#27
Posted 25 March 2005 - 09:25 PM
And Max, I've heard it called both ways quite frequently, so I don't see how Assembler is "semi-incorrect." Seems to me like it's more a matter of personal preference than anything else.
#28
Posted 29 March 2005 - 01:29 PM
But I think Assembler is the name of the program who turns the assembly code to hex. I don't know..
Max: Before Assembly they didn't write in 1's and 0's, they wrote in hex.
#29
Posted 29 March 2005 - 02:27 PM
The C++ compiler though doesnt let u see the output unless you have a system pause thingy at the end...
Anyways ya C is good and pretty easy:
#include <stdio.h> int main() { printf("Hello World\n"); return 0; }
simple as that ^^
Edit: I will upload a program I did in C++ so you can see some of its power, its not done, just play through it if you want, it has secrets, and unlockables, but you probably wont play it cause it is kind of boring >> it is a poor attempt at a text-based RPG.
#30
Posted 29 March 2005 - 04:24 PM
Quote
Yes, but it lets you do anything the CPU can do. No real limit. You have to keep track of memory storage though (not that you don't ever have to with anything else).
Here is a "program" for C++ that I learned:
int count = 0; Record[] r = new Record[10]; while (!in.eof) { Record rec = readRecord(in) // helper method if (count >= r.length) { Record[] newArray = new Record[2*r.length]; for (int i=0; i<count; i++) newArray[i] = r[i]; r = newArray; } r[count] = rec; count++;
I read in records until the array is full, then when it IS full, it creates a temp. array twice the size of the current one, copy over all the data from the current array and moves all my pointers to it so my temp. array takes the place of the original.
#31
Posted 29 March 2005 - 05:01 PM
#32
Posted 29 March 2005 - 05:07 PM
Quote
Thanks, but I didn't want to there. I originally wanted this for a mailbox where regular users can hold 10 messages but the admin can hold an infinity. But I didn't want to make a new code.
#33
Posted 29 March 2005 - 05:11 PM
#34
Posted 29 March 2005 - 08:06 PM
Kubjelle, on Mar 29 2005, 02:29 PM, said:
Yeah, an assembler is used to create programs out of assembler code, but Assembler in and of it self seems to be interchangable with Assembly. I just think Assembler sounds better, so that's what I use.
#35
Posted 06 April 2005 - 09:30 AM
http://www.adenu.com/programs.htm
um ya, do whatever u want with it, i need Visual Studio .net to compile my big one, to lazy to install it(freezes comp)