Programming

Questions I ask when I feel I can do something better than how WordPress does it?

Does WordPress have a built-in way to do this? Does this inbuilt way do what I want completely or partially? If partially, how much code would I have to write to complete the functionality? If WordPress doesn’t have a way to do this, is there something (library, plugin, addon) that’s under active development by a competent, …

Questions I ask when I feel I can do something better than how WordPress does it?Read More »

Straight road ahead

Fixing our mental model of Git Branches; it’s a straight line folks!

Recall From the last part, we learnt that: git tracks your code with a pointer called HEAD When you commit, you create a snapshot of your code with a unique commit ID which is a long alphanumeric string. When you checkout a particular commit, you move the HEAD (git’s pointer) to that commit. You can move …

Fixing our mental model of Git Branches; it’s a straight line folks!Read More »

Branches

Digging Deep into Git with 1 file in a single repository and 11 commits

Recently, I was conducting a session on git and branching and I was trying to explain the mental model. I didn’t do a very good job of it. I found an excellent post by Neil Atkinson called Git branches – Is your mental model wrong?. I tried to use the post, but it didn’t help …

Digging Deep into Git with 1 file in a single repository and 11 commitsRead More »

Door with a sign that says "Restricted Area, Authorized persons only"

Adding Elegance & Security to Deployment

In the last part, we got a deployment strategy working by mapping our workflow to git branches and setting up a script for automatic deployment. At the end of it I mentioned that our script was not elegant since it would run with any push. It wouldn’t matter if code was pushed to the branch …

Adding Elegance & Security to DeploymentRead More »

PHP code on Laptop

Creating a simple deployment script with PHP

In earlier parts of this tutorial, we discussed the concepts and mental models associated with a deployment process using git. We also set up our servers and remote repositories. In this part, we create a PHP script that will be invoked when the remote git repository requests the Webhook URL. For this example, we’re going …

Creating a simple deployment script with PHPRead More »

Computer terminal

Digging into git commands for deployment

In the first part of this tutorial, we discussed a mental model of deployment stages mapped to git branches. We also discussed conceptually how running a git push origin branch-name to push code to the remote repository can trigger a webhook which we can use to pull code from the repository to a server using git pull origin branch-name. In the second …

Digging into git commands for deploymentRead More »

Woman holding out a key in her necklace

Setting up servers & repositories

In the last part, we created a client side workflow with separate stages mapped to specific branches: Git Branch Workflow Stage Server master 1. Development https://dev.yoursite.com/ staging 2. Staging https://staging.yoursite.com/ production 3. Live/ Production https://yoursite.com/ It doesn’t matter how many stages you have in your workflow as long as each stage is mapped to a …

Setting up servers & repositoriesRead More »

branch with flowers

Preparing a conceptual model for workflow using git branching

In this part, I’m going to explore the mental model for a deployment workflow by mapping it to git branches. Requirements Servers You’ll need at least one proper server. By proper, I mean a server where you can log in from the terminal and run commands. That requires ssh access. I find DigitalOcean (referral link) to …

Preparing a conceptual model for workflow using git branchingRead More »

Madieval style sign board says Clear, Complete, Standard

Rule of Thumb What is good documentation?

Recall In an earlier post, Who reads your documentation?, we discovered that not just developers but lay people also read documentation. In the previous post, How is documentation consumed?, we discovered that documentation is not just consumed by people but also tools and programs. Documentation is also not consumed as a whole, but in parts and pieces. …

Rule of Thumb What is good documentation?Read More »

Coding in an IDE on a mac

How is documentation consumed? Not just by human eyes

Recall In the previous post, Who reads your documentation?, we discovered that not just developers inside and outside your organisation but also lay people and amateurs are going to need and use documentation to try small fixes and tinkering. The myths discussed in this post are about how these people use or consume your code. Myths …

How is documentation consumed? Not just by human eyesRead More »

%d bloggers like this: