OPW – Project update, aka “tenaciousness is key”

The last few weeks have presented a series of extremely trying RL (real-life) challenges to deal with outside of my coding life.  There were a few rounds of very upsetting news, on a personal level.  I had to make a move on short notice, to a remote area where (believe it or not) internet and cell reception are hard to come by.  It took a week and a half to get internet, due to various hold-ups… and since I had no cell reception either, it was very hard to get much done as there was no easy way to look up syntax or examples when I got stuck.  Other obligations are suddenly making increased demands on my time and energy, while a number of things have simultaneously gone awry which have been or will be very time-consuming to sort out.  Staying focused through the trials and upsets has taken a monumental effort at times.

In short, it’s been pretty horrendous.

I’m a determined soul, though, when I have a goal in mind, so I refuse to quit.  It’s just going to take some serious tenacity (and sleep deprivation) to see things through.  I love what I’m doing, I’m enthusiastic about this project, and I want this experience, so I’m going to give it all I’ve got.

An in-depth understanding of Git has been slow in coming, I’m afraid.  I used Subversion, once upon a time in a class far far away, so the concepts of branching and checking out code and merging aren’t new.  Much of the time, technology just kind of innately makes sense to me, and new concepts fall into place with relative ease (considering the complexity of the topic at hand, anyway).  I’ve found it inexplicably difficult, however, to wrap my head around Git.  I know what I want to do in a given situation, but figuring out how to make Git actually do it has taken an inordinately long time.  Recently, some relatively minor fixes were made, but stored on a different repository, and I couldn’t figure out how to pull the changes to my local machine.  I ultimately ended up waiting until the changes were merged into the origin.  By then, unfortunately, I was half-configured for the other repository… so it took time and some fancy dancing to get everything back to normal.  Ick.  Well, mistakes lead to more learning, even if the resulting predicaments can be frustrating at times.  This evening’s learning, however out of place it may be in the middle of this post, was how to pull the latest changes from the remote of a branch you’ve been working on. I want to post it here, now, because I may not remember to do it later:

git fetch upstream yourworkingbranch
Continue reading

OPW – Miscellaneous web development tips

The Ubuntu virtual machine (VM) I was developing on decided to have a thermonuclear meltdown yesterday. I reappropriated a 16GB thumbdrive and have installed Ubuntu natively on that. Since I have to redo the nice little setup I’d done for myself, I might as well document it while I’m remembering. I can’t take credit for it, as it came from other developers who were nice enough to share their wisdom with me, either directly or indirectly. In the spirit of paying it forward, here ya go.  🙂

First, a bit of background info:

When you clone from a GitHub repository with Git, it automatically creates the main project directory for you.

Rather than cloning to the Apache document root /var/www and fiddling with sudo every time one creates, moves, or edits a file, it’s nice to be able to work from a folder in one’s home directory… but then it’s a pain to keep copying the modified files to /var/www for testing.

Here’s how I made my life a little easier:

Continue reading

OPW – Forking and Creating a New Branch in Git and GitHub

This week, we are working on getting familiarized with Git and GitHub, and writing up some more detailed documentation to facilitate future deployments of TidePools. I am a complete n00b to Git and GitHub, so here are a few of my notes about them to help me keep things straight. I’m posting them here in the hopes that they may be useful to others, as well.

The TidePools code was recently moved here:


I was added to the organization as a team member and given permissions to push and pull. I was told that the preferred way to contribute for this project is to add branches, which will then be reviewed before being merged. I didn’t know where to start, and while GitHub’s tutorials are pretty good, I had to read between the lines to figure out how to set up proper branching. Below are the steps I used. I tested functionality by making small modifications to the README file and then checking whether the changes were reflected on GitHub.

The first step was to log in to the GitHub site, go to the TidePools repository on OTI (linked above), click the Fork button at the top, and tell it to fork to g33kgrrl. That creates a copy of the code in my GitHub repositories. Then I make a copy of the forked repository on my local machine:

g33kgrrl@saturn:~/TidePools$ mkdir fork
g33kgrrl@saturn:~/TidePools$ cd fork
g33kgrrl@saturn:~/TidePools/fork$ git clone https://github.com/g33kgrrl/TidePools.git
Cloning into TidePools...
remote: Counting objects: 1788, done.
remote: Compressing objects: 100% (1734/1734), done.
remote: Total 1788 (delta 63), reused 1778 (delta 53)
Receiving objects: 100% (1788/1788), 50.49 MiB | 280 KiB/s, done.
Resolving deltas: 100% (63/63), done.
g33kgrrl@saturn:~/TidePools/fork$ cd TidePools

Continue reading