Trevor M. Stauffer

Download My Resume

About Me

Hi, my name is Trevor Stauffer. I am looking for a career in Software Engineering.

I am a self-taught programmer and know the following languages : Python, C++, C#, Java, JavaScript, HTML, CSS, and SQL. I'm also familiar with Google Cloud, Docker, and Git. Below you can find some examples of my work including a rideshare app, an app to track my finances, an app that sets alarms based on the sun, and a fun math problem I solved.

I have taken a Data Science course on Codecademy and I have graduated from The Pennsylvania State University with a Bachelor's Degree in Physics.

I'm available for immediate hire and if you would like get in contact with me about a position, feel free to use the contact page to get in touch.

I look forward to hearing from you.

Rideshare App

Trevor's Rides is a Rideshare App that I created using .Net Maui and ASP.Net. It's the best example I have of my software developement expertise and because of this, I gave it it's own page on my website. You can check it out here.

Project Euler

This is a fun problem that I solved on the website Project Euler. Project Euler specializes in unique problems that not only require some mathematical insight, but also a little bit of programming to solve. Some of the problems are quite difficult and will require a day or more of focus to acquire the insight needed to solve them.

The solution I would like to share with you had the problem statement as follows:

Euler's Totient function, φ(n) [sometimes called the phi function], is used to determine the number of positive numbers less than or equal to n which are relatively prime to n. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, φ(9)=6. The number 1 is considered to be relatively prime to every positive number, so φ(1)=1. Interestingly, φ(87109)=79180, and it can be seen that 87109 is a permutation of 79180. Find the value of n, 1 < n < 107, for which φ(n) is a permutation of n and the ratio n/φ(n) produces a minimum.

It's easy to determine whether φ(n) is a permutation of n and store the ratio n/φ(n) which produces a minimum. It's even easy to calculate φ(n). The hard part is calculating φ(n) for all of the numbers 1 < n < 107 in a timely fashion.

First Attempt

Euler70.py

I initially thought I would try to solve the problem without any mathematical insight into it. Just loop through all the numbers and count the number of relative primes it had by seeing if each number less than it had any common divisors. Sometimes a brute force approach is doable on some of the easier problems. This turned out to be not the case, as when I ran the program, it started out fast but then slowed to point where I calculated that it would take literally millions of years to solve in this way.

Second Attempt

Euler70SecondAttempt.py

My second approach was a huge improvement. My big insight was to see that I don't need to loop through each of the numbers less than n to count the number of numbers relatively prime to n. I can rather, using the list of prime factors of n, calculate φ(n) directly, using a formula. I used Eratosthenes Sieve to find all the primes needed for this problem. Then I looped through all the numbers and found the list of prime factors by looping through the primes and seeing if they were factors. I made sure to make a note if each prime factor divided the number once, twice, etc. as this was needed for the formula. This method worked and would be solvable in about 17 hours, but Project Euler states that all problems can be solved in under a minute.

Third and Final Attempt

Euler70ThirdAttempt.py

My third attempt came with the realization that I did not need to loop through all of the primes to find the list of prime factors. I could use the same method I used to find the primes to find the list of prime factors for each number. Eratosthenes sieve uses a method to find the primes by creating a list of booleans where each index relates to a number and the boolean is whether or not that number is prime. The list starts at two and is intialized as all numbers prime. You find the first number marked as prime in the list, which is two, and mark all multiples of that number as composite. Then you find the next number still marked as prime, which is now three, and do the same. Repeat this until you've reached the end of the list and you've found all the primes in the list. I noticed while I'm marking these numbers as composite I can also add that prime to its list prime factors, vastly speeding up the process of finding the prime factors. Once I ran this solution, it finished in about two minutes, so I recoded it in C++ and it finished in under a minute.

Other Projects

Finance Tracker

Code Release Readme
Code Windows ReadMe

This is an app that I've been using to track my finances. It allows me to keep a daily record of my finances in all the accounts that I have. It's built off of Windows Forms on the .Net framework, stores all the data in an SQL file, which is stored locally and in a Google Cloud bucket, from which I can download on my phone for viewing.

Akashic

Release
Android

This is an app that I have been using to remind me of when the sun reaches certain points in the sky. I have been following a certain spiritual practice that requires me to bow during certain times of the day and it has been useful for this endeavor. It's built using Native Android with Java.

Get in contact with me if you'd to comment on my code or talk about an open position.