Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Get Zero Code Changes Outside of Source Control

DZone's Guide to

How to Get Zero Code Changes Outside of Source Control

Think source control is just for web developers? These scenarios will help you make the case for source control as something for everyone, not just web devs.

· DevOps Zone ·
Free Resource

Learn more about how DevOps teams must adopt a more agile development process, working in parallel instead of waiting on other teams to finish their components or for resources to become available, brought to you in partnership with CA Technologies.

Source control is bread and butter for web developers, however, not so much for SQL developers and other business people. One of my goals for the coming year is to get the whole of my team using source control processes.

One of the arguments against using source control is there will always be a few exceptions where it won't be used. Let's look at a few scenarios to help make the case for source control.

Scenario One

Web Dev 1 makes a change in production to fix an issue and doesn't use source control. Web Dev 2 is working on a new feature and makes use of source control. He is given the sign-off to deploy his new feature and in the process undoes Web Dev 1's fix.

Management blames Web Dev 2 as they "broke" stuff during the deployment. Web Dev 2 doesn't understand what happened and Web Dev 1 is oblivious to the entire scenario despite in reality being part of the problem.

Scenario Two

A SQL Dev works all night to fix a problem. He deploys to production and doesn't notice a missed where clause due to lack of sleep.

-

Let's look at these two scenarios done with the whole team buying into source control.

Scenario One

Web Dev 1 makes a change in production to fix an issue and also commits to source control. This takes him an extra 5 minutes (if that!) Web Dev 2 is working on a new feature and makes use of source control. He is given the sign-off to deploy his new feature and in the process merges Web Dev 1's fix before he deploys to production.

Management is happy with Web Dev 1, nothing is broken and new functionality has made the website better not worse.

Scenario Two

A SQL Dev works all night to fix a problem. He deploys to production and doesn't notice a missed where clause due to lack of sleep, he also commits to source control this takes him an extra 5 minutes (if that!).

In the morning a colleague looks through the commits made during the night and queries the missing where clause. A fix is made in source control and deployed, management and the client are unaware that a problem was created and fixed.

-

These are simple scenarios but I cannot think of any situation where the outcome would be better to not use source control. These examples assume no continuous deployment, adding this to the system before every team has bought into source control would cause bugs and issues all over the place.

However, with a team that is 100% behind source control continuous deployment can achieve an amazing productivity boost. After every commit code could be automatically tested, reviewed by other members of the team and deployed to test environments for further analysis. Only tested code that has been reviewed can get anywhere near production environments.

Having said all this there are ways especially on the SQL side to mitigate losing changes while you work on training individuals and convincing management. Before any code is deployed to production do a schema compare. If you only see changes you have made, you can proceed, if you don't shout at your team.

Advantages

  • Code Reviews

  • Team awareness of what is being changed

  • History of changes

  • Smoother Deployments

  • Automation

  • Better Teamwork

  • Diff changes between different versions

  • Many more

Disadvantages

  • Time to learn tools

  • Remember to commit changes

  • Technologies that use binary files harder to version control

Discover the warning signs of DevOps Dysfunction and learn how to get back on the right track, brought to you in partnership with CA Technologies.

Topics:
devops ,source control ,sql ,web dev

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}