RE: Lightsteem 0.0.9 - Introducing event listeners by amosbastian

View this thread on steempeak.com

Viewing a response to: @emrebeyler/lightsteem-0-0-9-introducing-event-listeners

· @amosbastian ·
$10.58
Thanks for the contribution, @emrebeyler! Will definitely be useful for people that need to stream the blockchain for their bots for example. Personally I only ever used it once, but it was such a hassle with all the crashes that I gave up - do you think yours is/will be more reliable than e.g. the stream function used in steem-python? Also, I was wondering if there is a reason why you don't ever seem to include docstrings (I noticed this in previous contributions as well, I think)? 

>shortcuts added for the inconvenience

I'm sure you mean convenience ;) - looking forward to more updates, especially the exception handling and retry mechanisms should make it more robust.

---

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/1221212).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
👍  , , , , , , ,
properties (23)
post_id62,379,388
authoramosbastian
permlinkre-emrebeyler-lightsteem-0-0-9-introducing-event-listeners-20180913t202801664z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https:\/\/join.utopian.io\/guidelines","https:\/\/review.utopian.io\/result\/3\/1221212","https:\/\/support.utopian.io\/","https:\/\/discord.gg\/uTyJkNm","https:\/\/join.utopian.io\/"],"users":["emrebeyler"],"app":"steemit\/0.1"}
created2018-09-13 20:28:00
last_update2018-09-13 20:28:00
depth1
children2
net_rshares9,583,512,552,987
last_payout2018-09-20 20:28:00
cashout_time1969-12-31 23:59:59
total_payout_value8.843 SBD
curator_payout_value1.740 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,176
author_reputation174,225,255,912,876
root_title"Lightsteem 0.0.9 - Introducing event listeners"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (8)
@emrebeyler · (edited)
Thanks for the review.

> do you think yours is/will be more reliable than e.g. the stream function used in steem-python?

I have a couple workarounds to stream blocks on my old steem-python scripts. I didn't wanted to implement these into lightsteem blindly.

Currently, I can not say lightsteem is more robust than their competitors, but it will be. I switched some of my scripts and waiting for them to crash. I will apply the workarounds after that. 

One thing I remember that the get_dynamic_global_properties sometimes returns null. There are a couple of cases like that. I will decide the best way when I encounter them, and apply it. :)

Regarding docstrings, I am not a believer. Not because the docstrings are bad, it's a good thing but it needs to be used perfectly.

Example: 

```
def hello(person):
	```
	@param person string
	```
   print("hello", person)
```

This is our initial function. Then requirements change, and we change the function.

```
def hello(people):
	```
	@param person string
	```
	for person in people:
		print("hello", person)
```


We have quickly updated the code since we face with deadlines but forgot to update the docstring.

That makes the docstring and documentation unreliable. And once the docstring is unreliable (even %99 is up to date), it's worthless. (There is no "person" argument anymore and it's not a string.)

And I can say, this happens a lot. Even in large codebases with well-established projects.

*thanks for catching the typo. Fixing asap. :)*
👍  
properties (23)
post_id62,380,218
authoremrebeyler
permlinkre-amosbastian-re-emrebeyler-lightsteem-0-0-9-introducing-event-listeners-20180913t204129049z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit\/0.1"}
created2018-09-13 20:41:30
last_update2018-09-13 20:43:51
depth2
children0
net_rshares1,961,052,066
last_payout2018-09-20 20:41:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,507
author_reputation319,480,565,467,431
root_title"Lightsteem 0.0.9 - Introducing event listeners"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@utopian-io ·
Thank you for your review, @amosbastian!

So far this week you've reviewed 1 contributions. Keep up the good work!
properties (22)
post_id62,677,283
authorutopian-io
permlinkre-re-emrebeyler-lightsteem-0-0-9-introducing-event-listeners-20180913t202801664z-20180918t025242z
categoryutopian-io
json_metadata{"app":"beem\/0.19.42"}
created2018-09-18 02:52:42
last_update2018-09-18 02:52:42
depth2
children0
net_rshares0
last_payout2018-09-25 02:52:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length114
author_reputation152,913,012,544,965
root_title"Lightsteem 0.0.9 - Introducing event listeners"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000