Programming Diary #24: The Steem Conversation Accelerator (SCA) is now Open Source

in Steem Dev3 months ago (edited)

SCA: Conversation at the speed of Steem

Summary

Today's programming diary post describes the state of the Steem Conversation Accelerator (SCA) on the day after its release into the public domain.

The MIT licensed browser extension provides notifications when conversations are happening on the Steem blockchain, and it displays an HTML activity list that lets the browser operator click through to the front-end of choice in order to participate in those conversations.

This tool is provided in the context of a long-term development vision that focuses on decentralized access to the blockchain; bringing human attention to the blockchain; and creating a value exchange between token-burning and post visibility.

As with previous programming diaries, the post also includes sections describing recent activities in developing this tool, plans for the future, and a section of reflections.


Developer Delegation Day

Before I move on, have you seen my suggestion for a Developer Delegation Day?

This is an idea for Steemizens to spur development by delegating 5 SP to a developer of choice on the 5th day of every month. September 5th is coming up in 4 days. Will you participate, and if so, to whom will you delegate?

Background

Now back to our regularly scheduled programming.

In my July 4 programming diary post (#20), I introduced the new browser extension that I had begun working on, the Steem Conversation Accelerator. The stated goal for the tool was,

to increase the speed and engagement for organic conversations on the Steem blockchain by notifying the browser operator when conversations are taking place.

I wrote more about it in Programming Diary #21, 22, and 23.

Yesterday, after those two months of spare-time updates on nights and weekends, I have opened the repo under the MIT License.

As previously described, the browser extension has three functional components:

  • A pop-up window that collects configuration information:

  • A background script that polls regularly for new activities and delivers browser notifications when they are observed

  • And an activity list browser tab that is opened when the browser operator clicks on one of the browser notifications:

And what are the activities that the background script is looking for? Right now, those activities are the recent posts, comments and replies from the accounts that an observer account is following.

If you want to try it out, or if you want to contribute, the repo is here.

The general principles that are driving pretty-much all of my programming efforts are:

  1. For peer to peer transactions on a decentralized network, we want the application to run on the end-user device.
  2. The Steem blockchain is a play for the attention economy, so the most valuable development efforts are those that deliver human attention.
  3. The second-best way for a developer to bring value to the ecosystem is by providing an exchange of value between token-burning and post-visibility. This gives the token utility, and it also increases scarcity.

At this point, the browser extension is the most practical way that I have learned for delivering an application on an end-user device. SCA is presently being driven by the first two principles, and I eventually intend to also add a Visibility As A Service (VAAS) component.

Activity Descriptions

Overall, I completed 20 git commits in the last couple weeks. I'm not going to paste them here since you can now see them in the repo.

Activities in the last two weeks have been focused in three general areas: (i) Continued troubleshooting of the locking between the background polling and the activity display; (ii) Experimenting with the display format for the activity list; and (iii) Code organization/clean-up in preparation for Open Source publication.

Also, I created README and LICENSE.txt files for the project, and @cmp2020 stepped through the installation instructions without my assistance in order to make sure that someone can follow them.

Here's a little bit about each aspect.

Troubleshooting the locking mechanism

I spent a number of hours again during this cycle trying to figure out why the memory locking was continuing to misbehave. Eventually, I discovered that the problem wasn't in the logic of the locking, but rather a simple grammar error in the function call to release one of the locks. Finally, it seems like the locking has been working as expected for about a week.

Experimenting with the display format

As previously mentioned, I'm very-much a "function over form" type of person, so making a web page look pretty is definitely a weak point of mine. I tried a variety of color schemes, though, and eventually came up with one that I think is tolerable.

I had another theme that I liked, too, modeled after the Philadelphia Eagles colors, but it clashed with the logo and I didn't feel like getting the AI to make another logo for me, so I went back to playing with blue themes.

Code organization

I went through a bunch of the functions and tried to eliminate extraneous code, and I also created some new files in order to separate functions according to their intended use. I am now migrating towards the following structure:

  • One pair of files for displaying the HTML/CSS activity list (JavaScript and HTML)
  • One pair of files for displaying the pop-up menu (JavaScript and HTML)
  • A file that does the background polling (JavaScript)
  • One file with helper functions for interacting with the Steem blockchain
  • One file with helper functions for managing storage locking
  • One file with with helper functions that might be used in multiple other places.

There's still a lot of room for improvement with the code organization.

Next Up

As previously detailed, my long-term vision for this tool includes notifications from followed accounts, notifications from threads where the observer account has participated, and notifications from posts/comments/replies in communities where the observer account is a subscriber. Additionally, I'm going to add some capabilities so that people can get some extra visibility for post promotion and @null beneficiary reward settings.

My immediate goals are:

  • Validate the observer account when it is entered in the popup configuration window.
  • Add some sort of polling status indicator and pause capability in the popup configuration window.
  • Start working on polling of threads where the observer account has participated.
  • Continue with improvements of existing capabilities.

Reflections

Don't expect too much

When @cmp2020 tried out the SCA installation instructions for me, it took him about 3 seconds to start coming up with suggestions for improvement. So, be forewarned. This is definitely an amateurish hobby project, and much improvement is still needed.

If I were starting over, there are already things that I know I would have designed differently (and still may, eventually).

Still, I've been running it daily for a couple months now, so I know that it is useful, and it presents me with blockchain activity that I would not see, otherwise. In the end, that's the bottom line. The tool already has the capability to call human eyeballs back to the blockchain from the other sites where we spend our time.

Also, I happened to notice in comments that Steemit is updating their curation strategy to focus on rewarding organic conversation in the comments sections. So, coincidentally, this extension arrives at a time when it can offer the browser operator a gateway into this growing curation space.

Network speed

The network polling is currently maxed out at about 5 accounts per second. This is tolerable, but slow. Unfortunately, the limit is imposed by Steemit's API rate limiting, so there's not much I can do about it in short order.

One possible improvement that I intend to try, eventually, is to adjust the size of the get_account_history call dynamically, in order to take advantage of higher rate limits on other API endpoint devices.

Another eventual possibility is to split up the polling and make parallel use of multiple API endpoints.

Conclusion

And so goes a milestone. From concept to reality in about 2 months is not terrible, considering that I had time constraints, very limited experience with javascript and HTML, and 0 experience with CSS. The amount of improvement that's still needed is daunting, but I'm satisfied with what has been achieved so far. The tool already provides a view into the Steem blockchain that - as far as I know - is not easily available anywhere else.

I invite anyone in the Steem ecosystem to download it and try it out, and I invite all developers to help me make it better.

Concordia res parvae crescunt - Small things flourish by concord.


Thank you for your time and attention.

As a general rule, I up-vote comments that demonstrate "proof of reading".




Steve Palmer is an IT professional with three decades of professional experience in data communications and information systems. He holds a bachelor's degree in mathematics, a master's degree in computer science, and a master's degree in information systems and technology management. He has been awarded 3 US patents.


image.png

Pixabay license, source

Reminder


Visit the /promoted page and #burnsteem25 to support the inflation-fighters who are helping to enable decentralized regulation of Steem token supply growth.

Sort:  

I've been using your extension for a few days now and would like to suggest two possible improvements:

  • the font should be increased to make it easier to read;
  • it would be good to provide the possibility for the user to call up the list of results at any time convenient for him. For example, sometimes a message pops up and I don't have time to click on it. Then I have to wait a certain number of minutes before the next notification. It would be nice to be able to open the results when it's convenient for me.

Overall I really enjoyed your extension 👍

 2 months ago 

Thanks for using it and thank you for the feedback! I'll see what I can do with the font this weekend.

The second point will take longer. I agree that it would be useful, and I have also wished for this, but I have a feeling that it would be challenging to implement.

I'll add both suggestions as "issues" in github so they don't fall off the radar.

Hi, sorry to bother you again, but I have another user feedback 😃. In the Steem Conversation Accelerator results, links to posts lead to non-existent pages:

image.png

The links look like this: https://steemit.com/yak-mi-vizhivali-khronika-viini-v-odnomu-misti-chastina-chotirnadcyata

And the post is available at the following link: https://steemit.com/hive-145157/@zaria56/yak-mi-vizhivali-khronika-viini-v-odnomu-misti-chastina-chotirnadcyata

That is, the community and the author are omitted in the link.

This situation is only with posts, everything is fine with comments.

 2 months ago (edited)

Ugh. Sorry about that. I must have broken that when I was reorganizing things and then missed it in testing. I'll fix that this weekend, too.

Thank you, again, for the feedback!

The second point will take longer.

If it is difficult, then it is not necessary to do it. I just expressed my thoughts as an average user. 🙂

In general, I think it is worth moving in the direction of the development of this expansion, it seems to me that it has good potential. If its use becomes more widespread, then you can even think about some mechanism for promoting content there.

 2 months ago 

Hi, thanks again for the feedback! I think I addressed all three of your points this weekend.

  • Broken URL in post display
  • Increased font to 14 pixels
  • Added a link to open the activity list at any time

I just merged the changes into the main branch a few minutes ago, so please try it out and let me know.

Eventually, I'll probably make that link into a button, but for now the link to open the activity list at any time is here, in the popup window:

Thanks, I'm glad you got it done so quickly. I will upload the new version of your extension soon 🙂

I'm glad that your extension is now available to everyone. I was really looking forward to it. I will definitely try it out soon. 🥳

This post has been featured in the latest edition of Steem News...

 3 months ago 

Thank you, @irawandedy!

Upvoted. Thank You for sending some of your rewards to @null. It will make Steem stronger.

This post has been upvoted/supported by Team 7 via @httr4life. Our team supports content that adds to the community.

image.png

 2 months ago 

Thank you, @httr4life!

Loading...