Codementor Events

How to craft a feature the right way

Published Mar 14, 2019

The problem

I have seen projects where developers have to implement a feature and they struggle on two key processes: Planification and deliverables.

Planification

Before touching the code base, it's very important to make a development plan since this will be our guide to develop the feature. It consist of notes, approaches to solve each feature section.

Let's plan a feature together

Say our client is asking us to implement multi-tenancy into a brand new application where we need to be able to register, login and use a dashboard.

Multi-tenant consists on separate each account data from other accounts, each account is a tenant.

But hey, multi-tenantcy is a big stuff... We need to split this into multiple features, this seems to be an epic... Let's see why.

For instance, Slack uses multi-tenancy since each account has its own subdomain which you use to register, login and scope the data for each account.

Hmmm, that means we can start to split this epic into multiple stories.

We will need to make the registration feature, the login feature and the rest of our app to work in this fashion.

  • EPIC: Multi-tenancy
    • Story: Registration
    • Story: Login
    • Story: Dashboard

Let's write the details for each story (feature):

Registration feature

Tasks:

  1. As a user I should be able to register using my account name, full name, email and password.
  2. Each account should have it's own sub-domain.
  3. After submitting the registration form I should receive a confirmation email.
  4. By clicking the confirmation link my account should be confirmed and I should be asked to login before being able to use the application.

In this example there is a list of tasks that could take some time to implement, I will highly recommend you to convert this tasks into new stories for example points 2 and 4 are great candidates. Here is why:

From the client perspective it will be much better to be able to see some progress instead of waiting for the whole registration feature to be fully completed.

From the developer perspective this allows you to deliver results soon, but also helps you thinking how to refactor the code you just implemented in the next opportunity. It also helps while reviewing the feature pull request, because it will be less code to review, it becomes easy to spot mistakes and write fixes.

Login feature

  1. As a user I should be able to login as a registered user using my account name, email and password.
  2. After submitting the login form I should be redirected to my account dashboard.

Dashboard feature

  1. As a user in session I should be able to see the account dashboard by default.
  2. My account dashboard should include the account subdomain in the URL.
  3. My account dashboard should display my account data.

Point 3 looks like a new story since we need to know what data will be displayed, also we need to plan how to scope this data by the account and for sure it will take some time.

Deliverables

We could say each of the stories is a deliverable, so right after merging and deploying our storie the client will be able to see your changes in action.

Ideally you should deliver as much as possible per day. The better you plan the quicker you can deliver.

Keep in mind that a deliverable is something the client can actually test. So make sure you let the client know how to test the deliverable, you can also test the deliverable with the client and guide him through the feature.

Tips and advice

Knowing how to code is not enough this days to be a succesfull engineer, you also need plannification skills among others. Work on those skills to become more productive to your team.

Divide and conquer. Split a requirement into multiple steps to easily achieve the goal.

Final thoughts and next steps

You can apply this technique to your life and tackle big problems. I encorage you to give it a try and share the results.

Discover and read more posts from Victor H
get started
post commentsBe the first to share your opinion
Show more replies