GR3

Dear public internet diary,

Today I decided to pay for the GRE fee with my credit card, because I need to get the test over with so I can apply to colleges before the September – December deadlines, but I don’t think I’ll have the spare cash in June. (The financially awkward part of being an adjunct instructor is not quite knowing how pay is going to go when going between semesters)

Why is the exam so dang expensive? I will already most likely need to take out loans for college itself. I will have to do research into scholarships and assistantships. Sigh. I still have loans from my BS, and from the last two times I tried to get into gradschool for different areas. I thought that I had to pay off these loans before I could move onto the next thing, but it is clear that this debt will be with me for a while – so why let it stop me? I’ll just go back to school, gain more debt, and then once I have a career that I’m happy with, then I can spend the rest of my life paying it off. ๐Ÿ˜›

I’m looking forward to going back to school, I guess. I’m building a new career, or a couple new careers, because the life of a corporate software engineer doesn’t suit me. Since I’ve quit and been working on my startup and as an adjunct, and been on an antidepressant, I’ve been so happy – probably happier than I’ve been in years. I’m a bit disappointed in myself for not having an established career at the age of 28, but eh… who really has their shit together in their 20s anymore? But I have hope in my future now, once I realized that Iย don’t have to keep doing the same kind of work – the 8-to-5 open-floorplan boring but stressful programming work. I’m no longer making anywhere near $90k/yr, I’m trying to figure out how to manage my finances on a tight budget, but at least I’m not withering away anymore.

Jeopardy for Computer Science

Sometimes, class gets quiet. Especially during review days, students usually don’t speak up on their own to ask questions. So, this semester I wrote a little Jeopardy program and used it for both of my classes.

The students at the community college I’m teaching at seemed to enjoy it; I was even asked to make more questions and come back with candy as a reward next class. So I will. I upgraded the Jeopardy program and wrote new questions dealing with different topics in Computer Science / C++, and it’s all ready to go!

This program is written with C++ and SDL2, as well as my Kuko framework. Since the class is about C++, I thought that it would be good to write the program with C++, instead of doing it as a webapp (which would have taken less time, admittedly!)

You can download the game code here: https://github.com/Rachels-Courses/CompSci-Jeopardy

It also requires the Kuko library: https://github.com/moosader/kuko

As well as SDL2 and Lua 5.2!

Kind words

When I was a student, I always tried to leave nice messages on my final exams / final submissions, so it is really nice to get the same from my students now that I’m teaching. ๐Ÿ™‚

I’m going to keep these for posterity!

I’m sorry it’s late. Have a great summer, and thank you for being such an awesome C++ teacher and teaching us how to get a good job as a programmer. ๐Ÿ™‚

 

It was a great semester learning from you and you definitely helped me to accomplish my goals in starting to learn the basics of programming. I wish you all the best […] Saying thank you isn’t enough for what you did to help me learn and giving me the Arduino as a gift but I promise I will learn from it and will always remember you ๐Ÿ™‚

Visual problem solving with SDL2

I am assembling some projects in my Challenge Topics repository on GitHub (https://github.com/Rachels-Courses/Challenge-Topics). These are projects that I’ve written to show in class, asking the students to come up with a better algorithm to solve some problem.

Here are some examples:

Screenshot-Searching

With this one, a linear and a random search are implemented to search a sorted list. The challenge is to ask students how a better searching algorithm can be done for our sorted list, where we do searching more intelligently than just going from the beginning to the end.

You can also expand this to talk about creating a data structure that auto-sorts when items are inserted, and whether to implement this by sorting immediately after an insert, or do a smart-insert and look for the appropriate position for the new object.

 

Screenshot-Travelling Salesperson

For this one, a list of cities are generated at random points on a map. The random paths generator essentially adds paths between cities in the order that the cities were generated. The challenge here is to ask students how to build a more intelligent route, visiting all cities once, and returning home afterward.

So for example, in the above screenshot, the salesperson goes from Grandview to Leawood to Raymore, which is a bit nonsensical.

You can also demonstrate Dijkstra’s Algorithm as well.

 

Screenshot-Collision Detection

Another problem we can look at is detecting how two objects are colliding, such as in a game. There are multiple ways to handle it – for example, you could do bounding-box collision detection and check the perimeter of the images themselves, each edge. Pros and cons? Could be empty space colliding, such as the top-right of the bunny and bottom-left of the dog.

Another option is to use the distance formula and figure out what a good distance is before considering the two images colliding. This works well for circular objects, but might not work as well for an oblong object.

Or, you could do a combination of both, maybe each object has several bounding boxes within it (like the dog’s head, and dog’s torso).


 

The idea behind these exercises isn’t to necessarily get the “most efficient” algorithm to any given problem, but to have students brainstorm and actually think about the problem visually, instead of having everything be intangible. Having pure console-based applications using just cin and cout can be boring, and even when implementing something modelled on a real-life system, it can be hard to really get into it. Even many command-line programs use something like pdcurses to give more organization to the presentation of the program.

So by using the SDL library, we can still write C++ code and demonstrate some problems in a more graphical way. Even if SDL is not available on the students’ school computers, if the teacher has a laptop they can install SDL2 on their own and display it to the entire class for a more social lesson.

Learn more about SDL at: https://www.libsdl.org/

And my challenge repository is at: https://github.com/Rachels-Courses/Challenge-Topics