Some small updates on what’s keeping me busy this week: EdX and Microsoft’s C# course, and learning GitHub.

EdX.Org Programming With C#

I’m taking the free Programming With C# course on EdX.org provided by Microsoft. It’s starting off slowly, as advertised: the first two modules (due this past Sunday) were all about variable assignments and looping.

It’s interesting because part of your grade is based on peer assessments of your assignment. When your assignment for the module is submitted, you get to assess and grade the code of two of your peers. Each screen shows another user’s submitted code, under which is the following rating interface:

EDX PEER GRADING

The Peer Review interface on the EdX Platform

 

The first assignment was tedious because it involved creating variables to describe a student, a professor, a degree, and a course, but only using what the module covered, which was just variables and Console.Writeline. No objects yet; no structs.

It was a little awkward creating variables with a prefix on all of them to tell a student’s name, for example, apart from a professor’s name.

Here’s my solution on Github. Reading the code in the peer reviews, I realized I could’ve been more graceful with my use of Console.Writeline.

Modules Three and Four are due this week. Module Three covers using methods and exception handling, while Module Four gets started on data structures, covering arrays, enums and structs.

 

GitHub and Visual Studio: Lessons in Learning

While doing some of the work for the C# class and Entity Framework, I realized that while I setup a Github account and setup Visual Studio to use it with a project, I wasn’t actively using it to manage code.

I’ll need to know version control at some point, so I decided to get started publishing a small change to my code and then reverting it so that I could see what to expect from Github.

That’s when I learned: Don’t practice messing with Github code with code you care about. Here’s the Commit change log that shows that I just changed the one file:

Github Oops 1

 

So far, so good. Then I tested reverting that change, and… uh oh .Should’ve paid attention to the changes before I pushed:

Testing Oops 2

 

What I pushed didn’t remove the changes to the one file; I wound up removing every file in the project except the one I changed. Oh boy. I didn’t realize what happened until I checked the history afterwards.

The bright side is that this made me learn two new things with Git:

  1. Since the original code was still inside of an early code commit, I looked up how to revert back to the code inside of a specific commit.
  2. I looked up Git branching and merging, which is probably what I was supposed to do to begin with.

I’ve since retrieved the old code and branched the portion I wanted to separately save into a separate branch.

For a good starter tutorial on learning Github for version control, check out Lauren Orsini’s article, Github For Beginners: Don’t Get Scared, Get Started.