Staredit Network > Forums > Technology & Computers > Topic: Learning to program
Learning to program
Sep 7 2011, 11:19 pm
By: Jack
Pages: < 1 2 3 >
 

Sep 9 2011, 12:53 am O)FaRTy1billion[MM] Post #21

👻 👾 👽 💪

Quote
It's also refreshing to come back to some old code and have it organized in a way that doesn't require you to sift through every line just to understand what is going on.
I don't have to, though. ;o I've just opened random projects from years ago and still remember everything that is going on in there.
My programs aren't totally chaotic ... I just don't actively try to make my code cohere to some sort of pre-determined standard (well, anything more than: Is it concise? Does it run fast?).

Also nothing I write seems difficult or complicated at all ... Just in my typing-random-functions-without-any-prior-planning-or-algorithm-design things tend to come out really simply and to-the-point. ;o



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Sep 9 2011, 12:59 am Jack Post #22

>be faceless void >mfw I have no face

@roy the OS project is a game engine, it's in C++. I'd probably start off with small additions like shaders and such.

When I say SC1 and 2 mapping and modding tools, I mean actual tools like .m3 exporters, an EUD project I have in mind, etc. I have dabbled in programming before and know about OOP, indenting and commenting, basic C++ syntax, it's just making a working useful program and actually using my basic knowledge to accomplish something.

BTW is it a good or bad idea to use visual c++? Or should I use a different IDE?



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Sep 9 2011, 1:33 am The Starport Post #23



Honestly, it doesn't matter that much which IDE you use as long as you know how to use it well.



None.

Sep 9 2011, 1:45 am xAngelSpiritx Post #24

eternal lurker

Quote from Jack
When I say SC1 and 2 mapping and modding tools, I mean actual tools like .m3 exporters, an EUD project I have in mind, etc. I have dabbled in programming before and know about OOP, indenting and commenting, basic C++ syntax, it's just making a working useful program and actually using my basic knowledge to accomplish something.
Ah, my mistake. And yes, VC++ is fine.
If you know the basic syntax and concepts, may I ask what's really keeping you back?

For example, if I wanted to make a .m3 exporter, the first thing I would do, after making the design layout and whatnot, is read up on the .m3 format. I'd do this to learn what data goes where in the file, why it's there, and what it's used for. Then, I would write the code using I/O streams to read data to and from .m3 files, using the format I read up on. The rest is just making a GUI, extra options, and whatnot, which can all be done once the basic functionality is complete.

Are you just having trouble knowing where to start working on a project, or is it something more specific than that?



None.

Sep 9 2011, 3:10 am Roy Post #25

An artist's depiction of an Extended Unit Death

Quote from Jack
BTW is it a good or bad idea to use visual c++? Or should I use a different IDE?
Visual C++ requires the .NET Framework; you might as well be programming in C# I was thinking of the CLR. What IDE are you using? I don't know any that support Visual C++ but not plain C++.

Post has been edited 2 time(s), last time on Sep 9 2011, 1:43 pm by Roy.




Sep 9 2011, 3:45 am Lanthanide Post #26



Visual C++ is a strict superset of C++, so any IDE for VC++ will also support C++.

If you were only interested in doing C++ though, then a VC++ IDE could add extra annoying bells and whistles that get in your way.



None.

Sep 9 2011, 4:25 am Jack Post #27

>be faceless void >mfw I have no face

Quote from xAngelSpiritx
Quote from Jack
When I say SC1 and 2 mapping and modding tools, I mean actual tools like .m3 exporters, an EUD project I have in mind, etc. I have dabbled in programming before and know about OOP, indenting and commenting, basic C++ syntax, it's just making a working useful program and actually using my basic knowledge to accomplish something.
Ah, my mistake. And yes, VC++ is fine.
If you know the basic syntax and concepts, may I ask what's really keeping you back?

For example, if I wanted to make a .m3 exporter, the first thing I would do, after making the design layout and whatnot, is read up on the .m3 format. I'd do this to learn what data goes where in the file, why it's there, and what it's used for. Then, I would write the code using I/O streams to read data to and from .m3 files, using the format I read up on. The rest is just making a GUI, extra options, and whatnot, which can all be done once the basic functionality is complete.

Are you just having trouble knowing where to start working on a project, or is it something more specific than that?
Well, I don't know how to open an m3 file, edit it, and then save it. I barely know how to write to a txt file. I know how to, say, make a function but I don't know how to make the program do anything functional, whether that's visual output or file output. Best I know how to do is printf answers to questions, for example.

I think I'll end up using code::blocks so I can work with wxwidgets as I like crossplatform functionality.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Sep 9 2011, 5:08 am shmeeps Post #28



TL;DR'd this topic:

Don't worry about learning a language. In fact, this is probably the most mis-interpreted skill ever. People seem to idolize someone else when they say "Oh, I can program in C, C++, Java, PHP..." etc, like the number of languages someone knows is directly correlated to how big their dick is. Truth is, this has nothing to do with programming. I could take a language that I have never seen before and master* it within a week, if not less, with absolutely no problem simply by applying what I know about functional programming to the language. Most modern languages are INCREDIBLY similar, and you can easily apply what you know about a programming language you already know to the programming language you are trying to learn. The fundamental underlying concept to any programming language is problem solving, which is what you should focus on.

The easiest way to begin programming is to just pick a language. Managed languages (C#, Java, Vala, J#, D) are easy to start with and provide a good foundation for learning a programming language. These languages are usually fairly easy to newcomers because they guide you in the right direction by not allowing things that would normally be considered illegal that many "expert" programmers may abuse for simplicity of efficiency. However, if you would like to dive right into it, learning a language like C++ (which is what I started with about 11 years ago) is definitely recommended. Simply put, while using one of the previously mentioned languages may stop you from doing something stupid, using C++ forces you to learn not to even think about doing things stupid, because you'll learn quite quickly after spending days debugging something about what you should and should not do.

I would also recommend web programming as a good place to start. It's easier to create smaller scripts here, because you don't have to be concerned with any OS independent implementation, or anything like that. PHP, a common web programming language, is very much like the C/C++ programming languages, but gives you some leeway on what you can do. PHP programming is also event-based, meaning that actions and only happen if a user prompts it (for instance, such as loading a page, clicking a button, etc. Event based programming is very easy to learn, because you have an incredibly clear flow of program.

As for what you should start programming, you tell me. You could follow a tutorial if you'd like, especially if following a tutorial complements your learning style. This is a very good way to learn the basics, but there is only so long you can just follow a tutorial. There are generally two ways I suggest to begin programming. The first, in keeping with the problem solving theme, think of something that you would like to automate, and try to apply that to programming. For instance, I created programs for my Algebra classes back in High School that could take certain inputs and then solve the problems, complete with showing work. I eventually extended these to working with Pre-Cal, Calculus and Linear Algebra problems as well. It had nothing to do with not being able to do the math, I just didn't want to be bothered with it.

The second way would be to find something you want to work on. There's no point in learning if you will only program things that you have no interest in. For instance, the first, fully functional program I wrote was a re-creation of the old web-based Starcraft RPG game (SCRPG). It worked. Mostly. It was also incredibly shitty, but I learned alot from it.

Finally, if you really want to learn programming, you'll need help. Begin to familiarize yourself with your languages documentation (another reason I recommend C# or PHP, because they have amazing documentation, which Java does not), and sign up for some sites such as Stack Overflow, which can help you out immensely.

Just some tidbits from what I skimmed through:
  • Shaders are not child's play, you need to know quite a bit about graphics programming before being able to make anything remotely complex.
  • A functional Game Engine is even more complex, even in the bare minimum. I would advise you not to start here, unless you wish to create a simple game from a simple engine that is already provided for you.
  • Visual C++ does not require .NET, only the CLI version does. You can develop native, MFC, Win32 and ATL applications without C++
  • Don't use Java. Please.
  • Visual Studio is probably the most powerful IDE you'll find, but power != best. Find one that you like, there's plenty of free ones around.
  • You can get free MS Software from DreamSpark

About me: I'm studying for a goddamn Ph.D. in Software Engineering.

Anyways, gotta run, might post some more later.



None.

Sep 9 2011, 1:40 pm ShadowFlare Post #29



Yeah, Visual C++ is the name of a program, not a language. All versions of the Visual C++ IDE allow you to create C++ programs that do not use the .NET framework. Of course, you do have the option of writing a C++ program that uses the .NET framework.



None.

Sep 9 2011, 1:49 pm shmeeps Post #30



Yes, and if developing for Windows, .NET is a great way to start because it takes away a lot of boilerplate code (stuff that is identical between projects that you have to keep re-writing).

A few other things
  • Don''t worry about cross-platform stuff right now. Build for your OS until you get the hang of things. In fact, this should never be a reason for programming, as it can always be added in later (albeit, with some hassle. However, it is not the hardest thing in the world to do). Also, never choose a language solely on the fact that it is cross-platform (IE, Java).
  • Don't worry about having a plan. I know someone mentioned the Waterfall Development Cycle earlier, truth is, you don't need that. At least right now. The programming paradigm you'll most adhere to when starting out is called Code and Fix, where you code, test it, and fix it. You don't need a good methodology unless you are working on something bigger (IE, an open source project), and even then, Waterfall is a terrible choice.
  • Get the basics down before anything else. Don't worry about file spec, graphics, GUI, or anything until you can make a fully functional command line program. This teaches you how to program instead of worrying about a pretty interface. Once you can program, its fairly easy to add in a nice GUI, especially if you are using a Visual Language.




None.

Sep 9 2011, 2:00 pm Roy Post #31

An artist's depiction of an Extended Unit Death

I suggested Waterfall because it follows a structured pattern that is close to how our educational system treats projects. It's not always a terrible choice, depending on the project, but as any methodology, you shouldn't just follow it by the letter, and instead adapt to what the project needs.




Sep 9 2011, 3:59 pm MadZombie Post #32



Quote
Don't use Java. Please.
Why? Not even as a first language?



None.

Sep 9 2011, 4:38 pm The Starport Post #33



Quote from MadZombie
Quote
Don't use Java. Please.
Why? Not even as a first language?
One potential reason: Oracle. :/



None.

Sep 9 2011, 5:20 pm MadZombie Post #34



Quote
Oracle
:wtfage: ?



None.

Sep 9 2011, 6:06 pm shmeeps Post #35



Quote
I suggested Waterfall because it follows a structured pattern that is close to how our educational system treats projects. It's not always a terrible choice, depending on the project, but as any methodology, you shouldn't just follow it by the letter, and instead adapt to what the project needs.
It's not a bad development method, it's just outdated. Furthermore, most starting programmers want to sit down and code, not plan everything out first, and in the scope of what they are doing (usually small scripts or a small program at most), that is fine, and is an easy way to learn programming because you get instant feedback. I agree that Waterfall does have a place in programming, however, it doesn't show up often, and then only in a "professional" environment. Most modern development methods now related to Waterfall use some form of Waterfall hybrid, such as combining Waterfall and Agile or Waterfall and Prototyping, because people want results as early as possible, and this would be the quickest way to stick with a Waterfall-esque cycle, but have tangible results.

Quote
Why? Not even as a first language?
Java is a terrible language. It has decently good OO concepts, which is good, but it has many short comings.
  • The biggest reason is performance, but this is not applicable to a beginner programmer.
  • Piss poor documentation. Someone who is beginning programming needs clear and concise documentation, not the long and drawn out shit Java generates.
  • Java seems to emphasize flow control via exceptions, which is not intended use, and is a poor coding practice.
  • Java's "Garbage Collector" does not clean up alot of things it should. In programming, as in life, you should always learn how to clean up after your self.
  • Efficient GUI building is a chore. Compare to any MS Visual Language, and you'll see why they are far superior.
  • Cross platform is not a reason to use a programming language. That's like saying anal sex is the best method of copulation because it works on any gender. Furthermore, if you write ANSI C/C++, it will work on any platform.
  • Owned by Oracle. Oracle cannot keep up with current practices, and what Oracle says goes, instead of having a committee based revision system like most languages.
  • Java 8 is riddled with bugs, and most practical applications are being overcome by other methods (Visual Languages, C# especially, HTML5, etc).

This does not even include lack of closures, or more advanced topics.

Fun Java links here.



None.

Sep 9 2011, 6:27 pm Centreri Post #36

Relatively ancient and inactive

Quote from shmeeps
Cross platform is not a reason to use a programming language. That's like saying anal sex is the best method of copulation because it works on any gender.
I'm stealing this, true or not.



None.

Sep 9 2011, 6:29 pm The Starport Post #37



Cross platform = anal sex? :lol: Troll analogy is trolling.


One redeeming feature of Java is ironically that you don't even have to use Java; any language that can compile to Java bytecode is available as well.

But yeah, Oracle kinda ruins it for me.



None.

Sep 9 2011, 6:40 pm shmeeps Post #38



Quote from name:Tuxedo-Templar
Cross platform = anal sex? :lol: Troll analogy is trolling.

One redeeming feature of Java at least is ironically that you don't even have to use Java; any language that can compile to Java bytecode is available as well.

But yeah, Oracle kinda ruins it for me.
Non-Troll ;) Okay, I admit it's a little much, but it's how I feel about it, since any language CAN be cross platform with a bit of work.

And yeah, Generics in Java. *Shudder* I only left them out of the list since they aren't really "beginner" material.



None.

Sep 9 2011, 10:59 pm Apos Post #39

I order you to forgive yourself!

Quote from shmeeps
  • The biggest reason is performance, but this is not applicable to a beginner programmer.
  • Piss poor documentation. Someone who is beginning programming needs clear and concise documentation, not the long and drawn out shit Java generates.
  • Java seems to emphasize flow control via exceptions, which is not intended use, and is a poor coding practice.
  • Java's "Garbage Collector" does not clean up alot of things it should. In programming, as in life, you should always learn how to clean up after your self.
  • Efficient GUI building is a chore. Compare to any MS Visual Language, and you'll see why they are far superior.
  • Cross platform is not a reason to use a programming language. That's like saying anal sex is the best method of copulation because it works on any gender. Furthermore, if you write ANSI C/C++, it will work on any platform.
  • Owned by Oracle. Oracle cannot keep up with current practices, and what Oracle says goes, instead of having a committee based revision system like most languages.
  • Java 8 is riddled with bugs, and most practical applications are being overcome by other methods (Visual Languages, C# especially, HTML5, etc).
  • Java was slow in 1995, this is 2011. I have yet to see actual benchmarks done correctly.
  • Java has one of the best documentation. Via Javadoc (Saves lot of time later) and the official documentation. If you can't bother searching, don't bother learning.
  • If something unexpected happens in your program, this can sometimes lead to very big security issues. It is a good practice to have some sort of escape plan (Especial with a program that can be ran on multiple platforms.).
  • Just because there is garbage collection in Java doesn't mean you don't flush and close. On the other side, the Garbage First is pretty amazing.
  • Never heard of Netbeans? Also, Swing has a very good architecture.
  • As time goes by, people start to use more and more
  • Cross platform is a reason in itself to use a programming language. As time goes by, more and more people use different OS with different hardware. It becomes a programmer's nightmare to be able to provide a program that works for everyone.
  • Can't really say anything here.
  • Java 8?

There were five primary goals in the creation of the Java language:
  • It should be "simple, object-oriented and familiar".
  • It should be "robust and secure".
  • It should be "architecture-neutral and portable".
  • It should execute with "high performance".
  • It should be "interpreted, threaded, and dynamic".

Java is a mature programming language and it definitely teaches good programming practices.




Sep 10 2011, 12:00 am Lanthanide Post #40



Anyone who thinks they're doing waterfall and hasn't had proper training, really will not be doing proper waterfall.

If you say "do waterfall" to a beginner, they'll get the idea that they need to do some design up front before they start coding, but you should do that no matter what process you're following and that by itself is not "waterfall".

So really: try and do some design for what you want your program to do before you start writing the code. If you've got some long-term plans, then you can try to design your early stuff so it will be flexible and easy to extend later on.



None.

Options
Pages: < 1 2 3 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy