“Peace cannot be kept by force. It can only be achieved by understanding.” — Albert Einstein
When you are working on a project, sometimes things can become quite stressful but quotes like above are always motivating. The Outreachy program has taught me a few things related to technical fields which I believe would be beneficial in the long run in my career. As the program is halfway through and I have learned a lot, there are a few things that I like to mention.
Concept of Sync and Async
The project to which I was assigned relied heavily upon the concept of synchronous and asynchronous. As I have been working in the field of software engineering for a while, I was already aware of the concept. For people who don’t know about it, here you go.
In synchronous operations, tasks are executed one at a time, and only after one is finished is the next allowed. In other words, you must wait for one activity to complete before moving on to the next.
Asynchronous operations, on the other hand, allow you to switch to another activity before the preceding one completes. As a result of asynchronous programming, you may handle multiple requests at the same time, executing more tasks in a much shorter time.
This is the concept behind it but why is it being utilized in my open source project?
There is a package called WebdriverIO Sync and its support has been dropped by WebdriverIO due to breaking changes in fibers and V8. As this package was being used as a dependency for the selenium tests, it was required to move all selenium tests from sync to async.
To do so, the first challenge was to get aware of the documentation provided by WebdriverIO. The documentation provided me with an understanding of how the sync and async concept is being utilized and how it can be implemented in the MediaWiki Selenium tests. For instance, the following code contains a test and is mentioned in sync mode.
For us to make it into async, it is required that the test uses async and await. Plus, all WebdriverIO commands return a Promise and need to be awaited to get the result. Observe the following.
This is one area where I have been currently working and to be more familiar regarding sync and async usage would definitely recommend you to have a look at the getting started guide.
Gerrit and why do I like it?
I have been working with Gerrit for a while and personally, I like it. So before I can jump into more depth, let's see what Gerrit is.
As per Wikipedia, “it is a free, web-based team code collaboration tool. Software developers in a team can review each other’s modifications on their source code using a Web browser and approve or reject those changes. It integrates closely with Git, a distributed version control system”.
So why do I like Gerrit?
The reason is its ability to make multiple patches on a commit before merging it. You can easily make individual comments on each patch that can be reviewed by one or more individuals.
How will these things help me with my career?
So not to make this blog so long, in the end I would say that it's just a part of the things that I have learned uptill now and with a month still remaining, I am aiming to learn even more. Ultimately, working in an opensource platform will help me to get my dream job and I am definitely ensured that hard work will definitely help me to ace that future interview!