From c6aa74418ba6c41b78b29a1d43ca05da3fa5c7bf Mon Sep 17 00:00:00 2001 From: Joseph Hale Date: Thu, 23 Nov 2023 17:15:07 +0000 Subject: [PATCH] chore: Import posts from Hydeout theme --- _posts/2021-11-10-nchc.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ _posts/2022-07-02-introducing-binary-clock.md | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ _posts/2022-11-30-why-i-use-the-mpl.md | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ _posts/2022-12-23-git-authorship.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ _posts/2023-01-28-5-insights-from-tracking-every-second-of-2022.md | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ _posts/2023-05-18-binary-clock-coming-to-ios.md | 30 ++++++++++++++++++++++++++++++ _posts/2023-09-23-unit-testing-bulldozing-lamps.md | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ _posts/2023-10-29-auto-merging-prs.md | 199 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ _tabs/about.md | 33 +++++++++++++++++++++++++++++++-- assets/img/posts/2022_time_tracking/2022 Weekly Sleep Trends.png | 0 assets/img/posts/2022_time_tracking/arizona_saints_chorale.jpg | 0 assets/img/posts/2022_time_tracking/barrett_graduation.jpg | 0 assets/img/posts/auto_merging_prs/allow_auto_merge.png | 0 assets/img/posts/auto_merging_prs/branch_protection_rule_settings.png | 0 assets/img/posts/auto_merging_prs/branch_protection_rules_none.png | 0 assets/img/posts/auto_merging_prs/branch_protection_rules_some.png | 0 assets/img/posts/auto_merging_prs/merged_prs.png | 0 assets/img/posts/auto_merging_prs/org_actions_prs_permissions.png | 0 assets/img/posts/binaryclock/binary-clock-to-ios.png | 0 assets/img/posts/binaryclock/binary_clock_demo.gif | 0 assets/img/posts/git-authorship/git_authorship_demo.gif | 0 assets/img/posts/nchc/barrett_delegation.jpg | 0 assets/img/posts/nchc/kathryn_thornton.jpg | 0 assets/img/posts/unit_testing_bulldozing_lamps/wrecking_ball_lamp.jpg | 0 assets/img/posts/unit_testing_bulldozing_lamps/wrecking_ball_lamp_square.jpg | 0 25 file(s) changed, 1059 insertion(s)(+), 2 deletion(s)(-) diff --git a/_posts/2021-11-10-nchc.md b/_posts/2021-11-10-nchc.md new file mode 100644 --- /dev/null +++ b/_posts/2021-11-10-nchc.md @@ -0,0 +1,107 @@ +--- +layout: post +title: "Lessons from Solitude" +tags: + - Education + - Personal Development +--- + +*Personal reflections on the 2021 Conference of the [National Collegiate Honors +Council](https://www.nchchonors.org/) in Orlando, Florida.* + +![The six students representing Barrett, The Honors College at the 2021 National +Collegiate Honors Council](/assets/img/posts/nchc/barrett_delegation.jpg) +> The six students representing Barrett, The Honors College at the 2021 National +> Collegiate Honors Council. +> +> *Back Row:* Elora Bevacqua, Jaclyn Fishbach, Arianna Tillman +> +> *Front Row:* Alex Gilchrist, Joseph Hale, Anika Islam + +For most of the last two years, the world has been forced to accept solitude. +While a challenging change of pace for a highly extroverted world, this forced +solitude has enabled widespread reflection on how to improve the institutions +and structures in our societies. According to [Susan +Cain](https://susancain.net/), the acclaimed author of [Quiet: The Power of +Introverts in a World that Can't Stop Talking](https://youtu.be/c0KYU2j0TM4), +such solitude is the source from which "most great ideas spring" because it +provides the time and space required for creativity and imagination. As such, it +is relevant that this year's conference of the National Collegiate Honors +Council encouraged a re-imagination of the collegiate honors experience across +the country by providing time and space for academics across the country to +share the challenges, ideas, and successes they have experienced through these +last two years of relative solitude. With that understanding, I sought to +discover the best ideas on three topics: personal time management, honors peer +mentoring, and effective support systems for students working on an honors +capstone experience like a thesis. + +By paying close attention to the personal stories of the many highly +accomplished people who presented at the conference, I learned that a +foundational principle of effective time management is to focus on only those +activities in which one can be fully invested. One of these people was [Dr. Thao +Do](https://www.linkedin.com/in/thaocoach/) who, in just 15 years, has excelled +in the diverse industries of mechanical engineering, biomedical research, +marketing, law, and aviation by being "all in" on her vision of creating and +distributing solutions to a variety of worldwide problems. Notably, she did not +attempt to master all five of these varied industries at once, rather she moved +from one to the next as her greater mastery of the one revealed a need to better +understand the next. For example, she decided to pursue biomedical research to +learn how nature solved mechanical problems and apply nature's solutions to +solve new problems with machinery. Similarly, during the conference's opening +keynote, [Thomas Riddle](https://twitter.com/thomasriddle_ii), made it obvious +that one's hobbies and personal passions can be synergistically integrated into +his/her professional work as he described how he used his personal love of Star +Wars and Indiana Jones to inspire a completely new set of engaging school +curriculums. By taking a closer look at the motivations behind these and other +extraordinary accomplishments I saw that there was no "secret formula", rather +each of these amazing individuals found a way to link their personal interests +to their professional work. As such, "time management" simply consisted of +focusing on those personal interests and applying them in meaningful ways. + +![](/assets/img/posts/nchc/kathryn_thornton.jpg) +> Meeting [Kathryn Thornton](https://en.wikipedia.org/wiki/Kathryn_C._Thornton), +> one of the NASA astronauts who fixed the Hubble Space Telescope. + +This principle of deliberate focus also carried into the forums focused on ideas +for improving honors peer mentoring. When discussing how different colleges pair +mentors and mentees, the shared guiding principle was the question "Who will +best provide a meaningful personal relationship with the mentee?". Even though +each college took a different route to answer that question (e.g. matching based +on major/interests, letting students pick their mentors, paying mentors so they +would dedicate more time, etc.), by the end of that discussion we all felt that +a deliberate focus on the ways that mentors could form meaningful relationships +with their mentees was paramount to a mentoring program's success. From there, +other ideas like establishing a group of alumni mentors for juniors and seniors, +simplifying all honors leadership applications into a single form, and providing +training on disability/counseling services served as implementation details for +achieving the overarching vision of creating meaningful relationships. + +These attributes of an effective mentoring program were also reflected in the +forums focused on finding effective ways to support students through a +culminating honors experience like a thesis. For example, the University of the +Incarnate Word took the mentoring principles literally by creating an alumni +mentor group for juniors and seniors that included a focus on the long-term +impacts of the thesis experience on the alumni's professional career. In +contrast, Northern Arizona University (NAU) and the University of Idaho focused +on sophomores by creating a 1-2 credit course that teaches scholarly/research +writing skills. For NAU specifically, their 1 credit course leads students +through the creation of a 10-page thesis proposal so that they have a +significant foundation for the full senior thesis. Then, representing more of a +middle ground, the University of South Carolina focused on creating a +mentoring-style relationship between the honors faculty and the senior students +through activities like meetings with an honors advisor early each semester that +would turn into more regular one on one breakfasts if the advisor felt like the +student was struggling more than normal. Though they varied in their specific +policies and decisions, each of these institutions first recognized the unique +challenges faced by honors students attempting to complete a major research +project for the first time and focused on providing personal, mentor-like +attention to encourage and teach those students along the path to eventual +success. + +I am grateful to have attended this conference. The lessons were many, the new +friendships are amazing, and the overall experience was inspiring. As Barrett, +along with the rest of ASU, comes back to an integrated, in-person college +experience, I hope we can both remember these lessons and value the solitude in +which they were learned. I believe that by so doing we will be better equipped +to deliberately focus on the principles that foster the meaningful, personal +experiences that typify the honors experience. diff --git a/_posts/2022-07-02-introducing-binary-clock.md b/_posts/2022-07-02-introducing-binary-clock.md new file mode 100644 --- /dev/null +++ b/_posts/2022-07-02-introducing-binary-clock.md @@ -0,0 +1,142 @@ +--- +layout: post +title: "Introducing Binary Clock: Your Nerdy Mobile Timepiece" +category: + - Projects +tags: + - Binary Clock + - React Native + - Android + - iOS + - Mobile App +--- + +Meet [**Binary Clock**](https://github.com/thehale/BinaryClock), the new nerdy +app for telling time on Android/iOS! + +![Screenshot of the Binary Clock app running on both an Android and iOS +device](/assets/img/posts/binaryclock/binary_clock_demo.gif) + +## Table of Contents +- [How does it work?](#how-does-it-work) +- [Why did you make it?](#why-did-you-make-it) + - [Nostalgia](#nostalgia) + - [Practice](#practice) +- [Where can I get it?](#where-can-i-get-it) +- [Can I contribute? If so, how?](#can-i-contribute-if-so-how) +- [Enjoy!](#enjoy) + +## How does it work? +A binary clock works just like a standard digital clock, showing the current +time in hours, minutes, and seconds. + +However, instead of showing decimal numbers the binary clock shows the +corresponding binary numbers as a series of bright and dim colored dots. + +Let's go through an example. + +Consider the time `08:47:13`. To show that time on a binary clock, we have to +convert the numbers `08`, `47`, and `13` to binary. + +| Decimal Number | Binary Number | +|----------------|---------------| +| 08 | 001000 | +| 47 | 101111 | +| 13 | 001101 | + + +_If you don't know how to convert decimal numbers into binary check out Khan +Academy's [3 minute video](https://youtu.be/H4BstqvgBow) explaining the +process._ + +> + +With those binary numbers in hand, the only step remaining to display the binary +clock is to show each `1` as a bright dot, and each `0` as a dim dot (shown +vertically for aesthetics). + +``` + 0 1 0 ⚪ 🟢 ⚪ + 0 0 0 ⚪ ⚪ ⚪ + 1 1 1 🟢 🟢 🟢 + 0 1 1 --> ⚪ 🟢 🟢 + 0 1 0 ⚪ 🟢 ⚪ + 0 1 1 ⚪ 🟢 🟢 + +08 :47 :13 +``` + +As you can see, the result is the vertical version of the binary clock shown in +the picture at the beginning of this article. + +Alternatively, converting each decimal digit into a separate binary number will +yield the horizontal version of the clock. + +| Decimal Number | Binary Number | +|----------------|---------------| +| 0 | 0000 | +| 8 | 1000 | +| 4 | 0100 | +| 7 | 0111 | +| 1 | 0001 | +| 3 | 0011 | + +``` +0 1 0 0 0 0 ⚪ 🟢 ⚪ ⚪ ⚪ ⚪ +0 0 1 1 0 0 ⚪ ⚪ 🟢 🟢 ⚪ ⚪ +0 0 0 1 0 1 --> ⚪ ⚪ ⚪ 🟢 ⚪ 🟢 +0 0 0 1 1 1 ⚪ ⚪ ⚪ 🟢 🟢 🟢 + +0 8 : 4 7 : 1 3 +``` + +## Why did you make it? +Two reasons: nostalgia and practice. + +#### Nostalgia +One of my elementary school teachers kept a binary clock on her desk, and I felt +so brilliant once I finally figured out how to read it. Recreating a binary +clock as a mobile app has given me the opportunity to relive the elementary +school excitement that accompanied my first experiences with the mathematics +that power modern computers. + +#### Practice +Binary Clock is my first venture into the world of mobile app development, and I +wanted to start with a relatively simple project before tackling my more +ambitious ideas for fun/useful mobile apps. + +## Where can I get it? + +Currently, Binary Clock is only available on the [Google Play +Store](https://play.google.com/store/apps/details?id=dev.jhale.binaryclock). + +Binary Clock is compatible with iOS and iPad OS, but listing it on the Apple App +Store requires me, the developer, to pay a $99/year subscription. + +If you really want to see Binary Clock on the App Store, consider [sponsoring my +open-source development](https://github.com/sponsors/thehale) or [sending a +monetary gift via PayPal](https://paypal.me/jhale1805). + +## Can I contribute? If so, how? +The [code behind Binary Clock](https://github.com/thehale/BinaryClock) is +open-source on GitHub. That means there are lots of ways you can contribute. For +example, you can request new features, report issues, offer new code, or +donate money to support continued development. + +You can find the full contribution guidelines +[here](https://github.com/thehale/BinaryClock/blob/master/CONTRIBUTING.md). + + +## Enjoy! +Thanks for reading to the end of this article! I hope you enjoyed learning about +binary clocks, and I look forward to hearing what you think of the app! + +> Tick, tock, tick, tock, the Binary Clock is here. +> +> Just on, off, on, off, the numbers have disappeared. +> +> The moment has come to have some fun, +> +> with this one-of-a-kind timepiece! +> +> -- Joseph Hale diff --git a/_posts/2022-11-30-why-i-use-the-mpl.md b/_posts/2022-11-30-why-i-use-the-mpl.md new file mode 100644 --- /dev/null +++ b/_posts/2022-11-30-why-i-use-the-mpl.md @@ -0,0 +1,183 @@ +--- +layout: post +title: "Why my open-source code uses the Mozilla Public License" +tags: + - Open Source Licensing + - Mozilla Public License + - MPL-2.0 +--- + +I believe an open-source software license should ensure that code can always be +used everywhere. The [Mozilla Public +License](https://www.mozilla.org/en-US/MPL/) does a great job of meeting that +goal. + +## Table of Contents +- [What is an open-source software license?](#what-is-an-open-source-software-license) +- [What types of open-source software licenses are there?](#what-types-of-open-source-software-licenses-are-there) + - [Permissive Licenses](#permissive-licenses) + - [Benefits of Permissive Licenses](#benefits-of-permissive-licenses) + - [Problems with Permissive Licenses](#problems-with-permissive-licenses) + - [Copyleft Licenses](#copyleft-licenses) + - [Benefits of Copyleft Licenses](#benefits-of-copyleft-licenses) + - [Problems with Copyleft Licenses](#problems-with-copyleft-licenses) +- [What type of license is the Mozilla Public License?](#what-type-of-license-is-the-mozilla-public-license) +- [Why do you prefer the Mozilla Public License for your open-source projects?](#why-do-you-prefer-the-mozilla-public-license-for-your-open-source-projects) +- [How do I use the Mozilla Public License for my open-source projects?](#how-do-i-use-the-mozilla-public-license-for-my-open-source-projects) +- [Where are good places to learn more?](#where-are-good-places-to-learn-more) + + +## What is an open-source software license? +By default, you are the only person allowed to use any code you write. That's +because you [automatically own a +copyright](https://www.copyright.gov/registration/other-digital-content/) for +your source code as soon as you type it. + +For anyone else to use your code, you have to give them permission in the form +of a legal document called a **license**. + +Writing your own software license is complex, so multiple organizations have +written generic **open-source software licenses** which you can use to safely +grant other people permission to use your code. + + +## What types of open-source software licenses are there? +Most open-source software licenses allow anyone to use the code freely. The +differences arise from the additional rules each license requires people to +obey. + + +### Permissive Licenses +Licenses with few extra rules are called **permissive licenses**. The [MIT +license](https://choosealicense.com/licenses/mit/), [Apache +license](https://choosealicense.com/licenses/apache-2.0/), and [BSD +licenses](https://opensource.org/licenses/BSD-3-Clause) are commonly used +permissive licenses. + +#### Benefits of Permissive Licenses +Permissive licenses are great because they allow code to easily be used by +anyone, for any project (open-source or not), with few limitations. For example, +my [Expressive Resume](https://github.com/thehale/expressive-resume) project is +licensed permissively so that anyone can use it to create a resume while keeping +the corresponding formatting code private. + +#### Problems with Permissive Licenses +The problem with permissive licenses is that their lenient permissions make it +difficult/impossible to ensure that improvements to the code remain available to +everyone. For example, some organization could legally copy the code for +[Expressive Resume](https://github.com/thehale/expressive-resume), make a few +private improvements, then start sharing the result with a more restrictive +license (e.g. selling the improved code). As long as that organization gives me +credit for the original version, there's no legal mechanism to force them to +share their improvements. + + +### Copyleft Licenses +Licenses with strict conditions are called **copyleft licenses**. The GPL family +of licenses [[1]](https://choosealicense.com/licenses/lgpl-3.0/) +[[2]](https://choosealicense.com/licenses/gpl-3.0/) +[[3]](https://choosealicense.com/licenses/agpl-3.0/) are the most famous +examples of copyleft licenses. + +#### Benefits of Copyleft Licenses +Copyleft licenses are great because they ensure that all usages of the code +remain available for everyone. For example, the [Linux operating +system](https://github.com/torvalds/linux) uses a copyleft license which +requires anyone who shares an improved version of Linux to also share their +source-code. Additionally, if someone copied an algorithm from the Linux code to +build a video game, all the code for the video game would have to be +open-sourced even though a video game has nothing to do with operating systems. + +#### Problems with Copyleft Licenses +The problem with copyleft licenses is that their strict code-sharing +requirements often discourage people and companies from using copyleft-licensed +code. Most companies, small or large, want to keep portions of their code secret +to maintain a competitive advantage, which is usually impossible if they use any +GPL licensed code. + +Sometimes other circumstances make it impossible to use copyleft-licensed code. +For example, apps published on the Apple App Store cannot legally contain any +code licensed under the copyleft GPL license because [some of Apple's Terms of +Service conflict with the +GPL](https://www.fsf.org/news/2010-05-app-store-compliance). + + +## What type of license is the Mozilla Public License? +The Mozilla Public License (abbreviated as the MPL) is a **middle ground** +between permissive and copyleft licenses. + +Like permissive licenses, code shared under the MPL can be used in any project, +public or private. + +Like copyleft licenses, the MPL ensures that improvements to the original code +are available for everyone. + +Unlike permissive licenses, modifications to the licensed code must be +open-sourced. + +Unlike copyleft licenses, new software which only uses the licensed code can +stay private. + +For example, if you use my +[multicounter](https://github.com/thehale/multicounter) library in a Python +project you don't need to open-source anything. If you fix a bug or add a new +feature to `multicounter`, then only that bug fix/feature needs to be +open-sourced. If you copy an algorithm from `multicounter` into your code, then +only the file containing the copied algorithm needs to be open-sourced while +everything else can stay private. + +As a result, the Mozilla Public License preserves most of the benefits of +permissive and copyleft licenses, while simultaneously mitigating their +problems. + +## Why do you prefer the Mozilla Public License for your open-source projects? +I put a lot of time into building useful, high-quality software. I want people +to use my work to build amazing new things I never would have imagined. By using +the Mozilla Public License for my code, you and everyone else in the world can +freely use my code for any of your projects, open-source or not. + +However, when I provide a strong foundation to everyone for free, I think it's +only fair to expect people to share any enhancements they make to that +foundation in the same way. By using the Mozilla Public License, I ensure that +improvements to my code are neither locked away behind a proprietary paywall nor +burdened with the extra restrictions of a strict copyleft license like the GPL. + +## How do I use the Mozilla Public License for my open-source projects? +It's easy! + +Create a file called `LICENSE` in the root folder of your project and copy the +[license text](https://www.mozilla.org/media/MPL/2.0/index.48a3fe23ed13.txt) +from [Mozilla's website](https://www.mozilla.org/en-US/MPL/). You don't need to +change the license text at all. + +You should also add a [short +comment](https://www.mozilla.org/en-US/MPL/headers/) to the top of each source +code file indicating its MPL license. Mozilla also makes it easy to copy/paste +these comments from [their website](https://www.mozilla.org/en-US/MPL/headers/). + +To make everything even easier, I like to use the following VS Code Plugins: + - [Choose a + License](https://marketplace.visualstudio.com/items?itemName=ultram4rine.vscode-choosealicense): + Create the `LICENSE` file without ever leaving VS Code. + - [licenser](https://marketplace.visualstudio.com/items?itemName=ymotongpoo.licenser): + Automatically adds license headers to each source code file. + +## Where are good places to learn more? +The best place to learn more about the Mozilla Public License is the [official +FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/). + +If you want to learn more about open-source software licensing in general, I +recommend the following sites: + - [Choose a License](https://choosealicense.com/): Helps developers understand + which software license(s) best match their values/goals for a project. + - [Fossa Blog](https://fossa.com/blog/): A blog with detailed explanations of + all common open-source software licenses using everyday language. + - Produced by a company which specializes in building automated tools to + help companies follow the rules of software licenses. + +Of course, you should always seek any legal advice from a lawyer who specializes +in copyright law. + +*Note: While I am knowledgeable about open-source software licensing, I am not +an attorney. Thus, my comments cannot be considered legal advice under any +circumstances.* diff --git a/_posts/2022-12-23-git-authorship.md b/_posts/2022-12-23-git-authorship.md new file mode 100644 --- /dev/null +++ b/_posts/2022-12-23-git-authorship.md @@ -0,0 +1,48 @@ +--- +layout: post +title: "Introducing Git Authorship: Easy Visualizations of Code Authors" +category: + - Projects +tags: + - Open Source Licensing +--- + +Meet [**Git Authorship**](https://github.com/thehale/BinaryClock), an +interactive tool for seeing who wrote each line of code in your git +repositories! + +![Screenshot of the Git Authorship tool for the cubing.js +project](/assets/img/posts/git-authorship/git_authorship_demo.gif) + +## Table of Contents +- [Why is tracking code authorship important?](#why-is-tracking-code-authorship-important) +- [How does Git Authorship help with tracking code authorship?](#how-does-git-authorship-help-with-tracking-code-authorship) +- [How can I start using Git Authorship?](#how-can-i-start-using-git-authorship) + + +## Why is tracking code authorship important? +For legal reasons. + +More specifically, code is protected by copyright, meaning the author of the +code is the only person allowed to use it unless an alternate agreement has been +made (e.g. an open-source code license). + +Both companies and open-source projects looking to stand on firm legal ground +need to ensure that all code authors have granted appropriate usage permissions +for the code they have written. + +## How does Git Authorship help with tracking code authorship? +Git Authorship creates an interactive web visualization of every folder/file in +your code repository, labelled with the corresponding authors. + +Git Authorship also supports configuration files to label the usage permissions +(e.g. licenses) each author has granted. + +Note however, that Git Authorship has no tools for obtaining usage permissions +from code authors. Tools like [CLA +Assistant](https://github.com/contributor-assistant/github-action) are more +appropriate for that purpose. + +## How can I start using Git Authorship? +Go to the [project homepage](https://github.com/thehale/git-authorship) and +follow the instructions there! diff --git a/_posts/2023-01-28-5-insights-from-tracking-every-second-of-2022.md b/_posts/2023-01-28-5-insights-from-tracking-every-second-of-2022.md new file mode 100644 --- /dev/null +++ b/_posts/2023-01-28-5-insights-from-tracking-every-second-of-2022.md @@ -0,0 +1,197 @@ +--- +layout: post +title: "5 insights from tracking every second of my life during 2022" +tags: + - Time Tracking + - Personal Development + - Goals +--- + +I tracked every second of my life during 2022, and it unlocked personal insights +impossible to discover otherwise. + +To accomplish this feat, I configured a few high-level categories of activities +in a nice, free [time-tracking +app](https://play.google.com/store/apps/details?id=com.razeeman.util.simpletimetracker) +and pressed the corresponding button every time I switched to a different +activity. Over the whole year I logged 5,218 different activities, an average of +14 per day. + +While tracking my time like this immediately helped me use my time more +efficiently (I did *not* want to press the "wasted time" button), the most +significant insights discussed below followed a review of the aggregate data for +the whole year. + +## Table of Contents +- [Insight #1: Developing expertise takes time](#insight-1-developing-expertise-takes-time) +- [Insight #2: Work hard, but remember to relax](#insight-2-work-hard-but-remember-to-relax) +- [Insight #3: Success does not require sacrificing sleep](#insight-3-success-does-not-require-sacrificing-sleep) +- [Insight #4: Serving in the community is invigorating](#insight-4-serving-in-the-community-is-invigorating) +- [Insight #5: Use travel to enable meaningful interactions](#insight-5-use-travel-to-enable-meaningful-interactions) +- [Conclusion](#conclusion) + + +## Insight #1: Developing expertise takes time + +The average worker in the United States clocked [1,791 hours on the job in +2021](https://stats.oecd.org/index.aspx?DataSetCode=ANHRS) -- 34.4 hours per +week -- according to the [Organisation for Economic Co-operation and Development +(OECD)](https://stats.oecd.org/index.aspx?DataSetCode=ANHRS), an international +policy research organization. That statistic was one key metric cited by a +columnist who declared the United States ["the most overworked developed nation +in the +world"](https://20somethingfinance.com/american-hours-worked-productivity-vacation). + +By comparison, in 2022, I clocked 2308 hours and 26 minutes on "work activities" +-- **44.4 hours per week** -- which is 28.8% more hours than the average, +overworked United States employee. Since I am a full-time student, these "work +activities" include time spent in lectures and completing homework in addition +to my traditional part-time employment as a software engineer. + +![](/assets/img/posts/2022_time_tracking/barrett_graduation.jpg) +> Receiving my diploma for a Bachelors of Science in Software Engineering at the +> convocation ceremony for Barrett, The Honors College at Arizona State +> University in May 2022. + +Fortunately, I accomplished a lot with those thousands of hours of work: + - Completed an [Honors Thesis](https://github.com/thehale/DIY-Smartcube) where + I invented a sound-based protocol for converting normal Rubik's Cubes into + "smartcubes". That *undergraduate* research has already won a finalist + position in the *graduate* level at the [2023 Annual Meeting of the American + Association for the Advancement of Science](https://meetings.aaas.org/), a + prestigious national conference. + - Graduated with a Bachelor's Degree in Software Engineering, including + recognition as the [Outstanding Graduate in Software + Engineering](https://fullcircle.asu.edu/graduate/joseph-hale/) (one recipient + per semester) and an Outstanding Senior at the Barrett Polytechnic Campus + (two recipients per semester, one male, one female). + - Designed and implemented data pipelines at work which generated over $700,000 + in revenue in 2022, a 22% increase over 2021. + - Released multiple open-source tools which together collected over [200 stars + on GitHub](https://github.com/thehale). + - Contributed bug-fixes and new features to multiple open-source libraries + [[1]](https://github.com/gitpython-developers/GitPython/commits?author=thehale) + [[2]](https://github.com/deanmalmgren/textract/commits?author=thehale) which + are downloaded tens of millions of times per month + [[1]](https://pypistats.org/packages/gitpython) + [[2]](https://pypistats.org/packages/textract). + + +The lesson here? **Developing expertise takes time**, which I hope serves as a +reassurance to new and hopeful software engineers. You can do it! Continue +putting in the time to refine your knowledge and your expertise will grow +accordingly. + + +## Insight #2: Work hard, but remember to relax + +As much as I worked hard in 2022, I also played hard. In 2022 I spent over 1400 +hours on fun activities with family, friends, dates with my wife, and enjoying +personal hobbies -- an average of over 27 hours per week. + +Notably, these activities were primarily concentrated during the breaks from +school, with those four months seeing almost as much time on activities as the +other 8 months of the year when I was completing coursework. + +| Time of Year | Hours of Activities | % of Total | +| ------------------------------------------------------------------- | ------------------- | ---------- | +| School Semesters (8 months)
*(January-April, August-November)* | 750.6 hours | 53.6% | +| School Breaks (4 months)
*(May-July, December)* | 648.7 hours | 46.4% | + +The lesson here? **Relaxing is valuable, but in the right time and place.** + + +## Insight #3: Success does not require sacrificing sleep + +As a busy college student in 2022 -- juggling a bachelor's degree, master's +degree, part-time work, volunteer responsibilities, and family needs -- I +expected to see poor results on my sleep statistics. + +In actuality, I slept for 2924 hours 22 minutes, which is **8.01 hours per +night**. Furthermore, I consistently slept well throughout the year instead of +"catching up" during breaks like I did for activities. I also spent an +additional 341 hours on other basic needs like meals, hygiene, and exercise. + +![](/assets/img/posts/2022_time_tracking/2022%20Weekly%20Sleep%20Trends.png) +> The average number of hours I slept each night in 2022, plotted on a week by +> week basis. + +The lesson here? **Success does not require sacrificing a good night's sleep.** + + +## Insight #4: Serving in the community is invigorating + +During 2022 I had the privilege of volunteering in multiple capacities: + - At Barrett, The Honors College I served as a [peer + mentor](https://asu.campuslabs.com/engage/organization/barrett-poly-mentors) + for incoming first-year students to help them learn the ropes of college and + connect them to campus resources. + - In the [Arizona Saints + Chorale](https://www.facebook.com/profile.php?id=100069341468507), a + community choir which raised thousands of dollars for local charities, I sang + vocal bass. + - At [The Church of Jesus Christ of Latter-Day + Saints](https://www.churchofjesuschrist.org/?lang=eng), I served my neighbors + in various religious and personal capacities. + +![](/assets/img/posts/2022_time_tracking/arizona_saints_chorale.jpg) +> Singing in the Arizona Saints Chorale. I am in the bass section, standing in +> the top right corner of the image wearing a green tie. + +In total, I spent 244 hours and 50 minutes on various forms of community service +during 2022 -- 4.7 hours per week. + +The lesson here? **Remember to give back to your community** + +## Insight #5: Use travel to enable meaningful interactions + +In 2022 I traveled a lot. While not the largest block of time by duration, 25% +of all time entries during 2022 were tagged as "Travel" for a total of 353 hours +and 11 minutes. To merit a "Travel" tag, a time slot had to meet the following +criteria: + 1. The time was spent in/on/waiting for a moving vehicle. + - e.g. cars, trains, flights, buses, bikes, electric scooters, etc. + 2. The time was *not* spent completing homework or working on other tasks. + - Such time blocks were instead tagged with their corresponding activity. + +As a result of these rules, my "Travel" time truly represents time lost in the +process of moving from place to place. + +Some of this travel was exciting (e.g. driving to family dinners), while other +travel was less so (e.g. commuting to a largely empty office). Either way, over +**one full day of time each month** -- 29.4 hours to be exact -- was lost to the +need to physically transport myself from one location to another. + +These travel time numbers prompt several deep questions: + - What would I do with a full extra day of time each month? + - Reducing travel time generally means increasing virtual interactions. To what + extent is that a desireable trade? + +Some analysts [[1]](https://www.lendingtree.com/auto/cost-of-commuting/) +[[2]](https://listwithclever.com/research/best-and-worst-cities-for-commmuters-2022/#:~:text=2x%3A%20how%20much%20potential%20income%20is%20lost%20to%20time%20spent%20commuting%20to%20work%20(opportunity%20cost)%3F) +answer the first question by discussing 'opportunity cost', specifically the +amount of money one could make by working instead of commuting. For me, that is +likely a poor answer since [I already worked so much in +2022](#insight-1-developing-expertise-takes-time). + +Rather, I think it is more valuable to focus on the second question. Fostering +meaningful relationship with friends, family, or coworkers often requires +spending time together in-person. Traveling thus becomes a pre-requisite for +many aspects of human friendship. + +The lesson here? **The best travel time enables meaningful interactions**. + +## Conclusion + +A wise leader I greatly respect once observed the following: + +> When performance is measured, performance improves. When performance is +> measured and reported, the rate of improvement accelerates. +> +> -- [Thomas S. +> Monson](https://www.churchofjesuschrist.org/study/manual/preach-my-gospel-a-guide-to-missionary-service/how-do-i-use-time-wisely?lang=eng#aside2) + +By *measuring* every second of 2022 I have significantly *improved* my ability +to understand my actual priorities and reason meaningfully about needed changes +to achieve my desired goals. As I continue this daily reflection throughout +2023, I hope to gain even greater insights! diff --git a/_posts/2023-05-18-binary-clock-coming-to-ios.md b/_posts/2023-05-18-binary-clock-coming-to-ios.md new file mode 100644 --- /dev/null +++ b/_posts/2023-05-18-binary-clock-coming-to-ios.md @@ -0,0 +1,30 @@ +--- +layout: post +title: "Coming Soon: Binary Clock on iOS!!" +category: + - Projects +tags: + - Binary Clock + - React Native + - Android + - iOS + - Mobile App +--- + +Your nerdy timepiece will soon be available on the Apple App Store! + +![Artistic drawing of the Binary Clock app coming to the Apple App +Store](/assets/img/posts/binaryclock/binary-clock-to-ios.png) + +To date, my Binary Clock application has [only been offered on the Google Play +Store](https://jhale.dev/projects/2022/07/02/introducing-binary-clock.html#where-can-i-get-it). +Thanks to a recent grant I am now able to offer the app on the Apple App Store! +(More details to come soon...) + +When the app goes live I will look forward to your feedback! The best place to +discuss issues or request features is on the project's public [GitHub Issue +Tracker](https://github.com/thehale/BinaryClock/issues). You can also send +private messages to [support@jhale.dev](mailto:support@jhale.dev). + +*The Apple App Store logo is a trademark of Apple Inc., registered in the U.S. +and other countries.* \ No newline at end of file diff --git a/_posts/2023-09-23-unit-testing-bulldozing-lamps.md b/_posts/2023-09-23-unit-testing-bulldozing-lamps.md new file mode 100644 --- /dev/null +++ b/_posts/2023-09-23-unit-testing-bulldozing-lamps.md @@ -0,0 +1,122 @@ +--- +layout: post +title: "Unit Tests: How to Fix a Lamp Without Bulldozing Your Hometown" +tags: + - Debugging + - Unit Testing + - Software Engineering + - Testing +--- + +
+ A lone house lamp stands in contrast to a large wrecking ball destroying a city of skyscapers. +
+ Attempting to fix a small function by rerunning a large program is like repeatedly bulldozing and rebuilding an entire city to fix one lone lamp that won't turn on.

There is a better way... +
+
+ +
+ +## A Short Story of Debugging Desperation + +In *97 Things Every Programmer Should Know*, [Thomas Guest](https://www.linkedin.com/in/thomasguest) recounts a moment when he had identified a problematic piece of code in a large application, but had lost hours in recompilation time trying to experiment with the erring edge case. + +At wit's end, he went to his co-worker, Hoppy, who "had a reputation as the local expert on programming issues." But Hoppy's help was not what Thomas expected. + +Surprisingly, the programmer extraordinaire first admitted "he wasn't sure" about the problem. Then, instead of referencing documentation, Hoppy copied the failing function into a separate file to make a brand new program which took its inputs via the command line. After a few minutes of rapid experimentation, Hoppy and Thomas had their answer! + +## By Small Programs are Great Insights Brought to Pass + +Why was Hoppy's little program so much more effective at identifying the error than running the code in its full context? + +Consider the amount of work required to execute a large program. Each run acquires acres of memory, spends significant effort framing the land with countless data structures, and constructs numerous communication highways -- just to burn everything down when the program exits. That is a massively wasteful amount of effort when trying evaluate a tiny, lamp-sized function. + +By pulling the faulty function into a separate program, Hoppy was doing the digital equivalent of swapping out light bulbs. + +[Creating a small progam](https://stackoverflow.com/help/minimal-reproducible-example) provides [insights into the workings of a larger program.](https://ericlippert.com/2014/03/05/how-to-debug-small-programs/#:~:text=these%20techniques%20then%20scale%20up%20to%20finding%20bugs%20in%20non-trivial%20programs.) In a recent pair programming session, a coworker showed me a large list of Python objects which would specify some complex database constraints. He asked if putting the constant at the bottom of the file would cause an error. Initially unsure, I wrote the following small program: + +```python +# fruit.py + +class Apple: + types = APPLE_TYPES + +APPLE_TYPES = ["gala", "granny smith"] +``` + +Within 30 seconds of the question, we received our answer: `NameError: name 'APPLE_TYPES' is not defined`. + +Interestingly, because the program is so short, we identified a different approach within a minute which permits the constant at the end of the file. + +```python +# fruit.py + +class Apple: + types: list + + def __init__(self): + types = APPLE_TYPES + +APPLE_TYPES = ["gala", "granny smith"] +``` + +These small programs, written in less than two minutes, reveal a big insight about the Python language: assignments to class variables resolve at the time of class *definition*, while assignments in an `__init__` method resolve at the time of class *instantiation*. + +## Unit Tests are Small Programs which Yield Big Insights + +This "small programs" approach is productively applied to unit testing. After all, a unit test is fundamentally a small program which evaluates a piece of a larger program. + +Consider the following toy unit test in Python: + +```python +from math import log2 + +def test_logarithms_work(): + assert log2(4) == 2 +``` + +This test automates the same successful approach from Thomas's story with Hoppy. The function of interest, `log2`, is selected out of the [dozens of functions in Python's `math` module](https://docs.python.org/3/library/math.html?highlight=math#module-math) and efficiently evaluated in isolation. + +When each unique insight gained from a program is recorded as a unique unit test, the test suite gains the additional benefit of becoming an executable specification for the program -- capable of continuously verifying its proper functionality. + +## Keep Unit Tests Small. Avoid Omniscient Mocks + +Some parts of large programs depend on complex infrastructure, which can make them hard to test in isolation. Examples include code which interacts with a remote server over the internet or invoking the command line of another program. Such parts of a program are like our small house lamp which depends on the electrical grid for its power. + +Testing the edges of our system is often facilitated by mocks -- stand-in implementations of the dependency -- akin to a portable power supply in our lamp metaphor. Such mocks can be immensely helpful. Patching out network responses, for example, can de-couple tests from a flaky/slow third-party API, drastically reducing both test durations and failure rates. + +However, one pitfall to avoid when unit testing is an anti-pattern I will call "omniscient mocking" + +Omniscient mocking is characterized by the use of mocks which know too much about the intricacies of the implementation of the functionality under test. The use of such mocks makes a test suite more brittle and impedes improvements to the software. + +Imagine testing a lightbulb by smashing it open to replace the filament. Not only does your test ruin the lightbulb, it excludes other valid implementations like LED and neon lights. + +As a code example, the earlier test for `math.log2` makes a clear assertion about the relationship between its parameters and output. In contrast, an omniscient mock might patch out the [`loghelper` function](https://github.com/python/cpython/blob/74c72a2fc73941394839bd912c4814398b461446/Modules/mathmodule.c#L2219) from the C library which [implements `math.log2`](https://github.com/python/cpython/blob/74c72a2fc73941394839bd912c4814398b461446/Modules/mathmodule.c#L2302) -- only to break when [`loghelper`'s function signature changed last year](https://github.com/python/cpython/commit/5a80e8580e2eb9eac4035d81439ed51523fcc4d2). + +In short, mocks are wonderful for patching out dependencies at the edges of your system, but they become more problematic the more they know about your code's implementation. + +## Final Thoughts + +Modern software systems are phenomenally complex. Compared to the mere 266 bits sufficient to count [all the atoms in the observable universe](https://www.thoughtco.com/number-of-atoms-in-the-universe-603795), the megabytes (and sometimes gigabytes) of memory used by modern programs encompass an unfathomably large state space. It is thanks to the well designed abstractions provided by modern programming languages that our programs are even remotely comprehensible. + +As whole programs continue to grow more complex, we need effective tools and techniques to understand the interactions of their constituent parts. Unit tests are one such tool for both facilitating and documenting that learning process. + +So, next time you find yourself repeatedly bulldozing your RAM, consider writing a small, lamp-sized program instead. + + + +------ + +*CREDITS: The cover image of a wrecking ball and house lamp was AI generated using the Bing Image Creator powered by DALL-E. Except where quoted, the text of the article is entirely original writing by Joseph Hale.* \ No newline at end of file diff --git a/_posts/2023-10-29-auto-merging-prs.md b/_posts/2023-10-29-auto-merging-prs.md new file mode 100644 --- /dev/null +++ b/_posts/2023-10-29-auto-merging-prs.md @@ -0,0 +1,199 @@ +--- +layout: post +title: "How to automatically merge trusted Pull Requests on GitHub" +tags: + - Open Source + - Security + - Software Engineering + - Project Management +--- + +
+ A screenshot showing a large number of automatically merged pull requests. +
+ Unblock your maintainers, reduce friction for regular contributors, and automatically apply updates/security fixes from GitHub's Dependabot -- without compromising your standards for security or quality! +
+
+ + +You can increase development velocity by automatically merging pull requests from individuals or bots you trust. Here's how + +## Enable **Allow auto-merge** pull requests in repository settings + +The default settings for GitHub repositories block auto-merging any Pull Requests. This is a beneficial security measure which makes it harder for untrusted actors to integrate malicious code into your repository. + +To allow trusted actors (e.g. maintainers and priviledged GitHub Actions workflows) to enable auto-merge for individual pull requests, you need to globally enable the feature in your repository settings. + +1. Go to `https://github.com/YOUR_USERNAME/YOUR_REPOSITORY/settings` +2. Choose the **General** settings group +3. Scroll down to the **Pull Requests** section +4. Enable **Allow auto-merge** + +![A screenshot of the GitHub repository settings page, showing how to allow auto-merging pull requests](/assets/img/posts/auto_merging_prs/allow_auto_merge.png) + +Remember, this setting is a repository-level *feature toggle*. Individual pull requests still will not be auto-merged unless explicitly flagged otherwise (which we handle [later in this guide](#automatically-enable-auto-merge-for-individual-pull-requests)). + +### GitHub Organizations: Allow GitHub Actions to create and approve pull requests + +Repositories under the scope of a GitHub Organization also need organization-level permissions to enable auto-approval/merging of pull requests. + +1. Go to `https://github.com/organizations/YOUR_ORGANIZATION/settings/actions` +2. Scroll down to the **Workflow permissions** section +3. Enable **Allow GitHub Actions to create and approve pull requests** + + ![A screenshot of the GitHub organization Actions settings page, showing how to allow automated creation and approval of pull requests](/assets/img/posts/auto_merging_prs/org_actions_prs_permissions.png) + +After enabling the setting at the organization level, double check that it is also enabled on the repository level. + +1. Go to `https://github.com/YOUR_ORGANIZATION/YOUR_REPOSITORY/settings/actions` +2. Scroll down to the **Workflow permissions** section +3. Enable **Allow GitHub Actions to create and approve pull requests** + +## Configure branch protection rules + +Without proper protections, automatically merging code can result in broken projects and/or security disasters. You can guard against these scenarios with [branch protection rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule). + +> **Note** +> +> Branch protection rules are free for public GitHub repositories. While you can create a branch protection rule for private GitHub repositories, it will only be enforced if the user/organization owning the repository subscribes to a paid plan (e.g. Pro, Team, Enterprise). + +Branch protection rule are configured in your repository settings + +1. Go to `https://github.com/USERNAME/REPOSITORY/settings` +2. Choose the **Branches** settings group + + If branch protection rules have never been configured for this repository, you should see the option to **Add branch protection rule** + + ![A screenshot of the branch protection rules settings page in GitHub when no rules have been configured.](/assets/img/posts/auto_merging_prs/branch_protection_rules_none.png) + + If branch protection rules already exist, you will instead see the options to **Edit** a rule, or **Add rule** + + ![A screenshot of the branch protection rules settings page in GitHub when one or more rules have been configured.](/assets/img/posts/auto_merging_prs/branch_protection_rules_some.png) + +3. Under **Branch name pattern**, enter the name of the branch to protect (e.g. `main` or `master`) +4. Under **Protect matching branches** enable all the rules you want to enforce before any merge can happen, automatic or not. I recommend the following: + - Enable **Require a pull request before merging** and its subrule **Require approvals** with the number of required approvals set to `1` + - Enable **Require status checks to pass before merging** and its subrule **Require branches to be up to date before merging** + > **Warning** + > + > Use the search box to find and select the names of the jobs to enforce as required status checks. Otherwise, this rule will do nothing. + + ![A screenshot of creating a new branch protection rule in GitHub.](/assets/img/posts/auto_merging_prs/branch_protection_rule_settings.png) +5. Scroll down to the bottom and press **Save changes** + + + +### RECOMMENDED: Improve the maintainability of required status checks with the `alls-green` GitHub Action + +The rule **Require status checks to pass before merging** suffers from two major flaws: + - Required status checks that are "skipped" count as "passing" + - The list of required status checks must be maintained manually -- especially difficult with [build matrices](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs) + +These concerns can be largely mitigated by adding the [`alls-green` GitHub Action](https://github.com/marketplace/actions/alls-green) to the end of your CI's workflow file with your required jobs listed under the `needs` key of the `alls-green` job. + +For example, +{% raw %} +```yaml +name: My Project's CI Checks +on: + pull_request: + branches: [main] +jobs: + lint: + # ... specifications for the `lint` job + test: + # ... specifications for the `test` job + + # Reduce the maintenance burden for required status checks. + # https://github.com/marketplace/actions/alls-green#why + alls-green: + # ^--- TODO: After the first run, set this job name as a + # required status check in your branch protection rules. + if: always() + needs: # <--- TODO: List all required jobs here. + - lint + - test + runs-on: ubuntu-latest + steps: + - name: Ensure all other jobs pass successfully. + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} +``` +{% endraw %} + +After your updated CI workflow is run for the first time, you can reopen the branch protection rules and search for `alls-green` to set it as a required status check. + +With the `alls-green` job configured, you no longer have to manually sync your branch protection rules with your build matrix. Additionally, changes to required job names only have to be kept in sync within the same workflow file, instead of with the GitHub branch protection UI. + +If you use status checks from third-party providers or multiple workflow files, you will still need to maintain those in your list of required status checks in the repository's branch protection rules. + +## Automatically enable auto-merge for pull requests from trusted authors + +Once the appropriate permissions and safeguards are in place, auto-merging pull requests from trusted authors can be enabled automatically with another GitHub Actions workflow. + +For example, the following workflow will automatically merge pull requests from [GitHub's Dependabot](https://docs.github.com/en/code-security/dependabot): + +{% raw %} +```yaml +# .github/workflows/automerge-dependabot-prs.yml +name: Auto-merge Dependabot PRs + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --rebase "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} +``` +{% endraw %} +> **Note** +> +> The above workflow was adapted from the [GitHub Dependabot documentation](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request). + +### How the auto-merging workflow works + +#### Limiting when the workflow runs +The above workflow is triggered `on` the opening of any [`pull_request`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) into the repository. + +The workflow's sole job, `dependabot`, only runs `if` the user who opened the request (i.e. `github.actor`) is `'dependabot[bot]'`. You can [customize this guard with any valid GitHub Action expression](https://docs.github.com/en/actions/learn-github-actions/expressions). For example, to auto-merge pull requests from one of multiple trusted authors (e.g. `dependabot[bot]` and a trusted maintainer with the username `octocat`) you can [provide a list](https://stackoverflow.com/a/70142531/14765128) of trusted author names: + +{% raw %} +``` +if: ${{ contains(fromJson('["dependabot[bot]", "octocat"]'), github.actor) }} +``` +{% endraw %} + +#### Automatically approving and merging the pull request +The job's two `steps` will use the [GitHub CLI's `pr` command](https://cli.github.com/manual/gh_pr) to interact with the pull request. + +The first step adds an automatic approval to satisfy the **Require approvals** branch protection rule we [configured earlier](#configure-branch-protection-rules). This approval will appear as coming from `github-actions[bot]`. + +The second step directs GitHub to `--auto`matically merge the pull request once all required status checks pass, per the **Require status checks to pass before merging** branch protection rule [configured earlier](#configure-branch-protection-rules). As written, the merge will use the `--rebase` strategy, but you can change it to [`--merge` or `--squash`](https://cli.github.com/manual/gh_pr_merge) at your preference. + +#### Security notes +These steps authenticate with the GitHub CLI using the [default `GITHUB_TOKEN`](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) which is granted additional priviledges for `write`-ing updates to a pull request by the [`permissions`](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) block at the top of the workflow. + +## Examples + +I actively use this auto-merging strategy for Dependabot PRs in many of my open source projects. While the repository settings are not publicly viewable, the GitHub Actions workflow files are. + + - **Multicounter:** [A Python package for easily counting multiple things at once.](https://github.com/thehale/multicounter) + - **Signatures**: [Run-time type checking for function signatures in Python.](https://github.com/thehale/signatures) + +If you successfully used this guide in your project, please let me know! I am happy to list your project here too. \ No newline at end of file diff --git a/_tabs/about.md b/_tabs/about.md --- a/_tabs/about.md +++ b/_tabs/about.md @@ -4,5 +4,34 @@ order: 4 --- -> Add Markdown syntax content to file `_tabs/about.md`{: .filepath } and it will show up on this page. -{: .prompt-tip } +🎯 I am a bilingual software engineer (English/Spanish) interested in building +educational applications which empower people to refine meaningful skills. + +🚀 As a professional developer for almost four years, I have built and deployed +financial ETL microservices which currently generate over $700,000 in +recurring annual revenues. I regularly contribute to open-source projects, +with my code running in projects used by millions. +[1] +[2] +[3] +[4] +[5] + +🏃‍♂️I learn new technologies quickly, usually building a major production +application within three months. At work, this has included a Docker +deployment of a Python application and an OAuth/OIDC +implementation to support corporate Single Sign-On. At home, this +includes my +Binary +Clock app written in JavaScript using React Native. + +📚 As an undergraduate Software Engineering student at Arizona State University +I published an honors +thesis detailing an invention which converts a normal Rubik's Cube into a +smartcube to track each face turn. I will complete my Master's Degree in May 2023. + +🎶 During my free time I love solving Rubik's Cubes (averaging ~12 seconds), +playing music (piano, viola, singing bass), chasing down a Frisbee in a +competitive game with friends, and trying out my hand at graphic design +(specifically logo design). diff --git a/assets/img/posts/2022_time_tracking/2022 Weekly Sleep Trends.png b/assets/img/posts/2022_time_tracking/2022 Weekly Sleep Trends.png new file mode 100644 --- /dev/null +++ b/assets/img/posts/2022_time_tracking/2022 Weekly Sleep Trends.png diff --git a/assets/img/posts/2022_time_tracking/arizona_saints_chorale.jpg b/assets/img/posts/2022_time_tracking/arizona_saints_chorale.jpg new file mode 100644 --- /dev/null +++ b/assets/img/posts/2022_time_tracking/arizona_saints_chorale.jpg diff --git a/assets/img/posts/2022_time_tracking/barrett_graduation.jpg b/assets/img/posts/2022_time_tracking/barrett_graduation.jpg new file mode 100644 --- /dev/null +++ b/assets/img/posts/2022_time_tracking/barrett_graduation.jpg diff --git a/assets/img/posts/auto_merging_prs/allow_auto_merge.png b/assets/img/posts/auto_merging_prs/allow_auto_merge.png new file mode 100644 --- /dev/null +++ b/assets/img/posts/auto_merging_prs/allow_auto_merge.png diff --git a/assets/img/posts/auto_merging_prs/branch_protection_rule_settings.png b/assets/img/posts/auto_merging_prs/branch_protection_rule_settings.png new file mode 100644 --- /dev/null +++ b/assets/img/posts/auto_merging_prs/branch_protection_rule_settings.png diff --git a/assets/img/posts/auto_merging_prs/branch_protection_rules_none.png b/assets/img/posts/auto_merging_prs/branch_protection_rules_none.png new file mode 100644 --- /dev/null +++ b/assets/img/posts/auto_merging_prs/branch_protection_rules_none.png diff --git a/assets/img/posts/auto_merging_prs/branch_protection_rules_some.png b/assets/img/posts/auto_merging_prs/branch_protection_rules_some.png new file mode 100644 --- /dev/null +++ b/assets/img/posts/auto_merging_prs/branch_protection_rules_some.png diff --git a/assets/img/posts/auto_merging_prs/merged_prs.png b/assets/img/posts/auto_merging_prs/merged_prs.png new file mode 100644 --- /dev/null +++ b/assets/img/posts/auto_merging_prs/merged_prs.png diff --git a/assets/img/posts/auto_merging_prs/org_actions_prs_permissions.png b/assets/img/posts/auto_merging_prs/org_actions_prs_permissions.png new file mode 100644 --- /dev/null +++ b/assets/img/posts/auto_merging_prs/org_actions_prs_permissions.png diff --git a/assets/img/posts/binaryclock/binary-clock-to-ios.png b/assets/img/posts/binaryclock/binary-clock-to-ios.png new file mode 100644 --- /dev/null +++ b/assets/img/posts/binaryclock/binary-clock-to-ios.png diff --git a/assets/img/posts/binaryclock/binary_clock_demo.gif b/assets/img/posts/binaryclock/binary_clock_demo.gif new file mode 100644 --- /dev/null +++ b/assets/img/posts/binaryclock/binary_clock_demo.gif diff --git a/assets/img/posts/git-authorship/git_authorship_demo.gif b/assets/img/posts/git-authorship/git_authorship_demo.gif new file mode 100644 --- /dev/null +++ b/assets/img/posts/git-authorship/git_authorship_demo.gif diff --git a/assets/img/posts/nchc/barrett_delegation.jpg b/assets/img/posts/nchc/barrett_delegation.jpg new file mode 100644 --- /dev/null +++ b/assets/img/posts/nchc/barrett_delegation.jpg diff --git a/assets/img/posts/nchc/kathryn_thornton.jpg b/assets/img/posts/nchc/kathryn_thornton.jpg new file mode 100644 --- /dev/null +++ b/assets/img/posts/nchc/kathryn_thornton.jpg diff --git a/assets/img/posts/unit_testing_bulldozing_lamps/wrecking_ball_lamp.jpg b/assets/img/posts/unit_testing_bulldozing_lamps/wrecking_ball_lamp.jpg new file mode 100644 --- /dev/null +++ b/assets/img/posts/unit_testing_bulldozing_lamps/wrecking_ball_lamp.jpg diff --git a/assets/img/posts/unit_testing_bulldozing_lamps/wrecking_ball_lamp_square.jpg b/assets/img/posts/unit_testing_bulldozing_lamps/wrecking_ball_lamp_square.jpg new file mode 100644 --- /dev/null +++ b/assets/img/posts/unit_testing_bulldozing_lamps/wrecking_ball_lamp_square.jpg -- tangled.sh