The Story Behind Oculus Home: Software Development and Refactoring

If you don't know how to use it, what's the point of wearing virtual reality heads?

The rise of virtual reality means that everyone can go to a tropical island without leaving home, or shoot aliens in space. But before that, they needed an interface that would allow them to interface easily with virtual reality applications.

This interface must be easy to use and responsive, similar to familiar screen keys and menus. This is why a startup called Envelop recently introduced a virtual reality user interface similar to the Microsoft Window system.

But even with big companies like Oculus Rift who sell virtual reality heads, making these new user interfaces is not an easy task. At the Facebook annual engineering conference in San Jose, Khoi Nguyen, a software engineer at Oculus, described the challenges in the process.

The original Oculus Home home page was slow to load, buggy, and full of code.

The original Oculus main interface was slow to load and was poor. Later they started designing from scratch, trying to make sure everything works smoothly. Nguyen explained that the design of the user interface does not necessarily result in the passing of users. Instead, the software part needs to be completely renovated.

Although Nguyen has experience in game development, he is not very proficient at producing large-scale engineering structures such as Facebook or Google that are used to accommodate millions of users at the same time. He admitted that he is not familiar with some of the advanced development tools and data processing engines commonly used by large Internet companies.

The first iteration of Oculus Home relied on several software services that his team could not update. He explained that updating some old software services will inevitably damage other services.

These vulnerabilities did not completely destroy the user interface, but they did have an impact on performance.

For example, loading simple tasks such as Oculus Home in the headline takes longer, due to software conflicts and outdated software. Therefore, Nguyen's team came up with a trick to divert people's attention and not allow users to pay too much attention to this delay.

When the head is activated, the main page will normally appear in the user's display, but it will slowly fade out and disappear in the dark, and then appear again in the line of sight.

However, Nguyen said this is wrong. Because they created a user interface that was confusing, eventually they could only write some long code.

Nguyen said: "The code soon became spaghetti. In the end it didn't taste delicious."

It is difficult to update and optimize the user interface due to excessive copying and pasting of the code. This is another problem in software development.

However, this user interface still works and you can still download and run virtual reality applications. Until Facebook acquired Oculus for $2 billion in 2014, Nguyen and his team were able to use the resources of this big company to redesign Oculus Home.

His team used two Facebook open source or free software tools, React and Flux, to create a user interface. They also create developer components that can be reused efficiently. These custom software components allow them to add new functionality to the main page, just like the text box that appears on the user's screen when browsing a virtual reality application. This reduces cluttered code that can make the user interface load slowly.

In addition, Nguyen and his team designed a more efficient way to store data that records all changes, such as the changes that occur when the user slides through the application on the main page or decides to run an application. Basically, this virtual reality user interface has been planned and his team can better understand the impact of a software change on other software.

Previously, it was very difficult for them to record these changes, which led to the emergence of problems like software that consumed too much computer system resources, causing slow loading or software vulnerabilities.

Redesign of Oculus Home took months and was officially unveiled on March 16, 2016. Reproducing written software makes it easier for them to detect and fix problems. He said he "has confidence that he can enter any document and know what's going wrong."

Posted on