All Posts

Explore all articles from Life Beyond Fife - Page 9

coding

Breaking into the opinionated, disjointed world of web development

Again and again, I find web development one of the most fascinating of all the disciplines I've come across in my career. Fascinating in the way Extreme Ironing is fascinating: you spend as much of the time wondering why as you do how. Getting started The main issue as I see it for a developer with existing skills in programming looking to become a web developer, is how to get started. Take jstherightway.org as an example of one of many introductory guides to modern web development: as comprehensive and helpful as it is, where do you begin? How do you...

4 min readRead more →
git

Caveats

If this isn't the only site you've looked at for assistance learning git, you may have come across advice that perhaps contradicts some of the suggestions I've made. For example, the template workflow I describe instructs users to get the latest changes from the origin repo using git pull. Other sources will recommend, with good reason, a slightly longer approach that splits this over two git commands, fetch and merge. Opiniated versus Non-opinionated As a programmer you may have heard languages being referred to as opinionated or non-opinionated. Opinionated languages do not just specify their, often terse, syntax, but rather...

4 min readRead more →
git

Conclusion

This guide does not claim, not wants to be, an exhaustive guide to git. It attempts to give a basic mental model for what the commands are actually doing in plain English and with some simple diagrams. Complex topics such as git, of which we've only begun to scratch the surface, are mastered by learning from multiple sources and after use and experimentation in practice. Much of the power of git comes from when things don't work exactly as planned or when there's subtly different use cases for you or your collaborators situation. The inner cycle recommends making frequent commits...

2 min readRead more →
git

The inner cycle

While actively writing code and experimenting with possible solutions, it's crucial to be constantly committing code to your local git repo. By doing so you ensure you can safely undo botched attempts you might develop along the way. Indeed, this gives you the freedom to try outlandish things knowing you can easily revert to the original without needing to rely on <Ctrl>+Z in your text editor. The git commands Anytime you're happy with a small increment of coding, you can commit your changes to the local git repo. This coding increment can be of any quality you wish; it can...

2 min readRead more →
git

The middle cycle

The middle cycle helps reduce the complexity of your final commit. This daily task is to pull the latest changes from the origin repo to your git repo and merge them locally with your work in progress. Therefore, when you're ready to persist your changes to the master branch on the origin repo, many of the potential merge conflicts will likely be resolved for you by git because the task has been broken up into smaller chunks. The git commands The developer begins by completing one or more repetitions of the inner most cycle. Once some time has elapsed and...

2 min readRead more →
git

The outer cycle

The outer most cycle represents a full development task loop beginning with getting the latest code from the origin repo; developing, say, a new product feature or bug fix; and ending with creating a pull request for your changes so that they're available to your development collaborators. Your feature may take only a few hours in which case the cycle completes quickly, however, out of consideration to your colleagues if nothing else, you should break your changes into small, standalone merges that do not take more than a week to develop. The git commands First checkout the master branch. $...

2 min readRead more →