Want to learn basic programing

Started by Ryex, October 05, 2009, 12:35:15 am

Previous topic - Next topic

Ryex

I want to learn basic programing aka I want to make small programs like PNO launcher or game_guy's default menu thing.

so first a few questions

1. what languege should i use, i want one that once "compiled" or in exe form it can be uses on any windows computer regardless of pre installed stuff like .NET.
also what programs (if any) will i need in oarder to create working programs in said language
2. what exactly dose compile mean? I think it was something to do with creating the exe but I'm not entirely sure. also so dose one do it?
3. am i even asking the right questions?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

Well I started off using Visual Basic which was used to make my DMSE. I think Visual Basics one of the easiest to learn. Then when you think you're good enough in it go onto c#. Which is what I did. Here's the visual basic compiler

http://www.microsoft.com/express/vb/Default.aspx
And yea compile means turn it into exe I think lol

Anyways its really easy to learn, it even comes with making a basic web browser tutorial. THis is what I started with and I'm not saying you should start with it but I'm just recommending it.

winkio

C++ and Java are the two most used starting languages from what I've seen.  I'd use C++, because it's the better language in my opinion, but different people like different styles.  And then there's the fact that C++ is pretty much the standard for a lot of programming related things because of it's speed and power.

It's better to use either C++ or Java than Visual Basic because C++/Java are so much more useful, even though they are slightly tougher at first.

Compiling is where you transform the text code into a file (or files) that can be run, not necessarily a .exe

There are so many right questions to ask that pretty much anything programming related would get you the answer you wanted.  Just start in C++, find some tutorials on console applications until you get the syntax and usage down, then go to windowed applications.

Ryex

sooo... I started off with c# and made a program and handed it out freely on the internet would people be able to just click the exe and have it run with out having to make sure they had other stuff installed?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

well it does depend what framework you used to make the program. You can select it by going to Project > Properties
Then theres an option called Target Framework, change that to 2.0 so most people should already have 2.0

But I always build my stuff in 3.5 because theres things in the 3.5 you cant use in 2.0

Blizzard

October 05, 2009, 09:52:06 am #5 Last Edit: October 05, 2009, 09:54:08 am by Blizzard
Usually C# installers have the option to let people download .NET over the internet when installing the app. You can "publish" your application via Visual Studio (it's in the project's Properties section) which actually creates that installer.
I suggest using 2.0 if you can because, like G_G said, most people have 2.0. I prefer using it myself since I rarely need the additional stuff from 3.0 or 3.5.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Fantasist

I second winkio's opinion. Unless I'm wrong, you already have considerable experience with RGSS, so if you want to take your programming skills to the next level, learn C++. I'm actually re-doing my C++ lessons from last year (in college), because I want to be an adept with the language. The shift from Ruby to C++ can be a bit intimidating at first, but you'll get used to it. I use Visual C++ for the IDE. It's free and it's awesome. Eclipse is another good IDE (so I heard, never tried it though). Eclipse is free too btw.

PS: I don't know if it's just me, but I just LOVE the speed of C++ after using Ruby.

PPS: Forgot to mention Python. It's worth looking into.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




fugibo

Compiling is simply the process of transforming some kind of human-readable code (C, C++, VBasic, C#, Java, Obj-C, anything) into some kind of bytecode, which will be typically stored in a format that can be executed (.EXE, Mach-O executable, ELF, all sort of like a the BMP format, but for programs, if you get what I'm saying), and will be in some sort of architecture (ie i386, x86_64, JVM, etc) that can be executed either in a VM or natively on a processor. It's a very, very complicated process that you shouldn't worry about until you get waaaay more advanced.

Fantasist

Noob version of Compiler explanation:

The code the programmer wrote is called the "source code". Now, programmers code instructions, and the processor (which is supposed to execute these instructions) cannot understand the source code. The processor can only understand binary code, and the compiler does the job of converting the source code to a binary "executable", which the processor can actually execute. The whole thing gets complicated due to the fact that different processors are of different kinds, and though they all understand binary code, there are variations in the way they are interpreted. The best example is the 32-bit and 64-bit processors. A program made for a 32-bit system won't work on a system with a 64-bit processor for this reason. If you have the source code though, you could compile it into any type of executable you want, if you have a compiler that can do the job.
Besides all of this, today's compilers also do stuff like optimization.

That's about what I know, I could be wrong in a few details.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




fugibo

Quote from: Fantasist on October 05, 2009, 10:21:41 am
Noob version of Compiler explanation:

The code the programmer wrote is called the "source code". Now, programmers code instructions, and the processor (which is supposed to execute these instructions) cannot understand the source code. The processor can only understand binary code, and the compiler does the job of converting the source code to a binary "executable", which the processor can actually execute. The whole thing gets complicated due to the fact that different processors are of different kinds, and though they all understand binary code, there are variations in the way they are interpreted. The best example is the 32-bit and 64-bit processors. A program made for a 32-bit system won't work on a system with a 64-bit processor for this reason. If you have the source code though, you could compile it into any type of executable you want, if you have a compiler that can do the job.
Besides all of this, today's compilers also do stuff like optimization.

That's about what I know, I could be wrong in a few details.


My 64-bit Core 2 Duo is running 32-bit Safari right now. While running 64-bit Chess in the background. While it is true that usually one processor cannot run two different architectures natively, i386/x86_64 is an exception, since x86_64 is just an extension of i386.

Also, you're wrong about the source code, since languages like C let you include assembly in them (which obviously will only compile for one architecture), and some data types are different on different architectures, which can lead to weird bugs. However, if you program properly, it will usually compile for whichever platform you choose.

Also, like I said, executables also usually come in a specific format (such as .EXE), which allows for the kernel to execute it properly.

Fantasist

October 05, 2009, 10:50:00 am #10 Last Edit: October 05, 2009, 10:53:30 am by Fantasist
Ah, thanks :)
I was hoping someone would fill me in on the obvious ;)

EDIT: Don't get me wrong, I was not being sarcastic. I was just admitting my lack of knowledge of the obvious o.o

EDIT2:
QuoteMy 64-bit Core 2 Duo is running 32-bit Safari right now. While running 64-bit Chess in the background.


I swear I knew this was possible, but was just not sure...
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




winkio

Just an FYI: C# is ridiculously similar to Java, which means that it's still a very good choice :)  The transition from C# to Java takes almost no effort, so :).  One thing you do need to get the hang of are public, private, and protected.

Blizzard

Quote from: Fantasist on October 05, 2009, 10:50:00 am
EDIT2:
QuoteMy 64-bit Core 2 Duo is running 32-bit Safari right now. While running 64-bit Chess in the background.


I swear I knew this was possible, but was just not sure...


Emulation or similar instructions (which would be conversion of instructions from 32 bit to 64 bit). It doesn't work on everything, though. :/
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

so if I made a c# and distributed it to the public what is the chance that some one would not b able to run it if they have a computer made in the last 5 years?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

fugibo

Quote from: Ryexander on October 05, 2009, 08:21:54 pm
so if I made a c# and distributed it to the public what is the chance that some one would not b able to run it if they have a computer made in the last 5 years?


None, unless they're idiots. .NET only requires XP, I think, and that's been out since 2001.

Ryex

cool. it seems I'm now headed down the road to learn c#
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

fugibo

Quote from: Blizzard on October 05, 2009, 02:13:02 pm
Quote from: Fantasist on October 05, 2009, 10:50:00 am
EDIT2:
QuoteMy 64-bit Core 2 Duo is running 32-bit Safari right now. While running 64-bit Chess in the background.


I swear I knew this was possible, but was just not sure...


Emulation or similar instructions (which would be conversion of instructions from 32 bit to 64 bit). It doesn't work on everything, though. :/


x86_64 is an extension, i386 can run natively on the processor. (At least, that's how I understand it.)

Blizzard

I'm not really sure how it works. I didn't have any interest in it so far so I don't know.
You're probably right with it running natively.

@Ryex: If I remember right SP2 has .NET 2.0 included. I might be wrong, though. In any case the installer should solve the problem by just downloading 2.0 if somebody doesn't have it installed. In Blizz-ABS Config I distributed the executable without any installer to make it as simple as possible. But because of that people who don't have .NET 2.0 have to download it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.