Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Back in what must've been the mid-80s, when every microcomputer included BASIC and Choose Your Own Adventure Books were really popular, there were some novels that had BASIC programs listed in the text, for you to type in and further enjoy.

For example, as I recall, in one of these books, the adventurers were infiltrating an undersea base (and eventually wiped the bad guy's data storage [I do believe it was a hard drive, even though they were uncommon then]). One of the programs involved a game were you piloted a submarine and had to avoid or shoot sharks. The code was in BASIC; minor changes (such as 'CLS' -> 'HOME') had to be made for your specific computer, and it used good old 40-column text-mode to display the action. IIRC, the plot never depended upon the programs.

My question is, does anyone else recall these sorts of books? Do you know any titles that I could look for, or of any online? I am toying with the idea of writing a story like this (no, not in BASIC!), and would really like to see how it was done, back in the day.

share|improve this question
    
But I know an Indian movie in which a detective is looking at CMOS setup very seriously as if he is reading a case study :) –  PradeepGB Dec 5 '10 at 5:33
    
That bad guy should have used an off-site backup facility. Actually, maybe it's better that he didn't. –  Gary Rowe Dec 6 '10 at 13:03
    
Nowadays, you provide the programs in pre-compiled easy-to-download form. Sometimes I miss the old days. –  David Thornley Dec 6 '10 at 15:09
    
Dumb ol' Richard Pryor typed "LIST" in Superman III and "broke" into the mainframe. Not a book but a point in the Supes movies where I personally felt insulted because I'm so arrogant and snooty. –  johnny Dec 6 '10 at 15:33
    
moving Alex's answer to the comments: "Just found this post while searching for the same book - the underwater shark base thing. My mom bought it for me back in the day and I totally wrote the programs and everything. (And, yes, I am now a programmer. Way to go Mom!) I wish someone had answered this question. :(" –  David Peterman Jun 8 '12 at 15:08
show 1 more comment

closed as off topic by Ryathal, gnat, ChrisF Jun 8 '12 at 16:30

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

Read Gateway by Fred Pohl. A good part of the novel is conversations between the protagonist and his therapist, the therapist being a very sophisticated program. Every so often, there will be a page in the book that is some sort of BASIC-ish computer code that, if you're a techie and read it, it gives a bit of insight on how the AI therapist is thinking.

share|improve this answer
    
Any relation to en.wikipedia.org/wiki/ELIZA ? –  Mladen Jablanović Dec 6 '10 at 15:41
    
I don't want to give away any of the plot of the book ;) But I'd say likely not, given the creator of Sigfrid von Shrink. –  Jesse C. Slicer Dec 6 '10 at 15:42
    
Sounds like an interesting book. I played "Gateway II: Homeworld", and it sounds like it is based on the universe in that book. –  Clinton Blackmore Dec 6 '10 at 16:38
add comment

I remember those old books. I didn't actually own one, but I do remember flipping through the pages of one at the time and thinking that the programs were a bit too simplistic. (I was into BBC Basic with inline assembler at the time).

Ye Olde Infocomme Shoppe maintains a list of old book titles that may be of interest.

If you're thinking of writing something like this yourself, perhaps consider BBC Basic and then linking to an online BBC Basic interpreter or one for Windows which will allow you to provide simple to understand programs that can be typed in (that's important, no simple linking to an external website for instant download) and executed.

You'll be targeting a niche market, though.

Of course, if you publish this online you could have fun creating your own language and getting people to write programs for it through the browser. Your site could present problems that need to be solved using code before they can progress. This could be achieved using a similar process to the Mathematics Olympics where unit tests verify the solutions.

share|improve this answer
    
If I were to do a novel like this, I'd have challenges for building things with Mindstorms NXT robots, or possibly using the Arduino, or maybe, say, programming with PyGame. In any case, a small audience, indeed. That is an interesting list; it is too bad it doesn't appear to have the type of books I'm looking for. –  Clinton Blackmore Dec 6 '10 at 16:33
add comment

Wikipedia has a long list of books from the Choose Your Own Adventure series, so if the book you're looking for was part of the CYOA series you'll likely find it there. The same article links to Demian's Gamebook Web Page, which may be helpful in its own right. That page also has an associated mailing list, so if you still don't find what you're looking for you might ask on that list.

It's interesting to note that many of the CYOA books are available used for $0.01 on Amazon, so you could collect 100 of them for $1 (plus $399 shipping!).

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.