<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-poorly-pruned-branch-xk7kmhmpp" -->

---
title: A Poorly Pruned Branch | daily.dev
description: A developer manually changed the code to disable a branch, leaving behind a mysterious and awkward condition.
canonical: https://daily.dev/posts/a-poorly-pruned-branch-xk7kmhmpp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A Poorly Pruned Branch | daily.dev
og:description: A developer manually changed the code to disable a branch, leaving behind a mysterious and awkward condition.
og:url: https://daily.dev/posts/a-poorly-pruned-branch-xk7kmhmpp
og:image: https://api.daily.dev/og/posts/xk7KMhmPP.png
og:image:alt: A Poorly Pruned Branch
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A Poorly Pruned Branch

**[The Daily WTF](https://daily.dev/sources/thedailywtf)** · 1 min read · 8 upvotes · 1 comments

## Summary

A developer manually changed the code to disable a branch, leaving behind a mysterious and awkward condition.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thedailywtf.com/articles/a-poorly-pruned-branch>

## Community discussion

Top comments from developers on daily.dev.

**@randy** · 0 upvotes

> We definitely don't allow that in the current product's codebase, but we do have a habit of commenting-out (and usually commenting why) code is no longer valid in the legacy codebase. That said, the legacy code is a bit of a shit-show anyway, and will be "dead" in the nearish future, so... Yeah.
>
> What I think is funny are the comments about having a negation in an `if` statement. I just did a search-all for `if \(!` in the current codebase and got "104+ matches in 38+ files." And I know probably a good half of them are mine! 🤣 And yes, many are "if this thing doesn't exist, return." And...

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#php](https://daily.dev/tags/php), [#version-control](https://daily.dev/tags/version-control)

[View this post on daily.dev](https://daily.dev/posts/a-poorly-pruned-branch-xk7kmhmpp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"A Poorly Pruned Branch","url":"https://daily.dev/posts/a-poorly-pruned-branch-xk7kmhmpp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-poorly-pruned-branch-xk7kmhmpp"},"datePublished":"2024-05-15T11:00:33.204Z","dateModified":"2024-05-15T11:00:31.600Z","description":"A developer manually changed the code to disable a branch, leaving behind a mysterious and awkward condition.","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8b1b05f1d37d4ce032f91ef813127d14?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8b1b05f1d37d4ce032f91ef813127d14?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"The Daily WTF","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Daily WTF","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d21a6aa61a7244d893a3b3284df8e2ef","url":"https://daily.dev/sources/thedailywtf"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/a-poorly-pruned-branch-xk7kmhmpp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":8},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"general-programming,php,version-control","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Daily WTF","item":"https://daily.dev/sources/thedailywtf"},{"@type":"ListItem","position":3,"name":"A Poorly Pruned Branch"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/a-poorly-pruned-branch-xk7kmhmpp","comment":[{"@type":"Comment","text":"We definitely don’t allow that in the current product’s codebase, but we do have a habit of commenting-out (and usually commenting why) code is no longer valid in the legacy codebase. That said, the legacy code is a bit of a shit-show anyway, and will be “dead” in the nearish future, so… Yeah.\nWhat I think is funny are the comments about having a negation in an if statement. I just did a search-all for if \\(! in the current codebase and got “104+ matches in 38+ files.” And I know probably a good half of them are mine! 🤣 And yes, many are “if this thing doesn’t exist, return.” And being Groovy, !thing is our way of doing a null check… And yes, we use null because it’s clearer for us in our domain; and because the Null Object pattern wasn’t instilled from the get-go.","datePublished":"2024-05-15T14:05:57.985Z","url":"https://daily.dev/posts/xk7KMhmPP#c-8704IB2MS","author":{"@type":"Person","name":"Randy","url":"https://daily.dev/randy","image":"https://media.daily.dev/image/upload/s--UjV4-KkB--/f_auto/v1708097210/avatars/avatar_HXYbbGcBO38Rfv7RrCBdA"}}]}
```

