Presentation – GCP APIs with kotlin

I was invited for the talk as part of kotlin/everywhere at GDG Cloud London meetup on June 8th 2019. Unlike previous talks in this one I focused on the live coding part after brief intro into the language.

The demo project I prepared is a web site allowing user to upload pictures into GCP Storage, automatically annotate content using Vision API, synthesise voice which describes content of the image.

Web service is using kotlin, http4k, kotlinx.html, GCP APIs and has no JavaScript, which is very rare nowadays

The presentation is available here

GitHub repository with project:

But things went really wrong, demo daemons have attacked my computer(yes, it's a silly excuse!)

What went wrong

Normally, before presentation I plug my laptop to the projector and everything works well, but not this time. Here is a postmortem of my effort to run presentation

  • Projector was recognised by my laptop and picture was shown for the 5 seconds. After than it started to glitching and blinking like a disco lights.
  • I was given HDMI to mDP converted which didn't help at all
  • I started to panic because it's the only laptop I have. Luckily, person from Google Campus gave me the MacBook which works perfectly. But it had a tiny issue - no development software was installed there, even no java VM. Also, I'm terrible with macs
  • I have tried to reboot system many times trying different kernels. Because of that I lost all open windows and prepared environment.
  • I realised that I just need to stream my screen to Mac and it would be a solution. I just need to broadcast screen to local network
  • Not that easy, huh. Google Campus WiFi is well protected - it doesn't allow members to connect to each other. Hence, there is no way Mac can consume image from my laptop through local network
  • That situation absolutely derailed me since it was time to start meetup and audience was already in the room.
  • Bingo! I realised I can use my phone as a router to allow laptops to talk to each other over LAN. It sounded good to me!
  • Not that easy. There was no 4G coverage, no signal at all inside the building(it's a well known Google Campus issue). That means no cloud APIs are available :(. So I had to run to the window searching for the cell network signal
  • After all I was trying to google simple recipe for vlc I failed, and the time pressure was very high.
  • Deep breath, step back, "How do I deliver screen picture over network?". Google Hangouts, of course!
  • "All sorted" - I thought.
  • Nearly sweating and thirsty I have started presentation. Once I finished my slides I switched to Idea and quickly prepared environment for demo(which I lost during reboots).
  • Idea started to play badly. Apparently it didn't replace title of the project so I was thinking that I was editing original project(with all code completed) instead of demo. I didn't realized that from the beginning so after few lines of code I had to open another "demo" folder which apparently was already opened.
  • Idea didn't allow me to do so and I renamed folder "demo" to "demo1", continued to write code. At some point Idea stopped running application even "run" icon has gone from the "main" method. Disaster.
  • 2 mins of silent voodoo in the command line in front of the dozens people and I still did not have a clue.
  • My time was running up and organisers proposed me to continue after next talk. Unfortunately continuation never happened since given time was up

That's a very common thing which happens during live demo from what I heard from more experienced presenters. I feel I need to learn a lesson from this:

  • Always check that projector works fine with laptop
  • It might worth to buy external video adapter, just in case.
  • I should swap timeslots with next presenter allowing myself more time to prepare environment
  • Demo environments should have backups

That's it, folks! (c)
I'd like to have the same talk another time :)