|
Post by trikmit on Nov 18, 2005 0:54:56 GMT
I need help to write a program that will compute the tax for people when you input their wages and hours amoung other things. If any one can help I will give you more details. Thanks in advance Email me at trikmit@hotmail.com
|
|
buff1
New Member
Posts: 3
|
Post by buff1 on Nov 18, 2005 1:12:40 GMT
We wont write the program for you. We dont do homework.
But if you get the program started and post the code we will help you with it.
|
|
|
Post by trikmit on Nov 18, 2005 1:26:53 GMT
How do I start coding. This is just the begining of class and over 80% of the class already does programming and I have not done any at all. Where can I get a book or something on it my school book is on intro to programming not any specific language but he said we will work with basic
|
|
buff1
New Member
Posts: 3
|
Post by buff1 on Nov 19, 2005 4:12:08 GMT
You need to have Qbasic or QiockBasic on your computer first of all. Then click on it and it will go to an editor. That's where you type in the code.
A good start is to look through the help at the index and look at most of the things there (click on them to get definition/syntax etc.
You can find Qbasic and QuickBasic on the internet. Though downloading QuickBasic may not be legal due to copyright laws, i don't think microsoft will care since they are more involved in Visual Basic and other things now.
|
|
|
Post by earlofqb on Nov 20, 2005 20:35:36 GMT
How do I start coding. This is just the begining of class and over 80% of the class already does programming and I have not done any at all. Where can I get a book or something on it my school book is on intro to programming not any specific language but he said we will work with basic Ask Idulhurst (sorry if I misspelled your name) for his txt manual to QB that he wrote himself. Even a semi-skilled QB'er like me (ok, maybe not skilled, but I know enough to write anything except graphic-based games (graphics are overly difficult in QB)) learned some new tricks thanks to his tutliage. I think he has a small listing of his txt manuals on his site (this forum has a link on the homepage of it). As an aside to Idul: sorry I never finished your QB challenge with INKEY$, I've had a lot to do. Once it is over, INKEY$ Challenge is next on my list.
|
|
|
Post by Ildûrest on Nov 24, 2005 11:07:30 GMT
Idulhurst? Sounds like Idlehurst, heh heh. No offence taken. The first part to my tutorial is here: www.autopack.com/aleks/host/QB_A_1.TXTIt gets down to the real truth quickly, er, I mean, instantly. If you find it hard to get your mind around that, then this may suit you better: tedfelix.com/qbasic/It's a bit slower to get into what you need. (Namely INPUT, PRINT, and using mathematical operators) But if you find my tutorial too confusing then it may be a better choice. EDIT: If you have trouble reading my tutorial, click the "File" menu, click "Save as", and put it somewhere easy to find (like your desktop) so you can open it with Microsoft Word or Notepad.
|
|
|
Post by earlofqb on Nov 25, 2005 3:17:39 GMT
That second link had someone I'd consider half-crazy. Sure, programming is fun and all that, but aren't you just pushing your child (or student) into it? They won't enjoy it as much and will just end up hating you. I know of someone who was sort of pushed into it (parents bought him a stack of books and a compiler. Didn't help it was C++ either ). He's the best programmer I've seen, but he takes no fun in it and completely abandoned the career that could've set him on easy street (he's done things professionals rarely do, and wrote an entire game (not 3D, but graphics still weren't too bad) that rivals most "old skool" games (from the NES era). He started programming around when that page said to (pre-teen), He's now 19 and would easily have been given CSA (chief software architect) at MS if Billy Gates wasn't in that position (in my opinion, he was that good). However, because he hates programming because he felt pushed into it, he's completely walked away from it, deleted his programs (every day I kick myself that I didn't ask for a copy on disk), and enjoys life studying other ways of life that, although they interest him, have extremely limited chances for enhancement (think educated burger-flipper. Career needs a degree, but you can't go far with it). Of course, personal fulfilment is a major priority for me; still I feel he walked away from something he shouldn't have. The basic point that I disagree with that article for is that you should make the decision to program at a later age. Sure, it is nice to get them interested in it young, but I'd start with showing them projects (in a beginner-level language like BASIC) you've done, then let them play them (not mess with source code). Once they start asking why this feature acts like this, introduce them to the source code (be sure it has plenty of comments). Just read them the comments and ask them if they want to mess around with it. If they do, ask them what they'd change, and you make the changes yourself. While you do it, show them what you're doing and explain it to them (don't get complicated, just say this keyword does this, etc). Eventually, they'll want to start doing this themselves. Then you can introduce them to BASIC itself (I'd skip Logo, but I'm extremely biased towards BASIC ). Sure, they'll ask why they can't work like you did, but just tell them to be patient and explain that what you did was pretty complicated, and its best if they know the basics first. Then run through a list of topics as you see fit and as they ask. Obviously start with your standard beginner programming statements (print, input, if...then...else, and loops), then they can start with text-based stuff. I'd really advise you skip BASIC graphics, as they are too complicated and take too long for an impatient child to want to sit around for and program. Then, introduce them to Python, cementing their script-writing abilities. Then go to VB so they can work on "real" programs (I'm offended by that statement, however a lot of programmers say you aren't a programmer until you hit OOP and GUI-interactive programming, like VB). After a while, send them to a C-varient of their choice (introduce them to them all, then let them decide). This should yield happier "little programmers" and help avoid them "being pushed into it". If, at any point, they aren't interested, back off and reintroduce it later. If they refuse again, just ignore it as they'll just keep rejecting it.
|
|
|
Post by Ildûrest on Nov 26, 2005 5:11:14 GMT
Well, you can't apply one case to everyone. Still, you're right in many respects. I believe that (in general), the earlier you start programming, the better you will be at it. My dad showed me QBasic probably when I was about 8. It was just a little fun thing to play with. He didn't push me into it at all, I just slowly grew into it, normally doing a bit, forgetting about QB for a while, then getting back to it after several months. In the meantime my programs grew better and better. One of my most important projects was a prime number generator. As I didn't know how to use arrays, I used a line file for storage. I was very resourceful. I certainly yearned to find a way with which variables could be accessed by numbers. Anyway, I kept at it, refining it more and more, learning about which data types were more appropriate, and developing my optimisation and debugging skills. On the side, I played with Triggers in Starcraft (I always complained about easily fixable bugs on maps that other people had made) played with logic and assembly commands for machinery controllers (from Dad's business), and a few other things. This was all under my own initiative. There were two BASIC (pre-QBASIC, BASICA and GW_BASIC) books lying around in the house, and I absorbed them, although by that time I was beyond most of what they contained. I wasn't pushed into it, more I chose to explore it all. I like programming, but I don't want to make a career out of it. As my school has no computer subjects, there's a "computer club" at lunchtimes for those who want to learn about doing several things things from programming to 3D animation. The people who come are certainly interested in the stuff (they're giving up their time) but apart from me and two others, they're slow learners. (That means I get to help with the teaching ). They simply can't adjust their pattern of thinking to the extremely logic of computing tasks. Starting earlier makes it easier to adjust to such a mode of thinking, in my opinion. I introduced my younger cousin to programming just a few days ago. I suspected he had what it takes, and had been trying to get him to try it. Anyway, he was doing a project on Isaac Newton, so I walked him through a BASIC program to calculate acceleration due to gravity for a planet. He seemed to work it out very quickly, and he figured out how to change variabes. I left it at that for the day. A few days later, when I was at his house, he asked out of the blue how he could get QBasic on his computer (although he didn't know what its name was). I don't intend to do any more than answering his questions. If he doesn't take to it, then I'll leave it until later. I agree that forcing someone into it is often a bad thing. I don't want to be a professional programmer, though. Not solely. Robotics is something I'm very interested in. P.S. VB is doom and hell, in my opinion. See: www.network54.com/Forum/13959/message/1132206856/To+hell+with+all+of+VBdom!+It's+an+unhealthy+turn+on+BASIC.
|
|
|
Post by earlofqb on Nov 27, 2005 22:16:36 GMT
I wrote on that thar link you provided. Sure, I wrote a giant post, but you'll like it. I mentioned how VB.NET is weak, how VB never should have been elevated to professional status (like MS tried to), and how C# is the only real substitute in the .NET Framework for VB.NET. You might disagree with my enthusiastic support of VB 6, but considering it is the langauge I currently program most of my stuff in (QB is a very close second), you'll have to understand that perhaps most of my "enthusiasm" is mostly propoganda created by the fact that I have little to compare VB to (aside from C#. However with my short experiences with C#, there isn't much of a comparison I can draw). I then added in a factless comment on how the Big One will reduce us all back to the DOS era and QB will again be the language to know. Despite the fact that this is factless, its a safe assumption, as C and C++ will be too complex to replace (quickly) the programs people need. Sure, C and C++ are easier on processing power and memory, but considering a QB program takes less than 1/10 of the time (made up statistic, but logical ) to program, QB will be the first line at getting us back to normal.
|
|
|
Post by Mikrondel on Nov 28, 2005 9:31:42 GMT
Mr of QB I have a suggestion for you. Write a basic 'telnet' server in C, and run it on a UNIX/Linux machine. Pretty straightforward Username: Password: SUCCESS!/FAILURE! type thing. It may take several hours but I'm sure that you can spare that time SOMEWHERE in the next few months. It'll give you a really good kick start in C, and won't be overly difficult. (I find moderate challenges like this extremely effective in learning about something.) You may need to read up on C-style strings, and syntaxy bits here and there, but you don't seem the type that is adverse to reading. (There are many internet resources which are just as good as books, easier to find, and free. I learnt how to use C completely from internet resources.) A good reference for network socket programming is here: www.coding-zone.co.uk/cpp/articles/140101networkprogramming.shtmlObviously get it to work just using the keyboard first, before adding the network connection bit. If you don't have access to a Linux/UNIX machine, send me your source and I'll look over it and compile it and/or comment on it. A nice free C/C++ IDE for WINDOWS is Dev-C++ at www.bloodshed.net/You can write and test the non-network bits in this. In a simple console app like this, the C++ has very little advantage over C. But by all means, use C++ for this project if you like. There's hardly any difference anyway. Lastly, if you're not sure you're up to this, just give it a go anyway. See how far you get. You'll learn something new. Probably a lot of new things. If you have any problems ask me.
|
|
|
Post by earlofqb on Nov 28, 2005 23:49:08 GMT
Well, considering I know very little of C++ (recently took a stupid entrance exam in it and got a 69% on it, showing how little I know of it), however I might give it a go someday.
C is indeed a language I've been wanting to learn, although I'm not really going to learn it just for this. I'll take your challenge, although I know absolutely nothing about network programming, and little about C/C++.
I'm now downloading the nice Borland C/C++ compiler (the free one) and will take a good while to learn it (a lot of VB projects still there, and I'd rather not sacrifice those just yet; as I'm still learning VB and it is best to not jump around that much). I have a C++ IDE, although I'll probably end up using yours (simply because yours is a full version, and the one I have, Sally-A simple C++ IDE, is still in beta (supposedly still works though).
|
|
|
Post by Mikrondel on Nov 29, 2005 10:36:57 GMT
Terrific! Have a go.
This is a short project to code, but packed with important concepts that shouldn't be too hard to grasp.
The result will probably be about 30 lines.
The non-network version is just a port of INPUT "username: ", un$ INPUT "password: ", pw$ IF un$ = "Alpha" THEN IF pw$ = "Omega" THEN PRINT "SUCCESS" ELSE PRINT "FAILURE"
In C that's a bit more fiddly, but doable.
In pseudocode, this is how sockets will work
[Prepare a socket-- use socket() function] [Associate this socket with a port, e.g. port 5000, using bind() function] [Tell OS to wait for someone to connect - listen() function] [Pause until someone connects, when they do, tell me about it - accept() function] [Ask questions, get answers, with send() and recv()]
[And don't forget to close() your connections when you're done]
This process isn't extremely complicated, it's just long. Don't dwell too much on the information on the sockets site. If you don't understand, go to the next thing. Look at the example programs! In fact, I recommend that you take the example programs and modify them to suit this project. And then run them by me. If you're unsure, take a stab, make an educated guess, and if you're right, you already know something, and if you're wrong, you'll learn from your mistake. It's a win/win situation.
Don't worry that you're doing stuff in VB at the same time. Think of it as enhancing your ability to PROGRAM, rather than learning how to use a new language. If an alien came to study Earth, he (or 'it') would learn more, in less time, by going to new places and seeing new things, than by learning everything about one city. And you can relate knowledge between different areas. Say the alien learnt how to spell in English; it would help in all other places that use the Roman alphabet.
Anyway - just do it bit by bit, and if you have any problems ask me. As I said, it shouldn't take all that long but I think it will be a very effective way to start. The hardest part is probably dealing with C strings correctly.
|
|
|
Post by earlofqb on Nov 30, 2005 1:40:49 GMT
You do have a very valid point in your analogy. The only problem is that it doesn't equate exactly (just to be incredibly stupid:
Sub Main()
string strAliens = "Aliens"; string strC++ = "C++"'
If (strAliens != strC++) Then {
// Your statements are illogical
cout << "Illogical statement you've made, Mr. Ildurest" << endl; string apology;
cout << "Apologize please "; cin.getline(apology)
endl;
cout << "We accept your apology Mr. Ildurest" << endl;
}
---------------------------------------------------------------------------------------------------
Hope you enjoyed my little joke, just don't expect it to make perfect syntaxical sense.
Anyway, an alien couldn't use the Roman alphabet everywhere and expect to understand it all fully. The Spaniards use it, the French, etc., thus they would conclude that English as a written language is not an absolute.
Yes, I realize this is what you wanted me to conclude, that all programming languages might not be the same, but they hold the same key values and ideas. As such, I shouldn't look to fully understand one language then move on to the other, but should rather learn all of them simultaneously, as certain concepts are easier to grasp between different languages. You're a genius at subtly getting people to understand the meaning in your statements, Mr. Ildurest.
If you're interested, and if you didn't already know this; MS has listed, for free, a downloadable version of Visual Studio Express. This is basically Visual Studio's simplified and free version. It is free until November of 2006 and once you have it, it is yours for life. MS did this to encourage people to become programmers, as they're realizing that most of their programmers are old, and their ideas equally old. Thus, to get new ideas on old problems, they're "subtly" trying to get new programmers from this. I figure, so long as its free and will remain so after I've downloaded it, why not? There is no provision that I have to work for MS, and even if there were, I'd just ignore it anyway (how would they track me? Registration is optional, and I could easily use a web proxy to hide my IP).
The only problems with it is that it isn't the full version, but it does work and that's good enough. I'd imagine there would be a compiler included with it, if not you could easily find one online for free. The sizes range from 30 MB to 70 MB, and on my dialup would take around 12 hours per download (there are 5 of them, so 60 total hours downloading at 28k).
|
|
|
Post by Mikrondel on Dec 1, 2005 9:20:34 GMT
Terrific, unfortunately cin and cout are C++ things. I think printf() and gets() can be used in C. I'll ignore your lovely syntactical errors, apart from using "string".
Learn C-style strings. They're basically arrays of single characters, and don't change length.
char foo[16]; will create an empty string that can hold 15 characters. C strings end with a null (CHR$(0) for BASICness) which has good and bad results.
You have to use string functions to deal with this. (Find a few online tutorials, and read the best two)
I don't suggest you learn too many languages at once. However l do suggest you learn a few important ones before you get too deeply rooted to anything. A bit of variety will keep you adaptable. Spending all your time with VB and QB will make it difficult to use anything else.
Of course my analogy isn't very close to the issue at hand. You free to decide what you will.
|
|
|
Post by earlofqb on Dec 1, 2005 22:27:50 GMT
I used cin and cout because I plan to do this in C++. I apologize if I eluded that I'd do this in C (although many have recommended that I use Obj-C, or Objective C, which many tout as the best version of the original C language). Besides, if I did it in C, would I use ANSI C or "C '99"?, as (to the best of my knowledge) they are incompatable with each other and the other C dialects (intriguing how one eventually views a programming language as an actual language ). As far as the string thing (hee, rhyming ), C++ does have the String declaration, so that was valid. I figured with you mentioning the Dev-C++ IDE that you wanted me to do it in C++. Also about the Dev-C++ IDE, you might have wanted to mention it had a compiler with it (jk, its fine). Anyway, now I have two spiffy compilers for C++, and two IDEs (after tweaking with Sally's settings, I discovered just how powerful this IDE is (and it's still in beta? What's s/he waiting for? Borland recently opened their debugger to the public, so that crosses off one of the known "failings" in Sally). I highly recommend it if you're looking for something else. It currently has no debugger (read the inner parenthetical text above) and is terrible at wasting clock cycles (can't have more than one file open, and can't move too quickly either. Might be how the thing is set up to transparently display this spiffy background all the time), but it is very very good). Fear not, I plan to stop after C/C++ (the two are, as you said, "there's hardly any difference anyway". As such, I shall use them to intertwine concepts between them. Further, both compilers I have compile C and C++ code, so it should prove to be rather spiffy the end result of my C excursion). I won't delve into Java because it is covered in nearly every collegic course on programming (almost too well covered. Some colleges have Java as their only language. Of course, you probably knew this already, and it certainly didn't surprise me when I heard of it (colleges will only provide classes that are profitable, ie popular)). Further, I have a VB test to take next month that determines a scholarship (well, elegibility to a future contest which determines whether I'm elegible for the scholarship. Basically, I pass 2 tests and then place in the top 10 in the third test and I get me a nice couple thousand usd scholarship ). Thus, I won't delve into C/C++ too long, as I have to study hard for that there test. However, after that's done, I should have a few months to study C/C++ again, then revert back to VB and QB to study some more. That, and the fact that I must/should complete the myriad projects I have lined up (two of which are important and have a rapidly approaching deadline) for VB programming. Slowly, however, I'll probably transition to C/C++, if only to gain the "respect" of programmers outside BASIC circles (rather ignorant of them, but after 2 years of ignoring their "QB N00b!" and similar statements, I just shall submit by learning their "holy" language; because apparantly C# doesn't count for them). Of course, I'll never abandon VB (well, never say never, I've seen worse happen: folks promising to never leave Java, then when they "re-discovered" C++, they went there, despite all their complaints on C++ and how Java is so much "superior". What I mean by "never" is that I won't intentionally ignore VB, and whenever it is apparant, will use VB when it is the superior language for that program).
|
|
|
Post by Ildûrest on Dec 4, 2005 21:08:08 GMT
Learn C strings. (I'm not even sure that it's possible to use the C++ string class with socket functions.)
The way they work is pretty simple. It's using them safely and correctly that's a bit more difficult. But still reasonable.
What may be unreasonable is assuming you have similar capabilities to me - I guess I can't expect you to learn most of what you need to know about C strings in an hour or two.
So I'll leave it to you. If you have a question or want some advice, then I'm here.
|
|