Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Let’s have some fun with chat bots! @ JCON 2018

Let’s have some fun with chat bots! @ JCON 2018

A lot of companies are investing in chat bots. In this workshop, we will develop a fully functional chat bot from scratch with support for formatted messages, photos, documents, locations, buttons, custom keyboards and more. No slides, just code – and a lot of fun…

Do you understand the user interface of every website and every application? I don’t! Do you understand how to use a chat application like WhatsApp, Telegram, Threema, Signal, Facebook Messenger, etc? I do! If everyone knows how to chat, what if we provide our business services using a chat bot as a user interface? Let’s have some fun and create a chat bot live on stage as an introduction to this very interesting topic!

This talk has no slides – it’s all about code! Live on stage I start a new empty project and show the audience how to write a complete and working chat bot from scratch for Telegram. Our bot will receive messages from other Telegram users, analyze them and send an appropriate answer. The messages can be formatted and contain photos, documents and locations. We will use custom and inline keyboards, callback buttons and much more.

This talk is kind of interactive – the audience can use a Telegram client on their own devices to talk to the chat bot while I’m working on it live on stage.

To fully understand this talk the attendees should have basic knowledge of Java.

Marcus Fihlon

October 11, 2018
Tweet

More Decks by Marcus Fihlon

Other Decks in Technology

Transcript

  1. @McPringle Disclaimer The following presentation has been approved for open

    audiences only. Hypersensitivity to occasional profanity requires covering ears. All logos, photos etc. used in this presentation are the property of their respective copyright owners and are used here for educational purposes only. Any and all marks used throughout this presentation are trademarks of their respective owners. The presenter is not acting on behalf of CSS Insurance, neither as an official agent nor representative. The views expressed are those solely of the presenter. Marcus Fihlon disclaims all responsibility for any loss or damage which any person may suffer from reliance on this information or any opinion, conclusion or recommendation in this presentation whether the loss or damage is caused by any fault or negligence on the part of presenter or otherwise.
  2. @McPringle About me • Agile Coach CSS Insurance • Software

    Engineer CSS Insurance, Open Source Software • Lecturer TEKO Swiss Technical College • Speaker Conferences, User Groups, Meetups • Author Articles, Books • Community Leader Hackergarten, Java User Group Switzerland, Kotlin Swiss User Group, Voxxed Days Zürich, BaselOne
  3. @McPringle Coming soon* Kotlin Web Development Develop full stack web

    applications with Kotlin and React.js Packt Publishing ISBN 978-1-78862-031-4 * around Q3/2018
  4. @McPringle What makes chatbots unique? Chatbots… • are super easy

    to use. • have a personality and can be sympathetic. • don't just give answers, they perform actions. • can actively resume calls. • can be achieved with a relatively small budget. • can be active on multiple platforms. • provide the best insights into the user's emotional state.
  5. @McPringle Examples Use a chatbot to… • play a game

    or discuss your mental problems. • order something to eat or reserve a table. • create and remove virtual machines without calling a system administrator. • log your work data and monitor your overtime and vacation days. • handle frequently asked questions to reduce your call center load. • monitor your infrastructure and inform relevant people of outages. • communicate with your customers "in real time", e.g. ask for missing documents.
  6. @McPringle Today What you're gonna learn today: • The technical

    base • Receiving and sending messages • Receiving and sending photos • Using own keyboards (buttons) • Formatting messages • Writing automated tests What you won't learn today: • Natural Language Processing (NLP) • Artificial Intelligence (AI)
  7. @McPringle Credits This workshop relies heavily on the Java Telegram

    API hosted on GitHub: https://github.com/rubenlagus/TelegramBots Thank God they have such a great Wiki!
  8. @McPringle Prerequisites You need… • Java 8 installed and ready

    to use on your computer • An IDE you are familiar with • A Telegram account (tip: use your mobile phone to create one) • A Telegram client (mobile, web or desktop app) • Internet access • Enough battery power for the workshop (or a power cable)
  9. @McPringle Code Warriors wanted! About you • You are frighteningly

    awesome at what you do. • You can perform quick and deadly tactical strikes, as well as feats of epic badassery. Sometimes both at the same time. • You would rather refactor existing, mostly working, ugly code instead of rewriting it from scratch. OK nobody would really rather do that, but you know it's the right and honorable thing to do most of the time. • You know where your towel is. About us • Biggest Basic Health Insurance Company • 2800 Employees • 300 IT Professionals • 24 Scrum Teams • 130 Software Developers • Flexible working times • Personal development support • 6 weeks paid vacation • Great benefits • Located in Lucerne, Switzerland Contact me: [email protected]