Gearing Up for Spring 22 Data Structures

Happy New Year!  I hope your winter break has been restful and relaxing!

I’ve gotten a few requests from folks about how to prepare for CS 2341.  So I thought I’d provide a list of things to review before class starts:

  • C++ Language
    • Pass by value vs pass by reference vs pass by pointer
    • Pointers and dynamic memory allocation
    • How to declare classes and their main methods (constructors, destructors, etc)
    • Operator overloading in a class
    • Object composition 
    • Did I mention Pointers?  
      • How to declare a pointer?
      • How to dynamically allocate memory on the heap?
      • How to dynamically allocate an array of pointers? 
      • the & operator and the * operator
    • How to separate interface from implementation 
    • reading and writing files and parsing data 
  • Conceptual Things
    • How to break a problem down into bite-sized chunks. 
    • The idea that a function should do one thing and it should only do that one thing
    • Developing algorithmic solution to basic problems involving a simple 1D array
      • make use of control structures like ifs and loops
      • example: Find the 2nd smallest value in an array with only 1 loop. 
    • The conceptual relationship between pointers and arrays.
    • How to use a debugger

Perhaps the thing that is the biggest curve ball to students in 2341 is the scope and scale of the programming projects.  They will be much larger than you’ve encountered in previous classes.  This is intentional.  Learning to take a really large project description and break it down into manageable pieces (said another way: how to functionally decompose a problem) is as important of a skill to develop as actually being able to write the code to solve one of those pieces. 

 

Adding Timeout to Github Actions

To add a timeout to a Github Actions Workflow, add the timeout-minutes to the workflow YAML file.  See the red box in the image below for where to add it.  Once you save, commit, and push that change to your repo, let your TA know and they will … [Continue reading]

Old Python2 Code Causing you a Headache? Convert Python3 Automagically!

Do you have some Python 2 code hanging around?  Found some example code for exactly what you're trying to do, but it is written in Python2?  Python 2 has been sunset for a while now.  But converting your Python2 to Python3 can be a pain.  Well, did … [Continue reading]

What are the gcc system include paths?

The #include preprocessor directive in c++ is one of the first things that people learn. They come in two varieties: #include<> - usually meant for system-level includes such as iostream or other headers from libraries installed at the … [Continue reading]

Customizing CLion

Clion Logo

Some folks get a lot of enjoyment out of tweaking the UI of a piece of software.  In an IDE like CLion, the color scheme used for the code editor is highly customizable.  If you'd like to explore the settings and/or find a new theme for CLion or just … [Continue reading]

Docker and MySQL

Containers are all the rage, and Docker is the container engine of choice these days.  So, I wanted to provide this tutorial for setting up a MySQL server instance in a Docker container. … [Continue reading]

Spring 2019 Help Desk Schedule

The Spring 2019 Help Desk Schedule... … [Continue reading]

Linux, C++, and Libraries like myHTML

Whenever you write c++ code for a project, have you ever wondered where the actual implementations for iostream's << and >> operators are?  What about the implementations for all of the algorithms that are in the algorithm header? … [Continue reading]

Customizing Shell in your Terminal

I use  the terminal to do quite a bit on both my Mac laptop and Linux desktop.  Sometimes its easier to hammer out a shell command than it is find the right context menu or menu item to click to do something. On Linux, I use Guake Terminal and … [Continue reading]

Java – Exam Stats Example

This post is another in the series of small Java Programs and their evolution.  The scenario for the program today, Exam Statistics, is calculating a couple statistics for a set of grades entered by the user. You can see in the code below, I work on … [Continue reading]