Daily Learning Notes for March 28th, 2017

Just a few notes from working on my mob coding app:


  • Started this project! Created the repo, created HTML mockup for the UI, wrote the first set of project goals.


  • Should the server ensure that the countdown timers are synced across all clients?

  • How should I set a timer on the server to control changing turns?

  • What exactly does the server need to keep track of?

  • How should I prevent a user from typing in the text box when it’s not their turn?

  • Should I throttle the amount of data/events being sent when users are typing? How well would it perform if I sent data on every keystroke?

Outlining events and functions that I’ll need:

  • Event: when users connect
  • Event: when a user types into the text box
  • Event: when it’s time to change turns
  • Event: when users disconnect
  • Event: when a user changes their name
  • Event: clock tick, to keep clients in sync?
  • Client function: update player list, given data from server
  • Client function: send text box data to server
  • Client function: update text box, given data from server
  • Client function: update UI when turn changes, given data from server
  • Client function: update the countdown timer at a regular interval
  • Server function: track elapsed time and broadcast turn change event at the right time
  • Server function: receive and broadcast events based on data from clients
  • Server function: broadcast events when users connect or disconnect
  • Server state: keep track of list of user IDs, names, whose turn it is, who’s next, and elapsed time for each turn