Viewing a response to: @woz.software/re-matthewdavid-saving-notes-to-a-json-file-day-six-of-the-complete-node-js-developer-course-20170907t063203129z
I see what you are saying with this and I thought about it when going through this exercise. This section in the course left the code like this, but it makes sense to give some feedback if an error occurred. I think the next section will be refactoring this bit of code so that the logic can be reused by other functions. We'll see when I get there.
author | matthewdavid |
---|---|
permlink | re-wozsoftware-re-matthewdavid-saving-notes-to-a-json-file-day-six-of-the-complete-node-js-developer-course-20170908t032049695z |
category | javascript |
json_metadata | {"tags":["javascript"],"app":"steemit/0.1"} |
created | 2017-09-08 03:20:48 |
last_update | 2017-09-08 03:20:48 |
depth | 2 |
children | 2 |
last_payout | 2017-09-15 03:20:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 349 |
author_reputation | 2,155,255,892,877 |
root_title | "Saving Notes to a JSON file: Day Six of "The Complete Node.js Developer Course"" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 14,211,696 |
net_rshares | 5,807,306,112 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
woz.software | 0 | 5,807,306,112 | 100% |
Will be interesting to see what they propose is the correct way after the refactor :)
author | woz.software |
---|---|
permlink | re-matthewdavid-re-wozsoftware-re-matthewdavid-saving-notes-to-a-json-file-day-six-of-the-complete-node-js-developer-course-20170908t062815476z |
category | javascript |
json_metadata | {"tags":["javascript"],"app":"steemit/0.1"} |
created | 2017-09-08 06:28:15 |
last_update | 2017-09-08 06:28:15 |
depth | 3 |
children | 0 |
last_payout | 2017-09-15 06:28:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 85 |
author_reputation | 2,321,910,395,519 |
root_title | "Saving Notes to a JSON file: Day Six of "The Complete Node.js Developer Course"" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 14,222,930 |
net_rshares | 0 |
One other thing I noticed is there is no try/catch around the writing of the file so if that fails for whatever reason it will bubble up while the read is caught. Was that intentional?
author | woz.software |
---|---|
permlink | re-matthewdavid-re-wozsoftware-re-matthewdavid-saving-notes-to-a-json-file-day-six-of-the-complete-node-js-developer-course-20170908t063211023z |
category | javascript |
json_metadata | {"tags":["javascript"],"app":"steemit/0.1"} |
created | 2017-09-08 06:32:12 |
last_update | 2017-09-08 06:32:12 |
depth | 3 |
children | 0 |
last_payout | 2017-09-15 06:32:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 184 |
author_reputation | 2,321,910,395,519 |
root_title | "Saving Notes to a JSON file: Day Six of "The Complete Node.js Developer Course"" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 14,223,218 |
net_rshares | 0 |