Author Archives: joshuafife

Differentiating between trunk-based and feature-based development

Image depicting trunk-based vs feature-based development. Source: https://ruby0x1.github.io/machinery_blog_archive/post/step-by-step-programming-incrementally/index.html

Jacob Schmitt’s “Trunk-based vs feature-based development”

Link to article at the end

For this week, I am focusing on Jacob Schmitt’s blog post “Trunk-based vs feature-based development”. This is a short yet efficient article in explaining the differences between the two types of software development processes. Schmitt discusses the alternate use cases of such processes, where and when they might be utilized, who is most likely to use them, and the advantages and disadvantages of them. I chose this blog because as I learn more about forks, feature branches, commits and pull requests, it is important to also understand the overall development processes of companies and why they might use them. The development processes mentioned by the blog intertwine perfectly with git commands and usage.

Trunk-Based Development

According to Schmitt, Trunk-based development allows for developers to push changes straight to the main branch. However, if the new feature will take longer than usual changes, then they can “check out a branch from main, move the changes into it, then merge it back in when the development is complete” (Schmitt). Then, there would be a code review held by other developers to ensure that the new changes do not break the main production branch. Although this development approach is quite popular, it is used more often in the realm of experienced developers rather than newcomers.

Feature-Based Development

As for feature-based development, many developers can work on many different changes or branches at the same time. This is done by each developer creating their own feature branch, and then eventually requesting to merge with the main branch. One of the most important differences between feature and trunk based development is that in feature-based, developers never push straight to the main branch. This approach is much friendlier to beginner developers like myself, as there would be no worry of breaking production with new code since changes are on a different branch.

Advantages & Disadvantages

An advantage that trunk has over feature is that the code changes are more likely to be merged faster. Feature-based development pull requests can add up fast over time, which leads to a longer time between requesting and merging. Despite this, feature-based is much safer for larger development projects and groups, when there are too many feature branches to keep track of at once. As of right now, I prefer feature-based development because I would not be very comfortable working directly with the main branch as a new developer.

Thoughts

Although it might be simple, I found this article to be quite helpful in preparing me for what a future job or internship workflow might look like. When one has little to no experience with development in a professional environment, articles such as this one are very beneficial to learning more about team-based development. It gives a bit more background as to why we do this type of development, rather than just stating that we do it. I hope to use this knowledge in future projects with internships or jobs.

Link to article: Trunk-based vs feature-based development | Jacob Schmitt

From the blog CS@Worcester – Josh's Coding Journey by joshuafife and used with permission of the author. All other rights reserved by the author.

Welcome!

Hi, I’m Josh! I’m currently a 20 year old college student who’s studying Computer Science and this is the first blog I’ve ever had. I was never much into blogs, however I can see the benefits of consistently updating a log of your progress, thoughts, or ideas. Whether people read it or not, it’s a great way to express yourself!

With this blog, I hope to track my learning, personal projects, and the ever evolving world of technology we live in today. It’s easy to get lost in all the news and different technologies, so this might be my way of navigating through the ocean of programming/tech and keeping up.

That’s all I have for now. Have a great day!

From the blog CS@Worcester – Josh's Coding Journey by joshuafife and used with permission of the author. All other rights reserved by the author.