Hacker News new | past | comments | ask | show | jobs | submit login

Interestingly I ran into the Twilio example... yesterday.

Essentially my first take at the phone stuff I had done (a bit over 3 years ago) was to just roll into a single view and hack my way through it. The requirements (at the time) were relatively simple and this served us well for 3 years.

Now our requirements for phone calls has really changed as we've added things like voice prompts, whisper files, user interaction, and a bunch of other doo-dads. Worse yet, the presence (and behavior) of these states can now vary by the customer that is using them.

So I broke that jumble of code into a state machine with clear transitions. Each state farms the actual functionality to defined strategies which can be specified on a per-customer basis.

It works like a charm:)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: