Code Monkey home page Code Monkey logo

Comments (17)

ankitshah811 avatar ankitshah811 commented on August 15, 2024

Any chance this would be ready in the next week or so? @nickbarnwell

from tws-on-rails.

mehulkar avatar mehulkar commented on August 15, 2024

What do you mean 'mark status'? Don't attendees determine their status? Can hosts change/override an attendee's status?

from tws-on-rails.

ankitshah811 avatar ankitshah811 commented on August 15, 2024

Attendees do determine their status, but hosts can override if needed.

  • By signing up, they're 'pending' (attending).
  • By canceling via web interface, they're 'flake' (attending then canceled)
  • By not showing up, they're 'no show' (attending, never said a word, then just didn't show up)
    Marking status is mostly important just to mark no-shows and have them down as someone that didn't actually come after saying they would.

Otherwise, 'pending' and 'flake' should really be automatically selected, and if everything goes as it should, all host should do is hit 'CONFIRM'. That doesn't happen all the time.

from tws-on-rails.

mehulkar avatar mehulkar commented on August 15, 2024

So "No show" is the only thing a host should be able to set. And only after the event.
"Flake" should only be settable by the user.

I would say these are separate concerns and should be captured in the database separately.

  • User should be able to sign up for a tea time, which defaults them to "Attending". They should be able to "Flake", which sets their status to "Not attending".
  • Hosts should be able to set a boolean that says "No show". We can set up a validation that doesn't let a host flip a user's "No show" to true if the user's status was "Not attending".

from tws-on-rails.

ankitshah811 avatar ankitshah811 commented on August 15, 2024

Only case 'flake' should settable by the host is in the case that the person emailed them about flaking but didn't actually use the interface. I would give them that option, unless you have a strong case for why not.

Your method sounds perfectly sound. Could you share with me why it's better than what I originally thought? (Not challenging, more just to understand why this system to set attendance is more sound; I trust your word, but just wanna understand myself :)

Beyond that, is your method something we could incorporate before end of weekend?

from tws-on-rails.

mehulkar avatar mehulkar commented on August 15, 2024

I was typing out my reasoning, and I discovered that my suggestion above isn't the best way to capture this data. This is how I would model the status of an attendance:

  • Remove status column
  • Add flaked_on column of type Date
  • Add no_show column of type boolean

Reasoning:

  1. The status column is unnecessary because by virtue of creating an "Attendance" record, a user is said to be attending.
  2. You want to know when someone "flaked" because in the future, you can then optimize timing of an email of encouragement.
  3. You want to know that a user didn't show up, and since there is no longer a "status" column, we need to put that somewhere. The host will have to do this manually after the tea time.

from tws-on-rails.

ankitshah811 avatar ankitshah811 commented on August 15, 2024

Agreed on all accounts.

How long would this take to implement?

from tws-on-rails.

mehulkar avatar mehulkar commented on August 15, 2024

What are the rest of the statuses?

I see :present, :waiting_list, :cancelled

from tws-on-rails.

nickbarnwell avatar nickbarnwell commented on August 15, 2024

The reasoning behind having an enum for statuses rather than a few different fields is that it's easier to build queries for and you only ever have to look one place for the status; arguably you could wrap it with a method, but that's unnecessary if you get it for 'free' with ActiveRecord.

Also, yo udon't need flaked_on because you know the updated_at of the record.

from tws-on-rails.

mehulkar avatar mehulkar commented on August 15, 2024

Updated at doesn't tell you what was updated. It's reasonable to assume
that you wouldn't update anything other than status, but IMO not a good
assumption to make.

It may be easier to build queries with enum statuses, but it doesn't seem
like those are meaningful/useful queries.

May not be able to implement this until next weekend unfortunately, so
happy to debate/discuss more.

On Saturday, June 14, 2014, Nick Barnwell [email protected] wrote:

The reasoning behind having an enum for statuses rather than a few
different fields is that it's easier to build queries for and you only ever
have to look one place for the status; arguably you could wrap it with a
method, but that's unnecessary if you get it for 'free' with ActiveRecord.

Also, yo udon't need flaked_on because you know the updated_at of the
record.


Reply to this email directly or view it on GitHub
#45 (comment)
.


Mehul Kar
@mehulkar

from tws-on-rails.

ankitshah811 avatar ankitshah811 commented on August 15, 2024

I think it'd be useful to have a update history with timestamps (i.e. when they signed up, when they flaked, etc.)

from tws-on-rails.

nickbarnwell avatar nickbarnwell commented on August 15, 2024

Are there any other items we may want a full update history on? There are several gems you can use for detailed histories of item changes, but we could just DIY if it's only for Attendances (and you can't think of anything else that it might be worth using it for).

from tws-on-rails.

ankitshah811 avatar ankitshah811 commented on August 15, 2024
  • Sign up (i.e. becoming a user, not picking tea time)
  • Attendances / changes
    • I'd love for attendance creation/change events to be timestamped in a way that was connected to the user_id. I think interesting takeaways can be found in how long it takes someone between sign up and picking a tea time.
  • Tea time creation
  • Tea time edits
  • Profile changes for hosts

^ all I can think of right now

from tws-on-rails.

ankitshah811 avatar ankitshah811 commented on August 15, 2024
  • Emails sent to hosts after tea time to mark attendance
  • A confirmation button for hosts to indicate that they sent follow up thank you
  • Conditions for tea_time_followup_noshow, tea_time_followup_flake_noresched emails
  • Mobile readiness — most hosts will access this on the go. We want to make it easy.
  • A page linked in /profile with all post-TT-interfaces.
    • If hosts are timely, there should only be one post-TT interface there at a time, but it’s good to have all of them in one place.
  • A checkbox, separate from attendance, to mark potential hosts
    • if attendance_status = pending?, render 2nd field next to each attendance as a checkbox to mark potential hosts to reach out to
    • If an attendee is marked as a potential host, there should be a way to attach that to their user info for internal use

from tws-on-rails.

ankitshah811 avatar ankitshah811 commented on August 15, 2024

@nickbarnwell where are we on this?

from tws-on-rails.

ankitshah811 avatar ankitshah811 commented on August 15, 2024

Hey @nickbarnwell — do you think we could have this ready this weekend?

from tws-on-rails.

mehulkar avatar mehulkar commented on August 15, 2024

i think this is implemeted

from tws-on-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.