Is the HIVE External API Code Too Convoluted? HiveInvite.com is still down.

in Proof of Brain3 years ago

invite.png

For the image I drew an envelop around the HIVE logo to symbolize an invitation to the platform. I am claiming "fair use" of the logo as this is an editorial post about the Hive Invitation process.

Since the image contains a logo, the image is not suitable as a stock image. However, the paper in an envelop is suitable. You can add your text to the paper. You could animate the SVG, but not the PNG. This link goes to the SVG version with logo commented out .

And Now for the Post

I did something really embarrassing last month.

I talked someone into trying HIVE. I then proudly went to HiveInvite.com to turn one of my Pending Claimed Accounts into a functioning HIVE account.

HiveInvite.com simply hung and I embarrased the living daylights out of myself and we lost a potential HIVE user.

I later tried to create an account with the code from reazuliqbal . Again, this code simply hung!

The fact that two programs were hanging indicates that that is a problem in the dependencies, or perhaps the API.

Maybe the powers that be changed something in anticipation of HF25?

The fact that HiveOnboard reports new users shows that it is still possible to create accounts. Is the problem just with creating accounts from tokens?

A voice inside my head said I should reverse engineer the scripts and just create an account by calling the HIVE API.

I decided to start by working through the tutorials for JavaScript and Python on:

https://developers.hive.io/

NOTE: Since I am new to Python; I also had to workthrough the Python Tutorial ... YUCK!!!!

HIVE's JavaScript's tutorial has dependencies on jquery and node.js.

HIVE's Python tutorial has dependencies on pip3 and the beempy library. (You have to install these things before running the tutorial.)

But, I don't want to install those things. I just want to learn how to access the HIVE API !!!!!

I didn't want to install beem. So, I simply downloaded the Beem code from Github and have been reading the code (and going loopy in the process).

But lets get back to the matter at hand. The site HiveInvite.com simply hangs. I suspect that HIVE was developed by competent programmers who actually took programming classes in college. I never had a programming class. I learned by reading books and studying code written by others.

My observation through the years is that professionally trained programmers often make the mistake of injecting too many dependencies in their code.

If you viewed the source of HiveInvite.com; you will see that the program calls the following scripts which contain tens of thousands of lines. Some of the scripts call even more scripts. A change in any one of these scripts will break the site.

https://code.jquery.com/jquery-3.2.1.min.js
https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js
https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js
https://cdn.jsdelivr.net/npm/@hivechain/hivejs/dist/hivejs.min.js
https://unpkg.com/i18next/i18next.js
https://unpkg.com/i18next-xhr-backend/i18nextXHRBackend.js
https://unpkg.com/i18next-browser-languagedetector/i18nextBrowserLanguageDetector.js
https://hiveinvite.com/js/translate.js
https://hiveinvite.com/js/sitebuild.js
https://hiveinvite.com/js/helpers.js
https://hiveinvite.com/js/app.js
https://hiveinvite.com/js/loggedout.js
https://hiveinvite.com/js/loggedin.js
https://hiveinvite.com/js/freeclaim.js
https://hiveinvite.com/js/botclaim.js
https://hiveinvite.com/js/paidclaim.js
https://hiveinvite.com/js/invite.js
https://hiveinvite.com/js/create.js

The problem at HiveInvite.com could be in any of those scripts! Since JavaScript is compiled by the browser, the problem could be with the browser's JIT compiler. IMHO, supporting this program would be a nightmare.

@reazuliqbal 's invitation page is cleaner. It has the following dependencies:

https://code.jquery.com/jquery-3.4.1.slim.min.js
https://unpkg.com/dsteem@^0.10.1/dist/dsteem.js
https://unpkg.com/@hivechain/[email protected]/dist/dhive.js
https://reazuliqbal.com/js/app.js

The primary dependency is dhive.js which I suggest that anyone interested in understanding HIVE examine in detail.

Having spent several weeks examining these HIVE APIs is that HIVE developers have been making things too hard for themselves. The external API for HIVE does not need to be this complex.

IMHO, dependencies on convoluted code makes it difficult to support applications that interface with HIVE.

During my 41 moons on STEEM and HIVE, I've been examining all of the dApps associated with HIVE. They all seem to be suffering from an overly convoluted API that makes it difficult to develop and modify applications. I can make my case just by pointing to the tribal sites. Most of the tribal web sites are just cookie cutter sites based on the same code.

Only a few tribes like LeoFinance have successfully extend the api ( #POB included), just have cookie cutter sites.

Anyway, I've been reading the tutorials and code for the HIVE API this month. It made me feel sick.

I might give my thoughts on how to create a web based application in later posts, I just wanted to invite the HIVE audience to look at the code for HIVE's external API and ask how they feel. Does this code have too many artificial dependencies and is it too convoluted?


Posted via proofofbrain.io

Sort:  
Loading...