Programming Project of Mine 
Author Message
 Programming Project of Mine

Hello,
  I am currently planning how I'm going to accomplish a project I've
decided upon, which involves the creation of a Message Board.  I intend to
write this Message Board in C, however I need some help.

  What are some ways in which I can store posts on the message board?

I've considered creating a linked list.  Each link points to a post within
the thread--the first link being the thread starter.  

I still have one problem--storing the post.  I can store the post within
the same file that I store the list, however (considering my limited
knowledge) I don't know of a way to make the size of each structure (which
stores post information and the post) dynamic, thus I would waste space.  
So I could simply store the ID number, and reference a file.

But this brings up yet another issue.. Isn't it very tacky to store reams
of plain text files?  If the bulletin board becomes 'popular' (though I
doubt it will), won't it become slower for the Operating System to locate
files?

Thank you, and I am sorry about how poor this sounds.

- scott-skg



Thu, 29 Jan 2004 18:10:49 GMT  
 Programming Project of Mine
[Ignoring Followup-To because my newsswerver does not carry
acllcc++.]

Quote:

>   I am currently planning how I'm going to accomplish a project I've
> decided upon, which involves the creation of a Message Board.  I intend to
> write this Message Board in C, however I need some help.

>   What are some ways in which I can store posts on the message board?

I would use a SQL database.  This is not a joke.  There are
several free, efficient databases that you can use, such as
PostgreSQL and MySQL.  In fact, I actually have implemented
message boards in this way, as you can find by reading the source
to TeamSCOPE, the team collaboration software that I was paid to
write.  Tooting my own horn a little, it's at
        http://cscw.msu.edu/scope.html
although it's not written in strictly conforming ANSI C by any
means, more like POSIX C.  There's also a couple of conference
papers that I've co-authored about it (one to be soon published
in Int. J. Hum.-Comp. Studies), drafts available from
        http://cscw.msu.edu/reports.html

Quote:
> I've considered creating a linked list.  Each link points to a post within
> the thread--the first link being the thread starter.  

Hmm, but threads tend to become hierarchical.  I would use a
multilinked structure, with next-in-thread, prev-in-thread,
parent, and first-child pointers stored in each node.

Quote:
> I still have one problem--storing the post.  I can store the
> post within the same file that I store the list, however
> (considering my limited knowledge) I don't know of a way to
> make the size of each structure (which stores post information
> and the post) dynamic, thus I would waste space.  So I could
> simply store the ID number, and reference a file.

You can use all sorts of clever indexing strategies to combat
these problems.  But why bother?  The database companies have
spent years and millions or billions of dollars researching these
issues, and some of it has rubbed off on the free databases too.

Quote:
> But this brings up yet another issue.. Isn't it very tacky to
> store reams of plain text files?  If the bulletin board becomes
> 'popular' (though I doubt it will), won't it become slower for
> the Operating System to locate files?

Plain text files are great--as long as you don't need
lightning-quick access.  Databases are a better choice if you do.
--
Just another C hacker.


Thu, 29 Jan 2004 23:28:02 GMT  
 Programming Project of Mine

Quote:

>[Ignoring Followup-To because my newsswerver does not carry
>acllcc++.]

>>   I am currently planning how I'm going to accomplish a project I've
>> decided upon, which involves the creation of a Message Board.  I intend to
>> write this Message Board in C, however I need some help.

>>   What are some ways in which I can store posts on the message board?
>I would use a SQL database.  This is not a joke.  There are
>several free, efficient databases that you can use, such as
>PostgreSQL and MySQL.  In fact, I actually have implemented
>message boards in this way, as you can find by reading the source
>to TeamSCOPE, the team collaboration software that I was paid to
>write.  Tooting my own horn a little, it's at
>    http://cscw.msu.edu/scope.html
>although it's not written in strictly conforming ANSI C by any
>means, more like POSIX C.  There's also a couple of conference
>papers that I've co-authored about it (one to be soon published
>in Int. J. Hum.-Comp. Studies), drafts available from
>    http://cscw.msu.edu/reports.html

Maybe I'm slow, but I fail to see how this question, and the answer from
Mr. Pfaff is more on topic than, e.g. Games programming. Maybe off topic
answers are OK if you have to say something that makes you look good,
but not OK otherwise. I _this_ the formal criterion to be used in
comp.lang.c. in the future.

This looks to me like a design question that is not related to C,
and might be a good question in comp.programming. As far as I
have understood the topic of comp.lang.c, the fact that you
want to do something in C does not qualify that question as an
"allowed" question in this newsgroup.  Mr. Pfaff told me he
does not want to discuss anything but C in this newsgroup, and
that I should go to another group to discuss other things.
So, please explain how this is a discussion about the C programming
language. Wouldn't it be a good idea to use an SQL database if
you would try to solve the same problem in, e.g. Modula-3?

Explain the big difference in terms of topicality and morality
between message boards and games.

Quote:
>> I've considered creating a linked list.  Each link points to a post within
>> the thread--the first link being the thread starter.  
>Hmm, but threads tend to become hierarchical.  I would use a
>multilinked structure, with next-in-thread, prev-in-thread,
>parent, and first-child pointers stored in each node.

Do threads not tend to become hierarchical if you implement the
message board system in Eiffel?

Quote:
>> I still have one problem--storing the post.  I can store the
>> post within the same file that I store the list, however
>> (considering my limited knowledge) I don't know of a way to
>> make the size of each structure (which stores post information
>> and the post) dynamic, thus I would waste space.  So I could
>> simply store the ID number, and reference a file.
>You can use all sorts of clever indexing strategies to combat
>these problems.  But why bother?  The database companies have
>spent years and millions or billions of dollars researching these
>issues, and some of it has rubbed off on the free databases too.

Is C the only programming language that interfaces with databases?

Kurt

--
| Kurt Watzka                            



Fri, 30 Jan 2004 00:26:09 GMT  
 Programming Project of Mine

Quote:

> Maybe I'm slow, but I fail to see how this question, and the
> answer from Mr. Pfaff is more on topic than, e.g. Games
> programming.

It is off topic.  I answered it because I was feeling
particularly generous today (it's been a good week) and had a
useful answer.

Quote:
> Maybe off topic answers are OK if you have to say something
> that makes you look good,

*shrug*  It's not like my Usenet "reputation" has ever had any
effect on my real life.


Fri, 30 Jan 2004 00:55:57 GMT  
 Programming Project of Mine

Quote:


>> Maybe I'm slow, but I fail to see how this question, and the
>> answer from Mr. Pfaff is more on topic than, e.g. Games
>> programming.

> It is off topic.  I answered it because I was feeling
> particularly generous today (it's been a good week) and had a
> useful answer.

>> Maybe off topic answers are OK if you have to say something
>> that makes you look good,

> *shrug*  It's not like my Usenet "reputation" has ever had any
> effect on my real life.

Heh, sorry about the off-topic post..  I'm sure it gets irritating, but I
did not know where to post really--atleast, where was appropriate.  I'll
direct further responses to comp.programming


Fri, 30 Jan 2004 03:13:17 GMT  
 Programming Project of Mine
[alt.comp.lang.learn.c-c++ snipped]

Quote:


> > Maybe off topic answers are OK if you have to say something
> > that makes you look good,

> *shrug*  It's not like my Usenet "reputation" has ever had any
> effect on my real life.

Who wrote the binary search trees chapter in "C Unleashed" then?

Your c.l.c reputation has effected your real life, just admit it! :-)

--
Tor <torust AT online DOT no>



Fri, 30 Jan 2004 04:18:44 GMT  
 Programming Project of Mine

Quote:



> > > Maybe off topic answers are OK if you have to say something
> > > that makes you look good,

> > *shrug*  It's not like my Usenet "reputation" has ever had any
> > effect on my real life.

> Who wrote the binary search trees chapter in "C Unleashed" then?

I'd forgotten about that.  (And the taxes on the money I got from
it just about killed me back in April.)
--
"IMO, Perl is an excellent language to break your teeth on"
--Micah Cowan


Fri, 30 Jan 2004 08:34:02 GMT  
 Programming Project of Mine

Quote:

> *shrug*  It's not like my Usenet "reputation" has ever had any
> effect on my real life.

Every so often, I have this nightmare where a stranger walks up to me
on the street and says, "Hey - I know you from Usenet! Can you help me
with my homework?"

Let those worlds stay separate, and never the twain shall meet...

--
Cheers,  // First time posting?  READ THIS:
Rich.    // http://snurse-l.org/acllc-c++/faq.html



Fri, 30 Jan 2004 19:08:30 GMT  
 Programming Project of Mine


Quote:

>> *shrug*  It's not like my Usenet "reputation" has ever had any
>> effect on my real life.

>Every so often, I have this nightmare where a stranger walks up to me
>on the street and says, "Hey - I know you from Usenet! Can you help me
>with my homework?"

>Let those worlds stay separate, and never the twain shall meet...

Be careful what you wish for.  Actually, I've had things like
that happen to me a number of times.
--
Greg Comeau                 Countdown to "export": December 1, 2001
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout

Tasty C99/C++ Combo: Dinkumware libs + Comeau Compilers == WOW!!!



Fri, 30 Jan 2004 22:37:52 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Entry (mine, obviously disqualified.)

2. Algorithm for mining association rules implementation in C or C++

3. previous post of mine

4. Closing another application from mine

5. size matters; and I want mine smaller

6. Accessing other applications menu items fro mine.

7. why isn't my exception mine?

8. Editor mined (pointer declaration snafu)

9. Hook working on all windows but mine.

10. Accessing other applications menu from mine!!!

11. CListCtrl problem: mine or MS?

12. How to disable default serial driver/ load mine?

 

 
Powered by phpBB® Forum Software