Two Group Practices Every Noob Should Start Using for Solo Projects
Here are two practices used on professional group projects that new developers and students should start implementing when creating solo projects.
Use Git the Right Way
When you are creating a new feature for your project, don’t just work on your master branch on your local machine. Create a new branch for the feature you are working on and then merge it back in when it passes muster. Here is a great blog post by a fellow named Scott Lambert on how to do it, including links to learn Git for the first time, if you haven’t used it. In the article, you will note he references following a Git workflow written up by Vincent Driessen here (which I am actually using currently for a team project I am working on). While, I don’t think keeping both a master branch and an additional development branch to branch off of for features is necessary for a lot of pet solo projects, it certainly doesn’t hurt and will be great practice to have familiarity with if you want to give it a spin. Just make sure you are creating feature branches to work in either way.
I should also mention that while I don’t know Scott, according to his website, he is either still a student or very recently completed his web development studies and he has already been using professional Git practices for awhile. I’d be willing to bet dollars to donuts that this is the type of guy most employers would be very happy to interview based on the blog post he typed up alone.
Use a Style Guide and Stick to It
Forcing yourself to write code that isn’t garbage from the get-go is a great habit. Unfortunately, when you are new, it can be a challenge because there are many areas where you really just don’t know the difference between good and bad code. This is where style guides really come in handy. After writing up a feature, you can reference the pertinent section of a style guide and compare it against your code and re-factor the ugly stuff.
What’s even better is when you don’t even have to go back and reference the style guide and can instead hand the job off to someone else to do it for you. This is where software like Rubocop comes in. Rubocop and related software will compare your code to best practices in styling and tell you where you should consider refactoring your code. This not only improves the quality of code you have in production, it also really helps with learning the difference between good and bad code and the areas you need to read up on to improve.
I hope you have found this post useful and take the time to implement these two practices into your own code. I have recently included these practices into my own solo projects and it has certainly been helpful for me.
Cheers,
Nathan