Golearn!

Or learning a new language – Golang is my latest endeavor to keep my programming skills sharp. At the last Reno Developer meetup Spot presented on Golang and that inspired me to use Go to implement a Slack custom integration for the devreno Slack team. The Reno Developer meetup recently received sponsorship from JetBrains and one of the perks is we are provided with one license key per month to giveaway to members. Armed with newly acquired knowledge I set out to build a Slack integration in Go that allow any team member to run a slash command and see if they have won a prize.

Slash Commands

The name of the command is “raffl” and typing /raffl in any Slack channel:
Screenshot from 2016-04-30 09:45:08

will display the command, press enter one to focus the command, press enter again to run the command. One of three things will happen:

  1. You win a prize
    Screenshot from 2016-04-30 09:58:49
  2. You don’t win a prize
    Screenshot from 2016-04-30 09:54:03
  3. You’ve already won a prize and thus cannot win another
    Screenshot from 2016-04-30 10:01:26

What are the odds? Currently there are 2 prizes, in the form of JetBrains license keys, and there are 100 members of the devreno Slack team. So your chances are 1 in 100 every time you run /raffl in any Slack channel.

Technical Details

Programming in Go

Overall Go is easy to pick up assuming:

  • You’ve programmed in a C like language
  • Are familiar with a managed language
  • Enjoy using the command line
  • Willing to learn several helper utilities to augment your Go experience

I opted to also use the Go plugin for IntelliJ (both are free!) which provides an integration in a familiar IDE.  I found the move and rename refactorting support invaluable as I started to spread my wings with this project.

I also selected the Go BoltDB to persist the app data over the lifetime of use in a deployment.

Slack & Go

The Slack integration consists of a Slash Command and an Outgoing Webhook. This mainly because Slack expects a Slash command to run in less than 3000ms and will report a warning message back to the user if it takes longer. I forked this Slackbot framework for use as a starting point. Plenty of details in the docs for the framework and very well written. The basic flow is:

  • User types “/raffl” in any Slack channel
  • A call is made from Slack to a service running on a remote server (in this case hosted on Heroku)
  • The Slash command is processed immediately and if necessary a deferred command is invoke in Go to run additional logic
  • Deferred commands are invoked via a Goroutine and the response is continued in via Direct Message from @slackbot.

I choose Direct Message for the response target to keep the details of a prize win/loss secret to the requester.

The two main Go files for running this logic are:

  • Controller: Raffle.go main Slack integration
  • Model: Prize.go. contains logic to interact with BoltDB to manage the Prize data store

Be gentle if you review the code, I’m sure there is room for improvement in my use of Go.

Running Go in Slack

I selected Heroku to run the Go service that use invoked from Slack when “/raffle” is run by a user. I found Getting Started With Go on Heroku and the Go tutorial from Heroku (somewhat) useful.

Resources

 

 

Ignite Reno #14: What in the Wearable?

Wearable, what does it mean?

  • personal: clothing, wrist, or in the case of Glass your face
  • immediacy: augment our daily activities
  • convenience: look up to read your e-mail
  • interaction: keyboard and monitor no more
  • an opportunity to enhance contextual experience

GGDEVCON: Sense for Glass

Glass presents an unique opportunity to examine the environment around the wearer in real time. Environmental Sensors are rapidly evolving in size power, and portability to the point where they are essentially wearable and always on. There are several sensors already on the market that can provide real-time streaming of temperature, humidity, atmospheric gas, spectra, etc. This class will provide and in-depth review of best practices and design patterns for integrating sensors with Glass. Also presented is a live demonstration of several sensor technologies as part of this session. All source code presented during this class will be available at: https://github.com/gitizenme/Sense.

BetOnThisNV: Mobile Apps for Sexual Health

This slideshow requires JavaScript.

BetOnThisNV Mobile Apps Available

As part of the BetOnThisNV initiative supported by Nevada Division of Public and Behavioral Health, izen.me is proud to announce the availability of two new mobile applications for both iOS and Android.

NV SexSafe

When you protect yourself and others everyone wins. Learn more about safer sex, testing, free condoms and how you can spread the word to help keep Nevada sexually safer.

NV SexSafe

This app features a slot game, that when played, will provide information about the risks and protection that is available for the randomly selected partner, activity and method of protection. Also, include is information on where to get condoms, testing facilities and form to request help.

   

NV SelfCare

Learn more about how you can receive care for HIV/AIDS, check program eligibility and get the tools you need to take control of the infection and live well with HIV/AIDS.

iOS Simulator Screen shot Jul 16, 2014, 10.45.22 AM

 

This app is a features a calendar for tracking specific behaviors and activities of individuals who have HIV/AIDS.

   

Glass and Environmental Sensors

GGDC-SF14-SpeakerBadge

I’ll be speaking at GGDevCon on the topic of integrating Glass with Environmental Sensors.

Conference Overview

GGDevCon is an independent, two-day developer conference about Google Glass. This intensive technical conference for developers, software engineers and architects will train you how to master the Google Glass Development Kit and create outstanding Glassware. Learn about Live Cards, UI design and more. Get practical answers, roll up your sleeves, and learn how to program the wearable platform that is powering the next generation of wearable technology Oct. 27-28, 2014, in the San Francisco Bay Area.

Register Here

Session Overview

Glass and Environmental Sensors

In this class, the integration of environmental sensors and Google Glass will be presented. Glass presents an unique opportunity to examine the environment around the wearer in real time. Environmental Sensors are rapidly evolving in size power, and portability to the point where they are essentially wearable and always on. There are several sensors already on the market that can provide real-time streaming of temperature, humidity, atmospheric gas, spectra, etc. This class will provide and in-depth review of best practices and design patterns for integrating sensors with Glass. Also presented is a live demonstration of several sensor technologies as part of this session. All source code presented during this class will be available via public GitHub repository.

 

 

From Zero to Mobile at the Reno Collective

Overview

I recently held a training session at the Reno Collective as part of their Learn series. The session titled “Getting Started with App Development” is part of the From Zero to Mobile” series, is primarily centered around getting started with mobile app development from the ground up.  I covered topics ranging from development platforms, cloud services, marketing, UX/design, making money, etc.  Below you will find the slide deck from the class and a (brief!) list of online resources.

Resources

 

 

Sensordrone for Glass

Sensordrone for Glass Sensordrone for Glass

Here are a couple Glass vignettes for a functional first cut at the integration. A huge shoutout to TheMastorBaron for the Glass-IntentTunnel project.

The key aspects to the project are :

  • Glass-IntentTunnel – awesome library to tunnel Android Intents over Bluetooth
  • Hacked version of Sensordrone Control – Bluetooth connectivity, data collection and IntentTunnel integration
  • GlassSensor Glassware – Live Card Glassware app that communicates with Android app via Glass-IntentTunnel

Source code in the GitHub Repo.

Project Information Page

“Glass is a trademark of Google Inc.”

Announcing Sensordrone for Glass

A Glass app that utilizes the Glass Development Kit and the Sensodrone API to display sensor output in real time on the Glass display. I’m building this with Android Studio and will be posting some notes on configuration and performance soon.

Project Information Page

“Glass is a trademark of Google Inc.”

 

 

 

Mambo Health featured Reno Rebirth

4 Reno startups launch crowdfunding campaigns; tell us about yours | Reno Rebirth
http://blogs.rgj.com/renorebirth/2014/02/18/4-reno-startups-launch-crowdfunding-campaigns-tell-us-about-yours/

Pebble Snap v1.4

Watch App Close Up

Download or update the new v1.4 iOS App: DownloadOnTheAppStore

Download the new Pebble Watch App v1.4

Pro-tip:

If you are having trouble connection the iOS app to the Watch App. Check the camera icon, if it’s RED then tap it to connect to your Pebble. It should turn GREEN when properly connected.

New in this version:

  • Live preview of iOS device camera in the Pebble Watch App
    • Click on the Live Preview Button Live Preview Button to turn on/off

Pebble App Help