Connect with us

Software Development

101 Code Review: What is It and Why is It Important?

Published

on

10 Best Enterprise-level learning management systems (LMS) for 2020

New to the concept of code review? This post explains what code review is and why it’s important.

What is Code Review?

As Wikipedia puts it, “Code review is systematic examination … of computer source code. It is intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers’ skills.”

What is the purpose of code review?

Code review is the most commonly used procedure for validating the design and implementation of features. It helps developers to maintain consistency between design and implementation “styles” across many team members and between various projects on which the company is working.

We perform code review in two levels. The first is known as peer review and the second is external review.

The code review process doesn’t begin working instantaneously (especially with external review), and our process is far from being perfect — although we have done some serious research around the topic [3]. So, we are always open to suggestions for improvement. :)

101 Code Review: What is It and Why is It Important?

Having said that, let’s dig into peer reviews.

What is a peer review?

A peer review is mainly focused on functionality, design, and the implementation and usefulness of proposed fixes for stated problems.

The peer reviewer should be someone with business knowledge in the problem area. Also, he or she may use other areas of expertise to make comments or suggest possible improvements.

In our company, this is necessary because we don’t do design reviews prior to code reviews. Instead, we expect developers to talk to each other about their design intentions and get feedback throughout the (usually non-linear) design/implementation process.

Accordingly, we don’t put limitations on what comments a reviewer might make about the reviewed code.

What do peer reviewers look for?

  • Feature Completion
  • Potential Side Effects
  • Readability and Maintenance
  • Consistency
  • Performance
  • Exception Handling
  • Simplicity
  • Reuse of Existing Code
  • Test Cases

Feature Completion

The reviewer will make sure that the code meets the requirements, pointing out if something has been left out or has been done without asking the client.

Potential Side Effects

The reviewer will check to see whether the changed code causes any issues in other features.

Readability and Maintenance

The reviewer will make sure the code is readable and is not too complicated for someone completely new to the project. Model and variable names should be immediately obvious (again, even to new developers) and as short as possible without using abbreviations.

Consistency

Conducting peer reviews is the best approach for achieving consistency across all company projects. Define a code style with the team and then stick to it.

Performance

The reviewer will assess whether code that will be executed more often (or the most critical functionalities) can be optimized.

Exception Handling

The reviewer will make sure bad inputs and exceptions are handled in the way that was pre-defined by the team (it must be visible/accessible to everyone).

Simplicity

The reviewer will assess whether there are any simpler or more elegant alternatives available.

Reuse of Existing Code

The reviewer will check to see if the functionality can be implemented using some of the existing code. Code has to be aggressively “DRYed” (as in, Don’t Repeat Yourself) during development.

Test Cases

Finally, the reviewer will ensure the presence of enough test cases to go through all the possible execution paths. All tests have to pass before the code can be merged into the shared repository.

Code Review - Peer Review

What is an external review?

An external review addresses different issues than peer reviews. Specifically, external reviews focus on how to increase code quality, promote best practices, and remove “code smells.”

This level of review will look at the quality of the code itself, its potential effects on other areas of the project, and its adherence with company coding guidelines.

Although external reviewers may not have domain expertise, they do have discretion to raise red flags related to both the design and code and to suggest ways to solve problems and refactor code as necessary.

What do external reviewers look for?

Readability and Maintenance

Similar to above, the reviewer will make sure the code is readable and is not too complicated for someone completely new. Again, all model and variable names have to be immediately obvious (even to new developers) and as short as possible without using abbreviations.

Coding Style

The reviewer will ensure that everyone adheres to a strict coding style and will use code editors’ built-in helpers to format the code.

Code Smells

Finally, the reviewer will keep an eye out (or should that be a nose out?) for code smells and make suggestions for how to avoid them.

In case the term is new to you, a code smell is “a hint that something has gone wrong somewhere in your code. Use the smell to track down the problem.”

Must external reviewers be “domain experts”?

External reviewers don’t have to have domain knowledge of the code that they will be reviewing. [4].

If they know about the domain, they will feel tempted to review it at a functional level, which could lead to burnout. However, if they have some business knowledge, they can estimate more easily how complex the review will be and can quickly complete the review, providing a more comprehensive evaluation of the code.

So, domain expertise is a bonus, not a requirement.

20150819_162034 (1)

What if an external reviewer misses something?

We do not expect an external reviewer to make everything perfect. Something will most likely be missed. The external reviewer does not become responsible for the developer’s work by reviewing it.

How fast should developers receive a response from the external reviewer?

If a developer has requested an external review, he can expect some type of response within two hours. At the very least, the response should tell him a timeframe for completion.

In some cases, the external reviewers might not respond. They’re not perfect and might have too much work to do. Developers should feel free to ping them again if they don’t hear back within two hours or try with another external reviewer.

Why can’t developers simply merge their code into the main branch now and ask for an external review later?

There are many reasons this is a bad idea, but here are two of the most important:

  1. External reviews catch problems that would affect everyone if the code were merged into the main repository. It doesn’t make sense to cause everyone to suffer for problems that could have been caught by an external review.
  2. The process of merging code causes the developer to feel that the work is done, and it’s time to go on to the next thing. It’s silly to have people feeling like something is checked off the task list when it’s really not.

Can the external reviewer ask the developer to do something that is not precisely related to the code?

Yes, the external reviewer has some discretion here.

We don’t think that continuously making auxiliary changes that are unrelated to the core functionality is the right thing to do on reviews. On the other hand, small changes (or changes that help the code maintain a consistent style) may be requested.

There should be a reasonable relationship between the scope of the developed functionality and the scope of the requested change.

References

[1] Knous, M. & Dbaron, A. (2005). Code Review FAQ. Mozilla Development Network. Retrieved from https://developer.mozilla.org/en/docs/Code_Review_FAQ.

[2] Rigby, C., German, D. (2006). “A preliminary examination of code review processes in open source projects.” University of Victoria Technical Report: DCS-305-IR. Retrieved from http://ifipwg213.org/system/files/Rigby2006TR.pdf.

[3] Macchi, D., & Solari, M. (2012). Software inspection adoption: A mapping study. In Conferencia Latinoamericana de Informática (CLEI 2012). http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6427197.

[4] Mozilla (2012). Retrieved from http://www.mozilla.org/hacking/reviewers.html.

Continue Reading

Software Development

Alternative names for Minimum Viable Product

Published

on

By

What is MVP?

Introduction:

A minimum viable product is an early release of a product that provides enough functionality to satisfy early adopters. It is the first stage of the product development cycle including the result of applying an iterative development approach. The goal of a MVP is to search for product-market fit.

Minimum Viable Product - Henrik Kniberg
https://en.wikipedia.org/wiki/Minimum_viable_product

3 Amazing Useages of an Alternative Minimum Viable Product

1. Living MVP

This version of a MVP is the most basic. It is still in active development, but it is also in a fully functional state. The goal of a living MVP is to promote user feedback and create rapid changes, which can be used in future updates.

Many entrepreneurs feel the need to release a product as soon as possible. But today’s consumers don’t want to use an unfinished product or service. In fact, they may not even recognize it as a potential solution for their needs because it doesn’t have all the features they’re looking for.

This is why entrepreneurs should focus on creating a viable minimum viable product (MVP). A living MVP is a version of a MVP that is still in active development but that is also fully functional. This way, your customers can use your app and provide you with feedback from the ground level to help you improve your final product.

2. Mini MVP

A Mini is a product with a limited scope for testing before going into production with a full scope release product or service.

Mini MVP is a product with a limited scope for testing before going into production with a full scope release product.

This is to ensure that the best features are built, which will bring maximum value to the customer. The features that are not fully fleshed out or tested are pushed to be back-burnered in order to ensure that the best features are built to provide maximum value to the customer.

This type of prototype helps to identify potential flaws and optimize designs before committing to major design changes or implementing more specific features that will not be finalized until later on in the project timeline.

3. Artisanal MVP

These products are created without many resources such as capital, time, and staff members for the sole purpose of having something tangible to present to potential investors or customers during fundraising rounds or sales pitches meetings.

A successful MVP is a product that has just enough features to be valuable to the customer. It is not necessary to have all the features in place. You can have an MVP with just one or two features, but they need to be valuable.

Most of the time, startups are able to launch an MVP for free because they are creating it themselves. However, when you pay someone else to develop your product, the costs will vary depending on how much they are charging per hour or project.

How to find developers to build own MVP?

A potential problem is that we can’t just go to a developer and say “hey, I want you to build me this product”. This approach won’t work because developers want to know what the idea is, and why it’s valuable.

The best way to find a developer for your MVP project is by using freelancing marketplaces like Upwork or Guru. These sites let you post your job and see projects people are willing to do.

Continue Reading

Software Development

Most Popular Source Code Hosting Services in 2021

Published

on

By

Nowadays, there are a lot of source code hosting services to choose from — all having their pros and cons. The challenge, however, is to pick the one that will fit your needs best because the price is not the only factor that should be considered.

In this article, we’ll take a look at the key features of the most popular source code hosting facilities to help you make a wise decision. But first let’s take a brief look at what source code hosting service is because, as we see, there are some confusion about this term.

What is a source-code Hosting Service?

In short, source code hosting services or simply source code managers (SCM) are the services for projects that use different version-control systems (VCS). The latter ones are also sometimes referred to as “version control tools”.

Basically, a VCS is software and, in general, its main task is to allow programmers to track the revisions of a code in course of software development. Such revisions may be shared among all the team members so everyone can see who made a particular change and when. The list of the most popular version control tools includes Git, Mercurial, and Subversion.

At the same time, a source code manager is not software, it’s service. To put it more simply, it’s a space to upload copies of source code repositories (i.e. storage location for one project). Unlike version control systems which are just command lines, source code hosting service provides a graphical interface.

Without a source code manager, the work on a software development project would be difficult if possible at all.

GitHub

The choice of SCM is not accidental. Because if you ever ask someone what is a source code hosting service, Github will probably be the first thing they’ll start talking about. And it’s no wonder: it is ranked No.38, according to the Moz’s list of the top 500 websites.

Here are the key benefits of GitHub:

  • free for open-source projects
  • contains wiki, a platform for sharing hosting documentation
  • has an integrated issues tracking system
  • makes it possible to receive and issue contributions to projects   
  • has a well-developed help section with guides and articles
  • has gists, a service for turning files into git repositories
  • has GitHub pages that host static websites
  • allows for convenient code review  (in-context comments, review requests etc.)
  • has embedded project management features (task boards, milestones etc.)
  • offers team management tools (integration with Asana)

The above list contains only the most essential advantages of GitHub for you to understand why this source code hosting service is so popular among programmers. Yet, there is a risk that the great era of GitHub will soon come to its end. In October 2018, it was acquired by Microsoft and this raised some concerns among developers. But we’ll see.

Prices:

  • free – for open-source projects
  • $7 per month – for individual developers
  • $9 per user/month – for teams
  • $21 per user/month – for businesses (either business cloud or installed on a server)

GitLab

Gitlab screenshot

GitLab is also one of the handiest source code hosting services. As of today, it has fewer users than GitHub but does its best to conquer developers’ hearts. If you’ve ever used each of these host platforms for code repositories, you might have noticed that GitLab looks and feels like GitHub in many aspects. Yet, it also has some features the latter is lacking, so we may not say that GitLab significantly lags behind it in terms of functionality.

Speaking about main GitLab advantages, they are the following:

  • an open-source software
  • can be installed on your server
  • contains wiki and issue tracking functionality
  • has a user-friendly interface
  • has integrated CI/CD
  • comes with a deployment platform (Kubernetes)
  • allows for exporting projects to other systems
  • convenient for Scrum teams since it provides burndown charts as a part of milestones and allows teams to manage issues using Agile practices
  • has time-tracking features

It’s worth mentioning that GitLab also offers a convenient and easy migration from GitHub. So if you’re among those who feel uncomfortable about Microsoft’s acquisition of GitHub, GitLab would be the best option for you.

Prices:

  • Free – for open-source projects, private projects
  • $4 per user/month – Bronze plan
  • $19 per user/month – Silver plan
  • $99 per user/month – Gold plan

BitBucket

BitBucket screenshot

BitBucket is also a widely-used source code management tool and it’s a common second choice of many programmers (after GitHub). There are currently two versions of BitBucket: a cloud version hosted by Atlassian and a server version.

The main benefits of BitBucket are:

  • free private source code repositories (up to 5 users)
  • supports both Git and Mercurial (unlike GitHub and GitLab that can host only Git projects)
  • integrates with Jira and other popular Atlassian tools
  • allows for convenient code review (inline comments, pull requests)
  • advanced semantic search
  • supports Git Large File Storage (LFS)
  • has integrated CI/CD, wikis and issue tracking (only cloud versions)
  • offers team management tools (embedded Trello boards)

On top of this, BitBucket allows for external authentication with Facebook, Google and Twitter which makes this source code hosting service even more convenient for developers. It’s not as similar to GitHub as GitLab, but you can also easily migrate from GitHub to BitBucket.

Prices:

  • Free – for small teams (up to 5 users)
  • $2 per user/month – for growing teams (starts at $10)
  • $5 per user/month – for large teams (starts at $25)

SourceForge

SourceForge screenshot

SourceForge is one of the most well-known free host platforms for code repositories. It works only for open-source software development projects, but we could not ignore it in this article because SourceForge was of the first tools of this kind. Actually, before GitHub was even “born”,  SourceForge already topped the market.

Why you may want to choose SourceForge for your project? Well, here are its main strengths:

  • free for open-source projects
  • supports Git, Mercurial, and Subversion
  • offers the issue tracking functionality
  • offers an easy download of project packages
  • allows for hosting of both — static and dynamic pages
  • Has a huge directory of open-source projects
  • does not restrict the number of individual projects

The main downside of SourceForge is that it’s not very flexible and can be used only for open-source projects. So when it comes to the private app or web development, this source code manager is usually not even on the list.

Prices: the service is Free.

Wrap-up

In this source code management tools comparison, we outlined most widely used or promising services. Of course, there are a lot of other similar solutions which you may also consider for your app or web development project. But if you don’t have time for deep research, as professional software developers, we may recommend Github or Gitlab vs Git. These platforms are considered the best code hosting services since they are quite versatile and can satisfy a wide range of programming needs.

Continue Reading

Software Development

What is Green Software Development?

Published

on

By

What is Green Software Development?
  • Green Software Definition
  • Does the Green Software really exist?
  • And if so, what it does or how it does things?
  • Where’s real green projects separated from rumors and hype?

In the definition for Green Software is introduced as “Computer software that can be developed and used efficiently and effectively with minimal or no impact to the environment”.

Despite the fact that big software vendors are often scrutinized in respect to their environmental impact and we are not an exception having thousands of software developers and offices around the globe, we’re still sure that.

Green software  – the definition for green software is introduced as “Computer software that can be developed and used efficiently and effectively with minimal or no impact to the environment”.

Real impact comes when software company participates in actual commercial green projects.

Not trying to say that the way software development company “exists” doesn’t matter at all. Of course, it is better when a software developer buys his fast food in paper bags vs plastic or use more whiteboards than flip-charts… but sometimes the list goes too far from what really matters, emphasizing on potential over-use of computational capabilities of the hardware and so on. The development process must be not just lean but also comfortable for the software developer and they should not sacrifice running their unite-tests to questionable environmental impact of it. Instead making quality software that helps protecting the environment – this is where software development companies can make a positive impact.

Here’s few examples of green domains where we’re really busy as a custom software development company:

  • Carbon Emissions Trading. This is very powerful model from the economic standpoint and it requires really efficient software development solutions. Here’s why. Carbon Emissions Trade (also known as cap-and-trade) simply means that those who pollute more pay to those who pollute less. This is huge incentive to companies and governments to invest in CO2 emissions reduction. Now, in order to reduce the emissions without negative impact to the production capabilities, companies need to re-engineer and tune their manufacturing processes. For this to happen they need someone (usually a consultancy firm) who’s gonna be able to measure where are they now and how much do different process components ‘contribute’ to overall volume of emissions; b) model how to improve the process. For different industries number vary but every manufacturing process usually consists of hundreds factors that impact level of emissions to certain extent.

We actually create the software which consultancy firms use to measure and monitor processes to determine the most important factors that needs to be modified. One of the industries we are busily working for is aviation, which has to adapt to ETS regulations on fuel efficiency for flights.

  • Smart Energy. Electric energy is quite specific type of “fuel”. There’s no way of managing it in the ‘off-line’, you can’t preserve it in huge volumes (as you can for oil or natural gas). What needs to be done though is optimization of energy distribution in real time which is not a trivial task per se. Here comes embedded software development in rescue to this problem. That’s huge subject in itself and I think it deserves separate post. Meanwhile, here’s brief overview of what we do in this domain.
  • Consumer Privacy. No mistake. Believe it or not, but consumer privacy has so much to do with environment. And one of the biggest issues is paper junk mail. The average adult receives 41 pounds of junk mail each year. 44% goes to the landfill unopened. So, how can any of us get rid of all this? Not that easy. You actually need to go to each merchant web site, fill in the form and submit it or send them a paper mail (another type of waste) asking them stop sending unsolicited offerings to your mailbox. And we know that everything that takes that much effort doesn’t work for many and people just don’t go all way to get rid of it. But with right technology the process can be automated or at least semi-automated and the consumer can just log on to one system, enter her or his data and the system takes care of unsubscribing the person from all sources required. From the technology standpoint, yes, this is a challenge because system needs to sustain different interfaces and flows for each individual merchant and be flexible enough to adapt for more interfaces as well as catching up with those changing.

Green software really exists and participation in green projects is something software companies should really seriously consider. That is the best way to make an impact.

5 great examples of green software examples in IT

1) Walmart, the world’s biggest retail company, has been applying a variety of digital transformations that help manage wastage and energy usage and improve supply chain efficiency.

Wal-Mart is one of the most successful online retailers in the world. They provide mobile express returns and using their mobile app, you can scan QR codes to pay for items at local retail stores. This saves time for shoppers and helps diminish transport usage and CO2 emissions.

2) Patagonia is a company which can pride itself on being highly sustainable. They have used organic materials, resold outfits and have also been committed to providing organic food.

Moreover, the company offers crowdfunding services for charities and environmental projects. Blog posts can be found on The Cleanest Line about environmental crises and other related issues.

3) Getting closer to the implementation of Mega City of NEOM where every potential technology blends together with the intent to serve humanity.

Taking a sustainable approach to urban planning is becoming more popular and Saudi Arabia has recently announced that they’ll be investing $500 billion into the development of their megacities, while gearing them with renewable energy.

4) Microsoft continues to push the envelope in creating accountability for environmental protection while also providing solutions to companies who deal with green products.

Microsoft has already worked on projects in the past with energy efficiency, but Microsoft’s cloud computing is also making big waves when it comes to sustainability. The increased accessibility of software means that there are less cooling processes & ventilation needed in data centers.

5) Ørsted is a well-known wind technology and bioenergy provider from Denmark. Their decision to unite enables both sides to face environmental challenges more successfully.

Ørsted strives to build a clean energy world where coal and oil-based activities are replaced with clean natural sources. The company is at the forefront of this mission and hopes to be able to implement it by 2025.

Continue Reading

Trending