Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Mini project suggestions

Reply
Thread Tools

Mini project suggestions

 
 
Michael Strorm
Guest
Posts: n/a
 
      10-01-2003
Hi,
I'm in the middle of "teaching" myself C++. Having skimmed some of
the "Teach Yourself C++ in 21 Days" book, I got a feel for the
language, at least. Then I bought "The C++ Programming Language"
because it was on offer, and I'd have ended up buying it at some stage
anyway.
Skimmed some of that, but there's too much detail (for now) and I
know I won't take it in if I don't get some practice in actually
*writing* programs in C++. I'm getting the very strong impression that
(much more so than in C) learning to write "proper" C++ programs can't
just be done through short question exercises.
To get to the point, I'm wanting to start a moderately-sized
project that would take a week (working full time on it, which I won't
be ) to do reasonably, cover a decent subset of the language, be
interesting to do, and workable under (say) gcc on Linux (without too
much nonstandard code). It'd also be interesting to get some practice
in software design in there.
So, I'd be interested to get some suggestions, because I feel like
doing *something* with all this knowledge (and more importantly,
finding out what I don't know well). Thanks!

Michael Strorm
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Mike Wahler
Guest
Posts: n/a
 
      10-01-2003
"Michael Strorm" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> Hi,
> I'm in the middle of "teaching" myself C++. Having skimmed some of
> the "Teach Yourself C++ in 21 Days" book, I got a feel for the
> language, at least. Then I bought "The C++ Programming Language"
> because it was on offer, and I'd have ended up buying it at some stage
> anyway.


Yes, as your knowledge grows, I think you'll find this
book quite valuable. Make sure it's the 3rd or 'special'
edition though. Previous additions are essentially
obsolete.

Another very good book, especially for those who have
previous experience with other languages, is Koenig
& Moo's "Accelerated C++". www.acceleratedcpp.com


> Skimmed some of that, but there's too much detail (for now)


Yes, it's infoage ratio is quite dense. I also needed
to supplement it with other 'lighter' material when learning
C++.


>and I
> know I won't take it in if I don't get some practice in actually
> *writing* programs in C++.


Yes, good that you realize that. Learn by doing.

> I'm getting the very strong impression that
> (much more so than in C) learning to write "proper" C++ programs can't
> just be done through short question exercises.


Short exercises are good start, especially to prove to
yourself you understand a particular concept(s).

> To get to the point, I'm wanting to start a moderately-sized
> project that would take a week (working full time on it, which I won't
> be )


Don't be too optimistic with your time estimates. Don't
worry if something takes far longer than you expect. Even
for professionals, one of the most difficult tasks is making
(and meeting!) time estimates. Only practice and experience
will help with this. And having built up a 'code base' of
useful functions helps a lot toward 'speed of development'.
The concept of code reuse. When writing a function, keep
in mind "can this be 'generalized' to be useful in other
contexts?" This won't always be the case, but often is,
given a bit of forethought before deciding e.g. what
the parameters should be, if any. E.g. if you write a
function to output the contents of an object, you could
'hard code' it to use 'cout', or you could defined a
parameter of type std:stream&, in which case the
function could operate upon a file (std:fstream) as
well as on 'cout'.


>to do reasonably, cover a decent subset of the language, be
> interesting to do,


Only you can know what you find 'interesting'. E.g. many
are eager to write 'cool graphics games' etc. (which btw
is a far too advanced topic when learning the language,
especially since you'll need platform-specific 'extensions'
and special purpose libraries). E.g. Games don't interest
me at all, graphical or otherwise -- I have more fun with
databases and text manipulation. But that's just me.

> and workable under (say) gcc on Linux (without too
> much nonstandard code).


When learning, you should stay away from all nonstandard
(e.g. platform-specific) constructs. Learn the language
first. Then it matters not what your platform is (C++
is a 'platform-independent' language.)

>It'd also be interesting to get some practice
> in software design in there.


Design isn't really topical here, but we can help you
organize your code to best take advantage of the
language's power, prevent common errors etc. Software
design itself would be better discussed in groups such
as comp.programming and/or comp.algorithms, etc.
Often specific algorithm categories have their own
groups, e.g. cryptography.

> So, I'd be interested to get some suggestions, because I feel like
> doing *something* with all this knowledge


Yes, it is very satisfying to actually build something
useful and/or interesting with your new found skills.

>(and more importantly,
> finding out what I don't know well). Thanks!


The first 'nontrivial' thing I did with C++ (after
many small exercises) was a small 'contacts' database with
e.g. names, addresses, phone numbers, etc. That's because
I'm interested in databases, and that's an area where I
already have skill with other languages, and have the most
experience.

Hint: Use the standard library. It is *very* powerful,
and lets you start applying 'code reuse' immediately.
Spend some time learning about containers, iterators,
and the algorithms declared by header <algorithm>
which uses them. *Very* powerful and flexible things can
be done with them. Which reminds me: A very good book to have is
Josuttis' "The C++ Standard Library" www.josuttis.com/libbook


HTH,
-Mike


 
Reply With Quote
 
 
 
 
Gene Wirchenko
Guest
Posts: n/a
 
      10-01-2003
On 1 Oct 2003 15:30:14 -0700, (E-Mail Removed) (Michael Strorm)
wrote:

[snip]

> So, I'd be interested to get some suggestions, because I feel like
>doing *something* with all this knowledge (and more importantly,
>finding out what I don't know well). Thanks!


You could write a small text adventure. It need not do much, but
just to bring it up to framework level, you are going to have to do a
lot of work with I/O and string manipulation. There are plenty of
opportunities to define classes or use STL. After you have the
framework, you can bolt on a lot of other stuff that fits your fancy.

Sincerely,

Gene Wirchenko

 
Reply With Quote
 
Jonathan Mcdougall
Guest
Posts: n/a
 
      10-02-2003
> [snip]
>
> > So, I'd be interested to get some suggestions, because I feel like
> >doing *something* with all this knowledge (and more importantly,
> >finding out what I don't know well). Thanks!

>
> You could write a small text adventure. It need not do much, but
> just to bring it up to framework level, you are going to have to do a
> lot of work with I/O and string manipulation. There are plenty of
> opportunities to define classes or use STL. After you have the
> framework, you can bolt on a lot of other stuff that fits your fancy.


But PLEASE, before you ask, there is no way in C++ to clear the screen or
change the colour of the output


Jonathan


 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      10-02-2003
[Just clearing up a tiny nit]

Jonathan Mcdougall wrote:

> But PLEASE, before you ask, there is no way in C++ to clear the screen or
> change the colour of the output


.....unless you are prepared to use extensions to the language (such as
libraries - ncurses, SDL, OpenGL, whatever) which may not be available on
all your target platforms, and discussion of which is off-topic in both
these newsgroups but not in platform-specific newsgroups.

--
Richard Heathfield : (E-Mail Removed)
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
 
Reply With Quote
 
Gene Wirchenko
Guest
Posts: n/a
 
      10-02-2003
On Wed, 1 Oct 2003 23:19:44 -0400, "Jonathan Mcdougall"
<(E-Mail Removed)> wrote:

[snip]

>But PLEASE, before you ask, there is no way in C++ to clear the screen or
>change the colour of the output


<EG>

The best response I ever saw to the clear screen question was
"Which screen?"

Sincerely,

Gene Wirchenko
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      10-02-2003
Gene Wirchenko wrote:

> You could write a small text adventure. It need not do much, but
> just to bring it up to framework level, you are going to have to do a
> lot of work with I/O and string manipulation. There are plenty of
> opportunities to define classes or use STL. After you have the
> framework, you can bolt on a lot of other stuff that fits your fancy.




That's a pretty good project, if you like TA games. It was my learning
program for C many moons ago. It's probably even better for C++, because
the OO approach is natural for a game like that.




Brian Rodenborn
 
Reply With Quote
 
Mike Wahler
Guest
Posts: n/a
 
      10-02-2003

"Gene Wirchenko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Wed, 1 Oct 2003 23:19:44 -0400, "Jonathan Mcdougall"
> <(E-Mail Removed)> wrote:
>
> [snip]
>
> >But PLEASE, before you ask, there is no way in C++ to clear the screen or
> >change the colour of the output

>
> <EG>
>
> The best response I ever saw to the clear screen question was
> "Which screen?"


I like "use glass cleaner".

-Mike


 
Reply With Quote
 
WW
Guest
Posts: n/a
 
      10-02-2003
Mike Wahler wrote:
> "Gene Wirchenko" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>> On Wed, 1 Oct 2003 23:19:44 -0400, "Jonathan Mcdougall"
>> <(E-Mail Removed)> wrote:
>>
>> [snip]
>>
>>> But PLEASE, before you ask, there is no way in C++ to clear the
>>> screen or change the colour of the output

>>
>> <EG>
>>
>> The best response I ever saw to the clear screen question was
>> "Which screen?"

>
> I like "use glass cleaner".


Or if you need fast code and aggresive optimization there is the
hammer-fast-forward followed by a circle-to-remove-remainder (aka modulus)
method. And it is a time tested pattern used by burlgars and fireman all
around the world.

--
WW aka Attila


 
Reply With Quote
 
Ron Natalie
Guest
Posts: n/a
 
      10-02-2003
>> >> The best response I ever saw to the clear screen question was
> >> "Which screen?"

> >
> > I like "use glass cleaner".

>

I just tell them to turn the computer upside down and shake.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mini Dual Layers? Mini dl ScubaSteve7979@gmail.com DVD Video 0 10-25-2005 07:52 PM
The Mini-ITX Project Part II at XYZ Computing Silverstrand Front Page News 0 10-24-2005 01:49 PM
The Mini-ITX Project at XYZ Computing Silverstrand Front Page News 0 09-19-2005 03:25 AM
Mini Project - Beginner in Visual Studio .NET Scottie T ASP .Net 2 04-02-2005 10:26 AM



Advertisments