IA Algorithms Enrichment 2017
Activities > Dec 9 > Further topics

Further topics and study

Congratulations on completing the IA Algorithms enrichment! Over the course of this enrichment, you have seen different algorithms that are used in the wild, learned how to design algorithms, and then implement those algorithms in C++. In truth, this type of thinking will carry over to any programming language you might want to learn -- all programming languages will have if/else statements, variables, arrays, etc., at this point, it is just a matter of learning new syntax and adjusting yourself to the features of each new language.

C++ is a fairly popular and common language and is used to write things ranging from operating systems (Windows, macOS, and Linux all have components written in C++) to end-user client applications. There are a lot of different extensions to C++ that allow you to use it for a wide variety of different applications. These extensions will require further knowledge of C++ than what we have discussed here, but as you learn more about C++, you will find that a number of neat tricks that C++ is capable of are really just built upon a lot of the basic building blocks that we have already learned. I strongly encourage you to continue learning and writing in C++ (in addition to other programming languages), being able to write computer programs is an invaluable skill.

I've listed here a number of resources and topics for you to research if you decide that you are interested in continuing to learn about programming and CS topics. These are entirely optional, and will remain located at this web address for the foreseeable future.

As a general comment, you will find a lot of information about programming on the Internet. Google searches will almost always find you relevant topics, documentation, and examples (more often than in other fields, in my experience), and wonderful sites like Stack Overflow host a whole treasure trove of programming knowledge in a friendly Q&A format. If you want to learn something, just search for it!

Finishing up C++ concepts

We've covered the basics, but there is still much more to learn about how to program in C++. Here's a list of topics I recommend you look into next:

In addition to knowing these topics, it's also a good idea to familiarize yourself with the C++ standard library. While it is large, it provides a number of useful tools for solving all sorts of programming problems. I would recommend looking at these headers in particular:

  • <cmath> (contains math functions)
  • <cctype> (contains functions for dealing with characters)
  • <cstdlib> (C Standard Library utilities, specifically with int/char[] conversion and random number generation. malloc and the like have been superseded by new and delete in C++)
  • <ctime> or <chrono> (dealing with time)
  • <map> (creates a "list" where the indices are of an arbitrary data type)
  • <fstream> (input/output with files -- not possible on repl.it)
  • <algorithm> (provides standard implementations of common algorithms, such as sorting)

C++ libraries

C++, being a common and open language, also has a large number of libraries that enable you to do more things with C++ than you can do only with the standard library (at least not without a lot of low-level work). Here is a short list of libraries you might be interested in, and a short description of their purpose:

  • Qt is a cross-platform graphical application toolkit that allows you to build applications with graphical user interfaces (GUIs). Qt also provides classes for other useful things, such as network communication, database connectivity, webpage rendering, and reading from device sensors.
  • cUrl is a C library (that is compatible with C++) that allows you to communicate with Internet hosts; you can use it to download or upload files or information from/to a server, and much more. This is a C library, so some of the patterns it uses might be unfamiliar; I recommend that you look at a number examples and read the documentation prior to writing an application with cUrl. You can also find C++ bindings for cUrl online, but be aware that these may not be as well-documented.
  • cocos2d-x is a video game engine/development library targeted for C++.

Caution: cUrl and some components of Qt allow you to communicate with public computer systems. Exposing your program to the Internet (or even providing it a way to access the Internet) can provide a way for malicious computer programs to make their way onto your computer. Ensure that your program only communicates with hosts you trust, and that your program only does what you intend for it to do.

This is not an exhaustive list of C++ libraries, there are lots out there (some even for the same purpose as others). Most libraries you find should have documentation that details how to use all of the interfaces in the library, as well as some examples to get you started. If not, Google searches will often find examples for you. When working with libraries, you will often find yourself Googling a lot of specific questions. Sites like Stack Overflow have a lot of good questions and answers on how to deal with specific programming problems (library-related or not).

Other programming languages

C++ is not the only programming language. There are plenty others, and knowing one helps immensely with learning others. If you are interested in learning new programming languages, you can try some of the languages listed below. Note that a number of these feature a syntax very similar to C++:

  • Java: A cross-platform application programming language inspired by C/C++. Heavily object-oriented. Comes with a vast standard library that serves most of the needs of an application developer. This is also the language used to create Android apps.
  • Python: A cross-platform, interpreted, object-oriented, dynamically-typed programming language. Useful for making small programs that have a single dedicated purpose, or if you just need to mess around with some code; but it can be used on a larger scale. Known for a more abstract, readable syntax than other programming languages. Also has a large selection of packages that provide a wide range of functions.
  • JavaScript: An interpreted, object-oriented, dynamically-typed programming language, influenced by Java and C++ (but is quite distinct from those two). Most often used to provide functionality in webpages. Usually considered to be of a rather low quality (compared to other languages), but is quite useful. I recommend learning HTML and CSS, which, while not necessarily programming languages themselves, are usually used with JavaScript to build web applications.
  • Swift: Impicitly and statically typed, object-oriented programming language based on Objective-C. This is largely used for iOS app development but can be used as a general systems programming language as well. Requires macOS or Linux (macOS required for iOS app development).
  • Rust: Implicitly and statically typed, object-oriented systems programming language designed for speed, memory, and thread safety. This has been developed in the last few years to address a lot of pitfalls in other languages (including C++). Components of Mozilla Firefox are written in Rust.

Here's a brief explanation of some of the terms used above:

  • Interpreted: Instead of compiling your source to computer code, source code is read and executed line by line. Generally slower than compiled languages but do not require recompilation after code changes.
  • Dynamically typed: Types and type conversions are checked at runtime. These languages are usually interpreted and also implicitly typed.
  • Implicitly typed: Variables do not need to be given types when they are declared; their types are inferred from the type of data being assigned to them. Implicitly typed languages usually have a keyword (like let or var) that are used for all variable declarations.
  • Statically typed: Types and type conversions are checked at compile time (like C++). This is the opposite of dynamic typing.
  • Systems programming language: The language can be used to program low-level components of a computer system; these languages can also be used for more user-facing components as well. C++ is a systems programming language.

Source version control

As your software projects get larger, it becomes more important that you are able to record changes that you make to the codebase and be able to revert changes at any point. Additionally, group software projects need to accomodate a large number of people working on the same codebase at once. Version control systems enable you to track changes in your software projects and also help accomodate development workflows of group projects. git is the most popular version control system, and is used to track hundreds of thousands, if not millions, of software projects. If you want to get more involved in software development, I highly recommend that you make an account on GitHub, an online git repository hosting service.