Using Source Control for Resume Managment

I've been applying to jobs recently and have wanted to have specific resumes for each job. The thing is even then certain resumes will be the same. I used to have multiple versions for different types of jobs, ie general programming, computer vision, game programming, etc. The time came when of course I would have a mistake or wanted to add a project on my resume I would need to do it for all my resumes. Now of course if you're like me, you're going to end up missing some part of it in some resume.

After trying to reconcile all the resumes I gave up, decided to delete all my resumes and start fresh. That's when I realised what I was doing was source control but not using source control and so I decided to use git. The idea was simple:

  • Have a main branch that kept the bulk of the resume. Eg: Work experience, projects, skills, etc.
  • Create a new branch for each type of tailored resume. Eg: General programming, computer vision, etc.
    • For each branch, add specific skills and reorder resume as you see wish
    • The latest of each branch is the latest resume for that specific category
  • If I need to make any major changes I can commit to main branch and push to all the resume branches
  • For each of the branches, print their respective resume in pdf format so I can easily upload

Step 1 - Making the resume source control compatible

You need to start by making your resume in essentially something plain text.

Now normally I hate front end web related stuff but this was time for my HTML skills to shine. So after 5 hours of following w3schools tutorials, I had an HTML version of my resume. The advantage? Its all plain text and formatting is really easy.

Step 2 - Setup your source control

(Note Im using Linux however it should really make much of a difference)

(I'm not going to go into source control tutorial but if there's enough interest I can add it in)

So now lets setup a git repo for our resume.

saad@saad-desktop:~$ mkdir Resume
saad@saad-desktop:~$ cd Resume/
saad@saad-desktop:~/Resume$ git init
Initialized empty Git repository in /home/saad/Resume/.git/

Next, let's add our resume into the repo

saad@saad-desktop:~/Resume$ git add resume.html
saad@saad-desktop:~/Resume$ git commit -m "Add initial resume"
[master (root-commit) d920918] Add initial resume
1 file changed, 333 insertions(+)
create mode 100644 resume.html

Now we've got our resume setup.

Step 3 - Create different branches for your resume

Next step is simple too. Simply create a new branch/switch into it. Modify the file and then commit.

saad@saad-desktop:~/Resume$ git branch computer-vision
saad@saad-desktop:~/Resume$ git checkout computer-vision
Switched to branch 'computer-vision'
saad@saad-desktop:~/Resume$ git add resume.html
saad@saad-desktop:~/Resume$ git commit -m "Tailored Resume for Computer Vision"
[computer-vision 855c785] Tailored Resume for Computer Vision
1 file changed, 1 insertion(+), 1 deletion(-)

Step 4 - You want to change something that affects all the resumes

This is the reason I used git for my source control. Its quite simple to apply a change. First we simply go back to the main branch and commit our changes

saad@saad-desktop:~/Resume$ git checkout master
Switched to branch 'master'
saad@saad-desktop:~/Resume$ git add resume.html
saad@saad-desktop:~/Resume$ git commit -m "New skills"
[master 0896838] New skills
1 file changed, 1 insertion(+), 1 deletion(-)

Now that we have that part done, the next part is also pretty simple. While usually you merge changes, it doesnt really make sense in this context because resumes aren't ever merged. Instead, we need to re-base the different branches onto the main branch (a more indepth tutorial on how rebase works here

So now lets rebase our computer-vision resume onto master branch

saad@saad-desktop:~/Resume$ git rebase master computer-vision
First, rewinding head to replay your work on top of it...
Applying: Tailored Resume for Computer Vision

Now obviously if you have many branches its time consuming but there’s an excellent stack overflow answer to do it all at once. Now that we've rebased we're done! Our master is up to date and the tailored branches now have the changes too.

Step 5 - Printing all the resumes (optionally the lazy way)

This is probably not the best way to do it nor do I really have bash scripting experience but it does the job. with google chrome and print it. Now there are a bunch of html to pdf convertors out there too but I haven't had them play well with google fonts. So instead lets use chrome to print all the resumes. The issue is I want to automate the printing part of it as well and so back to w3schools I go. I simply added this auto-print script to the resume and used that to print the resume each time.

<script type="text/javascript">
    window.print();
    setTimeout(function(){window.close();}, 1);
</script>

And then a very simple (probably poorly done) bash script to print all my resumes.

#!/bin/bash

# Place shortcuts to the files
LINK_DIR="resume_link"

rm -rfv "$LINK_DIR/"
mkdir $LINK_DIR

# Get all the branches so that we can print resumes for each one
OUTPUT="$(git branch)"

IFS=$'\n'
for name in $OUTPUT
do
# Delete existing resume
branch="$(echo $name | tr -d '* ')"
rm -rfv "$branch/"

# Checkout the branch and print the resume using chrome
git checkout $branch
google-chrome --user-data-dir=prof --incognito --kiosk --kiosk-printing resume.html
mkdir $branch
mv SaadAhmad.pdf "$branch/"

# Add shortcut
ln -s "../$branch/SaadAhmad.pdf" "./$LINK_DIR/$branch.pdf"
done

And run the script and you'll have pdfs of all the branches!

ScanMe

More information on implementation to come later. This project was our final year design project to create a 3D scanner. Realizing a lot of these systems exist for small objects, the idea was extended it to 3D bodies because why not? I would love to try and buy clothes online. So pretty much the goal was to come up with a scanner that would create an animatable 3D model of a person. Did it work well? Not amazingly but it worked to prove a concept.

More description on the scanner from the old project page for school here

Example on one of my friends.

Generated Point Cloud:

Reconstructed 3D Model:

3D Model with Weights

Using PWM on the Beaglebone Black

Problem

After searching the internet I found that most PWM and pin muxing code had been rendered obsolete due to the new 3.8 kernel used in the BBB. I found two sources of information that were helpful in order to get PWM working (here and here). From this I played around until I got the EHRPWM pins working. I have written up a C++ library so that you guys can use it from within your applications.

The main problem I found with the steps was a similar problem that other people were having.

  1. I couldnt change the period of the pin
  2. If I changed the period for one channel of the PWM module, I didnt get period/duty/polarity files that I could modify for the other channel

The reason for not being able to set the period is that both channels need to share the same period. As a result if both channels are enabled (such as P8 Pin 13 and 19) then setting either period will conflict with the other. If the period was initially changed for one of the channels then the other period (which is initialized from the device tree module) has a conflicting period and thus does not actually allow the pin driver to be setup.

Solution

To fix these issues I modified the pwm_test kernel driver so that it would not initialize the channel if it has a period of 0. (Line 273 in kernel/drivers/pwm/pwm_test.c


/* Only set the config if the period is > 0. Otherwise the period will be set later dynamically */
if ( pwm_test->period > 0 )
{
/* polarity is already set */
rc = pwm_config(pwm_test->pwm, pwm_test->duty, pwm_test->period);
if (rc) {
dev_err(dev, "pwm_config() failed\n");
return rc;
}
} else {
pwm_test->period = 0;
}

The next thing that needed be changed was the device overlays for the bone_pwm_P* pins were changed so that they had a period of 0 and were disabled at the start.

pwms = <&ehrpwm2 1 500000 1>;
enabled = ;

became (for each bone_pwm_P module)

pwms = <&ehrpwm2 1 0 1>;
enabled = ;

Once I made those changes, I recompiled the kernel (following the instructions here or here). Copied over pwm_test.ko to /lib/drivers/, copy the compiled dtbo files into /lib/firmware and then manipulated the period as described in the previous links. The only thing to make sure now is that you set the periods for both channels at the start to whatever you desire and then enable it by echo'ing 1 to the run fille.

Code/Files

I've uploaded the compiled files and the library on a git-hub repo (https://github.com/SaadAhmad/beaglebone-black-cpp-PWM)  and installation instructions can be found there

 

Hope you guys find this useful!