|
|
|
|
|
April 21st, 2005, 05:00 AM
|
|
Major General
|
|
Join Date: Jan 2005
Location: In your mind.
Posts: 2,241
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Look what I can do...
What is spagetti code/a "Hello World" program?
__________________
O'Neill: I have something I want to confess you. The name's not Kirk. It's Skywalker. Luke Skywalker.
-Stargate SG1
|
April 21st, 2005, 05:06 AM
|
|
Lieutenant Colonel
|
|
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
|
April 21st, 2005, 08:28 AM
|
|
Major General
|
|
Join Date: Nov 2004
Location: Floating in space.
Posts: 2,297
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 I even implimented a save and load feature, complete with my own file type! And it had a nice blue background
|
April 21st, 2005, 09:15 AM
|
|
General
|
|
Join Date: May 2002
Location: Canada
Posts: 3,227
Thanks: 7
Thanked 44 Times in 28 Posts
|
|
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.
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!
|
April 21st, 2005, 09:40 AM
|
|
Second Lieutenant
|
|
Join Date: Mar 2005
Location: Seattle, WA
Posts: 417
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
April 21st, 2005, 09:59 AM
|
|
Major
|
|
Join Date: Sep 2004
Location: Searching for a holy grail.
Posts: 1,001
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Look what I can do...
__________________
He who disagrees with me in private, call him a fool. He who disagrees with me in public, call him an ambulance.
|
April 21st, 2005, 11:35 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
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!
|
April 21st, 2005, 12:12 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
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
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
April 21st, 2005, 01:03 PM
|
Private
|
|
Join Date: Mar 2005
Location: Netherlands
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: Look what I can do...
Quote:
Gandalf Parker said:
Most programmers started in Basic.
And most wont admit it.
|
GW-Basic for me. But I won't admit to being a programmer Despite having used various Basic dialects, Pascal, Delphi, a little bit of C, PHP and one or two batch languages...
__________________
Quack?
|
April 21st, 2005, 04:14 PM
|
|
Major General
|
|
Join Date: Nov 2004
Location: Floating in space.
Posts: 2,297
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
I'm not responsible for any damages from this program though, so don't sue me!
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|