Open Sourcing My University Projects

Have you ever googled for solutions to textbook problems?

In programming classes, googling for code is a common practice. If I get stuck, I often look up existing solutions to get a feel for the potential flow, architecture, or algorithms used in the program.

Many of the solutions I would find would be from students at my university. They would post their code to GitHub publicly, either because they didn’t have free private repositories or they wanted to share it with the world.

Normally I work on projects in private repositories (I get unlimited private repositories via the GitHub student pack). Many of them are still buried deep in my account.

However, I have decided to release all of my projects from last semester on my GitHub. Here is a quick run-down of the classes I took and each project within the class.

CS 550: Distributed Systems

Dapster (Java) [GitHub Link]

Napster is a classic file sharing program; this is my version of it. The architecture involves peers hosting and downloading files from each other, as well as a central indexing server for peers to register their files with.

This project was the first time I worked with the Client-Server Stub/Skeleton architecture.

Danutella (Java) [GitHub Link]

Gnutella is another file sharing system, except that it is fully distributed; there is no central indexing server. My system has been augmented with two consistency mechanisms (push and pull) which allow peers to know if their files are out of date or not.

This project was the first time I worked with message passing and multi-casting algorithms.

CS 586: Software Systems Architecture

Gas Station Simulator (Java) [GitHub Link]

In this project, I used the Model Driven Architecture to make a platform independent gas station model. Using the base model, I made two platform dependent Gas Pumps.

This project was the first time I used the State, Abstract Factory, and Strategy patterns.

IPRO 497-222: The Science of Volleyball

WinSight (C, CUDA, PHP, Python) [GitHub Link]

WinSight is a Volleyball training tool currently specialized for improving consistency in players’ setting. In this project, I worked with chrmil11 and HeatherFlux to fork YOLO, an object detection framework, to track volleyballs.

WinSight’s Setup at Spring 2018 IPRO Day at IIT

This project was the first time I worked with computer vision and GPU computations rather than CPU.


Hopefully these repositories serve as useful guides for future students.

Please comment below if you’re interested in any of these projects, or if you’ve found this post on a search for answers!

Programming Puzzle Solution

Did you get it?

Let’s first talk about what exactly this expression is doing:

g(a).b[c] = 2;

g is a function that takes some parameter a, and returns a structure with an attribute b, which is an array. In this statement, we’re setting b’s c’th value to 2.

This is useless in C because the structure returned by g will just be thrown away – there are no more references to it.

However, in C++, we have the ability to return references, which are just pointers underneath, using the symbol &. Therefore, the change to the b array would persist, making this a not-so-useless line of code.

What might spark your mind is the normal pointer-based structure variable accessing, which would look like this.

g(a)->b[c] = 2;

This would be useful and work the same way in both C and C++.

 

I hope this puzzle solution satisfied you. If not, I’m thinking of making more programming puzzles. If you’re interested in some of a specific language or technology, leave a comment down below.

 

Dan