skip to main content
10.1145/3160489.3160503acmconferencesArticle/Chapter ViewAbstractPublication Pagesaus-ceConference Proceedingsconference-collections
research-article
Public Access

How to teach "modern C++" to someone who already knows programming?

Published: 30 January 2018 Publication History

Abstract

The C++ programming language has undergone major changes since the introduction of C++11. 'Modern C++,' defined here as C++11 and beyond, can be viewed as a new language compared to C++98 (the version of C++ introduced in 1998). Many new features have been added to modern C++, including lambda expressions and automatic type deduction. The standard library has also been dramatically updated with constructs such as std::unordered_set and smart pointers. The traditional way of teaching C++ by first teaching C's low-level features, such as raw pointers and char * strings, is potentially ineffective when teaching modern C++. Based on this hypothesis, we updated the way in which we teach C++ at UW-Madison by teaching the most important high-level features (containers, iterators, and algorithms) first, and introducing the low-level features (raw pointers, dynamic memory management, etc.) only when they are necessary. In this paper, we present our experiences teaching modern C++ with this top-down approach. We find that with our new approach, students' perceptions about learning C++ are largely positive.

References

[1]
2010. Keith Schwarz's C++ Course Reader. http://web.stanford.edu/class/cs106l/handouts/full_course_reader.pdf. (2010).
[2]
2015. David Kieras's Using C++ Lambdas. http://umich.edu/~eecs381/handouts/Lambda.pdf. (2015).
[3]
2015. David Kieras's Using C++ Smart Pointers. http://umich.edu/~eecs381/handouts/C++ 11_smart_ptrs.pdf. (2015).
[4]
2017. Erase-remove idiom in C++. https://en.wikipedia.org/wiki/Erase-remove_idiom. (2017).
[5]
2017. ISOCPP's C++ Videos. https://isocpp.org/blog/category/video-on-demand. (2017).
[6]
2017. Meeting C++ Videos. http://meetingcpp.com/. (2017).
[7]
Ivaylo Donchev. 2013. Experience in teaching C++ 11 within the undergraduate informatics curriculum. Informatics in Education-An International Journal Vol12_1 (2013), 59--79.
[8]
Kate Gregory. 2015. Stop teaching C. https://www.youtube.com/watch?v=YnWhqhNdYyk&t=2002s. (2015).
[9]
Emily Howe, Matthew Thornton, and Bruce W Weide. 2004. Components-first approaches to CS1/CS2: principles and practice. ACM SIGCSE Bulletin 36, 1 (2004), 291--295.
[10]
Andrew Koenig and Barbara Moo. 2000. Accelerated C++: practical programming by example. Pearson Education India.
[11]
A Koenig and BE Moo. 2000. Rethinking how to teach C++ Part 1: Goals and principles. JOOP-Journal of Object-Oriented Programming 13, 7 (2000), 44--47.
[12]
A Koenig and BE Moo. 2000. Rethinking how to teach C++ Part 2: Two interesting decisions. JOOP-Journal of Object-Oriented Programming 13, 8 (2000), 36--40.
[13]
A Koenig and BE Moo. 2001. Rethinking how to teach C++ Part 3: The first data structures. JOOP-Journal of Object-Oriented Programming 13, 9 (2001), 35--38.
[14]
A Koenig and BE Moo. 2001. Rethinking how to teach C++ Part 4: Emphasizing the library. JOOP-Journal of Object-Oriented Programming 13, 10 (2001), 25--27.
[15]
A Koenig and BE Moo. 2001. Rethinking how to teach C++ Part 5: Working with strings. JOOP-Journal of Object-Oriented Programming 13, 11 (2001), 29--32.
[16]
A Koenig and BE Moo. 2001. Rethinking how to teach C++ Part 6: Analyzing Strings. JOOP-Journal of Object-Oriented Programming 13, 12 (2001), 29--32.
[17]
A Koenig and BE Moo. 2001. Rethinking how to teach C++ Part 7: Payback time. JOOP-Journal of Object-Oriented Programming 14, 1 (2001), 36--40.
[18]
A Koenig and BE Moo. 2001. Rethinking how to teach C++ Part 8: An interesting revision. JOOP-Journal of Object-Oriented Programming 14, 2 (2001), 43--47.
[19]
A Koenig and BE Moo. 2001. Rethinking how to teach C++ Part 9: What we learned from our students. JOOP-Journal of Object-Oriented Programming 14, 3 (2001), 44--47.
[20]
Timothy Long, Bruce Weide, Paolo Bucci, David Gibson, Joe Hollingsworth, Murali Sitaraman, and Steve Edwards. 1998. Providing intellectual focus to CS1/CS2. 30, 1 (1998), 252--256.
[21]
Timothy Long, Bruce Weide, Paolo Bucci, and Murali Sitaraman. 1999. Client view first: an exodus from implementation-biased teaching. 31, 1 (1999), 136--140.
[22]
Bjarne Stroustrup. 1999. Learning standard C++ as a new language. CC Plus Plus Users Journal 17 (1999), 43--54.
[23]
Bjarne Stroustrup. 2009. Programming in an undergraduate CS curriculum. In Proceedings of the 14th Western Canadian Conference on Computing Education. ACM, 82--89.
[24]
Bjarne Stroustrup. 2014. Programming: principles and practice using C++. Pearson Education.
[25]
Bjarne Stroustrup. 2016. C++11 - the new ISO C++ standard. http://www.stroustrup.com/C++ 11FAQ.html. (2016).
[26]
TIOBE. 2017. TIOBE index for C++. htps://www.tiobe.com/tiobe-index/. (2017).

Cited By

View all
  • (2022)How much C can students learn in one week? Experiences teaching C in advanced CS courses2022 IEEE Frontiers in Education Conference (FIE)10.1109/FIE56618.2022.9962662(1-8)Online publication date: 8-Oct-2022
  • (2021)Detecting Memory-Related Bugs by Tracking Heap Memory Management of C++ Smart Pointers2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE51524.2021.9678836(880-891)Online publication date: Nov-2021
  • (2019)Teaching C programming in context: a joint effort between the Computer Systems, Embedded Computing and Programming Challenges courses2019 IEEE Frontiers in Education Conference (FIE)10.1109/FIE43999.2019.9028687(1-9)Online publication date: Oct-2019

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ACE '18: Proceedings of the 20th Australasian Computing Education Conference
January 2018
127 pages
ISBN:9781450363402
DOI:10.1145/3160489
  • Conference Chairs:
  • Raina Mason,
  • Simon
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 30 January 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. course experiences
  2. modern C++ pedagogy
  3. ordering of topics
  4. problem-oriented approach
  5. syllabus design
  6. top-down approach

Qualifiers

  • Research-article

Funding Sources

Conference

ACE 2018
Sponsor:
  • Southern Cross UNIVERSITY
  • SIGCSE
ACE 2018: 20th Australasian Computing Education Conference
January 30 - February 2, 2018
Queensland, Brisbane, Australia

Acceptance Rates

ACE '18 Paper Acceptance Rate 14 of 36 submissions, 39%;
Overall Acceptance Rate 161 of 359 submissions, 45%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)118
  • Downloads (Last 6 weeks)16
Reflects downloads up to 01 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2022)How much C can students learn in one week? Experiences teaching C in advanced CS courses2022 IEEE Frontiers in Education Conference (FIE)10.1109/FIE56618.2022.9962662(1-8)Online publication date: 8-Oct-2022
  • (2021)Detecting Memory-Related Bugs by Tracking Heap Memory Management of C++ Smart Pointers2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE51524.2021.9678836(880-891)Online publication date: Nov-2021
  • (2019)Teaching C programming in context: a joint effort between the Computer Systems, Embedded Computing and Programming Challenges courses2019 IEEE Frontiers in Education Conference (FIE)10.1109/FIE43999.2019.9028687(1-9)Online publication date: Oct-2019

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media