View Full Version : What should I write?

November 2nd, 2009, 12:06 PM
i've been trying to use QuickBASIC more to learn how to make programs and maybe move up to C/C++ later on. but right now, i'm drawing a blank on what to write, so anyone got ideas?

November 2nd, 2009, 12:30 PM
What interests you? Generally programmers write programs that "scratch a personal itch". That itch doesn't have to be anything that doesn't exist. It can be something already done but you're curious about.

I once taught myself hardware programming and wrote my own GUI frameworks (text and graphical) because I once asked the question to myself in watching Windows 3.x and text-based menu/window programs of "How do they do that?" (such in how does a window know what's under it). Learned a lot for myself despite these problems having already been solved.

So what interests you? What do you want to learn how to do?


November 2nd, 2009, 12:49 PM
a little bit of everything is my interests. with enough time and a good book i could really learn how to program. but since i don't have a good book, i want to try starting out by writing programs.

November 2nd, 2009, 01:07 PM
So the "itch" part is the most important in my opinion as well. You want to pick something you'd find interesting and that will make the job fun. Programming is like a game... kinda like a role-playing game. You have your commands you can use, and are given a task to accomplish or desired function, you lay out the commands you think should work, then run it and see if it works. If not, you get to figure out why and play around to find the bug and get that part to work. Then move forward, etc etc.

It's kinda amazing (at least for me) the amount of code I'd write sometimes that wouldn't work as expected. Especially starting out with my first programs and amateur errors. But it was always fun to fix and see IF I could do something I saw.

So I'd write simple games just to amuse myself. One easy one was a tag game I wrote with you and the computer being the two happy face ascii symbols. Then it was a little quick code to figure out who's it, and which x,y coordinate to move to, scan the user input and do what they want, then move again. Eventually I found it's impossible to beat a computer as they don't mess up .. kinda funny when I realized that. Each person moves one space and you'll never win if you always move correctly, so I had to add a little oddities to the movement of the computer to make sure you get closer to him than you would otherwise.

Anyway, so again.. it just needs to be something you've seen or something you think would be fun. If it's not something you're interested in it seems more like work and your motivation to dive in won't be there. For me I dislike databases .. they just seem boring so once I get there I tend to lose track or motivation. But things like a program that randomly paints was fun and even more fun to watch once it's done. Play with sin or tan or make a guessing game.

I don't recommend Pacman since that was frustrating to try myself lol although if you use sprites it'll be easier but I'd start with something more basic. Maybe an ASCII map and dude and see if you can get it him to walk around and not be able to walk through the wall. Right there you're 70% done with any variation of that :-) Character detection and collision detection is the basics of any game.

BTW, as you've probably heard (read) me say .. (type) .. and a few others agreed that's why TurboC was so nice to use. Just like Qbasic it has a help file that actually has help! (I know.. crazy?! j/k) why other programs strip that out is beyond me. Qbasic is a great language to learn because the help was helpful and the commands weren't too over the top to understand. TurboPascal was ok and had a help file but really was made (far as I could tell) to teach kids C structure but at that point to be honest I don't think C was any more difficult to learn than Pascal so I'd skip the middle man if you have a choice.

- John

November 2nd, 2009, 01:14 PM
Write a small database software that helps you catalog you vintage computers and parts.

You could code this so it has a GUI with mouse support and it can snag its look and feel settings from a configuration file.

Just my 2 cents on an idea.

Ole Juul
November 2nd, 2009, 02:20 PM
Write something you can use. :)

November 2nd, 2009, 02:28 PM
you should write (so I don't have to)
A menu/front-end/program launcher for DOS to play games.

It would include a list of games, perhaps listed/sortable by year, alphabet, or genere, with the file title of the game itself, and ideally a screenshot of the game you're about to launch.

the backend would be a simple enough database type text file so that games can be quickly added or edited or removed, just a simple list of:

"game name", "path", "executable name", "path to screenshot"

and of course, it has to work on an 8088.
and of course, it should probably work in CGA EGA or VGA. Not asking too much am I? :)

Something like this may exist already though...

November 2nd, 2009, 02:31 PM
Write something you can use. :)

Or that I can use! :wink:

Lou - N2MIY
November 2nd, 2009, 03:07 PM
I suggest you write a quickbasic program to control something (real / physical). By that I mean, hook something to the machine through the serial, or even better, the printer port. You can learn somemthing about hardware while learning about programming. I have written quickbasic / printer port programs to do such varied things as drive two stepper motors (for an x/y positioner) to driving an alphanumeric LCD display (Hitachi 44780 based.) The most recent program I wrote was to output LPC-10 encoded speech to a board that uses the TI TMS5220 speech chip (from speak-and-spell fame.)

So, maybe make some relay drivers and write code to control your Christmas light display....


November 3rd, 2009, 01:45 AM
i've been trying to use QuickBASIC more to learn how to make programs and maybe move up to C/C++ later on.
Just get started with something you're comfortable with and, probably more importantly, enjoy using. The concepts are pretty much the same across high level languages, so whatever you learn will be useful when you move onto more powerful and/or complicated stuff. You don't want to get bogged down in details when you're still trying to master the basics.

you should write (so I don't have to)
A menu/front-end/program launcher for DOS to play games.
That's actually a pretty good idea for a project. I'm working on something similar just now (for arcade cabinets) and it's really rekindled the tinkering programmer in me. I think the attraction is that the possibilities for new features are almost limitless, so there's always something to do. You can start with a very simple base and just build on it when you get the coding urge, learning new techniques as you go.

Something like this may exist already though...
Even if it does already exist, there's nothing wrong with reinventing the wheel if the aim is to figure out just how wheels work!

November 3rd, 2009, 05:33 AM
Write a program that solves a simple puzzle. Like a sudoku (ehrm, that might be a big bite to chew though.) Maybe Towers of Hanoi (http://en.wikipedia.org/wiki/Towers_of_hanoi), maybe a program to translate text into morse code (perhaps to simple) or a ceasar crypto.

There are a bunch of puzzles on wikipedia that are quite suitable to implement:


here is a classic:


November 3rd, 2009, 07:28 AM
What kind of programming have you done so far? Have you implemented any known algorithms, came up with your own algorithms and so on?

Here is a list of suggestions from which you could check the ones you already did:

1. Bubblesort on an array of numbers, strings.. preferrably loaded from a text file.
2. Othello game with computer AI that operates on brute force.
3. Quicksort, like above but more hairy to get correct.
4. Simple drawing program that lets you draw lines, circles, flood fill enclosed areas.
5. Clock which reads system time and displays with hands on a dial.
6. Tetris game or similar.
7. Text adventure using a two word verb-noun parser.

All those are within reach for someone who understands computer programming.

November 3rd, 2009, 07:55 AM
Why not do it the old fashioned way... find a program listing in a magazine,
type it in, make mistakes, fix them and in the process, figure out how it all works.

Okay, so magazines don't really publish program listings in BASIC anymore.
But you could start here somewhere http://www.atariarchives.org/
Expect to convert the program to QuickBASIC (if that's what you're using).

Ole Juul
November 3rd, 2009, 02:37 PM
Even if it does already exist, there's nothing wrong with reinventing the wheel if the aim is to figure out just how wheels work!
LOL, well put! :)

December 20th, 2009, 03:46 AM
If you want a challenge try making your own operating system, or perhaps a GUI for a text-based one.

December 21st, 2009, 11:40 AM
Maybe this (http://kodev.wordpress.com/) will give you some ideas. My school friend and I have been working on this Zombie game, but back when we first made the blog, our main goal was to create little mini-games. One of my personal goals has been a fast prime number generator. I just need a supercomputer to run it! :-)

Surely everyone knows of the Cracker Barrel game ("Jump All But One"). That was one I made too (on the blog).