CI/CD Building a C# Project in Jenkins

The goal for this stage of development is to get our C# project listed in Jenkins and building. The next iteration will be adding testing.

This step follows the work from CI/CD Scanning GitHub for Repositories from Jenkins, where Jenkins is set up to scan for projects, but it now needs the files required to build.

Continue reading

CI/CD Scanning GitHub for Repositories from Jenkins

The next step is to get Jenkins to search GitHub for repositories to build.

I want all the projects in my GitHub repository that qualify to be built automatically, so if I add a new project with the right setup, it will automatically build it.

This can be achieved by having Jenkins scan your GitHub repository to gather all projects. GitHub supports pushing to Jenkins when repositories change, but that is more complicated when Jenkins is behind a firewall and cannot be directly contacted (we’ll be relying on polling in this case instead).

Continue reading

CI/CD Visual Studio Project Layout

As described in https://www.oneoddsock.com/2022/04/02/personal-ci-cd/, the goal of setting up the CI/CD automation is to:

  • Break up my more monolithic solutions into much smaller, more consumable components
  • Automate testing of my code
  • Improve potential for code sharing with others
  • Greater visibility of code/test status through reporting

To facilitate this, I’ll structure my Visual Studio solutions in GitHub so Jenkins can access them and run builds and tests.

The sample project is published on GitHub for reference at: https://github.com/FineRedMist/jenkins-project-sample-dotnet

For reference, I’m using Visual Studio 2022 Community Edition. I’m configuring the projects to use .NET 6.0.

Continue reading

Personal CI/CD

I have a number of personal projects with code scattered about, where if I want to include code from one project into another I generally either need to copy code or find more sophisticated ways to share.

After going through interviewing coop student candidates and seeing their projects and GitHub repositories (when provided) I realized that documenting the process and demonstrating the value you can get out of it would be substantial.

The motivation for me is to take my projects to a higher level of rigour and improve reuse. Furthermore, I want to automate builds, validation by content tests, notifications, etc.

I do use GitHub for storing my projects which are primarily in C# but I want to amp up my setup to another level. The feature I want are:

  1. Get my projects from GitHub
  2. Build them
  3. Run tests on them
  4. Post main branch builds to a NuGet repository
  5. Post main branch symbols to a symbol server
  6. Generate notifications to Slack (I have my own setup for the family) about build status.

I already have a machine I use locally for service-related work. Switching to Linux would be non-trivial due to some of the services being run.

So the following setup will be using Windows, but I don’t think it will be entirely dissimilar to Linux.

The software I’m looking at using for all of these are:

Anything else that comes up during setup will be documented along the way.

Unreal Engine & Localization

The Unreal Engine has some rather nifty functionality for dealing with localization. We have also made numerous modifications to facilitate our workflow, but I’ll stick to what is in vanilla Unreal (this is based on 4.25).

There are three different string types to use within Unreal:

  • FString: These are traditional strings most people are used to. When creating a new string it will allocate memory to store the data. Equality comparisons need to check the actual string data.
  • FName: When you create a name, it is stored in a table in memory permanently (there is no clean up of unused names). Two FNames with the same value point to the same index, which makes equality comparisons very fast: they just compare indices. But the memory usage can grow without bound.
  • FText: These are localized strings that go through a process of being gathered, translated, and having their values stored in a separate file called a locres file. When evaluating an FText, there is a lookup for the actual value to use.

Epic provides a tokenization system using curly braces, { and }, where you can provide parameters (either positional or named) for an FText format string.

However, we added another one using square brackets, [ & ], where we would take the token within and look up the value as an FName in various tables that were provided to look up information.

Continue reading

We Got Schooled

Welcome to Ontario, where we are in lock down again.

It is really unfortunate we are in this situation again. We didn’t need to be. We could have been substantially more rigorous about how we approached testing for COVID, constraining vectors of transmission, and minimizing spread of the virus.

This may sound odd, but sadly Ford’s Ontario government’s focus on the economy has missed extraordinary opportunities that existed. We could have done so much more for the economy AND constrained the spread of COVID.

What is interesting is these opportunities are STILL present. We can still implement these now, just without the same impact it would have had six months ago in the summer.

The first thing to note is now we have to up our game: COVID is mutating given the number of people infected and how we are fighting it. We need to be prepared for this by minimizing spread as much as possible to reduce opportunities to mutate and overcome our efforts to immunize.

First are all the notes we made in https://www.oneoddsock.com/2020/08/10/covid-19-and-the-ontario-education-guidelines/.

Since I posted this we have learned a lot about how effective school is at present. It is clear that it isn’t working effectively.

Students don’t reliably have effective spaces or resources for learning that school provides. So when learning remotely (as high school students are obligated to 3/4 of the time and now all students have to do ALL of the time), accommodations are needed to make education effective.

The following are additional recommendations:

Continue reading

Minimum Wage & COVID

I find it extremely disappointing that the frontline workers that have to deal with the substantially greater risk of contracting COVID are in many cases relying on minimum wage.

If they really are as valuable as we are saying (and I think they are), we should increase the minimum wage to reflect that.

I fully agree with paid sick leave, particularly for COVID to avoid further infections, but there is one more detail I would add to minimum wage requirements: Part-time workers should have a HIGHER minimum wage. The reason being is they are not working the full 40 hours per week and are substantially more likely to have multiple jobs to support themselves and their family. Working multiple jobs increases the likelihood of spreading COVID as it crosses (theoretical) bubbles. Increasing the minimum wage for part-time would ideally drive more employers to provide full-time work instead and reduce the number of jobs that a person has to maintain to support themselves and their family.

“Use Your Own Words”

I didn’t expect how much this hurt.

You can take some text and apply some function to it, say “summarize” or “paraphrase” and you have an idea of what to do.

What do you do when you are asked to take some text and “express it in your own words”? I don’t know what this means. Let me turn it around to give you an example. Let’s say given some text A I come up with text B that is “in my own words”. How do you test that? How different does B have to be from A? How similar do they have to be to ensure B reflects A in some way? If you assign this task to multiple people, you not only expect different results, you *want* different results as if it is unheard of to have people apply the same poorly defined “in your own words” function to text A.

As to the hurt? I have a rather intense case of imposter syndrome. I didn’t grow up in an environment that was particularly interested in what I had to say. Everyone else was far more interested in talking about what was on their minds than being interested in what I had to contribute. So I learned to shut up. I don’t have my own words.

Extra Notes:

The procedure I’m approaching when I encounter this now is to review the material, close it so I’m not referring to it, then write my thoughts on it. Then compare to determine if I’m missing relevant details.

However, it still feels like there is a fundamental issue when you think about making information concise but unique; the concise configurations one can have of words about a topic that conveys information minimizes words increasing the likelihood of non-uniqueness amongst others going through the same operation.

Making Tracks

I briefly had the Canada COVID-19 tracking application installed, but I was extremely disappointed. It required both Bluetooth and GPS to run which means that if either were off for power saving then it wouldn’t operate. The exchange of codes should not require GPS at all. Furthermore it calls into question about the application not tracking location and maintaining personal privacy by demanding GPS to be enabled.

I honestly would have hoped for more from this functionality. There are a couple of features that would have stood out as compelling to keep it installed and available more often:

  • An API that other applications can use to determine how busy potential destinations are, the amount of interest in it (from other viewers, anonymous), and possibly recommendations for less busy places of a similar kind and distance.
  • Getting paid in some minor way, a credit, or tax break for running the application.

It should also reduce the barrier for tracking and reporting COVID. It could provide a QR code for testing facilities so your phone can directly receive notification of test results and propagate them, or scan a QR code from the test from the screen to do the same so there isn’t the likelihood of manually entering data or griefing with manually entering false information.