menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Technology News

>

I Fell in ...
source image

Hackernoon

4w

read

173

img
dot

Image Credit: Hackernoon

I Fell in Love With My Code, Then I Had to Kill It

  • The author shares their experience of deleting hundreds of lines of code they wrote for a feature for TheOpenPresenter in favor of new code for audio indication.
  • The feature for audio indication required accessing data from multiple plugins, each with its own schema.
  • The author decided to abstract this data access into a SceneState object, allowing plugins to register a callback function that returns the state.
  • Since this is handled on the server, the function must be provided to the frontend, which was implemented using GraphQL and Postgraphile.
  • The author originally had a solution that listened to every small change, but eventually came up with a better method using reserved properties.
  • The cost of this change was having to delete hundreds of lines of code they had worked on for a long time.
  • The lesson learned is to find the simplest solution first, but not to be afraid to throw code away if a better solution is found.
  • TheOpenPresenter is an open-source presentation system that lets you control any of your screens remotely and is stable enough to use regularly.
  • The author personally uses it for meetups every week and encourages readers to try it out.
  • If you have any questions or want to report issues, you can ask or submit them to the Github repo.

Read Full Article

like

10 Likes

For uninterrupted reading, download the app