Categories
Tips

Navigating GitHub’s Love-Hate Rollercoaster

On a cold and bitter February afternoon, a computer programmer’s worst nightmare ensued: all git commands stopped functioning.

I unleashed my best freak-out face: >:0

Time was running out while I tried to figure out how to fix it. For my senior capstone, my teammates and I are creating a web-based game using Phaser 3’s framework to create an educational experience on how to fight wildfires. But I needed to push last-minute updates to the game’s codebase. And Git was not cooperating.

At the time, I used WebStorm, a Javascript and Typescript IDE, to edit the code, which comes with a lot of bells and whistles, including built-in Git functionality. But one day, these tools stopped working. So I switched to using the built-in terminal, but no matter how many branches or clones I made, I was blocked at every turn.

An Unpopular Opinion to Navigate

To make matters worse, GitHub and I have a horrible relationship. It’s embarrassing! I avoided learning git commands for years. Ever since my first computer science course, everyone always told me how amazing using GitHub was, whether they were decades-long professionals or first-year college students. What a bunch of bologna!

Eh. The user interface on GitHub’s website was difficult for me to navigate, and for the longest time, I didn’t realize that manually downloading and uploading updated code to GitHub wasn’t ‘normal.’ Or at least, not the best way to use it. And I didn’t understand what the terminology meant. It felt I was being told to ‘branch’ and ‘fork’ when I didn’t want to. Magic forks are weird! And magic branches feel like ‘Alice in Wonderland,’ and that story always made me feel uncomfortable (the cat freaked me out, and I’m a huge cat person, so that was disturbing). Worse, I didn’t understand what happened after calling those commands in the terminal.

But there’s no way I’m the only computer programmer in the world experiencing these issues!

This is why I want to show you what I appreciate about GitHub now, and a new technology I’m using that helped me understand GitHub at a deeper level, and makes navigating the steps more fun.

The Basic Commands

Based on my understanding thus far, which is very limited, this is the most simple workflow to use when making changes to a GitHub repository.

git clone # make a copy of the repository
git branch # create a new place to store a copy
git checkout # enter that copy
git pull origin main # merge latest code to branch

…make code edits…

git add –all # put changes in a queue (staging)
git commit -m “what you changed” # attach a message to changes
git push origin # upload code changes to main

These are commands that have helped me the most in navigating the crazy web of Git. But given that it’s easy to make mistakes and get lost, GitHub’s documentation is a good starting place, and more understandable after already learning the commands I talked about above.

What I appreciate now about GitHub is that once you understand how a few different steps work, I feel like I’m more in control with how to update different versions of code. I guess since it’s ‘version control,’ that’s appropriate.

But it did take me a while to get to that point. And although using tools with bells and whistles is convenient, sometimes they obfuscate the process. So when something breaks, it’s really hard to know what went wrong. More confusion leads to more frustration, and it can surprisingly waste a lot of time.

I ended up finding a technology that technically still has downloadable bells and whistles, but they do make managing versions not only easier to understand, but demonstrate the process, and make it clear which steps need to occur in order. Surprisingly, it was with a very common free IDE.

I’ll explain.

A Visual Solution

I downloaded Visual Studio Code and downloaded the following extensions:

  • GitHub Pull Requests by GitHub
    Why? To review and manage GitHub Pull Requests! This is very useful when working on a team repository.
  • GitHub Repositories by GitHub
    Why? To quickly browse, search, edit, and commit to any remote GitHub repository from inside the IDE!
  • Azure Repose By Microsoft
    Why? To open and browse repos quickly from any version. Cloning without this can result in working with out-of-date code, especially if the main repository is regularly updated often.
  • Remote Repositories by Microsoft
    Why? This one integrates with the GitHub Repositories and Azure Repos extensions. Disabling this extension makes all these extensions (except GitHub Pull Requests) inactive, so I believe it’s to tie them together.

Let’s explore how all these extensions function together. First, I clicked on the Remote Explorer button that looks like a desktop icon in the IDE. Then I clicked the + sign to add a new remote repository.

Which opened up a beautiful window at the top of the window that let me sign into GitHub and open a repository! My team’s is named fire-sim.

Notice that there are options to open pull requests too! These are extremely helpful to look at all the revisions. In my opinion, it feels clunky to use GitHub’s default UI.

Here is an example of what editing a pull request might look like with these extensions in Visual Studio Code. Note the extra ‘pull request icon’ at the bottom of the left sidebar, and how easy it is to see the old code vs. the new changes being requested to merge into main:

But that’s a side point. The biggest feature I want to demonstrate is how to make a new branch after adding a remote repository.

So, when you first open a repository, the codebase opens up. However, in order to make changes on a new branch and make a pull request later, an extra step is required.

I clicked on the ‘bug’ icon on the left side of the sidebar. This is normally the ‘Run and Debug’ button. Then, I clicked Continue Working On….

This allowed me to choose a new option that says, “Clone Repository Locally and Open on Desktop.” I get to choose a folder to save the code copy in. This opens up an entire new window, and when I open the terminal, I’m already navigated to the copy.

And this is the time to run all the code commands I wish! To add a new branch, I run the following commands:

Now in my IDE, I can make code changes in this beautiful setup.

After saving changes to each code file (eg. Ctrl+S or CMD+S), the IDE automatically detects changes and notifies you to make a commit via the Source Control button!

A new file opens that lets me write a comment, and then once I save (eg. Ctrl+S or CMD+S), and exit that file, I can push the code.

I can also make a commit and push the code through the terminal if I don’t like the GUI version. This kind of freedom is exactly what I was looking for, and might be the key to saving my love-hate relationship with GitHub.

I hope this article helps any other programmers enjoy version control a little more too!

Categories
Tips

Housekeeping in the Coding World

Code can smell really bad when it’s left out in the open. In the last six years, the biggest thing I learned about smelly code is that others than smell it too. So if code isn’t readable, organized, or built with safety in mind, it affects teammates trying to make it better. Thus, making code clean isn’t just a personal matter – but can make or break a team’s success.

This is much easier said than done, and in my experience so far, code smells are very easy to forget about, especially for personal projects. Organized code used to fall at the bottom of my priority list, especially when on a tight deadline. But when I started presenting my code and sharing it with others, having clean, organized code made the interaction more professional, engaging, and effective, since others can understand it and hence, care about it.

Who cares if my code smells?

On this topic, in the first chapter of Robert Martin’s book, Clean Code: A Handbook of Agile Software Craftsmanship, one of my favorite quotes is from Bjarne Stroustrup, the inventor of C++ and author of The C++ Programming Language.

I like my code to be elegant and efficient. The logic should be straightforward to make it hard for bugs to hide, the dependencies minimal to ease maintenance, error handling complete according to an articulated strategy, and performance close to optimal so as not to tempt people to make the code messy with unprincipled optimizations. Clean code does one thing well.

A lesson I learned from this is the art of elegancy. Designing code in this way makes it enjoyable for the reader, easier to improve the codebase, and enhances efficiency. One of the best advantages to developing software is speed. However, just because the software works, doesn’t mean it can be improved easily past the alpha stage. But if the code is already clean, then I feel like the team’s ability to advance the project faster and stronger is more likely.

Another problem with smelly code is that it can be so unrecognizable that it’s difficult to learn. I remember one of my earliest programming projects where I needed to complete a Yahtzee game, and the conditionals and functions became such a big web that I just about broke down and had to take a break (true story).

A really good lesson I wish I learned earlier on is how to make functions shorter. In chapter three of Refactoring: Improving the Design of Existing Code, Martin Fowler writes:

“Since the early days of programming, people have realized that the longer a function is, the more difficult it is to understand. Older languages carried an overhead in subroutine calls, which deterred people from small functions. Modern languages have pretty much eliminated that overhead for in-process calls. There is still overhead for the reader of the code because you have to switch context to see what the function does.”

I strongly believe focusing on making functions shorter is the biggest key to designing a program well. On another note, switching context to see what each function of my Yahtzee program did is definitely something I do not recommend (lol). Long functions used to be the bulk of my program. Worse, it made the program difficult to understand and debug, making it impossible to complete the assignment in time. And was I proud of it? Not even the slightest.

But with practice, reprioritization, and learning from advice from reputable resources noted earlier, there is hope for smelly code.

Practice makes perfect, er, de’code’orant

Currently, one thing I would like to start doing more often is making functions shorter. In the past, I assumed that talented programmers can handle reading long lines of code… but that kind of mindset just makes everyone’s lives more difficult (including my own). By making functions shorter, the code is more readable and easy to understand.

A good example of this is how my team and I formatted our app.js file in our fire simulator game this year. Below is a screenshot on the file that configures all the settings of our game correctly using Phaser, an HTML 5 game framework.

Notice how each block of code is short with steps that describe what the code does. The file itself can probably serve as a singular function.

However, deep in the FireSpread.js file, I implemented a feature that allows users to extinguish fires using the water icon. I was short on time and new to the methods that were required, so this the slimy spaghetti that resulted:

Even though there are some comments explaining the output of the program, it’s unclear why each line is integral. This function also does more than light fire – it creates an animated object, generates the frames for it, plays the animation, makes the fire clickable, includes an event that detects when and how the fire sprite is clicked, and deletes the fire sprite when clicked. As you can see… that is some smelly code!

In the future, I want to avoid repeating this type of mess for each feature. Even though being feature-focused will be important for the current sprint, being elegant-focused will allow features to be easier to add, especially if every function in the program is readable and reusable.

Before I return to my computer to put some de’code’orant on this code smell, one thing to always remember from here on out: embracing elegance leads to embracing what matters.

Categories
Tips

How to Make Connections Without Social Media

Want to send a personalized message to someone on LinkedIn? Click the Connect button, and optionally add a message to explain how you know each other.

But wait a second – they have 500+ connections. How can I possibly stand out of the crowd and get their attention? Short answer: don’t.

I don’t know about you, but if I answered all my messages, I would never get anything done. At least, not in the real world. My account would be teeming with hearts and thumbs-ups for all my ‘wonderful accomplishments’, when in reality, I’m sitting in bed all day with my thumbs glued to the phone and about to cry because I forgot to say good morning AND goodnight to my roommates.

The truth is, social media accounts only go so far. Even so, just about every career development workshop I’ve been to primarily focused on building a social media presence online.

Don’t get me wrong — this personally helped me practice how to communicate effectively to a general audience, but it only goes so far, especially when I’m just talking about myself all the time on LinkedIn, GitHub, TikTok, YouTube, and Instagram.

Boorrinnngg.

Instead of talking about myself by myself, the first step to making connections without social media is:

1. Ask People What They Like to Do

People love talking about themselves. And I don’t care how boring they think their life is, because the truth is, everyone has a story to tell.

Every time I meet someone new, I ask about what they like to do. This includes what their profession is, their hobbies, pets, and what they want to accomplish in the future.

By coming up with a few questions beforehand, the conversation will naturally take off. This is best over coffee, playing a board game, waiting for the bus, conference booths, or literally in the elevator (happened to me the other day)!

The biggest takeaway is to give people the space to tell their story. This is time best spent not trying to get something from them. This is the time to care. Let’s face it — the world is a better place when someone cares.

But what about career fairs?

Everyone told me to attend a career fair, talk to someone, shake their hand, reach out later on social media, cross my fingers that they like me and get a job offer. Pure. Manipulation. I’ve decided that’s not my style, although it took me 206 college credits and 3 career fairs to figure that one out.

In my opinion, online reputations and career fairs don’t have to be the primary focus. I like to remember that everything I put online (similar to the clothes I wear for the day) is a reflection of what happens in real life. Not everyone posts that way, but that’s my style. So if I put more energy into giving to the real world, the online reflection grows brighter, and the real-life connections I make are deeper.

Therefore, online and offline interactions are equally important. I proved this myself with the following evidence.

  • In the past three months, I have instructor Bill Pfeil from CS 461 to thank for supporting my three wonderful teammates in building a web-based educational fire simulator using Discord text & audio channels.
  • I have the crew at Cloud Native Computing Foundation (CNCF) to thank for inviting me to teach Minecraft modding to eager kids in Salt Lake City at KubeCon.
  • I have Cassandra Chin to thank for wanting to help me start writing a new children’s book for the first time after meeting with her at the conference.
  • And I have my Mom, Melissa McKay, for helping me meet new people, brainstorming, and reminding me to have fun.

All of these amazing people and opportunities would not be in my life without interacting with people both online and offline.

Step 2: Show Up In-Person to Something

Whatever you do, do not stay inside all day! There is a big world out there to explore, and every day spent inside is one day less of giving to others.

I’ve found that I thrive the most when I focus on how to lessen the suffering the others in one way each day. Full transparency: I learned this tip from a Masterclass taught by Neil deGrasse Tyson back in COVID-19 pandemic days.

Anyways, this can range from giving someone a granola bar to fixing a line of code on an open source project. But the more in-person that component is, the better.

For me, this comes in the form of teaching, but conferences, meetup groups, workshops, club meetings or even mentoring a cousin on mathematics for an hour are all ways to build a strong in-person community.

By getting to know people in the local community, I’ve been able to learn what people care about, why they do what they do, and what they want to learn. Sometimes I make an industry connection when I am least expecting it at events like these.

The most important part is to be yourself and learn what makes your community excited and happy.

Is it time to forget social media entirely?

No! However, it is easy to only post about how great I am. Ugh.

I always ask myself why I’m posting something, and question what the benefit is. Am I bragging about my accomplishments? Or am I shouting out someone who deserves recognition? Does my post provide something helpful for someone who reads it?

When a post is only about how cool someone is, viewers can lose trust, feel bad about themselves, and scroll endlessly in everyone’s daunting success.

I don’t think that’s very fun.

Step 3: Post What You Learned from Someone Recently Online

I’ve found that the best posts are sharing what I learned with someone or giving them recognition for an accomplishment. For example, I recently made a post on LinkedIn about teaching Minecraft modding in Salt Lake City. I focused on sharing the purpose behind the event, a link to the tutorial so that anyone can learn the code, and gave a shoutout to everyone who made it possible. In the result, the post lifts other people up, gives a free resource away, and helps others outside of the community learn why the event is helpful for society as a whole.

While accomplishments are great for building credibility, helpful interactions are great for building a rich community.

Now what?

Mistakes will happen in the networking process, and that’s okay! Just keep walking forward. With persistence and a sprinkle of creativity, it’s easier to make connections offline with online components that don’t take over your life, whether that’s for an interview, friendship, or building your own professional network.

Categories
About

About Me

I like turtles.

Sorry, I couldn’t resist bringing that meme back. As you can tell with my voice in the background, they are just too darn cute.

But wait! Before you go, if you found this page, I bet you’re wondering what this blog is and why you’re here.

This blog is for students and professors wanting to know how to survive as a college student. It is also for them to see the heartbreaking and exhilarating process of failing and succeeding when wrestling with software projects for the first time.

In my opinion, there is so much more to do than use software tools. So if you are interested in:

  1. Understanding why they work
  2. Exploring why they are built the way they are
  3. Brainstorming why and how they are useful for different types of communities

Then you are in the right place!

How I Got Here

My name is Kaitlyn Hornbuckle, and I’m a computer science student at Oregon State University. My education focus is on cybersecurity1, but I also dabble in content creation, science writing, public speaking, search engine optimization (SEO) techniques, and course development for various companies. Oh, and I love cats.

Below is a map detailing the steps I took, five years after enrolling in my first out-of-state university. The first stop is my original major.

My own personal student career map. Use at your own risk, if you dare.

As you can see, my journey was not a straight line. But it did lead me to a myriad of adventures in the field, including but not limited to video editing, writing online tutorials and science articles, teaching science, technology, engineering, and math topics to K-12 students in camps and workshops, and building a Discord bot that combats hate speech.

How I Started with Computers and Software

After I recorded my first video in the early 2000s using bubble effects from laptop camera software, I fell in love with everything related to technology.

In elementary school, I enjoyed spending my time exploring everything I could on the Internet, and then spread the word with my friends. I dove into Webkinz2, Moshi Monsters3, Club Penguin4, Spineworld5, CoolMathGames6, and found a website where I wrote a love letter to Justin Bieber (to this day, I wonder if my email address got sold for that one, but oh well). As word spread, it wasn’t long before the school’s network blocked almost everything I loved. But I also enjoyed running around outside in the fresh air, so I couldn’t complain.

When I got a little older, I defended Minecraft villages with my friends and screamed from everything — axes, creepers, zombies, empty caves — you name it.

A Minecraft village I explored with my brother in Minecraft Bedrock Edition.7

In high school, I accidentally did Batman’s job (he was the IT guy at my high school) with the printer in my journalism class. I sat in front of video editors, audio editors, 3D animation tools, text editors, photo editors, search engines, graphical user interfaces on operating systems that constantly updated themselves, spreadsheets, video games, various Integrated Development Environments (IDEs) and emails.

But I don’t think I officially started with computers and software until I realized using them can help people. That was when my passion of using tech tools transformed into a raging passion for strategizing which technical projects and soft skills are useful and beneficial for communities.

A 3D Rubik’s cube with little compartments for trinkets generated with Blender8 back in 2019. This was one of the first times I wrote a tutorial on how to design one so that others in the local Denver community learned how to make 3D models.

Why I Jumped from One Technology to the Other

Once I figured out that I could use technology to help people, I dove deep in education technology. I could list off a bunch of methods and tools I learned along the way, but that’s for a different article.

However, there are three technologies from other industries that I want to highlight, as they provide new learning opportunities not only for students, but for product development and security training as well.

Hugging Face

Yes, their mascot is a hugging emoji. Despite the friendly name, the company provides a lot of machine learning documentation with thousands of open source models, datasets, and demo apps. It’s a relatively big collaboration platform that could be helpful for building any AI products in the future, both small and large.

Kali Linux

As someone who is new and wants to learn advanced penetration testing and security auditing techniques, this Linux distribution is the perfect toolbox. Personally, I’m curious about finding a way to use its customized kernel to test the website security of a custom site. The tools are best used ethically, and their tool documentation is a great starting place to explore.

Python Anywhere

For a long time, I struggled to find ways to practice using cloud software because I’m a student with a low budget. I also wanted to find a way to teach Python without requiring students to download anything, and that’s where I found this platform.

As someone who learned about ‘the cloud’ and what the purpose of a console was late in the game, I wish I found PythonAnywhere earlier. The platform allows you to access a console, create web apps, store code, and run 24/7 automated scripts. Some features are free to get started, but I made the $5/month option work to run small always-on tasks. In my case, it was for running and designing a Discord bot.

So with a little bit of exploration with these artificial intelligence, machine learning, cybersecurity, and cloud tools, I’m excited to see what types of projects I write about next and learn how to measure their impact.

Conclusion

I hope you enjoy the rest of the blog. Before you leave for your own adventure, don’t forget to enjoy the silly things in life — like how my cat doesn’t let a kitchen chair get in the way of attacking straws:

And if you want to stay updated on my latest career developments, feel free to check out my LinkedIn.

Happy coding!

  1. Cybersecurity Option at Oregon State University. https://engineering.oregonstate.edu/Academics/Degrees/computer-science/computer-science-option-cybersecurity ↩︎
  2. Webkinz. https://www.webkinz.com/ ↩︎
  3. Moshi Monsters Wikipedia. https://en.wikipedia.org/wiki/Moshi_Monsters ↩︎
  4. Club Penguin Wikipedia. https://en.wikipedia.org/wiki/Club_Penguin ↩︎
  5. Spineworld Fandom Wiki. https://spineworld.fandom.com/wiki/Spineworld ↩︎
  6. Coolmath Games. https://www.coolmathgames.com/ ↩︎
  7. Minecraft. https://www.minecraft.net/en-us/about-minecraft ↩︎
  8. Blender. https://www.blender.org/ ↩︎