Hacking Chart.js: A Crash Course in Down-and-Dirty Front End (Part 2)

What’s going on? I wanted to make clean, elegant, simple charts to represent data about armed conflicts in Africa. I used the Chart.js javascript library to obtain some pretty graphs, but I added functionality to the graphs and then wrote about it here so you can do it, too. This is the second in a series of three posts, and it’s about creating a sensible, readable scale along the x axis of a line chart.

For more info on Chart.js, have a look at the first post in this three-post series. 

Continue reading “Hacking Chart.js: A Crash Course in Down-and-Dirty Front End (Part 2)”

API Strategy and Practice Conference: Intro to APIs with Kim Lane and Kirsten Hunter

I’m at the API Strategy and Practice Conference here in Chicago, where Kin Lane and Kirsten Hunter have kicked things off with an “Introduction to APIs” workshop. Despite its title, the talk had value for API developers beyond the absolute beginner level. Although the two did an excellent job of explaining what an API is for someone who doesn’t know, the most valuable elements of the talk for someone who has made and used APIs, but wants to get better at it, were the cornucopia of resources that Kin recommended in his portion of the talk and Kirsten’s ______ in her portion of the talk.

Continue reading “API Strategy and Practice Conference: Intro to APIs with Kim Lane and Kirsten Hunter”

Pairing with Coraline, Entry 1: Ruby Syntax, Level 2 Spells, and POROs

Last month, I had the experience of building out an app on an extremely tight time schedule. The rapid-fire development, while exciting, left me with technical debt to pay. Luckily, I’ve had the extremely good fortune to work with a master of refactoring and code maintenance, Coraline Ada Ehmke, as I learn how to clean up my controllers, detect problems, and write a tight test harness. I wanted to pay it forward and share some of the lessons that I am learning from her in our process of building code together.

I’ll go over some things that I learned in our last session, with examples:

  • controller methods: form and function
  • code smells: method names and variable names
  • PoroPlus
  • Hash methods: zip and inject
  • An array method: map
  • “Or Equals”: an introduction to caching and an elegant alternative to instantiating variables outside of loops
  • Sugary Ruby syntax: &:, ?, and ranges (they’re not just for integers!)

Continue reading “Pairing with Coraline, Entry 1: Ruby Syntax, Level 2 Spells, and POROs”

A Contemplative Review: Extreme Programming Explained, by Kent Beck and Cynthia Andres

Two weeks ago, Austin Vance at Pivotal Labs loaned me a copy of Kent Beck’s and Cynthia Andres’s book  Extreme Programming Explained. For those unfamiliar, a one-line description:

Extreme Programming, or XP, encompasses a set of values, principles, and practices for software engineering teams to increase productivity, decrease waste, and improve predictability on their software projects.

Thirsty for more? Here’s a more comprehensive rundown, or you could purchase the book itself.

If you’re looking for the Cliffs Notes, this is definitely not your blog post. Rather, it’s a short selection of salient points from the book—namely, points that piqued my interest enough such that I would like to learn more about them than what is contained inside it.

Onward!

Continue reading “A Contemplative Review: Extreme Programming Explained, by Kent Beck and Cynthia Andres”

Hacking Chart.js: A Crash Course in Down-and-Dirty Front End (Part 1)

What’s going on? I wanted to make clean, elegant, simple charts to represent data about armed conflicts in Africa. I used the Chart.js javascript library to obtain some pretty graphs, but I added functionality to the graphs and then wrote about it here so you can do it, too. This is the first in a series of three posts, and it’s about auto-generating nice-looking legends for line graphs.

Addendum: to see, copy, and run the code itself, you can pull from https://github.com/chelseatroy/acled-data-webclient.

What is Chart.js? Chart.js is a javascript library originally drafted by Nick Downie (available here on GitHub). The library offers relatively quick setup in Javascript for several types of simple and elegant charts so you or I can create visual representations of data in our apps:

Screen Shot 2014-09-11 at 7.17.49 PM

Thank you to Sajal Sarkar for the image: http://www.eolikes.com/jquery/chart-js-simple-html5-charts-plugin

Continue reading “Hacking Chart.js: A Crash Course in Down-and-Dirty Front End (Part 1)”

OpenGov Hack Night: Dan Platt and Craig Booth on Chicago Crime Stories

Tonight at OpenGov Hack Night in 1871, Dan Platt and Craig Booth of Narrative Science came in to give us a tour of ‘Chicago Crime Stories,’ which, as described on the EventBrite Description, is:

an application utilizing Chicago open data to produce narrative on crime in any Chicago neighborhood.

The app takes mountains of Data about Chicago crime and presents a story based on a specific neighborhood, which you can specify on the homepage.

Continue reading “OpenGov Hack Night: Dan Platt and Craig Booth on Chicago Crime Stories”

Geekfest: Brian Kung—”What Dance Taught Me About Programming”

This Tuesday at lunchtime, Brian Kung spoke at the Groupon Chicago office on W Chicago Avenue to talk about how his dance practice has contributed to his programming. The talk ended up focusing on, in my view, two groups of ideas:

  1. similarities between the dance community and the programming community
  2. the elements of character that contribute to becoming a good dancer/programmer

I’ll discuss the concepts introduced in the talk within each of these categories. 

Continue reading “Geekfest: Brian Kung—”What Dance Taught Me About Programming””

Justin Love on SQRL (and the post-password authentication movement in general)

This synopsis is a guest post by Matt Hucke (@matthucke), a developer at AutoAccessoriesGarage.com and one of the first people I met this year at Windy City Rails! It covers Justin Love’s talk on SQRL.

Shared secret password security is “rotten at its core”.

With a memorable image involving monkeys sharing far too much, Justin Love (@wondible) exposed the fundamental problems of typical web site password setups. What we want in an effective authentication system, he says, is unique identities, not reused from site to site, to protect us from the inevitable breaches that are far too frequent these days. A hack of Target or iCloud should not result in our email accounts also being compromised – for users will reuse passwords across sites, no matter how often we tell them not to.

Continue reading “Justin Love on SQRL (and the post-password authentication movement in general)”

Matt Polito on Why Cucumber is Still Relevant

This afternoon at Windy City Rails, Matt Polito of HashRocket gave a talk called “Why Cucumber is Still Relevant.” For those who haven’t used it, Cucumber is a gem used in conjunction with writing tests in a rails application that provides a domain-specific language for describing and documenting what the application is supposed to do.

He brought up this article by Martin Fowler, which poses a question:

Will DSLs allow business people to write software rules without involving programmers?

He ends up answering this in the negative, but instead identifies the value of making software business-readable rather than business-writable.

Continue reading “Matt Polito on Why Cucumber is Still Relevant”

Dave Hoover on Developing Developers

This afternoon at Windy City Rails, Dave Hoover of DevBootcamp stood up to give a talk called “Developing Developers” about turning people into more capable software engineers.

He took the stand in favor of apprenticeship programs at tech companies, arguing that apprenticeship grows (and attracts) awesome people. That said, he offered some guidelines.

Continue reading “Dave Hoover on Developing Developers”