DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Maintenance
  4. Pre-Commit and Post-Deploy Code Reviews Are Dead

Pre-Commit and Post-Deploy Code Reviews Are Dead

Are pre-commit and post-deploy code reviews a thing of the past?

Aricka Flowers user avatar by
Aricka Flowers
·
Feb. 18, 19 · Opinion
Like (2)
Save
Tweet
Share
3.77K Views

Join the DZone community and get the full member experience.

Join For Free

Pre-commit and post-deploy reviews have been the industry standard for ensuring that code is functioning as intended. But with Git around, are these methods still needed?

Let's take a step back and look at how they work.

Pre-Commit Reviews Require That Code Is Checked for Bugs Before it Is Committed

Our CEO Sid Sijbrandij says pre-commit reviews make sense because new code is evaluated before it is introduced into the code base. But with distributed version control, he says, you can essentially do the same thing on Git branches. Prior to Git, branches were too pricey to use regularly in version control systems like Subversion.

Post-Deploy Reviews Periodically Check for Areas of Improvement in the Code Base

Post-deploy reviews are typically done on a periodic basis as a way to check certain areas of the code base and decide if improvements can be made. This method doesn't make sense, according to Sid, because "the code has already proven itself in production ... so you're reluctant to make changes to it." Additionally, the idea of occasionally reviewing your code base is not really needed:

"If there's technical debt in there, at least it's not affecting other code," Sid explains. "There's a certain interest you pay on the technical debt, and it has to do with how much it spreads the technical debt to your code base. Code that is not doing much, meaning it's being executed but it's not changing much, well at least it's not influencing other code. You're always going to have tech debt, and you're always going to have a limited time during which you can review and fix things. Focus on the code that's active, that's probably the best place to focus."

Git Branches Are More Efficient

Using Git branches to ensure that code is safe to introduce into the code base improves efficiencies when compared to pre-commit and post-deploy reviews, says Sid, who finds the former to be hard to track.

"Pre-commit code reviews were a bit awkward because you didn't have a good way to refer to it. It was in the tool, but you didn't have an SHA or definite way to refer to that version. And it was hard to know what CI it ran against because there wasn't an SHA. So by doing it post-commit, you have it in versions and it's much easier to see what you referred to. But with code review after deploy, the mindset was: 'If it works, you move on.'

"If you change it, there's extra risk; if you don't change it, it's extra tech debt — and you always have to choose between the two."

"You're not going to be as vigilant to technical debt building up, and it's harder to request that someone change something that's working. If you change it, there's an extra risk; if you don't change it, it's extra tech debt -— and you always have to choose between the two. With pre-deploy code reviews, you don't have to make that choice ... [With what we have now], I think pre-commit and post-deploy code reviews are dead, and code should be reviewed on a branch before it's deployed to production."

What do you think: are pre-commit and post-deploy reviews a thing of the past? Tweet us @GitLab or leave a comment below!

code style tech debt IT

Published at DZone with permission of Aricka Flowers, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Generate Code Coverage Report Using JaCoCo-Maven Plugin
  • How and Why You Should Start Automating DevOps
  • PHP vs React
  • SAST: How Code Analysis Tools Look for Security Flaws

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: