.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   OT: Look what I can do... (http://forum.shrapnelgames.com/showthread.php?t=23581)

Strategia_In_Ultima April 21st, 2005 05:00 AM

Re: OT: Look what I can do...
 
What is spagetti code/a "Hello World" program?

Will April 21st, 2005 05:06 AM

Re: OT: Look what I can do...
 
Quote:

Strategia_In_Ultima said:
What is spagetti code/a "Hello World" program?

Spaghetti code is exactly what it sounds like. It's stringy, messy, and gets all over the place. It's hard to pick it up, and you would in general just be better off cutting it into smaller pieces that are easier to deal with. So, like SJ's early program, full of GOTO statements, etc, instead of using "nice" loop structures, functions, and other things that make writing and reading programs easier.

"Hello World" is the traditional first program. All it does is output the text "Hello World" to standard output, then exits.

NullAshton April 21st, 2005 08:28 AM

Re: OT: Look what I can do...
 
The 500 or so lines of spagetti code was my first time creating a fairly good program. It was "Guess the Animal", kinda like twenty questions where the computer will ask you a question, and you answer it. It did very good, and would even learn from its mistakes http://forum.shrapnelgames.com/images/smilies/happy.gif I even implimented a save and load feature, complete with my own file type! And it had a nice blue background http://forum.shrapnelgames.com/image...es/biggrin.gif

David E. Gervais April 21st, 2005 09:15 AM

Re: OT: Look what I can do...
 
aaaahm so we are taking a walk down memory lane and sharing our 'First' Programming experience..

For me it was Atari Basic on the Atari 800 Computer. Aaah, the good old ways of line numbering and GOTO, GOSUB.. But the Atari let you place multiple commands on one line so you could cheat. http://forum.shrapnelgames.com/images/smilies/wink.gif

On the PC My first programming was with GW-Basic which came with the computer and I eventually graduated to Quick Basic 4.5 which allowed me to 'compile executables' allthough it was still an interpreted language when coding.

I'm still waiting for an 'Interpreted C language, I hate having to code, compile, run, code compile run,.. I miss the code, run, code, run, compile, share method.

nuf said, Cheers! http://forum.shrapnelgames.com/images/smilies/happy.gif

AngleWyrm April 21st, 2005 09:40 AM

Re: OT: Look what I can do...
 
For me it was a TRS-80 at Radio-Shack in Bellevue Square Mall. I read the book in the mall, and it had the traditional
10 PRINT "Hello, World!"
It also told of the GOTO statment, and I got to wondering what would happen if I made the program go back to the beginning. So I went back into Radio Shack, and wrote:

10 PRINT "Hello, World!"
20 GOTO 10

The screen filled to overflowing and would have run forever! They had to shut it down! I was hooked.

El_Phil April 21st, 2005 09:59 AM

Re: OT: Look what I can do...
 
http://www.playgroundlaw.com/cgi-bin/browse.pl?sid=2

For a detailed discussion on such issues

Fyron April 21st, 2005 11:35 AM

Re: OT: Look what I can do...
 
David E. Gervais said:
I'm still waiting for an 'Interpreted C language, I hate having to code, compile, run, code compile run,.. I miss the code, run, code, run, compile, share method.


Python might be what you are looking for. It is loosely based off of C++ and is interpreted. Unfortunately it lacks all of the fancy syntax characters, but it is an attempt to get away from all of that and have a more "natural" programming language, with white space syntax instead of explicit funky characters.

Or, you could always use PHP. It is much closer to C++ (and C) stylistically and is of course interpreted. You would have to use it through a browser, but there is no reason why you could not do things locally with it. Run some sort of web server that is cut off from the rest of the world, and viola! http://forum.shrapnelgames.com/images/smilies/wink.gif

Gandalf Parker April 21st, 2005 12:12 PM

Re: OT: Look what I can do...
 
Quote:

AngleWyrm_2 said:
For me it was a TRS-80 at Radio-Shack in Bellevue Square Mall. I read the book in the mall, and it had the traditional
10 PRINT "Hello, World!"
It also told of the GOTO statment, and I got to wondering what would happen if I made the program go back to the beginning. So I went back into Radio Shack, and wrote:

10 PRINT "Hello, World!"
20 GOTO 10

The screen filled to overflowing and would have run forever! They had to shut it down! I was hooked.

OK now is a good time for one of my favorite sigs. Heehee this is going to start some screams.

-- I try to avoid BASIC anymore since I saw the example of..(singing)
This is the code that never ends, it just goes on and on my friends.
Some people started GOTOing not knowing what it was
And now they keep GOTOing it forever just because
This is the code that never ends, it just goes on and on my friends.
(inspired by Lambchop's song..http://www.zutroy.com/stuff/neverend/)
HINT: you can get this song-virus out of your head by eating ice cream too fast.
Gandalf Parker

Evil_Duckie April 21st, 2005 01:03 PM

Re: OT: Look what I can do...
 
Quote:

Gandalf Parker said:
Most programmers started in Basic.
And most wont admit it. http://forum.shrapnelgames.com/images/smilies/happy.gif

GW-Basic for me. But I won't admit to being a programmer http://forum.shrapnelgames.com/image...es/biggrin.gif Despite having used various Basic dialects, Pascal, Delphi, a little bit of C, PHP and one or two batch languages...

NullAshton April 21st, 2005 04:14 PM

Re: OT: Look what I can do...
 
POKE PROGRAM OF DOOM!

10 A = 1
20 POKE A, INT(RND * 256)
30 A = A + 1
40 GOTO 20

Run it, and watch the funky colors http://forum.shrapnelgames.com/images/smilies/happy.gif

I'm not responsible for any damages from this program though, so don't sue me!


All times are GMT -4. The time now is 03:30 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.