![]() |
Re: OT: Look what I can do...
Suggestion for version 2:
Separate input, output and processing into their own functions. It's real good exercise. Something like main(){ get_input( variables ) process_input( variables ) put_output(screen) put_output(file) } My brother never learned to use functions, and now he codes his entire programs all in main(). So now he can't write big programs, because after a while it becomes too much to follow in one function. Try reading a 500-line function! One page is plenty. |
Re: OT: Look what I can do...
Nothing compared to my 500 or so lines of spagetti code written in qbasic.
|
Re: OT: Look what I can do...
Quote:
And most wont admit it. http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: OT: Look what I can do...
I don't believe "cout" or "cin" is in C, so it must be C++.
|
Re: OT: Look what I can do...
Quote:
And I don't know about the rest of you, but I started in C, at 14 years old. A year later I learned "BASIC", but it was the version in my TI calculator, not this Visual nonsense. I technically still haven't "learned" VB, but really, do I need to? I can read the stuff, and if I'm ever asked to write it for some horrid reason... well, I'll burn that bridge when I get to it. |
Re: OT: Look what I can do...
Gotta take my hat off to anyone who's got the initiative to learn a programminglanguage this "late in the game". http://forum.shrapnelgames.com/images/smilies/cool.gif
|
Re: OT: Look what I can do...
Quote:
All my variables were 4 or 5 character acronyms. And it had no elses or block-ifs, since I didn't know about them at the time. Instead, I used If-Dosomething-Goto http://forum.shrapnelgames.com/images/smilies/laugh.gif I'd estimate that up to 10% of the instructions in that program were gotos! But at least it was neat, well organized spaghetti code. http://forum.shrapnelgames.com/images/smilies/eek.gif |
Re: OT: Look what I can do...
Quote:
|
Re: OT: Look what I can do...
Anyone who knows more than one language would be hard pressed to tell you to learn or not learn any particular programming language without afew more answers. In other words, dont bother learning VB unless and until you have a reason to. Something that you want to do, which it does well. Same goes for any other language. They all have their pros and cons
|
Re: OT: Look what I can do...
My first program was indeed a hello world program written in BASIC, on the Apple IIE. I was so happy and proud to be learning how to program a computer. That was a long long time ago. That year I went on to write spagetti code. In those days, each line of code had a line number and you had stuff like, "100 goto 250".
Then when I took my first programming course in university, on the first day the professor asked, "put up your hand if your first programming language was BASIC". I put up my hand, along with about half the people in the class. The professor says, "You are all contaminated - you learned to write spagetti code!". That course used Modula-2, and they were very strict about your code being neatly organized. That was a good thing, because I got rid of the bad habits I picked up earlier. |
All times are GMT -4. The time now is 03:39 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.