Computer Science Canada Starting Programming |
Author: | Fevian [ Wed Feb 21, 2007 10:14 pm ] |
Post subject: | Starting Programming |
Well. I just started programming not too long ago. I began with some command line C++, which I'm novice at. I'm also novice at Visual Basic. I'd really start to make some stuff though, and I'd rather be able to do all interface and everything in one language. I've looked everywhere and I can't find anything about C++ and interfaces and the like. Am I missing something? Can you even do GUIs in C++ or what? Thanks, bye. |
Author: | bugzpodder [ Wed Feb 21, 2007 11:03 pm ] |
Post subject: | RE:Starting Programming |
download visual c++ express edition |
Author: | Fevian [ Fri Feb 23, 2007 2:32 pm ] |
Post subject: | RE:Starting Programming |
I have it. Had it for a while. Is that the only way to do it? No straight coding or anything. I'd really like to know all I can about it. The ins and outs, you might say. Once again, thanks. |
Author: | rdrake [ Fri Feb 23, 2007 3:44 pm ] |
Post subject: | RE:Starting Programming |
You will want to research some GUI toolkits to make your life easier. Big ones include Fox and GTK+. There are extensive tutorials for both of those GUI toolkits on the web, and they are both cross platform as well (meaning your application can have the same GUI written once, and used on Linux, Windows, OS X, etc.). |
Author: | wtd [ Fri Feb 23, 2007 4:19 pm ] |
Post subject: | RE:Starting Programming |
You can certainly write GUIs with just a text editor, and command-line compiler. However, GUI toolkits are usually either big, complex, or some combination of both. IDEs (integrated development environments) are typically constructed to mitigate this problem. I would, however, caution you to avoid GUIs as long as possible. In GUI applications written in C++ and/or VB, the vast majority of the code is incredibly boring boilerplate you insert just to get to the point of a blank window. GUIs sound like fun, but in practice, they are frequently tedious and boring. Also, I would ask if you have had any really good opportunities to check your knowledge. Have you had peer review along the way to see that you're writing decent code? |
Author: | PaulButler [ Fri Feb 23, 2007 4:25 pm ] |
Post subject: | RE:Starting Programming |
I don't know how it rates in terms of difficulty (I haven't programmed extensively with any GUI toolkit), but wxWindows is cross platform. The benefit is that it doesn't draw the components and windows itself, it uses the system's native components. So your application will look like a Windows app on Windows, a Linux app on Linux, and a Mac app on Mac OS. (Actually, the newer version of GTK for Windows uses a Windows theme by default, so this isn't quite as true as it once was.) This also means Windows/Mac users don't have to worry about installing GTK. |
Author: | Fevian [ Fri Feb 23, 2007 4:26 pm ] |
Post subject: | RE:Starting Programming |
I debug it all myself and check it over and over until I'm sure it works. Also, my teacher and friend who is also taking the course with me tell me I'm decent for a beginner. I know how to do certain stuff and I'd like to do more. But I really wanted some info on GUI stuff before I got into it. See what programs and knowledge I needed before proceeding. Any thing else in depth you can tell me. Once again, many thanks. |
Author: | wtd [ Fri Feb 23, 2007 4:29 pm ] |
Post subject: | RE:Starting Programming |
Well... here are the best tips I can share with you. Share your code. Post some programs you've written, even if they're small and seemingly trivial. If nothing else, you'll get style tips. Be humble. If you post your code, you will learn, but part of that process will involve people taking your code and tearing it to shreds. Do not stop at working code. Step back for a little while, then revisit it, and see if there's anyway you could have written it better. |
Author: | Fevian [ Fri Feb 23, 2007 4:42 pm ] |
Post subject: | RE:Starting Programming |
Well, yeah. That's good and all. So I should keep learning all there is about Command Line interface C++ and work hard on it until I'm good. Then go to advanced programming with toolkits and GUIs. I'll be sure to put in my code and stuff here, as you guys are gonna be helping me get good by checking my work and stuff. So, once again, thanks. Please, if any more info about C++ or programming in general at all, or optional paths to go on, post here. I'll read. |
Author: | wtd [ Fri Feb 23, 2007 4:47 pm ] |
Post subject: | RE:Starting Programming |
Toolkits, you have to remember, are typically designed by people who are experts in a particular language. They design their toolkits to take advantage of the most advanced features the language can provide. Understanding a given toolkit is therefore helped immensely by simply understanding the underlying language. |
Author: | Fevian [ Fri Feb 23, 2007 4:54 pm ] |
Post subject: | RE:Starting Programming |
So do what I said. More information appreciated. kthxbai Edit: What I meant by this post is that I should do what I said and study more. More info and stuff is appreaciated. Thanks, bye. |
Author: | haskell [ Fri Feb 23, 2007 9:08 pm ] |
Post subject: | RE:Starting Programming |
An IDE is not particularly needed(on Windows anyways). Your standard Win32 GUI application should be in atleast 2 parts: - Code - Resources Since all of these fancy IDE with Drag and drop GUI designers are just Visual Resource Editors(many are free and very easy to get/use), it is easy to use the command-line(go nuts), your favorite editor(such as EMACS of VIM), and still have your easy to make GUI using resources and a Resource Editor. Only thing is you need a resource compiler(not an issue at all), and then you can just link everything together in a neat little package, where the design is seperate from the code. Doing Win32 GUI applications in this manner simplifies Win32 GUI programming to VB-like levels. Even the labels for the main GUI loop is known by their values used in the resource file(s)(if its done right), and then you just handle the messages with ease, having much less code than if you hand coded the GUI. |
Author: | Fevian [ Sat Feb 24, 2007 10:26 am ] |
Post subject: | RE:Starting Programming |
Thanks a lot. Can you explain on that a little more. I'm not sure I "understood" it all. |
Author: | haskell [ Sat Feb 24, 2007 11:47 am ] | ||||||
Post subject: | RE:Starting Programming | ||||||
A resource script is a sub-scripting language, which bears some similarity to QBASIC, for describing GUI elements. This includes assigning them numerical IDs, names, text, size, etc... When this design is done seperately from the implementation, it is a lot easier to implement the GUI, because all you need to do is cause the window to be drawn, and all the other elements are drawn on. Then, in your main code, you just cause the window to be drawn, and handle the messages from GUI elements. Example.cpp
Example.rc
Example_res.h
This is just a loose example, but it illustrates the point clear enough. |
Author: | Fevian [ Sun Feb 25, 2007 9:46 pm ] |
Post subject: | RE:Starting Programming |
That was so beyond me, it wasn't funny. |
Author: | Martin [ Mon Feb 26, 2007 9:03 am ] |
Post subject: | RE:Starting Programming |
It's not as bad as it looks, Fevian. Keep in mind that all of the words in capital letters are defined (by Windows) outside of that class. If you had a list of what they all actually meant, the code isn't so bad. |
Author: | abcdefghijklmnopqrstuvwxy [ Mon Feb 26, 2007 10:26 am ] |
Post subject: | RE:Starting Programming |
Use .NET for GUI applications. Download C# express edition for free. Google it. Then you will see how easy it is to make a GUI. (It's almost like paint, you just click and drag.) |
Author: | haskell [ Mon Feb 26, 2007 11:13 am ] |
Post subject: | RE:Starting Programming |
Express editions aren't that great. Use SharpDevelop2. Its open source, and its really awesome. It doesn't get any easier than with resources and the switch statement... The resource script is made automatically in a Visual Resource editor(and depending on the editor, the resourse header with the object IDs), which is drag and drop, and then you just make the code to handle the messages. When someone says they are learning C++, they probably aren't going to be too interested in C# and .NET. There are huge fundamental differences between them, and learning one won't help you learn the other(a lot of unlearning and relearning). It is a good idea to expand and try all sorts of new things, hell, if you become a programmer, you probably will have to use .NET at some point. But, it doesn't really fit in with the whole, I wanna do GUIs in C++ thing. |
Author: | Fevian [ Tue Feb 27, 2007 1:18 pm ] |
Post subject: | RE:Starting Programming |
Okay. Say I wanted to start off making some basic apps and then wanted to make a simple game or something. What program or programs would I need to do both? Mind you, they can be two different ones. |
Author: | wtd [ Tue Feb 27, 2007 1:34 pm ] |
Post subject: | RE:Starting Programming |
Well, the realk question here should probably be: Do you want to learn C++, or do you just want a means to an end? If it's the former, you can almost certainly learn better idiomatic C++ by writing console apps, rather than GUI apps. If it's the latter, there are easier ways to achieve that than C++. |
Author: | Fevian [ Tue Feb 27, 2007 4:22 pm ] |
Post subject: | RE:Starting Programming |
How is easier? especially for games. I really wanna make some simple games or get more advanced into it as well. |
Author: | wtd [ Tue Feb 27, 2007 4:35 pm ] |
Post subject: | RE:Starting Programming |
C++ is a big, complex, scary language. This doesn't mean you shouldn't learn it if you want to, but if it's not what you really want, it's likely to discourage you. If you want to make games, and have no problem with being tied to a Microsoft-specific environment, I suggest checking out Tony's blog (compsci.ca/blog) for info on XNA. |
Author: | haskell [ Tue Feb 27, 2007 9:30 pm ] |
Post subject: | RE:Starting Programming |
Yeah... I wouldn't recommend anything until you learn the language. If you don't know a language, nor its standard libraries, than you are basically unable to do anything useful, or anywhere near the calibur I think you are thinking. Programming(especially in languages made for professionals) is not one of those, "Hmmm... I think want to do <enter task here> so I can be <enter title here> and have <enter quantity and object>, and I want it fast, although I am a novice." No, I'm not trying to stop your from programming, if anything I'd encourage it. But there is something that you should probably read: Teach Yourself Programming in Ten Years by Peter Norvig Keep it in prespective. Set goals within your range, then dive in. |
Author: | klopyrev [ Tue Feb 27, 2007 10:08 pm ] |
Post subject: | Re: Starting Programming |
I need to learn C++ for a programming competition that is in 3 or so months. Can anyone recommend a good book to start on? I need a book that focuses on Algorithmic Programming and quickly goes over the basic syntax, data types, functions, etc. I don't need a book that goes in depth on GUI and such. I have four books: "C++ Primer" by Stanley B. Lippman and Josee Lajoie, "C++ Primer Plus" by Stephen Prata, "C++ How To" by Kalev, Tobler and Walter, et Al, and "Object-Oriented Programming in C++" by Robert Lafore. I think the first two are pretty good, but I just can't choose which one. If anyone has any other books they can recommend or know something about these books, please share your knowledge. KL |
Author: | haskell [ Tue Feb 27, 2007 11:09 pm ] |
Post subject: | RE:Starting Programming |
C++ How to Program, 5th Edition. Its a Deitel book, so it covers the fundamentals and then some. Its a great way to spend your first XX number of C++ hours. And, so you can make up your own mind about this partcular book: Table of Contents Chapter 1: Introduction to Computers, the Internet and World Wide Web Chapter 2: Introduction to C++ Programming Chapter 3: Introduction to Classes and Objects And also by Deitel: Introduction to the Standard Template Library The best advice is just to read around the bookstore(or library). Look for something at your level, then go for it. |
Author: | Martin [ Wed Feb 28, 2007 12:45 am ] |
Post subject: | Re: RE:Starting Programming |
wtd @ Wed Feb 28, 2007 6:35 wrote: If you want to make games, and have no problem with being tied to a Microsoft-specific environment, I suggest checking out Tony's blog (compsci.ca/blog) for info on XNA.
Okay, who are you and what did you do with wtd? |
Author: | wtd [ Wed Feb 28, 2007 1:35 am ] |
Post subject: | RE:Starting Programming |
I killed him and stole his identity. Do you want to be next? But seriously, the OP seemed to have no inclination toward cross-platformedness, and seems fixated on gaming. Microsoft + Gaming + Friendly to Novices =~ XNA. |
Author: | Fevian [ Wed Feb 28, 2007 12:13 pm ] |
Post subject: | RE:Starting Programming |
Yeah. I'd really like to be proficient in C++ and some other languages, including some things I could do to make games. If whatever this XNA thing is for Microsoft that is for games apparently, I guess it's worth looking in to? Any explanation of what it is. Btw, I have no intention of rushing. I will keep perspective, but I'd really like to know anything about programming, including languages, usages, and other stuff. Any info you can give me, give me. Aight, thanks. |