An Enviromental Git

Where do I begin? This is my second attempt at working on a git repository. I wanted to make sure I made advancedment since the first one, as I felt the first one was really easy. There was a number of things I considered and I decided to do it more goal oriented this time.

List of Goals

  • Work on a large companies project
  • Attempt an environment that felt overwhelming
  • Code in C++

Finding an Option

I set those three goals for myself. The top two being inspired from a class I had earlier that day. I decided this because the current approach caused me to spend more time searching then actually learning. It wasn’t a good use of my time.

I did some searching, and at moments it felt futile, about 15 minutes into searching I decided I have to make a decision, so I quickly searched by C++, made sure there was some first time contributor labels. And dived in, the result?

Windows Calculator

That’s right. Windows Calculator. This simple program, that many of us use on a day to day basis. My first thought was more under the lines of “Wait, this program still has issues?”. My next thought was, damn this is a lot of files for that simple program. Is someone just a really bad programmer who wrote this? Okay, well I said I would do it, so here I am! You can check out the repository here.

The Set-Up

First approach I did was finding an issue. I stumbled upon this one I said hey! I know what macros are! I know what they accomplish! Surely I can attempt this one. So let me go the for this repository.

The readme is fairly detailed, and provides everything you need to know about contributing and working on calculator. It even shows you to set-up the environment. All I can think of “this is awesome”!

Set up

As you can see it has very detailed steps, and I thought this was going to be an easy process. So I’m going to detail the steps I took, and try to guess where I went wrong.

So first step is making sure I have the latest version of Visual Studio. I boot up my Visual Studio 2017, and go to the about, and it doesn’t recommend me any updates. Perfect, thats good to go!

I then go into components, Oh perfect the Universal Windows Platform Development already! Awesome start! I see in the bottom right a bunch of Windows SDK, I actually choose to install them all. Better safe then sorry was my approach, 2 hours later they are done downloading and installed. A friend beside me non-chalantly mentions hey I should upgrade to Visual Studio 2019 at some point too. I just spent the last two hours installing the SDK! I have more work to do! I replied, and continued about my merry way.

I follow up and install the XAML Styler, perfect! I should be good to go! I load up the project, load the SLN, and errors are everywhere! My first thought, okay there are probably settings I need to change. So I spend sometime looking, and went over the notes, I realized I actually missed the optional C++ Windows Universal Platform Tool. Crap!

Another 2 hours go by and it is now installed, keep in mind that I can’t use visual studio when this is installing, so my hands are tied, as I only have coding work to do at the moment. And I load the solution again. Great a lot less errors! However, still some remain. Hmm! What is the cause of this. I look closer, and there are a number of libraries that aren’t working. Maybe I don’t have those libraries installed? Keep in mind, this is about 5 hours at this point into this project. Spending sometime looking for them, eventually I stumble upon the answer. And it’s not the answer I wanted.

This is the toolset, I was missing. After 5 hours of installing and updating ,needed what my friend told me casually to do. That is install visual studio 2019. My reluctance to keep up-to-date just wasted a ton of time! Sigh!

So I download visual studio 2019, and follow the steps to a tee. Perfect, 3.5 hours after installing and re-installing everything I needed, I am good to go! There are no errors in the code! At least none that are highlighting!

I have to re-target the solution, but thats simple enough, so I do some quick CALC_E_* find all in the solutions, and locate all the locations of the variables, I take a look to see how they are connected, and track them down CalcErr.h seems to be the origin of it all.

Perfect I have found all the #define macros that I need to change! I do some research, find that static constexpr are actually automatically declared as inline, and I make the code changes. Now time to make sure it works. I begin to run the program in non-debug mode through visual studio.

Oh, a new error!

BootstrapForDebugging returned null instead of IPAddress & PortNumber of the remote msvsmon process

Uhh, English? Then I really take a look at what I am running, there are 6 solutions within a solution. They are running them all simultaneously, 2 of which are used to run calculator (Think front end & back end), and 4 that are actual tests. No idea which one it is, but this problem took quite a bit of googling, eventually I figured out I had to change the tests to run on an x64 machine. And this process took about an hour of trying different solutions, and making sure that it wasn’t a problem of a remote test connection. Eventually I figured it out, and boom, I ran all the tests. Everything compiled and…to my surprise, Calculator(Dev) loads up on my computer.

The Pull Request

Wow, that was a wild wide, now, I just need to push it. Crap, I got so caught up in creating the developer environment, that I forgot to create a branch! Whew nothing some googles can’t fix! You can see how I fixed it here.

I submit the request, and at Microsoft you have to sign a contribution contract of sorts, as well as it runs through some tests automatically. Both of these are now done, and now it’s been assigned to a Microsoft Employee to review my code!

So far so good! But what a wild ride.

I set to accomplish my goals, but I learned how to work in a bigger environment, the need to follow instructions very closely, and was able to contribute to a larger picture. You can see my pull request here.

I suggest anyone to just dive in like I did, and make the same mistakes I did, or be better and learn from my mistakes. Either way, don’t be afraid! With no risk there is no reward, and hopefully now they’ll accept my code and I can say I helped with the calculator, an application that is used worldwide, which is a super cool thing to say!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at
Get started
%d bloggers like this: