Weird data design on "resteems"

in #steem6 years ago

A custom JSON operation: Follow


When you follow someone, you broadcast this data into the blockchain:

["custom_json", {
    "required_auths": [],
    "required_posting_auths": [<follower>],
    "id": "follow",
    "json": ["follow", {
        "follower": "<follower>",
        "following": "<following>",
        "what": ["blog"]
    }]
}]

Can't say the best design, but looks like okay. Stop here for a moment, and think how would you design the resteem operation with a similar convention.

resteem operation


When you resteem a post, you broadcast that into the blockchain:

["custom_json", {
  "required_auths": [],
  "required_posting_auths": ["<account>"],
  "id": "follow",
  "json": ["reblog", {
      "account": "<account>",
      "author": "<author>",
      "permlink": "<permlink>"
  }]
}]

Seems like the id of "reblog" operation is follow. Weird.


Software Complexity - The art of naming by Alexandre Oliveira.

Not sure about the original intention about this naming but let's remember the great computer science quote:

There are only two hard things in Computer Science: Cache invalidation and naming things. -- Phil Karlton


Vote for me as a witness so I can have more rants about design decisions on STEEM blockchain.

Sort:  

Hey Emre, sorry to ruin your rant, but it's actually not that inconsistent. Both follow and reblog are part of the follow_api. So take the id as information to which plugin the op should be routed to, and it makes sense.
On a side note: muting/ignoring a user is also a follow operation with "what": ["ignore"].

Yeah, I know it's a part of follow plugin, however I don't accept my rant is ruined. 🤓

Follow plugin should include only follow/unfollow, or at least follow related stuff. If you want to add mute operation, you can refactor the plugin something like "relationships", etc.

Reblog op - being a part of Follow plugin doesn't make sense and it's not intuitive. I am sure there is at least one logical reason to put it here but that doesn't change the fact that it just looks weird.

OK, agreed :D so it's more a weird design/naming of the follow plugin. It also includes the reputation calculations, which are completely unrelated to follow-ops. Let's call it whatever_didnt_fit_elsewhere_api plugin :)

That is not a real rant!
That is just a nice notice from you.
You didn't even curse.
What is going on, are you a payed shill, working for the whales now?
You could at least have some names dropped, to get their attention!

See, this is a rant.
More exclamation marks!! 1!eleven
:)

Merhaba @emrebeyler bahsettiğiniz konuya ilişkin kodlar ile neler yapılabilir? Sanırsam otomatik takip veya otomatik oylama gibi bir kod parçacığı heralde.

zaten bu otomatik takip ve oylama yüzünden çoğu insan yerinde sayıyor oohh kebap yaa neyse allahtan öyle değilmiş

Tabi o konuda haklısınız😊 ama Benim istediğim şey kürasyon ödüllerini yükseltmeye yönelik bir çalışma. Hem upvote atarak destek olurum,hem de kürasyon ödülünü bir nebze olsa arttırım.

yok, otomatik takip veya otomatik oylama ile ilgili değil.

peki @emrebeyler hocam,
steemvoter haricinde otomatik oylama yapılabilecek bir sistem var mıdır?

steemauto.com var.

Peki hocam
teşekkürler

This comment has received a 0.37 % upvote from @speedvoter thanks to: @dianna1.

This comment has received a 0.44 % upvote from @speedvoter thanks to: @dianna1.

very important massage.I read your blog.thanks for share.

Loading...

You got a 1.80% upvote from @upmewhale courtesy of @emrebeyler!

Earn 100% earning payout by delegating SP to @upmewhale. Visit http://www.upmewhale.com for details!

Why is it not the other Acid? Boooo!

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.027
BTC 59698.06
ETH 2681.05
USDT 1.00
SBD 2.46