C++ Logo

std-proposals

Advanced search

Re: Making C++ easier for new students

From: Emile Cormier <emile.cormier.jr_at_[hidden]>
Date: Sat, 7 Aug 2021 12:36:10 -0300
Hi Bill,

You may already know what I'm about to suggest below, but I'll write anyway
for other instructors in the same predicament who may be lurking on this
mailing list.

I did a short stint teaching C++ game development at a community college at
while back, and introduced the C++ SFML library (https://www.sfml-dev.org/)
for it's portable multimedia features: graphics, sound, keyboard/mouse,
etc. It worked very well, allowing me and the students to focus on C++,
OO, design patterns, and game development instead of low-level nuts and
bolts stuff. The local gaming company that recruited many of the students
were apparently pleased with the results from what I've heard. Another
neighboring community college ended up adopting SFML as well for their game
development program.

There were no books on SFML at the time, but now I see there are a number
of them.

We also ended up using Boost (https://www.boost.org/) for its Signals2
library (https://www.boost.org/doc/libs/release/libs/signals2/), around
which we built a game events system. Boost also has a string algorithms
library (https://www.boost.org/doc/libs/release/libs/algorithm/string/)
that should be able to split a string (also check out Tokenizer -
https://www.boost.org/doc/libs/release/libs/tokenizer/).

For network communications, you could use the Asio library (
https://think-async.com/Asio/) or its Boost version (
https://www.boost.org/doc/libs/1_75_0/doc/html/boost_asio.html). C++23 is
supposed to introduce networking, which I understand will be based on Asio.
An Asio loop would have to be run in a separate thread than an SFML game
loop, so one would have to figure out a way to bridge the two (a
thread-safe queue, perhaps?).

The industry currently has to deal with C++ not having batteries included,
so you might as well teach your students how to integrate 3rd-party
libraries into their applications. Integrating libraries would be a useful
skill for them to learn.

I hope this helps, and thank you for teaching the next generation of
programmers.

Cheers,
Emile Cormier

On Tue, Aug 3, 2021 at 3:07 AM <std-proposals-request_at_[hidden]>
wrote:

> Date: Tue, 3 Aug 2021 06:05:07 +0000
> From: Bill Kerney
>
> Hi all,
>
> I've been watching this list for a while, and as a college instructor who
> teaches C++, I was curious how much interest this group has in making the
> introductory C++ experience easier for new students. It seems like
> something that would be good for the language as a whole in the long term,
> but I rarely see a proposal here that would make life better for my first
> semester students.
>
> After having taught C++ since, hmm, I guess technically 1997, but full
> time as a faculty member since 2015, I can relate to you all the questions
> I get asked which don't have a very good answer in the language and
> standard library:
>
>
> 1. How do I do non-blocking I/O? (Sometimes phrased like, "How do I
> read an arrow key?")
> 2. How do I recover from errors in input?
> 3. How do I display graphics on the screen?
> 4. How do I do colored text?
> 5. How do I read a mouse click?
> 6. How do I play a sound?
> 7. How do I send data over the internet?
> 8. How do I split a string?
>
> <snip>
>


> Thanks for your time,
> Bill Kerney
> Clovis Community College
>

Received on 2021-08-07 10:36:23