Contextual Camouflage

03 August 2018

Contextual Camouflage is an open-source gallery art installation built in Ruby on Rails that guides visitors to anonymously report mental health disorders that affect themselves or their relationships. After users submit a disorder, they have the option to include anecdotes and demographic data for intervention researchers.

The application was born out of Steelcity Codefest in 2017. After the hackathon was over, we pared down the team and restarted the application with a smaller team of three: me, Danielle Greaves, and Jeff Waltrowski. We continued to work with Jason McCoy, head of McCoy Creative, the mastermind and designer of the concept.

We pitched the idea of hosting an installation in the Cultural District to my employer, the Cultural Trust. They had a new space they were prepping for future installations and they generously offered it to us for our trial run. With Railsconf coming to town the week of April 17th - 19th (I was scheduled to present on it), we launched the installation on April 15th, 2017. The installation completed during the Trust’s Spring 2018 Crawl.

Event Description

Contextual Camouflage sheds light on mental health issues and brings those living with mental health issues out in the open, showing that they’re not alone, and that mental health issues are more prevalent than some assume. By allowing visitors to namelessly submit their experiences with mental health and tell their story, gathering all of that data and plotting a heat map of experiences in a real-time display. During the Crawl, a selection of Storytellers will share their experiences and tell the world how mental health has affected their life, relationships, and community.

The pride I felt as our talent Storytellers bared their souls in front of the installation was undefinable. Through the night, I had a lot of hearltfelt, honest conversations about mental health.

We have plans to continue to build out the project and to host the installation in more locations. If you are interesting in contributing or collaborating, please contact me.

Speaking

http://confreaks.tv/videos/railsconf2018-draw-a-crowd

https://speakerdeck.com/wonderwoman13/draw-a-crowd-the-contextual-camouflage-story

Press

With help from “amazing code ninjas,” Contextual Camouflage exhibit explores mental health

90.5 WESA Interview with Jason McCoy

Code

https://github.com/ContextualCamouflage/contextual-camouflage

How to Add a Slack Notifier with Slack-Notifer and Sidekiq

13 April 2017

Recently, my boss had the brilliant idea to route the request to a private Slack channel when our Ruby on Rails website processed a customer’s contact form. It’s ideal for spotting specific website issues and to stay tuned to our patrons interacting with our site.

I came across the excellent slack-notifier gem. I bundled in:

gem "slack-notifier"
gem "json"

Time to add in a custom incoming webhook in Slack. Incoming Webhooks are a simple way to post messages from external sources into Slack. They make use of normal HTTP requests with a JSON payload that includes the message text and some options. Once you have the Slack URL, I added it to our Figaro application.yml as SLACK.

Next step is to add an initializer for Slack in config/initializers/slack.rb.

require 'slack-notifier'

SLACK = Slack::Notifier.new "#{ENV['SLACK']}"

We’re already proud Sidekiq users. Processing the Slack message was ideal for a background worker so let’s build a SlackNotifierWorker.

require 'json'

class SlackNotifierWorker
  include Sidekiq::Worker
  queue_name = "default"
  sidekiq_options queue: queue_name

  def perform(hash={})
    notification = {
        "username": "csibot",
        "icon_emoji": ":loudspeaker:",
        "fields": [
            {
                "title": "Organization",
                "value": "#{hash['org']}"
            },
            {
                "title": "Path",
                "value": "#{hash['site_id']}"
            },
            {
                "title": "Category",
                "value": "#{hash['category']}"
            },
            {
                "title": "Notes",
                "value": "#{(hash['notes'])}"
            }
        ]
    }

    SLACK.ping notification
  end

end

Remember to set the queue (default since it is not critical), emoji icon (important!) and to utilize Slack’s nifty message formatter.

Our last step is to trigger the SlackNotifierWorker during the flow of a user submitting a contact form.

SlackNotifierWorker.perform_async(org: @org, notes: @notes, category: category_string, site_id: site.id)

That’s everything. Special thanks to Steven Sloan and Mike Perham for making this so easy to implement.

How to Deploy Rails with AWS CodeDeploy

16 March 2016

Now that I’m working at a large non-profit, I’m getting to stretch my DevOps skills a bit farther (with the help of our awesome Ops team). As we’re moving our Rails app from version 2 to 4, it was time to see if we could retire the legacy application that we maintained to deploy the old app to production.

Since we’re big users of AWS, my team was excited to learn about their relatively new service: AWS CodeDeploy. CodeDeploy is a free AWS service that efficiently deploys your released code to a “fleet” of EC2 instances while taking care to leave as much of the fleet online as possible. Ship it!

I hunted around AWS’s documentation and GitHub for any examples of deploying with Rails but came up empty handed. After a few (OK, many) failed deployments, we came up with a solid workflow.

Here is what we did:

  1. Setup an EC2 instance with everything that you need for your production server. In our case, this was Ruby, Passenger, and nginx. You do not want to clone your app via git to the server ahead of time but you will need to know the path of where you want your app to live on the server (for example www/var/…). Make sure you know which users you will use for each process (cloning the code, restarting the processes).
  2. Install the AWS CodeDeploy agent on to the server.
  3. Move the EC2 instance to a Production App Group AMI.
  4. In our codebase, we added the following bash scripts to our /script folder. Our full scripts are a bit more complicated (cloning our env vars from a secure s3 bucket) but these will get you off to a solid start. CodeDeploy currently hooks into GitHub only. Luckily, GitHub is what we are using to manage our codebases.
  5. Setup a required AWS CodeDeploy appspec.yml at the root of your app that references these scripts (see below).

application/appspec.yml

version: 0.0
os: linux
files:
  - source: /
    destination:
permissions:
  - object:
    owner:
    group:
  AfterInstall:
    - location: script/AfterInstall.sh
      runas:
  ApplicationStart:
    - location: script/ApplicationStart.sh
      runas:

application/script/AfterInstall.sh:

#!/bin/bash
cd /var/www/
RAILS_ENV=production bundle install --path vendor/bundle
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake assets:clobber
RAILS_ENV=production bundle exec rake assets:precompile

application/script/ApplicationStart.sh:

#!/bin/sh
sudo service nginx restart

Commit these changes and make note of the commit ID. Next, it’s time to set up CodeDeploy. From here, AWS has it covered in their walkthrough. Wash, rinse and repeat for your Staging setup.

After you have CodeDeploy setup, you will be simply need to know the commit ID, the group you want to deploy to and the frequency that you want your servers deployed in (one at a time, all together or half at a time). CodeDeploy does integrate with our CI service, TravisCI, but we have not setup the integration yet.

CodeDeploy will render a success or a failed message after your deployment completes. If it does fail, CodeDeploy links you to the relevant logs so you can troubleshoot the issue.

AWS CloudTrail automatically logs all of the deployment requests so you have a running log of who and what was deployed. Granted, CodeDeploy still feels new (they update the UI constantly) but I feel confident that the free service will only get better.

I hope more teams will start adopting CodeDeploy once they realize it is free, stable and a great way to shed homegrown tools for deployments.

Thanks to the Pittsburgh Cultural Trust for giving me a great environment to learn awesome tools like these.

The Joys and Challenges of Hiring Developer Bootcamp Grads

16 January 2016

I was recently asked to speak on a Winning the Talent War: Building a Diverse Community of Junior Developers & Technical Talent panel in Pittsburgh. The idea was to gather HR executives to listen to tech talks and a panel discussion around solving Pittsburgh’s small tech talent pool. Sadly, the event was canceled.

Since I had completed my talk outline already, I figured that I would recycle it into a blog post for you, lucky reader. I’ll even reveal my biography from the event page:

Brittany Martin is the Lead Ruby Developer for the Pittsburgh Cultural Trust and a Rails Mentor for Bloc.io. She is focused on bringing more women into tech and finding a way to cast her chocolate lab as Alf’s stand-in for the inevitable Netflix reboot.

Sounds like me, right? Away with the talk….

Makeup of a Typical Bootcamp Student

You = refers to the intended audience, HR executives in Pittsburgh

As a Ruby mentor for Bloc, I interact with a lot of potential junior developers. It’s amazes me how diverse their intentions are. If I focus on my students who are looking to make a career change, they share these characteristics:

  1. They have already had successful careers. They are looking for a new challenge that may lead them to a job with more flexibility, compensation and innovation. They have not flunked out of one career and are looking to sneak their way into another.
  2. They are smart. They have tried coding and instantly liked it. They understand that learning to code can be one of the most frustrating challenges that they will ever face.
  3. They are willing to invest in their future. These are employees that are willing to spend all their free time to acquire new skills.

The Pittsburgh tech community hasn’t seriously considered hiring bootcamp graduates even though they constantly struggle with hiring technical talent. Bootcamp graduates (BGs for short) can solve a lot of hiring needs, as long as the challenges they bring are addressed.

Joys of Hiring Bootcamp Graduates

Stale company culture? Hiring BGs can breathe new life into the workplace. They typically set a great example with their passion and high work ethic. Since BGs are encouraged to engage in the Meetup circuit while learning to code, they can often refer a lot of new candidates and get your company involved in your local community.

As noted, BGs have a past life that should be accounted for. They can bring a lot of domain expertise to their new jobs. I love seeing ex-nurses working at a healthcare startup, ex-CPAs working at a financial services company or ex-product managers assisting with project management at their new company. Make sure that when you interview BGs, you get their entire history, not just their coding timeline.

By training a new technical employee, a lot of bad processes can be revealed. BGs will quickly point out poor documentation, bad on-boarding steps and flimsy feedback loops. Remember, these students put their entire livelihood on the line to switch careers. They are heavily invested in making their new job work.

Challenges of Hiring Bootcamp Graduates

Setting up your company to interview and nurture bootcamp graduates is no small feat.

Unfortunately, a lot of bootcamp graduates are not taught basic project management skills and how to collaborate with an engineering team. When they are sole developers coding CRUD apps, they can get away with ad-libbing features. Learning how to properly submit pull requests, spec and estimate features and to balance work and life are skills that will need to be added to on-boarding. Getting BGs in front of real customers and prospects is important. Prior, it’s a smart idea to coach them to not promise features, to not guide the customers into answers and to listen for why they are asking for x feature.

BGs will need to be given plenty of room to fail. This will feel uncomfortable for you and for your organization. Working with your product managers to allocate extra time on earlier projects will pay off. Otherwise, BGs will deviate to doing safe tasks so they won’t grow as developers. In an ideal world, you will be able to hire BGs two or three at a time. Of course, this comes down to budget and bandwidth. It’s important that they can lean on each other and use each other as a health check. Just remember that if you have an 8 person engineering team and you hire 2 BGs, they will instantly make up 20% of your culture. Try to instill good habits early.

Hiring BGs in sets will also reduce the strain on senior mentorship. BGs are used to having mentors available to them so that they can feel good about the technical decisions they make. It’s important that you evaluate your engineering team prior to hiring to be sure your engineers want to mentor. Nothing is worse than see a mentor/mentee relationship fall apart because the mentor doesn’t want to teach or ignores feedback.

The Fictional Developer Wand

13 September 2015

3 years ago, I was a non-technical Product Manager and now I am a Web Developer.Not a week goes by where I don’t receive emails from potential developers asking for help. While some of these hopefuls understand the incredible time and energy it takes, it continues to amaze me how many assume I found and have a magic wand to gift them. With a simple wave, they will be transported from a job they hate into a fabulous world where they are sought after, well paid and will never have another worry again.

If you’ve gone through the intense process of learning how to code, you know this wand doesn’t exist. As a mentor and graduate of Bloc.io, I believe my learning was greatly accelerated by having a dedicated mentor and a structured curriculum. It’s glamorous to think that I worked full-time, completed my Bloc course and was instantly hired into a developer job that I wanted to keep forever.

What is my responsibility to reveal, my sprezzatura, is that I had a coding background. I had taken computer science courses in high school (only girl!), excelled in several coding classes at CCAC, barreled through some Coursera Python courses and even tutored Java for a year. To me, zero (never opened a text editor) to hired (12 weeks later getting paid $80k+) is just not feasible.

If you are looking to switch into a developer career, focus on the second job. I look back on my job at Ninefold fondly. I’m grateful that they gave me a chance when I hadn’t held a technical position before. I was not a Junior Developer but a Support Engineer. Day to day, I helped experienced developers deploy their production apps on to our PaaS. The amount of learning that came from that job was incredible. I was paid to troubleshoot coding issues when most of the times, StackOverflow was open next to my chat window.

Your dream job is likely two career moves away rather than one. This moment in time, right now, I truly believe I have made the switch from non-technical to technical. I proved myself at Ninefold and was asked to join NIRD when Ninefold pivoted out of the U.S. (shoutout to the wonderful NIRD team for believing in me) and recently joined the Pittsburgh Cultural Trust as their backend developer. While my first technical job was memorable, it was not the role that I had in mind when I graduated from Bloc. I want more potential developers to walk away from this understanding that it takes a lot of work to learn how to code and to keep that second job in mind.

When I hear complaints that there are not enough Junior Developers roles to keep up with all of the bootcamp graduates, I think to myself how many great roles are out there: technical project managers, IT, DBAs that could be filled by a Junior Developer. Junior Developers that are creative and diligent in continuous learning will be the ones to score that second dream job.

I’d love anyone’s thoughts on this especially if you have completed a dev bootcamp or are looking to make a career switch. A big thank you to Joe Esposito for editing and contributing ideas to this post.

Address

Pittsburgh, PA USA