Page 1 of 1

Need tips and advise on which programs to program to gain ex

Posted: Thu May 05, 2005 11:14 am
by ice-o
Hello,

I know html, and php extensivly.
I've been learning c++ for the last 4 days by reading over the tutorial on cplusplus.com, now while i see the end of the tutorial in sight. I want to know what to start really programming before i will want to start on an OS -

I realy want to make an OS one day but i know i first have to build up experience , that's why this thread.

So in short i'm asking for advice on programs to start programming ( of course in c++ ) to gain experience.

Ice-o

Re:Need tips and advise on which programs to program to gain

Posted: Mon May 09, 2005 12:42 am
by Solar
C++ isn't exactly the beginner's choice for an OS development language, as documented in the FAQ and many a thread in this forum.

That being said, I think that you should gather much general programming experience before tackling your first OS.

First, you should get a good book on C++. Tutorials are fine and well, but you will need a reference later on. Stroustrup's "The C++ Programming Language" comes to mind, which includes small assignments at the end of each chapter to make sure you really got the idea.

Second, you should have an idea of what processes, threads, server daemons, shared memory et al are about, as you will have to handle these subjects in an OS. How to implement documented standards is also a bonus. A small web server could be a very beneficial project, as it includes all of the above.

Third, if you really want to make a "finished" OS - as opposed to a I've-got-a-DOS-shell toy OS - knowing the demands of a GUI system would be nice. Like, an interactive configuration tool for the above webserver?

I know that many people here will think, "all this isn't necessary, I dived into my own OS right away", and I say, congratulations to you. I don't say the above are requirements to write your own OS, but the experience with language, development tools and processes will certainly be helpful.

Re:Need tips and advise on which programs to program to gain

Posted: Mon May 09, 2005 2:00 am
by distantvoices
general programming experience and experience in leading projects to the goal set in the project manual are definitely a need. And of course you need that sort of stubbornness that rips down walls of granite.

Solar's perfectly right here.

Btw: Here are some small startup proposals which might give you some days of puzzling:

1. a recursive test (like the one in unix shell, you know what I mean. You know it's behaviour. Just write code to behave like it or even better/nicer) - HInt: a recursive tree data structure comes in handy. *gg*

2. a recursive calculator - something which takes a string from the command line like 1+3/(4+(3+4*(8+8))), parses it and returns a result, no matter how many parentheses are in it.

Re:Need tips and advise on which programs to program to gain

Posted: Mon May 09, 2005 10:55 am
by mystran
Once you think you are happy with "small programs", I'd say try writing some kind of network daemon. MUD servers especially come to mind, since you essentially need to do some kind of multi-tasking (several clients) and then somehow support dynamic interaction between the different players (and monsters as well).

While I said "some kind of multi-tasking" I won't necessary mean that using native multi-threading is a good idea.. in fact, using an event loop might be a better idea.

It need ofcourse not be a "combat mud". Instead you can do a small interactive multi-user chat environment. The essential lessons of program design remain unchanged.

My main point however, is that a sufficiently complicated network daemon will teach you a lot of things that are useful in OS design, while still allowing you to use all the services of and existing OS, so as to allow you to concentrate on higher-level design.

I think there are other such projects, but that one is the one that came to my mind first.

Re:Need tips and advise on which programs to program to gain

Posted: Fri May 13, 2005 11:11 pm
by B.E
If you want to practices programming. The site PROBLEM SET ARCHIVE have about 2000 problems from prev programming contests.