Wednesday, September 21, 2016

SE475 - Branching, Merging, and Refactoring (Submit 9 - 16)

What's up everybody!

So I finally finished Homework 2, and learned how to branch and merge in Perforce. Also, refactored SeLinkList to be a double linked list.

Branching 

I really thought I'd screw this part up, and I almost did! Turns out it was a lot simpler than it looks, all I had to do was right-click the folder with the project, click branch, and in the branch window, type the folder target name  HW2_DL(.../student/agarcin/HW2_DL/...). After seeing the preview of the branching, and several tries later to not get errors, I finally was able to create the branch, and start coding in that branch.

Merging nightmares

I admit, the title is very exaggerated but merging can be a pain if not done properly. when merging the branch to the main codeline, it nearly went as smooth as I wanted but there was my first conflict in main.cs. Fortunately I previewed the merge first and then noticed that there was only 1 conflicting file. I used the Merge tool window(?) and started resolving each file, one by one and making sure there we're no further conflicts. Since main.cs was going to be refactored, I kept the original file and then just refactored it as asked in the Submit 16.

Well, that was fun! branching can e very helpful when you want to try out some new code you just thought about, without ruining the main code.

I'll keep you posted, but until then, back to work!

Monday, September 19, 2016

SE475 - Getting to know Perforce (submit 1 - 8)

What's up everybody!

Sorry I'm late in posting updates, but I've been busy lately. I've finished steps 1 through 8 and I'd like to talk a little about how things are going with Perforce (I gotta do it anyway, it's part of my grade).

Understanding the basics

The first two submits were fairly simple add and submit. After I added the numPlayers variable and tested the Class in the main function. Then I added the SeLinkList class to the project (Although I should've called it SeLinkNode, but that's not the point of the class). Pretty much everything from here to Submit 5 is ok and I fully understand what's going on and how it works in perforce.

Removing and Recovering

This is were things got a little interesting for me. I remember in Keenan's Optimized C++ class we're he told us to never remove a file in perforce (or something about not deleting the file in the depot, I can't remember well), so I never touched the remove option, until now. I've done deleting before in GitHub, so I hoped it would be no different or difficult in perforce. Fortunately, my worries where laid to rest when I recovered the file (Submit 6).

Extra stuff!!

So, I've taken the liberty to add a few extra functions in the SeLinkList class and Player class for future submits (hopefully I'll need them) but Submits 7 and 8 are pretty much straight forward. I hope to get the last 8 Submits up and running by Wednesday before 1:00 p.m.

Love to stay and keep coding, but I got a plane to catch tomorrow.

I'll keep you posted, but until then, I'm going to bed.

Sunday, September 11, 2016

SE475 - Fibonacci Program

What's up everybody!

After the setup now finally comes my favorite part, coding!!

Fibonacci program development

This really wasn't hard, all I did was create a static int function named Fibonacci, takes an int as parameter and it is called in main. I thought of having the user input the numbers, but ultimately I just decided to go for the default numbers in the homework, 15 and 22.  The function checks if the given integer is equal or less than 2, if it is, it simply returns 1. But if it's bigger than 2, then the function calls itself two times, one with n-1 and the other with n-2, where the returned values are summed up (Fibonacci(n-1) + Fibonacci(n-2)). Not much else to add other than I successfully uploaded it to Perforce.

Note to self: whenever I create a new project, upload it immediately to Perforce! Don't wait until it's ready and upload it in one go. Remember to keep checking-in updates as much as possible, to have a better chance of having a good backup and not do everything all over again.

Feels good to code native C# again, I'm used to coding C# only in Unity, so this is a nice change of pace.

I'll keep you posted, but until then, back to work!

Saturday, September 10, 2016

SE475 - First Post and Basic Setup

What's up everyone?

So, this is my first post (it's in the title) and let's see where this goes.

Visual Studio and Perforce successfully setup?

Yes, took a lot of time downloading the VS with update 3 but I have it up and running with no problems (so far, let's hope it stays that way). As for Perforce, I already had it setup when I was in Fall quarter 2015-16 in Optimized C++ with Keenan.

Any problems?

Long download and install time of VS 2015 might've been bad, but I'd consider it more as an inconvenience than a problem. Setting up a new work space in Perforce was easy, so no problem there.

Closing comments

Other than making this post look longer and a little more professional, I successfully managed to setup everything correctly. Actually, there is one question lingering in my mind: Am I doing this whole blog thing right? I'll leave it as it is for now.

I'll keep you posted.