Rapper Destroys Google Software Engineer in API Development

The incident that proves meritocracy is a myth.
Dec 15, 2022
5 min

DiamondBurned is a 2023 Software Engineer Intern at Google who gets paid $11,000 per month to work with the company. This programmer has created a number of open source libraries involving Discord, not to forget an API Wrapper called Arikawa. This software allows other developers to interact with Discord using the Go programming language; as opposed to creating their own API Wrapper in order to do so.

Yung Quant is a Rapper who has been rejected from the final round of Amazon (Advertising Department) and prevented from interviewing in the 2022 Google Hiring Freeze. This rapper has also created a number of open source libraries including a type-based code generator called Copygen and Disgo; another API Wrapper used to create a Discord Bot in Go.

How does it compare to Arikawa?

Google is a search engine giant used by over 90% of the internet. Given these credentials, one would predict the Arikawa software to be better than Disgo. However, predictions can be wrong. We compared each library based on ease of use, architectural design, and raw code performance to determine which library is the better Discord API Wrapper in Go.

Here are the results so you can decide for yourself.

Ease of Use

Arikawa

The programmer interface of Arikawa is provided in a standard format (function-based): When a developer wishes to send a message (to Discord), the developer must check Arikawa’s API Documentation for the Go function that sends a message to Discord. In Arikawa, this request is split into multiple functions (each with different parameters): Client.SendEmbedReply, Client.SendEmbeds, Client.SendMessage, Client.SendMessageComplex, Client.SendMessage, Client.SendTextReply. Unfortunately, using these functions as-is lack information behind the semantics of sending messages. The use of strict parameters for each function also prevents the developer from accessing other features such as text-to-speech and components (listed in Discord’s API Documentation).

Since Arikawa uses a function-based API, any updates to the parameters of the API’s functions require developers to add or remove those parameters from their own code; a specification of the compiled Go programming language. This results in unnecessary overhead when the Discord API updates, which happens often. To put this in perspective, the Discord API Documentation has been updated over 400 times in 2022 alone.

Disgo

The programmer interface of Disgo is provided in a struct-based format: When a developer wishes to send a message (to Discord), the developer must check the Discord API Documentation for the name of the endpoint (Create Message) that sends a message to Discord. Since Disgo is a 1:1 implementation of the Discord API, the developer will immediately understand which struct to use in Go; as creating a struct is a basic operation of the language.

Disgo provides a single function for sending any request: Send(*Client). In the context of sending a message, the function is CreateMessage.Send(*Client) . As a result, developers will be able to use Disgo’s API without ever touching the documentation it provides. Instead, developers are able to understand how their Go code works solely by using the Discord’s API Documentation. This provides a deep understanding of the API the developer is working with while also saving them from extra tabs in the browser.

Since Disgo is struct-based, any additions to the API’s struct parameters can be ignored; as setting every field is not required in the compiled Go programming language. This results in less overhead when the Discord API updates, which happens often. Disgo has solved this problem by creating Dasgo, which is a type library that ANY Go API Wrapper could use to maintain their Go representation of Discord objects.

Architectural Design

Arikawa

Requests

Arikawa request functions maintain no side effects. Arikawa implements a Rate Limiter, but fails to use it within its functions (i.e SendMessageComplex). This goes undetected because its rate limiter test uses mocks. The result is that developers must implement their own rate limiter to avoid their Discord Bots from being banned. Not good.

Events

A WebSocket Connection is created and consumes events that are sent to event handler functions. However, these functions involve the use of type assertion and reflection which carries a HUGE hit to performance (within the hot path) as a cost of an easier implementation for DiamondBurned (API Wrapper Creator). It’s unclear whether rate limits are implemented correctly for Gateway SendEvents.

Disgo

Requests

Disgo request functions maintain no side effects. Disgo’s rate limit implementation — customizable and tested via an integration test — ensures that concurrent calls of these requests do NOT result in a rate limit. This allows the developer to adhere to the Discord API Rate Limit without additional work.

Events

A WebSocket Connection is created and consumes events that are sent to event handler functions. These functions do NOT use type assertion or reflection which makes Disgo’s implementation the fastest Go Discord API Wrapper to-date. In addition, Disgo’s selective event processing prevents the processing of events that the end developer doesn’t use. Disgo also maintains rate limits for Gateway SendEvents such that developers may adhere to the Discord API Gateway Rate Limit without additional work.

Comparison

Disgo is easier to use, maintains a better architectural design, better performance, and a faster code velocity. Disgo has existed for 9 months and maintains 3 contributors. Arikawa has existed for 36 months and maintains 32 contributors. In addition, Disgo maintains the highest coverage of the Discord API among Go API Wrappers to-date.

Performance

Requests

Disgo uses the fasthttp library in order to send requests. This library is 10 times faster than the standard library net/http that Arikawa uses. However, this factor isn’t significant to a majority of developers due to Discord’s Default Rate Limits.

Events

Disgo does not use type assertion or reflection to handle events, while Arikawa does. Disgo’s selective event processing prevents any events that developer’s do not use from affecting performance. Based on theory alone, Disgo maintains the fastest Gateway Implementation between the two libraries.

Testing

Testing your code is a hot topic among developers. Google’s commendable uptime requirements would have you believe that its prodigies maintain better tested code, right? That’s not the case here. Arikawa features an integration test that covers 2.8% of the Discord REST API and implements an unspecified percentage of its functionality. Disgo features an integration test that covers 42.6% of the Discord REST API and implements 100% of its functionality.

These tests are run on every change a developer commits to ensure that issues are resolved before updates are released.

The Meritocracy Myth

What do developers have to say about Arikawa vs. Disgo? Arikawa maintains 351 stars on Github while Disgo only maintains 38 stars. This indicates that developers find Arikawa more interesting than Disgo, despite Disgo’s dominance in every aspect of API Consumption. In addition, Arikawa has been provided a dedicated channel in the Discord Go Community, while Disgo’s request for one has been pocket vetoed. Therefore, the current Discord Go Community values Arikawa more than Disgo. Of course, this should be no surprise in an industry that champions credentials over technical performance.

Read More

link