SQRL: Solving the Login Problem at Software Craftsmanship McHenry County

“Secure, Quick, Reliable Login” is a proposed technique to replace username/password login, as well as third party logins providers. SQRL (pronounced “squirrel”) provides an extremely user-friendly day-to-day workflow – the user simply scans a QR code on the page using a dedicated application, verifies that it refers to the correct site, and is then logged into the site. Other client options include clicking or tapping a link to run a local plugin or application.

SQRL uses sound and proven cryptography to provide a user-centric, fully decentralized system with an extremely easy day-to-day workflow. The only secret information is held by the user, which provides no place for third party tracking and insulates users from data breaches at service providers. A little bit of complexity creeps back in to the protocol for reclaiming a compromised ID, but this should be a extremely uncommon occurrence.

Comments Off

Git Q&A at ChicagoRuby

This has two main features. It starts with a brief conceptual overview of how Git works, and then uses that as a basis to talk about a couple of common questions. The presentation was mostly visual support, so the answers aren’t always in the slide deck.

This is the same as the FVCP presentation from the past week; a speaker dropped out and I happened to have this ready.

Comments Off

Git Q&A at Fox Valley Computing Professionals

This has two main features. It starts with a brief conceptual overview of how Git works, and then uses that as a basis to talk about a couple of common questions. The presentation was mostly visual support, so the answers aren’t always in the slide deck.

Comments Off

National Day of Calendar Hacking

I went solo for National Day of Civic Hacking. I attempted to run an unofficial event at the Elgin Technology Center but I put off the marketing and partnerships too long. Summer seems to be tough for suburban groups – several of the meetups go on hiatus.

Project 1: Elgin Area Chamber calendar

This may have been a little bit of stretch for civic hacking, but having to browse to the Elgin Area Chamber events page every week to see if there were any events that fit into may schedule was kind of a pain. So I built a program that scrapes the chamber events page and produces an iCalendar file which allows you to download elgin chamber events or subscribe to elgin chamber events

This took about half of Saturday.

Project 2: Farmers Market calendar

I had been wondering if tracking local farmer’s markets would be an appropriate activity. My fears were put to rest when I saw that an official challenge to hack farmer’s markets had been posted.

I originally wanted to do something with Disk Clock‘s week view, but the USDA Farmer’s Market Directory API didn’t have any affordances for cross-origin requests – presumably the javascript examples were only tested on their own site.

Since I’d just been working with iCalendar, I decided to try and rework the chamber project into a market feed. I actuality, I was able to reuse very little of the code – a little on the iCalendar side, but the API parsing was completely different, and since it’s a dynamic search I needed to present a form and immediately generate the calendar file – the chamber calendar is a singular artifact, so I was able to generate it once a day and upload to S3.

Farmer's Market Calendar

The information in the API isn’t as complete as the information available on the main site, and even produces invalid JSON with a trailing comma. But that was an easy fix, so now you can go get a Farmers Market Calendar for your area and never forget your local market again.

Comments Off

Classes Are Premature Optimization: Prototypes in Javascript at Fox Valley Computing Professionals

This talk is a mash up of two others:

The hard crunchy shell claims that Classes are premature optimization, forcing the programmer to freeze method implementations and often memory layouts during the design stage in order to make things easier for the compiler writer. Classes are also accidental complexity forcing the programmer to deal with rules and limits unrelated to the problem domain, and sometimes expend extra effort working around the class system. This talk will gaze into the soul of object oriented programming to see why classes might not always be beneficial (though they often are). We’ll look at alternate visions from the hard core classlessness of Self to the modern renaissance of Javascript.

The soft, melt-in-your-mouth center is an intro to the prototypal objects implemented in Javascript. Javascript objects are basically maps from strings to values, with a few extras, like dot indexing and prototypes. Prototypes are a way of relating objects so that one, the prototype, can provide default values for another.

Finally, we crunch out with a review of patterns for the proper application of classless patterns.

FVCP had a speaker drop out on the day of a meetup, and I was able to combine two previous talks to make sure members got some good content.

Comments Off

An Exercise in Extreme Modularity at ChicagoRuby

I have a rails project which is composed of gems. One of those gems is a rails app which depends on the others.

This was an on-the-spot lightning talk put together with only a few minutes preparation.

Comments Off

Paths, Properties, Paint: HTML5 Canvas and the Pervasive Pixel Painting Protocol at HTML5 Milwaukee

Sometimes, stacking divs and fiddling with CSS just doesn’t cut it. The canvas tag gives us an escape hatch – an infamous blank rectangle. Unlike applets and Flash, canvas is orchestrated by the same javascript you already use to run your web site. Canvas is a strange beast however; while it gives us a “blank canvas” perfect for painting and blending effects, the API is largely vector based, which makes it easy to do shapes and outlines that can be smoothly transformed.

We’ll take a deep dive into the way canvas “thinks” – the drawing model that you’ll need to bend it to your will. This same drawing model reappears in a number of other systems. Along the way we’ll also take a short peek into computing history to see how this hybrid vector/raster model came about.

Comments Off

Jump to Errors in Ruby Koans with VIM

I attended a Ruby Koans hack night the other day. Since I already know most of Ruby, I decided to see if I could get VIM’s make quickfix support running on the koans – the program prints a file and line, so at best it will just work and at worst I’ll have to get into writing an output parser.

Quickfix Mode

Quickfix mode (:help quickfix) is a feature of VIM designed for grabbing compiler output and stepping through the errors and warnings. VIM parses it into a list of file, line, message. It can jump you to the file in question, and has facilities to step back and forth through the list. Quickfix mode is also used by vimgrep and the Ack plugin to allow you to step through search results – which is where I spend no small part of my time.

WIth the ack plugin:

:Ack mystery_method

The plugin auto-opens the quickfix window. You can use :copen to do it yourself. Once you’ve got a list of search results (visible or hidden), you can step through the list with :cn[next] and :cp[revious]. I do this so much that I bound C-n to :cn

nnoremap <leader>a :Ack 
nnoremap <C-n> :cn<cr>

Make

The :make command runs the make program, make by default, and puts you into quickfix if there is anything that looks like a file-line pair. The make program is defined by the vim setting makeprg. I don’t do the koans very often, so I just set it at runtime.

" wrong
:set makeprg=rake

Unfortunately, this simple version doesn’t quite work. The koans helpfully provide text coloring, which is great for terminal use, but VIM sucks the control codes into the filename and gets confused when it can’t find the file. I initially hacked the rakefile to remove the offending codes, but with a moment’s reflection I realized that the koans might just have an option to deal with this. A little code inspection turned up the NO_COLOR environment variable.

There is just one more complication: you need a space between an env variable and the command, but spaces separate settings passed to the :set command. So, we’ll have to escape the spaces.

" right
:set makeprg=NO_COLOR=true\ rake

Now just :make and VIM should jump you straight to the first line that needs your attention. The koans only report one error at a time, so you’ll need to :make after every change – this might be a good time for a runtime keybinding.

Comments Off

Intro to Ruby at Elgin Technology Center

Ruby is a dynamic, object-oriented programming language with lots of cool stuff. It has attracted a community of creative, fun-loving, passionate people, who have generated a great quantity of conferences, videos, web sites, tools, companies, and hot job market to boot.

Comments Off

Paths, Properties, Paint: HTML5 Canvas and the Pervasive Pixel Painting Protocol at Fox Valley Computing Professionals

Sometimes, stacking divs and fiddling with CSS just doesn’t cut it. The canvas tag gives us an escape hatch – an infamous blank rectangle. Unlike applets and Flash, canvas is orchestrated by the same javascript you already use to run your web site. Canvas is a strange beast however; while it gives us a “blank canvas” perfect for painting and blending effects, the API is largely vector based, which makes it easy to do shapes and outlines that can be smoothly transformed.

We’ll take a deep dive into the way canvas “thinks” – the drawing model that you’ll need to bend it to your will. This same drawing model reappears in a number of other systems. Along the way we’ll also take a short peek into computing history to see how this hybrid vector/raster model came about.

Comments Off