Quote:
|
Originally Posted by Raistlfiren The first question I don't really know how to answer. I am not all that familiar with programming. I have done some HTML coding of a website, but that is about it. I have tryed looking into some C++, and have used Visual Basic C++. |
Just to clarify. C++ is one language and Visual Basic is another. Visual Basic C++ would be a mutant stepchild if it existed.
Warning longish-novel-post follows.
Now let's see if we can't help you out with the world of programming. First I would suggest a book called
Simple Program Design. It'll introduce you to programming concepts. The "For Dummies" books can be good but who wants to have a book that's calling you a dummy?
Now, on to some specific questions from your last post.
Quote:
|
Originally Posted by Raistlfiren I was looking at just building my own pi program, that I could run in the background of my server to calaculate pi. A program that I can customize to tell it how much cpu to only use, disc space, and etc.... |
Wow. On the surface this seems like it would be a simple program but it's actually very, very tough. I would actually avoid this one like the plague until you've gotten your feet a bit wetter. The problem is the infinite nature of pi itself. You get into problems with data types, precision, resource allocation (i.e. memory, etc.). You could quickly come up with a program that would crash your system in a second. Universities have cluster farms trying to calculate pi.
"It is interesting to note that even today pi cannot be calculated precisely—there are no two whole numbers that can make a ratio equal to pi. Mathematicians find a closer approximation every year—in 2002, for example, experts at the University of Tokyo Information Technology Center determined the value of pi to over one trillion decimal places."Article on Nova
Quote:
|
Originally Posted by Raistlfiren The other program I was looking at making was my own slideshow picture maker. |
This is an ambitious starting project but not outside the realm of possiblity. You could use the versioning approach with each major version being the addition of a new feature. So version 1 would be a simple interface for displaying the images. Subsequent versions would be the add-ons you described.
Quote:
|
Originally Posted by Raistlfiren I have checked out VB, but it looks a little bit more weird then just typing pretty much everything out in C++. I was just hoping to know and understand more of different programming languages so I can rely more on myself. Make a few programs that are suitable for me and other people... I am just kind of lost though in this whole C++ programming stuff. I look at the very first line and don't even understand #include<iostream.h> or #include<math.h>. I understand most of the bottom stuff, but the top just kind of confuses me. |
This may be the best example of why you should look into VB first. To be truthful my first language was C and VB was about my 5th or 6th. But let's explain the "#include" statements. The statements are used to bring in pre-coded "libraries" into your program. Basically a library is a set of related functions. You bring them into your program so that you don't have to write them from scratch yourself (kind of a "don't reinvent the wheel" thing). Most every higher level language has this "include" functionality. For example in COBOL thier known as "copybooks" and you use the "copy" keyword.
So the "math.h" library contains all kinds of math functions (from basic through some trig if memory serves). The "iostream.h" library contains functions for I/O streaming to the console and I think even to the LPT1 port. Basically it handles writing things to the screen. You make calls to the functions in those libraries passing arguements (parameters) as needed.
The neat thing is that you can create your own library files so that you can reuse code without having to type it from scratch each time. Any function that could be repeated in multiple programs is a candidate for including in a library. This is a big time saver in larger programs.
You can also take a pre-defined library and customize it to your own needs (like stripping out sections you don't need to make your program smaller and faster). Just don't EVER overwrite the standard libraries. You'll be hosed if you do.
Quote:
|
Originally Posted by Raistlfiren What in the heck... I understand a lot of the other middle stuff like case0,case1, case2, cout, cin, and all of that... The bottom code is just weird.... I found the calculator source from this site. |
The problem you appear to be running into is the syntax of the language. Each language has it's own syntax and some are easier to read than others. Your above statement alone is probably enough for me to point you towards VB as your first language. Couple this with either the calculator or graphics display program and VB is even more appealing as your first language.
VB will allow you to seperate the programming of the interface components from the interface functionality. Coding a window from scratch is a major pain in the tush if you don't know what you need to do. It'll also confuse the heck out of a beginner as you need to know about handles, threads, interupts, etc.. It's easier just to let a visual language (Visual Basic, Visual C++, Delphi, etc) handle it for you. The same goes for the components like buttons, labels, text boxes, etc. This way you can concentrate on the core functionality of the program itself.
I would also suggest VB.Net instead of VB6. VB6 is simpler in many respects but eventually you'll end up going to .Net anyway and then you've got another learning curve to overcome. There is even a
learning edition of Visual Basic.Net available online (~$80 US). I think Microsoft was even offering one for download? I'll see if I can find it again.
May I suggest that we concentrate first on the calculator program instead of the graphics browser? This will get your feet wet with the concepts of objects, functions, parameters, and most importantly program flow. Plus the calculator can quickly expand into other projects like a check-book tracker, home expense manager, stock manager, etc. Once you're familiar with the programming approaches then you'll be ready to move on to more ambitious programs. Think of it as the walk-before-you-run approach.
I'll be happy to help you along with the project.
Christopher